diff --git a/CHANGELOG.md b/CHANGELOG.md index 1402554701..760e85892e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) +## 65.53.0 - 2023-11-14 +### Added +- Support for the PostgreSQL service +- Support for new operations in the Identity Domains service +- Support for enabling, disabling, and renewing SSL/TLS in the Big Data service +- Support for diarization in the AI Speech service +- Support for Capacity Topology API in the Compute service + +### Breaking Changes +- The type of property `Status` was changed from `*string` to `MyRequestStatusEnum` in the `MyRequest` model in the Identity Domains service + + ## 65.52.1 - 2023-11-07 ### Added - Support for Java Management Service Downloads diff --git a/Makefile b/Makefile index 15addb5141..871c565b4c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ DOC_SERVER_URL=https:\/\/docs.cloud.oracle.com -GEN_TARGETS = identity core objectstorage loadbalancer database audit dns filestorage email containerengine resourcesearch keymanagement announcementsservice healthchecks waas autoscaling streaming ons monitoring resourcemanager budget workrequests functions limits events dts oce oda analytics integration osmanagement marketplace apigateway applicationmigration datacatalog dataflow datascience nosql secrets vault bds cims datasafe mysql dataintegration ocvp usageapi blockchain loggingingestion logging loganalytics managementdashboard sch loggingsearch managementagent cloudguard opsi computeinstanceagent optimizer tenantmanagercontrolplane rover databasemanagement artifacts apmsynthetics goldengate apmcontrolplane apmtraces networkloadbalancer vulnerabilityscanning databasemigration servicecatalog ailanguage operatoraccesscontrol bastion genericartifactscontent jms devops aianomalydetection datalabelingservice datalabelingservicedataplane apmconfig waf certificates certificatesmanagement usage databasetools servicemanagerproxy appmgmtcontrol ospgateway identitydataplane visualbuilder osubusage osubsubscription osuborganizationsubscription osubbillingschedule dashboardservice threatintelligence aivision aispeech stackmonitoring servicemesh adm licensemanager onesubscription governancerulescontrolplane waa networkfirewall vnmonitoring emwarehouse lockbox fusionapps mediaservices opa opensearch cloudmigrations cloudbridge disasterrecovery containerinstances aidocument queue recovery vbsinst identitydomains accessgovernancecp ocicontrolcenter osmanagementhub fleetsoftwareupdate computecloudatcustomer marketplacepublisher redis jmsjavadownloads ##SPECNAME## +GEN_TARGETS = identity core objectstorage loadbalancer database audit dns filestorage email containerengine resourcesearch keymanagement announcementsservice healthchecks waas autoscaling streaming ons monitoring resourcemanager budget workrequests functions limits events dts oce oda analytics integration osmanagement marketplace apigateway applicationmigration datacatalog dataflow datascience nosql secrets vault bds cims datasafe mysql dataintegration ocvp usageapi blockchain loggingingestion logging loganalytics managementdashboard sch loggingsearch managementagent cloudguard opsi computeinstanceagent optimizer tenantmanagercontrolplane rover databasemanagement artifacts apmsynthetics goldengate apmcontrolplane apmtraces networkloadbalancer vulnerabilityscanning databasemigration servicecatalog ailanguage operatoraccesscontrol bastion genericartifactscontent jms devops aianomalydetection datalabelingservice datalabelingservicedataplane apmconfig waf certificates certificatesmanagement usage databasetools servicemanagerproxy appmgmtcontrol ospgateway identitydataplane visualbuilder osubusage osubsubscription osuborganizationsubscription osubbillingschedule dashboardservice threatintelligence aivision aispeech stackmonitoring servicemesh adm licensemanager onesubscription governancerulescontrolplane waa networkfirewall vnmonitoring emwarehouse lockbox fusionapps mediaservices opa opensearch cloudmigrations cloudbridge disasterrecovery containerinstances aidocument queue recovery vbsinst identitydomains accessgovernancecp ocicontrolcenter osmanagementhub fleetsoftwareupdate computecloudatcustomer marketplacepublisher redis jmsjavadownloads psql ##SPECNAME## NON_GEN_TARGETS = common common/auth objectstorage/transfer example TARGETS = $(NON_GEN_TARGETS) $(GEN_TARGETS) diff --git a/aispeech/create_transcription_job_details.go b/aispeech/create_transcription_job_details.go index 74bc5e7a63..d353eee021 100644 --- a/aispeech/create_transcription_job_details.go +++ b/aispeech/create_transcription_job_details.go @@ -40,11 +40,11 @@ type CreateTranscriptionJobDetails struct { Normalization *TranscriptionNormalization `mandatory:"false" json:"normalization"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. - // Example: `{"bar-key": "value"}` + // Example: `{"bar-key": "value"}`. FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // Example: `{"foo-namespace": {"bar-key": "value"}}` + // Example: `{"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}`. DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } diff --git a/aispeech/diarization.go b/aispeech/diarization.go new file mode 100644 index 0000000000..8b87e21653 --- /dev/null +++ b/aispeech/diarization.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. + +// Speech API +// +// The OCI Speech Service harnesses the power of spoken language by allowing developers to easily convert file-based data containing human speech into highly accurate text transcriptions. +// + +package aispeech + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Diarization Speaker diarization is a combination of speaker segmentation and speaker clustering. Provide diarization details to enable this feature. +type Diarization struct { + + // Set true to enable Speaker diarization and tag transcription with speaker tags. By default this is disabled. + IsDiarizationEnabled *bool `mandatory:"false" json:"isDiarizationEnabled"` + + // Number of speakers in the audio provided. By default service will auto detect all speakers in audio file + NumberOfSpeakers *int `mandatory:"false" json:"numberOfSpeakers"` +} + +func (m Diarization) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Diarization) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aispeech/transcription_job.go b/aispeech/transcription_job.go index 1d2eedb5dc..5a866f639d 100644 --- a/aispeech/transcription_job.go +++ b/aispeech/transcription_job.go @@ -76,15 +76,15 @@ type TranscriptionJob struct { LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. - // Example: `{"bar-key": "value"}` + // Example: `{"bar-key": "value"}`. FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // Example: `{"foo-namespace": {"bar-key": "value"}}` + // Example: `{"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}`. DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` // Usage of system tag keys. These predefined keys are scoped to namespaces. - // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}`. SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` } diff --git a/aispeech/transcription_job_summary.go b/aispeech/transcription_job_summary.go index eca5b807f1..f7dc9b26b5 100644 --- a/aispeech/transcription_job_summary.go +++ b/aispeech/transcription_job_summary.go @@ -58,15 +58,15 @@ type TranscriptionJobSummary struct { LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. - // Example: `{"bar-key": "value"}` + // Example: `{"bar-key": "value"}`. FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // Example: `{"foo-namespace": {"bar-key": "value"}}` + // Example: `{"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}`. DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` // Usage of system tag keys. These predefined keys are scoped to namespaces. - // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}`. SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` } diff --git a/aispeech/transcription_model_details.go b/aispeech/transcription_model_details.go index 394eb28947..8e004fcd12 100644 --- a/aispeech/transcription_model_details.go +++ b/aispeech/transcription_model_details.go @@ -33,6 +33,8 @@ type TranscriptionModelDetails struct { // - de-DE: German - Germany // - it-IT: Italian - Italy LanguageCode TranscriptionModelDetailsLanguageCodeEnum `mandatory:"false" json:"languageCode,omitempty"` + + TranscriptionSettings *TranscriptionSettings `mandatory:"false" json:"transcriptionSettings"` } func (m TranscriptionModelDetails) String() string { diff --git a/aispeech/transcription_settings.go b/aispeech/transcription_settings.go new file mode 100644 index 0000000000..248845fe06 --- /dev/null +++ b/aispeech/transcription_settings.go @@ -0,0 +1,37 @@ +// 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. + +// Speech API +// +// The OCI Speech Service harnesses the power of spoken language by allowing developers to easily convert file-based data containing human speech into highly accurate text transcriptions. +// + +package aispeech + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TranscriptionSettings Processes to perform on the generated transcription. +type TranscriptionSettings struct { + Diarization *Diarization `mandatory:"false" json:"diarization"` +} + +func (m TranscriptionSettings) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TranscriptionSettings) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/aispeech/update_transcription_job_details.go b/aispeech/update_transcription_job_details.go index 31792734fe..1f1e85b5c9 100644 --- a/aispeech/update_transcription_job_details.go +++ b/aispeech/update_transcription_job_details.go @@ -25,11 +25,11 @@ type UpdateTranscriptionJobDetails struct { Description *string `mandatory:"false" json:"description"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. - // Example: `{"bar-key": "value"}` + // Example: `{"bar-key": "value"}`. FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` // Defined tags for this resource. Each key is predefined and scoped to a namespace. - // Example: `{"foo-namespace": {"bar-key": "value"}}` + // Example: `{"foo-namespace-1": {"bar-key-1": "value-1", "bar-key-2": "value-2"}, "foo-namespace-2": {"bar-key-1": "value-1", "bar-key-2": "value-2"}}`. DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` } diff --git a/bds/bds_client.go b/bds/bds_client.go index cc47898f34..4ca6dc7e6b 100644 --- a/bds/bds_client.go +++ b/bds/bds_client.go @@ -587,6 +587,68 @@ func (client BdsClient) addWorkerNodes(ctx context.Context, request common.OCIRe return response, err } +// CertificateServiceInfo A list of services and their certificate details. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/CertificateServiceInfo.go.html to see an example of how to use CertificateServiceInfo API. +func (client BdsClient) CertificateServiceInfo(ctx context.Context, request CertificateServiceInfoRequest) (response CertificateServiceInfoResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.certificateServiceInfo, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CertificateServiceInfoResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CertificateServiceInfoResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CertificateServiceInfoResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CertificateServiceInfoResponse") + } + return +} + +// certificateServiceInfo implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) certificateServiceInfo(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/actions/fetchOdhServiceCertificate", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CertificateServiceInfoResponse + 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/bigdata/20190531/BdsInstance/CertificateServiceInfo" + err = common.PostProcessServiceError(err, "Bds", "CertificateServiceInfo", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ChangeBdsInstanceCompartment Moves a Big Data Service cluster into a different compartment. // // # See also @@ -1068,6 +1130,130 @@ func (client BdsClient) deleteBdsMetastoreConfiguration(ctx context.Context, req return response, err } +// DisableCertificate Disabling TLS/SSL for various ODH services running on the BDS cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/DisableCertificate.go.html to see an example of how to use DisableCertificate API. +func (client BdsClient) DisableCertificate(ctx context.Context, request DisableCertificateRequest) (response DisableCertificateResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.disableCertificate, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DisableCertificateResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DisableCertificateResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DisableCertificateResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DisableCertificateResponse") + } + return +} + +// disableCertificate implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) disableCertificate(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/actions/disableOdhServiceCertificate", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DisableCertificateResponse + 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/bigdata/20190531/BdsInstance/DisableCertificate" + err = common.PostProcessServiceError(err, "Bds", "DisableCertificate", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// EnableCertificate Configuring TLS/SSL for various ODH services running on the BDS cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/EnableCertificate.go.html to see an example of how to use EnableCertificate API. +func (client BdsClient) EnableCertificate(ctx context.Context, request EnableCertificateRequest) (response EnableCertificateResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.enableCertificate, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = EnableCertificateResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = EnableCertificateResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(EnableCertificateResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into EnableCertificateResponse") + } + return +} + +// enableCertificate implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) enableCertificate(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/actions/enableOdhServiceCertificate", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response EnableCertificateResponse + 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/bigdata/20190531/BdsInstance/EnableCertificate" + err = common.PostProcessServiceError(err, "Bds", "EnableCertificate", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ExecuteBootstrapScript Execute bootstrap script. // // # See also @@ -2419,6 +2605,68 @@ func (client BdsClient) removeNode(ctx context.Context, request common.OCIReques return response, err } +// RenewCertificate Renewing TLS/SSL for various ODH services running on the BDS cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/RenewCertificate.go.html to see an example of how to use RenewCertificate API. +func (client BdsClient) RenewCertificate(ctx context.Context, request RenewCertificateRequest) (response RenewCertificateResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.renewCertificate, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RenewCertificateResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RenewCertificateResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RenewCertificateResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RenewCertificateResponse") + } + return +} + +// renewCertificate implements the OCIOperation interface (enables retrying operations) +func (client BdsClient) renewCertificate(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/bdsInstances/{bdsInstanceId}/actions/renewOdhServiceCertificate", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response RenewCertificateResponse + 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/bigdata/20190531/BdsInstance/RenewCertificate" + err = common.PostProcessServiceError(err, "Bds", "RenewCertificate", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // RestartNode Restarts a single node of a Big Data Service cluster // // # See also diff --git a/bds/certificate_service_info_details.go b/bds/certificate_service_info_details.go new file mode 100644 index 0000000000..18570101bd --- /dev/null +++ b/bds/certificate_service_info_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. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CertificateServiceInfoDetails Details for certificate service info +type CertificateServiceInfoDetails struct { + + // List of services for which TLS/SSL needs to be enabled. + Services []ServiceEnum `mandatory:"true" json:"services"` +} + +func (m CertificateServiceInfoDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CertificateServiceInfoDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/certificate_service_info_request_response.go b/bds/certificate_service_info_request_response.go new file mode 100644 index 0000000000..29ad4b07b2 --- /dev/null +++ b/bds/certificate_service_info_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 bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CertificateServiceInfoRequest wrapper for the CertificateServiceInfo operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/CertificateServiceInfo.go.html to see an example of how to use CertificateServiceInfoRequest. +type CertificateServiceInfoRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // Details for certificate service info + CertificateServiceInfoDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error, without risk of executing that same action again. Retry tokens expire after 24 + // hours but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CertificateServiceInfoRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CertificateServiceInfoRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CertificateServiceInfoRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CertificateServiceInfoRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CertificateServiceInfoRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CertificateServiceInfoResponse wrapper for the CertificateServiceInfo operation +type CertificateServiceInfoResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []CertificateServiceInfoSummary instance + Items []CertificateServiceInfoSummary `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CertificateServiceInfoResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CertificateServiceInfoResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/bds/certificate_service_info_summary.go b/bds/certificate_service_info_summary.go new file mode 100644 index 0000000000..95e7983944 --- /dev/null +++ b/bds/certificate_service_info_summary.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. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CertificateServiceInfoSummary List of TLS/SSL information of services +type CertificateServiceInfoSummary struct { + + // Name of the service + Service CertificateServiceInfoSummaryServiceEnum `mandatory:"true" json:"service"` + + // Whether certificate is enabled or disabled + ServiceCertificateStatus CertificateServiceInfoSummaryServiceCertificateStatusEnum `mandatory:"true" json:"serviceCertificateStatus"` + + // List of Host specific certificate details + HostSpecificCertificateDetails []HostSpecificCertificateDetails `mandatory:"true" json:"hostSpecificCertificateDetails"` +} + +func (m CertificateServiceInfoSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CertificateServiceInfoSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingCertificateServiceInfoSummaryServiceEnum(string(m.Service)); !ok && m.Service != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Service: %s. Supported values are: %s.", m.Service, strings.Join(GetCertificateServiceInfoSummaryServiceEnumStringValues(), ","))) + } + if _, ok := GetMappingCertificateServiceInfoSummaryServiceCertificateStatusEnum(string(m.ServiceCertificateStatus)); !ok && m.ServiceCertificateStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ServiceCertificateStatus: %s. Supported values are: %s.", m.ServiceCertificateStatus, strings.Join(GetCertificateServiceInfoSummaryServiceCertificateStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CertificateServiceInfoSummaryServiceEnum Enum with underlying type: string +type CertificateServiceInfoSummaryServiceEnum string + +// Set of constants representing the allowable values for CertificateServiceInfoSummaryServiceEnum +const ( + CertificateServiceInfoSummaryServiceZookeeper CertificateServiceInfoSummaryServiceEnum = "ZOOKEEPER" + CertificateServiceInfoSummaryServiceAms CertificateServiceInfoSummaryServiceEnum = "AMS" + CertificateServiceInfoSummaryServiceHdfs CertificateServiceInfoSummaryServiceEnum = "HDFS" + CertificateServiceInfoSummaryServiceYarn CertificateServiceInfoSummaryServiceEnum = "YARN" + CertificateServiceInfoSummaryServiceMapreduce CertificateServiceInfoSummaryServiceEnum = "MAPREDUCE" + CertificateServiceInfoSummaryServiceOozie CertificateServiceInfoSummaryServiceEnum = "OOZIE" + CertificateServiceInfoSummaryServiceHbase CertificateServiceInfoSummaryServiceEnum = "HBASE" + CertificateServiceInfoSummaryServiceSpark CertificateServiceInfoSummaryServiceEnum = "SPARK" + CertificateServiceInfoSummaryServiceHive CertificateServiceInfoSummaryServiceEnum = "HIVE" + CertificateServiceInfoSummaryServiceKafka CertificateServiceInfoSummaryServiceEnum = "KAFKA" + CertificateServiceInfoSummaryServiceFlink CertificateServiceInfoSummaryServiceEnum = "FLINK" + CertificateServiceInfoSummaryServiceRegistry CertificateServiceInfoSummaryServiceEnum = "REGISTRY" +) + +var mappingCertificateServiceInfoSummaryServiceEnum = map[string]CertificateServiceInfoSummaryServiceEnum{ + "ZOOKEEPER": CertificateServiceInfoSummaryServiceZookeeper, + "AMS": CertificateServiceInfoSummaryServiceAms, + "HDFS": CertificateServiceInfoSummaryServiceHdfs, + "YARN": CertificateServiceInfoSummaryServiceYarn, + "MAPREDUCE": CertificateServiceInfoSummaryServiceMapreduce, + "OOZIE": CertificateServiceInfoSummaryServiceOozie, + "HBASE": CertificateServiceInfoSummaryServiceHbase, + "SPARK": CertificateServiceInfoSummaryServiceSpark, + "HIVE": CertificateServiceInfoSummaryServiceHive, + "KAFKA": CertificateServiceInfoSummaryServiceKafka, + "FLINK": CertificateServiceInfoSummaryServiceFlink, + "REGISTRY": CertificateServiceInfoSummaryServiceRegistry, +} + +var mappingCertificateServiceInfoSummaryServiceEnumLowerCase = map[string]CertificateServiceInfoSummaryServiceEnum{ + "zookeeper": CertificateServiceInfoSummaryServiceZookeeper, + "ams": CertificateServiceInfoSummaryServiceAms, + "hdfs": CertificateServiceInfoSummaryServiceHdfs, + "yarn": CertificateServiceInfoSummaryServiceYarn, + "mapreduce": CertificateServiceInfoSummaryServiceMapreduce, + "oozie": CertificateServiceInfoSummaryServiceOozie, + "hbase": CertificateServiceInfoSummaryServiceHbase, + "spark": CertificateServiceInfoSummaryServiceSpark, + "hive": CertificateServiceInfoSummaryServiceHive, + "kafka": CertificateServiceInfoSummaryServiceKafka, + "flink": CertificateServiceInfoSummaryServiceFlink, + "registry": CertificateServiceInfoSummaryServiceRegistry, +} + +// GetCertificateServiceInfoSummaryServiceEnumValues Enumerates the set of values for CertificateServiceInfoSummaryServiceEnum +func GetCertificateServiceInfoSummaryServiceEnumValues() []CertificateServiceInfoSummaryServiceEnum { + values := make([]CertificateServiceInfoSummaryServiceEnum, 0) + for _, v := range mappingCertificateServiceInfoSummaryServiceEnum { + values = append(values, v) + } + return values +} + +// GetCertificateServiceInfoSummaryServiceEnumStringValues Enumerates the set of values in String for CertificateServiceInfoSummaryServiceEnum +func GetCertificateServiceInfoSummaryServiceEnumStringValues() []string { + return []string{ + "ZOOKEEPER", + "AMS", + "HDFS", + "YARN", + "MAPREDUCE", + "OOZIE", + "HBASE", + "SPARK", + "HIVE", + "KAFKA", + "FLINK", + "REGISTRY", + } +} + +// GetMappingCertificateServiceInfoSummaryServiceEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCertificateServiceInfoSummaryServiceEnum(val string) (CertificateServiceInfoSummaryServiceEnum, bool) { + enum, ok := mappingCertificateServiceInfoSummaryServiceEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// CertificateServiceInfoSummaryServiceCertificateStatusEnum Enum with underlying type: string +type CertificateServiceInfoSummaryServiceCertificateStatusEnum string + +// Set of constants representing the allowable values for CertificateServiceInfoSummaryServiceCertificateStatusEnum +const ( + CertificateServiceInfoSummaryServiceCertificateStatusEnabled CertificateServiceInfoSummaryServiceCertificateStatusEnum = "ENABLED" + CertificateServiceInfoSummaryServiceCertificateStatusDisabled CertificateServiceInfoSummaryServiceCertificateStatusEnum = "DISABLED" +) + +var mappingCertificateServiceInfoSummaryServiceCertificateStatusEnum = map[string]CertificateServiceInfoSummaryServiceCertificateStatusEnum{ + "ENABLED": CertificateServiceInfoSummaryServiceCertificateStatusEnabled, + "DISABLED": CertificateServiceInfoSummaryServiceCertificateStatusDisabled, +} + +var mappingCertificateServiceInfoSummaryServiceCertificateStatusEnumLowerCase = map[string]CertificateServiceInfoSummaryServiceCertificateStatusEnum{ + "enabled": CertificateServiceInfoSummaryServiceCertificateStatusEnabled, + "disabled": CertificateServiceInfoSummaryServiceCertificateStatusDisabled, +} + +// GetCertificateServiceInfoSummaryServiceCertificateStatusEnumValues Enumerates the set of values for CertificateServiceInfoSummaryServiceCertificateStatusEnum +func GetCertificateServiceInfoSummaryServiceCertificateStatusEnumValues() []CertificateServiceInfoSummaryServiceCertificateStatusEnum { + values := make([]CertificateServiceInfoSummaryServiceCertificateStatusEnum, 0) + for _, v := range mappingCertificateServiceInfoSummaryServiceCertificateStatusEnum { + values = append(values, v) + } + return values +} + +// GetCertificateServiceInfoSummaryServiceCertificateStatusEnumStringValues Enumerates the set of values in String for CertificateServiceInfoSummaryServiceCertificateStatusEnum +func GetCertificateServiceInfoSummaryServiceCertificateStatusEnumStringValues() []string { + return []string{ + "ENABLED", + "DISABLED", + } +} + +// GetMappingCertificateServiceInfoSummaryServiceCertificateStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCertificateServiceInfoSummaryServiceCertificateStatusEnum(val string) (CertificateServiceInfoSummaryServiceCertificateStatusEnum, bool) { + enum, ok := mappingCertificateServiceInfoSummaryServiceCertificateStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/bds/disable_certificate_details.go b/bds/disable_certificate_details.go new file mode 100644 index 0000000000..7d200d649a --- /dev/null +++ b/bds/disable_certificate_details.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. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DisableCertificateDetails The request body info about disable certificate service list. +type DisableCertificateDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` + + // List of services for which certificate needs to be disabled. + Services []ServiceEnum `mandatory:"true" json:"services"` +} + +func (m DisableCertificateDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DisableCertificateDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/disable_certificate_request_response.go b/bds/disable_certificate_request_response.go new file mode 100644 index 0000000000..688fb0fe4c --- /dev/null +++ b/bds/disable_certificate_request_response.go @@ -0,0 +1,107 @@ +// 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 bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DisableCertificateRequest wrapper for the DisableCertificate operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/DisableCertificate.go.html to see an example of how to use DisableCertificateRequest. +type DisableCertificateRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // Details for disabling certificate. + DisableCertificateDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error, without risk of executing that same action again. Retry tokens expire after 24 + // hours but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DisableCertificateRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DisableCertificateRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DisableCertificateRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DisableCertificateRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DisableCertificateRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DisableCertificateResponse wrapper for the DisableCertificate operation +type DisableCertificateResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this 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 DisableCertificateResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DisableCertificateResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/bds/enable_certificate_details.go b/bds/enable_certificate_details.go new file mode 100644 index 0000000000..ff09f76156 --- /dev/null +++ b/bds/enable_certificate_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. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// EnableCertificateDetails The request body info about configure certificate service list. +type EnableCertificateDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` + + // List of services for which certificate needs to be enabled. + Services []ServiceEnum `mandatory:"true" json:"services"` + + // Plain text certificate/s in order, separated by new line character. If not provided in request a self-signed root certificate is generated inside the cluster. In case hostCertDetails is provided, root certificate is mandatory. + RootCertificate *string `mandatory:"false" json:"rootCertificate"` + + // List of leaf certificates to use for services on each host. If custom host certificate is provided the root certificate becomes required. + HostCertDetails []HostCertDetails `mandatory:"false" json:"hostCertDetails"` + + // Base-64 encoded password for CA certificate's private key. This value can be empty. + ServerKeyPassword *string `mandatory:"false" json:"serverKeyPassword"` +} + +func (m EnableCertificateDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m EnableCertificateDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/enable_certificate_request_response.go b/bds/enable_certificate_request_response.go new file mode 100644 index 0000000000..225e7af7a0 --- /dev/null +++ b/bds/enable_certificate_request_response.go @@ -0,0 +1,107 @@ +// 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 bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// EnableCertificateRequest wrapper for the EnableCertificate operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/EnableCertificate.go.html to see an example of how to use EnableCertificateRequest. +type EnableCertificateRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // Details for configuring certificate. + EnableCertificateDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error, without risk of executing that same action again. Retry tokens expire after 24 + // hours but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request EnableCertificateRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request EnableCertificateRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request EnableCertificateRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request EnableCertificateRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request EnableCertificateRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// EnableCertificateResponse wrapper for the EnableCertificate operation +type EnableCertificateResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this 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 EnableCertificateResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response EnableCertificateResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/bds/host_cert_details.go b/bds/host_cert_details.go new file mode 100644 index 0000000000..8764b98582 --- /dev/null +++ b/bds/host_cert_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. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// HostCertDetails Details about the host and corresponding certificate. +type HostCertDetails struct { + + // Fully qualified domain name (FQDN) of the host + HostName *string `mandatory:"true" json:"hostName"` + + // Certificate value in string format + Certificate *string `mandatory:"true" json:"certificate"` + + // Private key of the provided certificate + PrivateKey *string `mandatory:"true" json:"privateKey"` +} + +func (m HostCertDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m HostCertDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/host_specific_certificate_details.go b/bds/host_specific_certificate_details.go new file mode 100644 index 0000000000..2e8f541d51 --- /dev/null +++ b/bds/host_specific_certificate_details.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. +// Code generated. DO NOT EDIT. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// HostSpecificCertificateDetails Host specific certificate details +type HostSpecificCertificateDetails struct { + + // Name of the host. + HostName *string `mandatory:"false" json:"hostName"` + + // Type of certificate self signed or CA signed + CertificateType HostSpecificCertificateDetailsCertificateTypeEnum `mandatory:"false" json:"certificateType,omitempty"` + + // The time the certificate expires, shown as an RFC 3339 formatted datetime string. + TimeExpiry *common.SDKTime `mandatory:"false" json:"timeExpiry"` +} + +func (m HostSpecificCertificateDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m HostSpecificCertificateDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingHostSpecificCertificateDetailsCertificateTypeEnum(string(m.CertificateType)); !ok && m.CertificateType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CertificateType: %s. Supported values are: %s.", m.CertificateType, strings.Join(GetHostSpecificCertificateDetailsCertificateTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// HostSpecificCertificateDetailsCertificateTypeEnum Enum with underlying type: string +type HostSpecificCertificateDetailsCertificateTypeEnum string + +// Set of constants representing the allowable values for HostSpecificCertificateDetailsCertificateTypeEnum +const ( + HostSpecificCertificateDetailsCertificateTypeCustomSigned HostSpecificCertificateDetailsCertificateTypeEnum = "CUSTOM_SIGNED" + HostSpecificCertificateDetailsCertificateTypeSelfSigned HostSpecificCertificateDetailsCertificateTypeEnum = "SELF_SIGNED" +) + +var mappingHostSpecificCertificateDetailsCertificateTypeEnum = map[string]HostSpecificCertificateDetailsCertificateTypeEnum{ + "CUSTOM_SIGNED": HostSpecificCertificateDetailsCertificateTypeCustomSigned, + "SELF_SIGNED": HostSpecificCertificateDetailsCertificateTypeSelfSigned, +} + +var mappingHostSpecificCertificateDetailsCertificateTypeEnumLowerCase = map[string]HostSpecificCertificateDetailsCertificateTypeEnum{ + "custom_signed": HostSpecificCertificateDetailsCertificateTypeCustomSigned, + "self_signed": HostSpecificCertificateDetailsCertificateTypeSelfSigned, +} + +// GetHostSpecificCertificateDetailsCertificateTypeEnumValues Enumerates the set of values for HostSpecificCertificateDetailsCertificateTypeEnum +func GetHostSpecificCertificateDetailsCertificateTypeEnumValues() []HostSpecificCertificateDetailsCertificateTypeEnum { + values := make([]HostSpecificCertificateDetailsCertificateTypeEnum, 0) + for _, v := range mappingHostSpecificCertificateDetailsCertificateTypeEnum { + values = append(values, v) + } + return values +} + +// GetHostSpecificCertificateDetailsCertificateTypeEnumStringValues Enumerates the set of values in String for HostSpecificCertificateDetailsCertificateTypeEnum +func GetHostSpecificCertificateDetailsCertificateTypeEnumStringValues() []string { + return []string{ + "CUSTOM_SIGNED", + "SELF_SIGNED", + } +} + +// GetMappingHostSpecificCertificateDetailsCertificateTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingHostSpecificCertificateDetailsCertificateTypeEnum(val string) (HostSpecificCertificateDetailsCertificateTypeEnum, bool) { + enum, ok := mappingHostSpecificCertificateDetailsCertificateTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/bds/operation_types.go b/bds/operation_types.go index 8598b8403d..4410eed6ea 100644 --- a/bds/operation_types.go +++ b/bds/operation_types.go @@ -18,117 +18,120 @@ type OperationTypesEnum string // Set of constants representing the allowable values for OperationTypesEnum const ( - OperationTypesCreateBds OperationTypesEnum = "CREATE_BDS" - OperationTypesUpdateBds OperationTypesEnum = "UPDATE_BDS" - OperationTypesDeleteBds OperationTypesEnum = "DELETE_BDS" - OperationTypesAddBlockStorage OperationTypesEnum = "ADD_BLOCK_STORAGE" - OperationTypesAddMasterNodes OperationTypesEnum = "ADD_MASTER_NODES" - OperationTypesAddUtilityNodes OperationTypesEnum = "ADD_UTILITY_NODES" - OperationTypesAddWorkerNodes OperationTypesEnum = "ADD_WORKER_NODES" - OperationTypesAddCloudSql OperationTypesEnum = "ADD_CLOUD_SQL" - OperationTypesRemoveCloudSql OperationTypesEnum = "REMOVE_CLOUD_SQL" - OperationTypesChangeCompartmentForBds OperationTypesEnum = "CHANGE_COMPARTMENT_FOR_BDS" - OperationTypesChangeShape OperationTypesEnum = "CHANGE_SHAPE" - OperationTypesUpdateInfra OperationTypesEnum = "UPDATE_INFRA" - OperationTypesRestartNode OperationTypesEnum = "RESTART_NODE" - OperationTypesRemoveNode OperationTypesEnum = "REMOVE_NODE" - OperationTypesCreateAutoscaleConfig OperationTypesEnum = "CREATE_AUTOSCALE_CONFIG" - OperationTypesUpdateAutoscaleConfig OperationTypesEnum = "UPDATE_AUTOSCALE_CONFIG" - OperationTypesDeleteAutoscaleConfig OperationTypesEnum = "DELETE_AUTOSCALE_CONFIG" - OperationTypesAutoscaleConfig OperationTypesEnum = "AUTOSCALE_CONFIG" - OperationTypesAutoscaleRun OperationTypesEnum = "AUTOSCALE_RUN" - OperationTypesCreateApiKey OperationTypesEnum = "CREATE_API_KEY" - OperationTypesDeleteApiKey OperationTypesEnum = "DELETE_API_KEY" - OperationTypesTestObjectStoreConnection OperationTypesEnum = "TEST_OBJECT_STORE_CONNECTION" - OperationTypesCreateMetastoreConfig OperationTypesEnum = "CREATE_METASTORE_CONFIG" - OperationTypesDeleteMetastoreConfig OperationTypesEnum = "DELETE_METASTORE_CONFIG" - OperationTypesUpdateMetastoreConfig OperationTypesEnum = "UPDATE_METASTORE_CONFIG" - OperationTypesActivateMetastoreConfig OperationTypesEnum = "ACTIVATE_METASTORE_CONFIG" - OperationTypesTestMetastoreConfig OperationTypesEnum = "TEST_METASTORE_CONFIG" - OperationTypesPatchBds OperationTypesEnum = "PATCH_BDS" - OperationTypesPatchOdh OperationTypesEnum = "PATCH_ODH" - OperationTypesPatchOs OperationTypesEnum = "PATCH_OS" - OperationTypesStopBds OperationTypesEnum = "STOP_BDS" - OperationTypesStartBds OperationTypesEnum = "START_BDS" - OperationTypesAddKafka OperationTypesEnum = "ADD_KAFKA" - OperationTypesRemoveKafka OperationTypesEnum = "REMOVE_KAFKA" - OperationTypesExecuteBootstrapScript OperationTypesEnum = "EXECUTE_BOOTSTRAP_SCRIPT" + OperationTypesCreateBds OperationTypesEnum = "CREATE_BDS" + OperationTypesUpdateBds OperationTypesEnum = "UPDATE_BDS" + OperationTypesDeleteBds OperationTypesEnum = "DELETE_BDS" + OperationTypesAddBlockStorage OperationTypesEnum = "ADD_BLOCK_STORAGE" + OperationTypesAddMasterNodes OperationTypesEnum = "ADD_MASTER_NODES" + OperationTypesAddUtilityNodes OperationTypesEnum = "ADD_UTILITY_NODES" + OperationTypesAddWorkerNodes OperationTypesEnum = "ADD_WORKER_NODES" + OperationTypesAddCloudSql OperationTypesEnum = "ADD_CLOUD_SQL" + OperationTypesRemoveCloudSql OperationTypesEnum = "REMOVE_CLOUD_SQL" + OperationTypesChangeCompartmentForBds OperationTypesEnum = "CHANGE_COMPARTMENT_FOR_BDS" + OperationTypesChangeShape OperationTypesEnum = "CHANGE_SHAPE" + OperationTypesUpdateInfra OperationTypesEnum = "UPDATE_INFRA" + OperationTypesRestartNode OperationTypesEnum = "RESTART_NODE" + OperationTypesRemoveNode OperationTypesEnum = "REMOVE_NODE" + OperationTypesCreateAutoscaleConfig OperationTypesEnum = "CREATE_AUTOSCALE_CONFIG" + OperationTypesUpdateAutoscaleConfig OperationTypesEnum = "UPDATE_AUTOSCALE_CONFIG" + OperationTypesDeleteAutoscaleConfig OperationTypesEnum = "DELETE_AUTOSCALE_CONFIG" + OperationTypesAutoscaleConfig OperationTypesEnum = "AUTOSCALE_CONFIG" + OperationTypesAutoscaleRun OperationTypesEnum = "AUTOSCALE_RUN" + OperationTypesCreateApiKey OperationTypesEnum = "CREATE_API_KEY" + OperationTypesDeleteApiKey OperationTypesEnum = "DELETE_API_KEY" + OperationTypesTestObjectStoreConnection OperationTypesEnum = "TEST_OBJECT_STORE_CONNECTION" + OperationTypesCreateMetastoreConfig OperationTypesEnum = "CREATE_METASTORE_CONFIG" + OperationTypesDeleteMetastoreConfig OperationTypesEnum = "DELETE_METASTORE_CONFIG" + OperationTypesUpdateMetastoreConfig OperationTypesEnum = "UPDATE_METASTORE_CONFIG" + OperationTypesActivateMetastoreConfig OperationTypesEnum = "ACTIVATE_METASTORE_CONFIG" + OperationTypesTestMetastoreConfig OperationTypesEnum = "TEST_METASTORE_CONFIG" + OperationTypesPatchBds OperationTypesEnum = "PATCH_BDS" + OperationTypesPatchOdh OperationTypesEnum = "PATCH_ODH" + OperationTypesPatchOs OperationTypesEnum = "PATCH_OS" + OperationTypesStopBds OperationTypesEnum = "STOP_BDS" + OperationTypesStartBds OperationTypesEnum = "START_BDS" + OperationTypesAddKafka OperationTypesEnum = "ADD_KAFKA" + OperationTypesRemoveKafka OperationTypesEnum = "REMOVE_KAFKA" + OperationTypesExecuteBootstrapScript OperationTypesEnum = "EXECUTE_BOOTSTRAP_SCRIPT" + OperationTypesOdhServiceCertificateUpdate OperationTypesEnum = "ODH_SERVICE_CERTIFICATE_UPDATE" ) var mappingOperationTypesEnum = map[string]OperationTypesEnum{ - "CREATE_BDS": OperationTypesCreateBds, - "UPDATE_BDS": OperationTypesUpdateBds, - "DELETE_BDS": OperationTypesDeleteBds, - "ADD_BLOCK_STORAGE": OperationTypesAddBlockStorage, - "ADD_MASTER_NODES": OperationTypesAddMasterNodes, - "ADD_UTILITY_NODES": OperationTypesAddUtilityNodes, - "ADD_WORKER_NODES": OperationTypesAddWorkerNodes, - "ADD_CLOUD_SQL": OperationTypesAddCloudSql, - "REMOVE_CLOUD_SQL": OperationTypesRemoveCloudSql, - "CHANGE_COMPARTMENT_FOR_BDS": OperationTypesChangeCompartmentForBds, - "CHANGE_SHAPE": OperationTypesChangeShape, - "UPDATE_INFRA": OperationTypesUpdateInfra, - "RESTART_NODE": OperationTypesRestartNode, - "REMOVE_NODE": OperationTypesRemoveNode, - "CREATE_AUTOSCALE_CONFIG": OperationTypesCreateAutoscaleConfig, - "UPDATE_AUTOSCALE_CONFIG": OperationTypesUpdateAutoscaleConfig, - "DELETE_AUTOSCALE_CONFIG": OperationTypesDeleteAutoscaleConfig, - "AUTOSCALE_CONFIG": OperationTypesAutoscaleConfig, - "AUTOSCALE_RUN": OperationTypesAutoscaleRun, - "CREATE_API_KEY": OperationTypesCreateApiKey, - "DELETE_API_KEY": OperationTypesDeleteApiKey, - "TEST_OBJECT_STORE_CONNECTION": OperationTypesTestObjectStoreConnection, - "CREATE_METASTORE_CONFIG": OperationTypesCreateMetastoreConfig, - "DELETE_METASTORE_CONFIG": OperationTypesDeleteMetastoreConfig, - "UPDATE_METASTORE_CONFIG": OperationTypesUpdateMetastoreConfig, - "ACTIVATE_METASTORE_CONFIG": OperationTypesActivateMetastoreConfig, - "TEST_METASTORE_CONFIG": OperationTypesTestMetastoreConfig, - "PATCH_BDS": OperationTypesPatchBds, - "PATCH_ODH": OperationTypesPatchOdh, - "PATCH_OS": OperationTypesPatchOs, - "STOP_BDS": OperationTypesStopBds, - "START_BDS": OperationTypesStartBds, - "ADD_KAFKA": OperationTypesAddKafka, - "REMOVE_KAFKA": OperationTypesRemoveKafka, - "EXECUTE_BOOTSTRAP_SCRIPT": OperationTypesExecuteBootstrapScript, + "CREATE_BDS": OperationTypesCreateBds, + "UPDATE_BDS": OperationTypesUpdateBds, + "DELETE_BDS": OperationTypesDeleteBds, + "ADD_BLOCK_STORAGE": OperationTypesAddBlockStorage, + "ADD_MASTER_NODES": OperationTypesAddMasterNodes, + "ADD_UTILITY_NODES": OperationTypesAddUtilityNodes, + "ADD_WORKER_NODES": OperationTypesAddWorkerNodes, + "ADD_CLOUD_SQL": OperationTypesAddCloudSql, + "REMOVE_CLOUD_SQL": OperationTypesRemoveCloudSql, + "CHANGE_COMPARTMENT_FOR_BDS": OperationTypesChangeCompartmentForBds, + "CHANGE_SHAPE": OperationTypesChangeShape, + "UPDATE_INFRA": OperationTypesUpdateInfra, + "RESTART_NODE": OperationTypesRestartNode, + "REMOVE_NODE": OperationTypesRemoveNode, + "CREATE_AUTOSCALE_CONFIG": OperationTypesCreateAutoscaleConfig, + "UPDATE_AUTOSCALE_CONFIG": OperationTypesUpdateAutoscaleConfig, + "DELETE_AUTOSCALE_CONFIG": OperationTypesDeleteAutoscaleConfig, + "AUTOSCALE_CONFIG": OperationTypesAutoscaleConfig, + "AUTOSCALE_RUN": OperationTypesAutoscaleRun, + "CREATE_API_KEY": OperationTypesCreateApiKey, + "DELETE_API_KEY": OperationTypesDeleteApiKey, + "TEST_OBJECT_STORE_CONNECTION": OperationTypesTestObjectStoreConnection, + "CREATE_METASTORE_CONFIG": OperationTypesCreateMetastoreConfig, + "DELETE_METASTORE_CONFIG": OperationTypesDeleteMetastoreConfig, + "UPDATE_METASTORE_CONFIG": OperationTypesUpdateMetastoreConfig, + "ACTIVATE_METASTORE_CONFIG": OperationTypesActivateMetastoreConfig, + "TEST_METASTORE_CONFIG": OperationTypesTestMetastoreConfig, + "PATCH_BDS": OperationTypesPatchBds, + "PATCH_ODH": OperationTypesPatchOdh, + "PATCH_OS": OperationTypesPatchOs, + "STOP_BDS": OperationTypesStopBds, + "START_BDS": OperationTypesStartBds, + "ADD_KAFKA": OperationTypesAddKafka, + "REMOVE_KAFKA": OperationTypesRemoveKafka, + "EXECUTE_BOOTSTRAP_SCRIPT": OperationTypesExecuteBootstrapScript, + "ODH_SERVICE_CERTIFICATE_UPDATE": OperationTypesOdhServiceCertificateUpdate, } var mappingOperationTypesEnumLowerCase = map[string]OperationTypesEnum{ - "create_bds": OperationTypesCreateBds, - "update_bds": OperationTypesUpdateBds, - "delete_bds": OperationTypesDeleteBds, - "add_block_storage": OperationTypesAddBlockStorage, - "add_master_nodes": OperationTypesAddMasterNodes, - "add_utility_nodes": OperationTypesAddUtilityNodes, - "add_worker_nodes": OperationTypesAddWorkerNodes, - "add_cloud_sql": OperationTypesAddCloudSql, - "remove_cloud_sql": OperationTypesRemoveCloudSql, - "change_compartment_for_bds": OperationTypesChangeCompartmentForBds, - "change_shape": OperationTypesChangeShape, - "update_infra": OperationTypesUpdateInfra, - "restart_node": OperationTypesRestartNode, - "remove_node": OperationTypesRemoveNode, - "create_autoscale_config": OperationTypesCreateAutoscaleConfig, - "update_autoscale_config": OperationTypesUpdateAutoscaleConfig, - "delete_autoscale_config": OperationTypesDeleteAutoscaleConfig, - "autoscale_config": OperationTypesAutoscaleConfig, - "autoscale_run": OperationTypesAutoscaleRun, - "create_api_key": OperationTypesCreateApiKey, - "delete_api_key": OperationTypesDeleteApiKey, - "test_object_store_connection": OperationTypesTestObjectStoreConnection, - "create_metastore_config": OperationTypesCreateMetastoreConfig, - "delete_metastore_config": OperationTypesDeleteMetastoreConfig, - "update_metastore_config": OperationTypesUpdateMetastoreConfig, - "activate_metastore_config": OperationTypesActivateMetastoreConfig, - "test_metastore_config": OperationTypesTestMetastoreConfig, - "patch_bds": OperationTypesPatchBds, - "patch_odh": OperationTypesPatchOdh, - "patch_os": OperationTypesPatchOs, - "stop_bds": OperationTypesStopBds, - "start_bds": OperationTypesStartBds, - "add_kafka": OperationTypesAddKafka, - "remove_kafka": OperationTypesRemoveKafka, - "execute_bootstrap_script": OperationTypesExecuteBootstrapScript, + "create_bds": OperationTypesCreateBds, + "update_bds": OperationTypesUpdateBds, + "delete_bds": OperationTypesDeleteBds, + "add_block_storage": OperationTypesAddBlockStorage, + "add_master_nodes": OperationTypesAddMasterNodes, + "add_utility_nodes": OperationTypesAddUtilityNodes, + "add_worker_nodes": OperationTypesAddWorkerNodes, + "add_cloud_sql": OperationTypesAddCloudSql, + "remove_cloud_sql": OperationTypesRemoveCloudSql, + "change_compartment_for_bds": OperationTypesChangeCompartmentForBds, + "change_shape": OperationTypesChangeShape, + "update_infra": OperationTypesUpdateInfra, + "restart_node": OperationTypesRestartNode, + "remove_node": OperationTypesRemoveNode, + "create_autoscale_config": OperationTypesCreateAutoscaleConfig, + "update_autoscale_config": OperationTypesUpdateAutoscaleConfig, + "delete_autoscale_config": OperationTypesDeleteAutoscaleConfig, + "autoscale_config": OperationTypesAutoscaleConfig, + "autoscale_run": OperationTypesAutoscaleRun, + "create_api_key": OperationTypesCreateApiKey, + "delete_api_key": OperationTypesDeleteApiKey, + "test_object_store_connection": OperationTypesTestObjectStoreConnection, + "create_metastore_config": OperationTypesCreateMetastoreConfig, + "delete_metastore_config": OperationTypesDeleteMetastoreConfig, + "update_metastore_config": OperationTypesUpdateMetastoreConfig, + "activate_metastore_config": OperationTypesActivateMetastoreConfig, + "test_metastore_config": OperationTypesTestMetastoreConfig, + "patch_bds": OperationTypesPatchBds, + "patch_odh": OperationTypesPatchOdh, + "patch_os": OperationTypesPatchOs, + "stop_bds": OperationTypesStopBds, + "start_bds": OperationTypesStartBds, + "add_kafka": OperationTypesAddKafka, + "remove_kafka": OperationTypesRemoveKafka, + "execute_bootstrap_script": OperationTypesExecuteBootstrapScript, + "odh_service_certificate_update": OperationTypesOdhServiceCertificateUpdate, } // GetOperationTypesEnumValues Enumerates the set of values for OperationTypesEnum @@ -178,6 +181,7 @@ func GetOperationTypesEnumStringValues() []string { "ADD_KAFKA", "REMOVE_KAFKA", "EXECUTE_BOOTSTRAP_SCRIPT", + "ODH_SERVICE_CERTIFICATE_UPDATE", } } diff --git a/bds/renew_certificate_details.go b/bds/renew_certificate_details.go new file mode 100644 index 0000000000..9da0e8e6a7 --- /dev/null +++ b/bds/renew_certificate_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. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RenewCertificateDetails The request body info about renew certificate service list. +type RenewCertificateDetails struct { + + // Base-64 encoded password for the cluster admin user. + ClusterAdminPassword *string `mandatory:"true" json:"clusterAdminPassword"` + + // List of services for which certificate needs to be renewed. If no services provided renew will happen only for default services - AMBARI,RANGER,HUE,LIVY. + Services []ServiceEnum `mandatory:"false" json:"services"` + + // Plain text certificate/s in order, separated by new line character. If not provided in request a self-signed root certificate is generated inside the cluster. In case hostCertDetails is provided, root certificate is mandatory. + RootCertificate *string `mandatory:"false" json:"rootCertificate"` + + // List of leaf certificates to use for services on each host. If custom host certificate is provided the root certificate becomes required. + HostCertDetails []HostCertDetails `mandatory:"false" json:"hostCertDetails"` + + // Base-64 encoded password for CA certificate's private key. This value can be empty. + ServerKeyPassword *string `mandatory:"false" json:"serverKeyPassword"` +} + +func (m RenewCertificateDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RenewCertificateDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/bds/renew_certificate_request_response.go b/bds/renew_certificate_request_response.go new file mode 100644 index 0000000000..9f2a227118 --- /dev/null +++ b/bds/renew_certificate_request_response.go @@ -0,0 +1,107 @@ +// 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 bds + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RenewCertificateRequest wrapper for the RenewCertificate operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/bds/RenewCertificate.go.html to see an example of how to use RenewCertificateRequest. +type RenewCertificateRequest struct { + + // The OCID of the cluster. + BdsInstanceId *string `mandatory:"true" contributesTo:"path" name:"bdsInstanceId"` + + // Details for renewing certificate. + RenewCertificateDetails `contributesTo:"body"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error, without risk of executing that same action again. Retry tokens expire after 24 + // hours but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RenewCertificateRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RenewCertificateRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RenewCertificateRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RenewCertificateRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RenewCertificateRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RenewCertificateResponse wrapper for the RenewCertificate operation +type RenewCertificateResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a request, provide this 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 RenewCertificateResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RenewCertificateResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/bds/service.go b/bds/service.go new file mode 100644 index 0000000000..8f7f48a5ae --- /dev/null +++ b/bds/service.go @@ -0,0 +1,96 @@ +// 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. + +// Big Data Service API +// +// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. +// + +package bds + +import ( + "strings" +) + +// ServiceEnum Enum with underlying type: string +type ServiceEnum string + +// Set of constants representing the allowable values for ServiceEnum +const ( + ServiceZookeeper ServiceEnum = "ZOOKEEPER" + ServiceAms ServiceEnum = "AMS" + ServiceHdfs ServiceEnum = "HDFS" + ServiceYarn ServiceEnum = "YARN" + ServiceMapreduce ServiceEnum = "MAPREDUCE" + ServiceOozie ServiceEnum = "OOZIE" + ServiceHbase ServiceEnum = "HBASE" + ServiceSpark ServiceEnum = "SPARK" + ServiceHive ServiceEnum = "HIVE" + ServiceKafka ServiceEnum = "KAFKA" + ServiceFlink ServiceEnum = "FLINK" + ServiceRegistry ServiceEnum = "REGISTRY" +) + +var mappingServiceEnum = map[string]ServiceEnum{ + "ZOOKEEPER": ServiceZookeeper, + "AMS": ServiceAms, + "HDFS": ServiceHdfs, + "YARN": ServiceYarn, + "MAPREDUCE": ServiceMapreduce, + "OOZIE": ServiceOozie, + "HBASE": ServiceHbase, + "SPARK": ServiceSpark, + "HIVE": ServiceHive, + "KAFKA": ServiceKafka, + "FLINK": ServiceFlink, + "REGISTRY": ServiceRegistry, +} + +var mappingServiceEnumLowerCase = map[string]ServiceEnum{ + "zookeeper": ServiceZookeeper, + "ams": ServiceAms, + "hdfs": ServiceHdfs, + "yarn": ServiceYarn, + "mapreduce": ServiceMapreduce, + "oozie": ServiceOozie, + "hbase": ServiceHbase, + "spark": ServiceSpark, + "hive": ServiceHive, + "kafka": ServiceKafka, + "flink": ServiceFlink, + "registry": ServiceRegistry, +} + +// GetServiceEnumValues Enumerates the set of values for ServiceEnum +func GetServiceEnumValues() []ServiceEnum { + values := make([]ServiceEnum, 0) + for _, v := range mappingServiceEnum { + values = append(values, v) + } + return values +} + +// GetServiceEnumStringValues Enumerates the set of values in String for ServiceEnum +func GetServiceEnumStringValues() []string { + return []string{ + "ZOOKEEPER", + "AMS", + "HDFS", + "YARN", + "MAPREDUCE", + "OOZIE", + "HBASE", + "SPARK", + "HIVE", + "KAFKA", + "FLINK", + "REGISTRY", + } +} + +// GetMappingServiceEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingServiceEnum(val string) (ServiceEnum, bool) { + enum, ok := mappingServiceEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/common/version.go b/common/version.go index 74c9113e39..967e15fb13 100644 --- a/common/version.go +++ b/common/version.go @@ -12,8 +12,8 @@ import ( const ( major = "65" - minor = "52" - patch = "1" + minor = "53" + patch = "0" tag = "" ) diff --git a/core/capacity_source.go b/core/capacity_source.go new file mode 100644 index 0000000000..dd07dda0ec --- /dev/null +++ b/core/capacity_source.go @@ -0,0 +1,121 @@ +// 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" +) + +// CapacitySource A capacity source of bare metal hosts. +type CapacitySource interface { +} + +type capacitysource struct { + JsonData []byte + CapacityType string `json:"capacityType"` +} + +// UnmarshalJSON unmarshals json +func (m *capacitysource) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalercapacitysource capacitysource + s := struct { + Model Unmarshalercapacitysource + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.CapacityType = s.Model.CapacityType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *capacitysource) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.CapacityType { + case "DEDICATED": + mm := DedicatedCapacitySource{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for CapacitySource: %s.", m.CapacityType) + return *m, nil + } +} + +func (m capacitysource) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m capacitysource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CapacitySourceCapacityTypeEnum Enum with underlying type: string +type CapacitySourceCapacityTypeEnum string + +// Set of constants representing the allowable values for CapacitySourceCapacityTypeEnum +const ( + CapacitySourceCapacityTypeDedicated CapacitySourceCapacityTypeEnum = "DEDICATED" +) + +var mappingCapacitySourceCapacityTypeEnum = map[string]CapacitySourceCapacityTypeEnum{ + "DEDICATED": CapacitySourceCapacityTypeDedicated, +} + +var mappingCapacitySourceCapacityTypeEnumLowerCase = map[string]CapacitySourceCapacityTypeEnum{ + "dedicated": CapacitySourceCapacityTypeDedicated, +} + +// GetCapacitySourceCapacityTypeEnumValues Enumerates the set of values for CapacitySourceCapacityTypeEnum +func GetCapacitySourceCapacityTypeEnumValues() []CapacitySourceCapacityTypeEnum { + values := make([]CapacitySourceCapacityTypeEnum, 0) + for _, v := range mappingCapacitySourceCapacityTypeEnum { + values = append(values, v) + } + return values +} + +// GetCapacitySourceCapacityTypeEnumStringValues Enumerates the set of values in String for CapacitySourceCapacityTypeEnum +func GetCapacitySourceCapacityTypeEnumStringValues() []string { + return []string{ + "DEDICATED", + } +} + +// GetMappingCapacitySourceCapacityTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCapacitySourceCapacityTypeEnum(val string) (CapacitySourceCapacityTypeEnum, bool) { + enum, ok := mappingCapacitySourceCapacityTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/core/change_compute_capacity_topology_compartment_details.go b/core/change_compute_capacity_topology_compartment_details.go new file mode 100644 index 0000000000..42d2a37f9f --- /dev/null +++ b/core/change_compute_capacity_topology_compartment_details.go @@ -0,0 +1,46 @@ +// 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" +) + +// ChangeComputeCapacityTopologyCompartmentDetails Specifies the compartment to move the compute capacity topology to. +type ChangeComputeCapacityTopologyCompartmentDetails struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment + // to move the compute capacity topology to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeComputeCapacityTopologyCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeComputeCapacityTopologyCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/core/change_compute_capacity_topology_compartment_request_response.go b/core/change_compute_capacity_topology_compartment_request_response.go new file mode 100644 index 0000000000..117a54629a --- /dev/null +++ b/core/change_compute_capacity_topology_compartment_request_response.go @@ -0,0 +1,108 @@ +// 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" +) + +// ChangeComputeCapacityTopologyCompartmentRequest wrapper for the ChangeComputeCapacityTopologyCompartment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeCapacityTopologyCompartment.go.html to see an example of how to use ChangeComputeCapacityTopologyCompartmentRequest. +type ChangeComputeCapacityTopologyCompartmentRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" contributesTo:"path" name:"computeCapacityTopologyId"` + + // The configuration details for the move operation. + ChangeComputeCapacityTopologyCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ChangeComputeCapacityTopologyCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeComputeCapacityTopologyCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeComputeCapacityTopologyCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeComputeCapacityTopologyCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeComputeCapacityTopologyCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeComputeCapacityTopologyCompartmentResponse wrapper for the ChangeComputeCapacityTopologyCompartment operation +type ChangeComputeCapacityTopologyCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.cloud.oracle.com/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response ChangeComputeCapacityTopologyCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeComputeCapacityTopologyCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/core/compute_bare_metal_host.go b/core/compute_bare_metal_host.go new file mode 100644 index 0000000000..2b45a2ff57 --- /dev/null +++ b/core/compute_bare_metal_host.go @@ -0,0 +1,171 @@ +// 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" +) + +// ComputeBareMetalHost A compute bare metal host. +type ComputeBareMetalHost struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" json:"computeCapacityTopologyId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute bare metal host. + Id *string `mandatory:"true" json:"id"` + + // The shape of the compute instance that runs on the compute bare metal host. + InstanceShape *string `mandatory:"true" json:"instanceShape"` + + // The current state of the compute bare metal host. + LifecycleState ComputeBareMetalHostLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the compute bare metal host was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the compute bare metal host was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + ComputeHpcIslandId *string `mandatory:"false" json:"computeHpcIslandId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute local block. + ComputeLocalBlockId *string `mandatory:"false" json:"computeLocalBlockId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute network block. + ComputeNetworkBlockId *string `mandatory:"false" json:"computeNetworkBlockId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute instance that runs on the compute bare metal host. + InstanceId *string `mandatory:"false" json:"instanceId"` + + // The lifecycle state details of the compute bare metal host. + LifecycleDetails ComputeBareMetalHostLifecycleDetailsEnum `mandatory:"false" json:"lifecycleDetails,omitempty"` +} + +func (m ComputeBareMetalHost) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeBareMetalHost) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeBareMetalHostLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeBareMetalHostLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingComputeBareMetalHostLifecycleDetailsEnum(string(m.LifecycleDetails)); !ok && m.LifecycleDetails != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleDetails: %s. Supported values are: %s.", m.LifecycleDetails, strings.Join(GetComputeBareMetalHostLifecycleDetailsEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ComputeBareMetalHostLifecycleDetailsEnum Enum with underlying type: string +type ComputeBareMetalHostLifecycleDetailsEnum string + +// Set of constants representing the allowable values for ComputeBareMetalHostLifecycleDetailsEnum +const ( + ComputeBareMetalHostLifecycleDetailsAvailable ComputeBareMetalHostLifecycleDetailsEnum = "AVAILABLE" + ComputeBareMetalHostLifecycleDetailsDegraded ComputeBareMetalHostLifecycleDetailsEnum = "DEGRADED" + ComputeBareMetalHostLifecycleDetailsUnavailable ComputeBareMetalHostLifecycleDetailsEnum = "UNAVAILABLE" +) + +var mappingComputeBareMetalHostLifecycleDetailsEnum = map[string]ComputeBareMetalHostLifecycleDetailsEnum{ + "AVAILABLE": ComputeBareMetalHostLifecycleDetailsAvailable, + "DEGRADED": ComputeBareMetalHostLifecycleDetailsDegraded, + "UNAVAILABLE": ComputeBareMetalHostLifecycleDetailsUnavailable, +} + +var mappingComputeBareMetalHostLifecycleDetailsEnumLowerCase = map[string]ComputeBareMetalHostLifecycleDetailsEnum{ + "available": ComputeBareMetalHostLifecycleDetailsAvailable, + "degraded": ComputeBareMetalHostLifecycleDetailsDegraded, + "unavailable": ComputeBareMetalHostLifecycleDetailsUnavailable, +} + +// GetComputeBareMetalHostLifecycleDetailsEnumValues Enumerates the set of values for ComputeBareMetalHostLifecycleDetailsEnum +func GetComputeBareMetalHostLifecycleDetailsEnumValues() []ComputeBareMetalHostLifecycleDetailsEnum { + values := make([]ComputeBareMetalHostLifecycleDetailsEnum, 0) + for _, v := range mappingComputeBareMetalHostLifecycleDetailsEnum { + values = append(values, v) + } + return values +} + +// GetComputeBareMetalHostLifecycleDetailsEnumStringValues Enumerates the set of values in String for ComputeBareMetalHostLifecycleDetailsEnum +func GetComputeBareMetalHostLifecycleDetailsEnumStringValues() []string { + return []string{ + "AVAILABLE", + "DEGRADED", + "UNAVAILABLE", + } +} + +// GetMappingComputeBareMetalHostLifecycleDetailsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeBareMetalHostLifecycleDetailsEnum(val string) (ComputeBareMetalHostLifecycleDetailsEnum, bool) { + enum, ok := mappingComputeBareMetalHostLifecycleDetailsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ComputeBareMetalHostLifecycleStateEnum Enum with underlying type: string +type ComputeBareMetalHostLifecycleStateEnum string + +// Set of constants representing the allowable values for ComputeBareMetalHostLifecycleStateEnum +const ( + ComputeBareMetalHostLifecycleStateActive ComputeBareMetalHostLifecycleStateEnum = "ACTIVE" + ComputeBareMetalHostLifecycleStateInactive ComputeBareMetalHostLifecycleStateEnum = "INACTIVE" +) + +var mappingComputeBareMetalHostLifecycleStateEnum = map[string]ComputeBareMetalHostLifecycleStateEnum{ + "ACTIVE": ComputeBareMetalHostLifecycleStateActive, + "INACTIVE": ComputeBareMetalHostLifecycleStateInactive, +} + +var mappingComputeBareMetalHostLifecycleStateEnumLowerCase = map[string]ComputeBareMetalHostLifecycleStateEnum{ + "active": ComputeBareMetalHostLifecycleStateActive, + "inactive": ComputeBareMetalHostLifecycleStateInactive, +} + +// GetComputeBareMetalHostLifecycleStateEnumValues Enumerates the set of values for ComputeBareMetalHostLifecycleStateEnum +func GetComputeBareMetalHostLifecycleStateEnumValues() []ComputeBareMetalHostLifecycleStateEnum { + values := make([]ComputeBareMetalHostLifecycleStateEnum, 0) + for _, v := range mappingComputeBareMetalHostLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetComputeBareMetalHostLifecycleStateEnumStringValues Enumerates the set of values in String for ComputeBareMetalHostLifecycleStateEnum +func GetComputeBareMetalHostLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + } +} + +// GetMappingComputeBareMetalHostLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeBareMetalHostLifecycleStateEnum(val string) (ComputeBareMetalHostLifecycleStateEnum, bool) { + enum, ok := mappingComputeBareMetalHostLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/core/compute_bare_metal_host_collection.go b/core/compute_bare_metal_host_collection.go new file mode 100644 index 0000000000..1eafd49bd8 --- /dev/null +++ b/core/compute_bare_metal_host_collection.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" +) + +// ComputeBareMetalHostCollection A list of compute bare metal hosts. +type ComputeBareMetalHostCollection struct { + + // The list of compute bare metal hosts. + Items []ComputeBareMetalHostSummary `mandatory:"true" json:"items"` +} + +func (m ComputeBareMetalHostCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeBareMetalHostCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/core/compute_bare_metal_host_summary.go b/core/compute_bare_metal_host_summary.go new file mode 100644 index 0000000000..8721e62c0e --- /dev/null +++ b/core/compute_bare_metal_host_summary.go @@ -0,0 +1,83 @@ +// 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" +) + +// ComputeBareMetalHostSummary Summary information for a compute bare metal host. +type ComputeBareMetalHostSummary struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" json:"computeCapacityTopologyId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute bare metal host. + Id *string `mandatory:"true" json:"id"` + + // The shape of the compute instance that runs on the compute bare metal host. + InstanceShape *string `mandatory:"true" json:"instanceShape"` + + // The current state of the compute bare metal host. + LifecycleState ComputeBareMetalHostLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the compute bare metal host was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the compute bare metal host was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + ComputeHpcIslandId *string `mandatory:"false" json:"computeHpcIslandId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute network block. + ComputeLocalBlockId *string `mandatory:"false" json:"computeLocalBlockId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute local block. + ComputeNetworkBlockId *string `mandatory:"false" json:"computeNetworkBlockId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute instance that runs on the compute bare metal host. + InstanceId *string `mandatory:"false" json:"instanceId"` + + // The lifecycle state details of the compute bare metal host. + LifecycleDetails ComputeBareMetalHostLifecycleDetailsEnum `mandatory:"false" json:"lifecycleDetails,omitempty"` +} + +func (m ComputeBareMetalHostSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeBareMetalHostSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeBareMetalHostLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeBareMetalHostLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingComputeBareMetalHostLifecycleDetailsEnum(string(m.LifecycleDetails)); !ok && m.LifecycleDetails != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleDetails: %s. Supported values are: %s.", m.LifecycleDetails, strings.Join(GetComputeBareMetalHostLifecycleDetailsEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/core/compute_capacity_topology.go b/core/compute_capacity_topology.go new file mode 100644 index 0000000000..8cfbca565e --- /dev/null +++ b/core/compute_capacity_topology.go @@ -0,0 +1,188 @@ +// 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" +) + +// ComputeCapacityTopology A compute capacity topology that allows you to query your bare metal hosts and their RDMA network topology. +type ComputeCapacityTopology struct { + + // The availability domain of the compute capacity topology. + // Example: `Uocm:US-CHICAGO-1-AD-2` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + CapacitySource CapacitySource `mandatory:"true" json:"capacitySource"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the compute capacity topology. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + Id *string `mandatory:"true" json:"id"` + + // The current state of the compute capacity topology. + LifecycleState ComputeCapacityTopologyLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the compute capacity topology was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the compute capacity topology was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m ComputeCapacityTopology) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeCapacityTopology) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeCapacityTopologyLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeCapacityTopologyLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *ComputeCapacityTopology) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + AvailabilityDomain *string `json:"availabilityDomain"` + CapacitySource capacitysource `json:"capacitySource"` + CompartmentId *string `json:"compartmentId"` + Id *string `json:"id"` + LifecycleState ComputeCapacityTopologyLifecycleStateEnum `json:"lifecycleState"` + TimeCreated *common.SDKTime `json:"timeCreated"` + TimeUpdated *common.SDKTime `json:"timeUpdated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.AvailabilityDomain = model.AvailabilityDomain + + nn, e = model.CapacitySource.UnmarshalPolymorphicJSON(model.CapacitySource.JsonData) + if e != nil { + return + } + if nn != nil { + m.CapacitySource = nn.(CapacitySource) + } else { + m.CapacitySource = nil + } + + m.CompartmentId = model.CompartmentId + + m.Id = model.Id + + m.LifecycleState = model.LifecycleState + + m.TimeCreated = model.TimeCreated + + m.TimeUpdated = model.TimeUpdated + + return +} + +// ComputeCapacityTopologyLifecycleStateEnum Enum with underlying type: string +type ComputeCapacityTopologyLifecycleStateEnum string + +// Set of constants representing the allowable values for ComputeCapacityTopologyLifecycleStateEnum +const ( + ComputeCapacityTopologyLifecycleStateActive ComputeCapacityTopologyLifecycleStateEnum = "ACTIVE" + ComputeCapacityTopologyLifecycleStateCreating ComputeCapacityTopologyLifecycleStateEnum = "CREATING" + ComputeCapacityTopologyLifecycleStateUpdating ComputeCapacityTopologyLifecycleStateEnum = "UPDATING" + ComputeCapacityTopologyLifecycleStateDeleted ComputeCapacityTopologyLifecycleStateEnum = "DELETED" + ComputeCapacityTopologyLifecycleStateDeleting ComputeCapacityTopologyLifecycleStateEnum = "DELETING" +) + +var mappingComputeCapacityTopologyLifecycleStateEnum = map[string]ComputeCapacityTopologyLifecycleStateEnum{ + "ACTIVE": ComputeCapacityTopologyLifecycleStateActive, + "CREATING": ComputeCapacityTopologyLifecycleStateCreating, + "UPDATING": ComputeCapacityTopologyLifecycleStateUpdating, + "DELETED": ComputeCapacityTopologyLifecycleStateDeleted, + "DELETING": ComputeCapacityTopologyLifecycleStateDeleting, +} + +var mappingComputeCapacityTopologyLifecycleStateEnumLowerCase = map[string]ComputeCapacityTopologyLifecycleStateEnum{ + "active": ComputeCapacityTopologyLifecycleStateActive, + "creating": ComputeCapacityTopologyLifecycleStateCreating, + "updating": ComputeCapacityTopologyLifecycleStateUpdating, + "deleted": ComputeCapacityTopologyLifecycleStateDeleted, + "deleting": ComputeCapacityTopologyLifecycleStateDeleting, +} + +// GetComputeCapacityTopologyLifecycleStateEnumValues Enumerates the set of values for ComputeCapacityTopologyLifecycleStateEnum +func GetComputeCapacityTopologyLifecycleStateEnumValues() []ComputeCapacityTopologyLifecycleStateEnum { + values := make([]ComputeCapacityTopologyLifecycleStateEnum, 0) + for _, v := range mappingComputeCapacityTopologyLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetComputeCapacityTopologyLifecycleStateEnumStringValues Enumerates the set of values in String for ComputeCapacityTopologyLifecycleStateEnum +func GetComputeCapacityTopologyLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "CREATING", + "UPDATING", + "DELETED", + "DELETING", + } +} + +// GetMappingComputeCapacityTopologyLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeCapacityTopologyLifecycleStateEnum(val string) (ComputeCapacityTopologyLifecycleStateEnum, bool) { + enum, ok := mappingComputeCapacityTopologyLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/core/compute_capacity_topology_collection.go b/core/compute_capacity_topology_collection.go new file mode 100644 index 0000000000..e68009198c --- /dev/null +++ b/core/compute_capacity_topology_collection.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" +) + +// ComputeCapacityTopologyCollection A list of compute capacity topologies. +type ComputeCapacityTopologyCollection struct { + + // The list of compute capacity topologies. + Items []ComputeCapacityTopologySummary `mandatory:"true" json:"items"` +} + +func (m ComputeCapacityTopologyCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeCapacityTopologyCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/core/compute_capacity_topology_summary.go b/core/compute_capacity_topology_summary.go new file mode 100644 index 0000000000..fbed325dbd --- /dev/null +++ b/core/compute_capacity_topology_summary.go @@ -0,0 +1,80 @@ +// 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" +) + +// ComputeCapacityTopologySummary Summary information for a compute capacity topology. +type ComputeCapacityTopologySummary struct { + + // The availability domain of the compute capacity topology. + // Example: `Uocm:US-CHICAGO-1-AD-2` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the compute capacity topology. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + Id *string `mandatory:"true" json:"id"` + + // The current state of the compute capacity topology. + LifecycleState ComputeCapacityTopologyLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the compute capacity topology was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the compute capacity topology was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m ComputeCapacityTopologySummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeCapacityTopologySummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeCapacityTopologyLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeCapacityTopologyLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/core/compute_hpc_island.go b/core/compute_hpc_island.go new file mode 100644 index 0000000000..97f9b2a2b2 --- /dev/null +++ b/core/compute_hpc_island.go @@ -0,0 +1,107 @@ +// 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" +) + +// ComputeHpcIsland A compute HPC island. +type ComputeHpcIsland struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" json:"computeCapacityTopologyId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + Id *string `mandatory:"true" json:"id"` + + // The current state of the compute HPC island. + LifecycleState ComputeHpcIslandLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the compute HPC island was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the compute HPC island was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The total number of compute bare metal hosts located in this compute HPC island. + TotalComputeBareMetalHostCount *int64 `mandatory:"true" json:"totalComputeBareMetalHostCount"` +} + +func (m ComputeHpcIsland) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeHpcIsland) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeHpcIslandLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeHpcIslandLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ComputeHpcIslandLifecycleStateEnum Enum with underlying type: string +type ComputeHpcIslandLifecycleStateEnum string + +// Set of constants representing the allowable values for ComputeHpcIslandLifecycleStateEnum +const ( + ComputeHpcIslandLifecycleStateActive ComputeHpcIslandLifecycleStateEnum = "ACTIVE" + ComputeHpcIslandLifecycleStateInactive ComputeHpcIslandLifecycleStateEnum = "INACTIVE" +) + +var mappingComputeHpcIslandLifecycleStateEnum = map[string]ComputeHpcIslandLifecycleStateEnum{ + "ACTIVE": ComputeHpcIslandLifecycleStateActive, + "INACTIVE": ComputeHpcIslandLifecycleStateInactive, +} + +var mappingComputeHpcIslandLifecycleStateEnumLowerCase = map[string]ComputeHpcIslandLifecycleStateEnum{ + "active": ComputeHpcIslandLifecycleStateActive, + "inactive": ComputeHpcIslandLifecycleStateInactive, +} + +// GetComputeHpcIslandLifecycleStateEnumValues Enumerates the set of values for ComputeHpcIslandLifecycleStateEnum +func GetComputeHpcIslandLifecycleStateEnumValues() []ComputeHpcIslandLifecycleStateEnum { + values := make([]ComputeHpcIslandLifecycleStateEnum, 0) + for _, v := range mappingComputeHpcIslandLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetComputeHpcIslandLifecycleStateEnumStringValues Enumerates the set of values in String for ComputeHpcIslandLifecycleStateEnum +func GetComputeHpcIslandLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + } +} + +// GetMappingComputeHpcIslandLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeHpcIslandLifecycleStateEnum(val string) (ComputeHpcIslandLifecycleStateEnum, bool) { + enum, ok := mappingComputeHpcIslandLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/core/compute_hpc_island_collection.go b/core/compute_hpc_island_collection.go new file mode 100644 index 0000000000..f5ddaa4b77 --- /dev/null +++ b/core/compute_hpc_island_collection.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" +) + +// ComputeHpcIslandCollection A list of compute HPC islands. +type ComputeHpcIslandCollection struct { + + // The list of compute HPC islands. + Items []ComputeHpcIslandSummary `mandatory:"true" json:"items"` +} + +func (m ComputeHpcIslandCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeHpcIslandCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/core/compute_hpc_island_summary.go b/core/compute_hpc_island_summary.go new file mode 100644 index 0000000000..c9e45e7c78 --- /dev/null +++ b/core/compute_hpc_island_summary.go @@ -0,0 +1,65 @@ +// 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" +) + +// ComputeHpcIslandSummary Summary information for a compute HPC island. +type ComputeHpcIslandSummary struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" json:"computeCapacityTopologyId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + Id *string `mandatory:"true" json:"id"` + + // The current state of the compute HPC island. + LifecycleState ComputeHpcIslandLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the compute HPC island was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the compute HPC island was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The total number of compute bare metal hosts located in this compute HPC island. + TotalComputeBareMetalHostCount *int64 `mandatory:"true" json:"totalComputeBareMetalHostCount"` +} + +func (m ComputeHpcIslandSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeHpcIslandSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeHpcIslandLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeHpcIslandLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/core/compute_network_block.go b/core/compute_network_block.go new file mode 100644 index 0000000000..82aa92a2d4 --- /dev/null +++ b/core/compute_network_block.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. + +// Core Services API +// +// Use the Core Services API to manage resources 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" +) + +// ComputeNetworkBlock A compute network block. +type ComputeNetworkBlock struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" json:"computeCapacityTopologyId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + ComputeHpcIslandId *string `mandatory:"true" json:"computeHpcIslandId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute network block. + Id *string `mandatory:"true" json:"id"` + + // The current state of the compute network block. + LifecycleState ComputeNetworkBlockLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the compute network block was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the compute network block was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The total number of compute bare metal hosts located in this compute network block. + TotalComputeBareMetalHostCount *int64 `mandatory:"true" json:"totalComputeBareMetalHostCount"` +} + +func (m ComputeNetworkBlock) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeNetworkBlock) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeNetworkBlockLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeNetworkBlockLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ComputeNetworkBlockLifecycleStateEnum Enum with underlying type: string +type ComputeNetworkBlockLifecycleStateEnum string + +// Set of constants representing the allowable values for ComputeNetworkBlockLifecycleStateEnum +const ( + ComputeNetworkBlockLifecycleStateActive ComputeNetworkBlockLifecycleStateEnum = "ACTIVE" + ComputeNetworkBlockLifecycleStateInactive ComputeNetworkBlockLifecycleStateEnum = "INACTIVE" +) + +var mappingComputeNetworkBlockLifecycleStateEnum = map[string]ComputeNetworkBlockLifecycleStateEnum{ + "ACTIVE": ComputeNetworkBlockLifecycleStateActive, + "INACTIVE": ComputeNetworkBlockLifecycleStateInactive, +} + +var mappingComputeNetworkBlockLifecycleStateEnumLowerCase = map[string]ComputeNetworkBlockLifecycleStateEnum{ + "active": ComputeNetworkBlockLifecycleStateActive, + "inactive": ComputeNetworkBlockLifecycleStateInactive, +} + +// GetComputeNetworkBlockLifecycleStateEnumValues Enumerates the set of values for ComputeNetworkBlockLifecycleStateEnum +func GetComputeNetworkBlockLifecycleStateEnumValues() []ComputeNetworkBlockLifecycleStateEnum { + values := make([]ComputeNetworkBlockLifecycleStateEnum, 0) + for _, v := range mappingComputeNetworkBlockLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetComputeNetworkBlockLifecycleStateEnumStringValues Enumerates the set of values in String for ComputeNetworkBlockLifecycleStateEnum +func GetComputeNetworkBlockLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + } +} + +// GetMappingComputeNetworkBlockLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComputeNetworkBlockLifecycleStateEnum(val string) (ComputeNetworkBlockLifecycleStateEnum, bool) { + enum, ok := mappingComputeNetworkBlockLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/core/compute_network_block_collection.go b/core/compute_network_block_collection.go new file mode 100644 index 0000000000..ba326c0587 --- /dev/null +++ b/core/compute_network_block_collection.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" +) + +// ComputeNetworkBlockCollection A list of compute network blocks. +type ComputeNetworkBlockCollection struct { + + // The list of compute network blocks. + Items []ComputeNetworkBlockSummary `mandatory:"true" json:"items"` +} + +func (m ComputeNetworkBlockCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeNetworkBlockCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/core/compute_network_block_summary.go b/core/compute_network_block_summary.go new file mode 100644 index 0000000000..2dab3feebd --- /dev/null +++ b/core/compute_network_block_summary.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 ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComputeNetworkBlockSummary Summary information for a compute network block. +type ComputeNetworkBlockSummary struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" json:"computeCapacityTopologyId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + ComputeHpcIslandId *string `mandatory:"true" json:"computeHpcIslandId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute network block. + Id *string `mandatory:"true" json:"id"` + + // The current state of the compute network block. + LifecycleState ComputeNetworkBlockLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The date and time that the compute network block was created, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The date and time that the compute network block was updated, in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // The total number of compute bare metal hosts located in the compute network block. + TotalComputeBareMetalHostCount *int64 `mandatory:"true" json:"totalComputeBareMetalHostCount"` +} + +func (m ComputeNetworkBlockSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComputeNetworkBlockSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComputeNetworkBlockLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComputeNetworkBlockLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/core/core_compute_client.go b/core/core_compute_client.go index 54cc77b017..24ff41a0bb 100644 --- a/core/core_compute_client.go +++ b/core/core_compute_client.go @@ -542,6 +542,70 @@ func (client ComputeClient) changeComputeCapacityReservationCompartment(ctx cont return response, err } +// ChangeComputeCapacityTopologyCompartment Moves a compute capacity topology into a different compartment. For information about moving resources between +// compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ChangeComputeCapacityTopologyCompartment.go.html to see an example of how to use ChangeComputeCapacityTopologyCompartment API. +// A default retry strategy applies to this operation ChangeComputeCapacityTopologyCompartment() +func (client ComputeClient) ChangeComputeCapacityTopologyCompartment(ctx context.Context, request ChangeComputeCapacityTopologyCompartmentRequest) (response ChangeComputeCapacityTopologyCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.changeComputeCapacityTopologyCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeComputeCapacityTopologyCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeComputeCapacityTopologyCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeComputeCapacityTopologyCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeComputeCapacityTopologyCompartmentResponse") + } + return +} + +// changeComputeCapacityTopologyCompartment implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) changeComputeCapacityTopologyCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeCapacityTopologies/{computeCapacityTopologyId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ChangeComputeCapacityTopologyCompartmentResponse + 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/ComputeCapacityTopology/ChangeComputeCapacityTopologyCompartment" + err = common.PostProcessServiceError(err, "Compute", "ChangeComputeCapacityTopologyCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ChangeComputeClusterCompartment Moves a compute cluster into a different compartment within the same tenancy. // A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory access (RDMA) network group. // For information about moving resources between compartments, see @@ -1062,6 +1126,72 @@ func (client ComputeClient) createComputeCapacityReservation(ctx context.Context return response, err } +// CreateComputeCapacityTopology Creates a new compute capacity topology in the specified compartment and availability domain. +// Compute capacity topologies provide the RDMA network topology of your bare metal hosts so that you can launch +// instances on your bare metal hosts with targeted network locations. +// Compute capacity topologies report the health status of your bare metal hosts. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeCapacityTopology.go.html to see an example of how to use CreateComputeCapacityTopology API. +// A default retry strategy applies to this operation CreateComputeCapacityTopology() +func (client ComputeClient) CreateComputeCapacityTopology(ctx context.Context, request CreateComputeCapacityTopologyRequest) (response CreateComputeCapacityTopologyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createComputeCapacityTopology, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateComputeCapacityTopologyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateComputeCapacityTopologyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateComputeCapacityTopologyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateComputeCapacityTopologyResponse") + } + return +} + +// createComputeCapacityTopology implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) createComputeCapacityTopology(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/computeCapacityTopologies", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateComputeCapacityTopologyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Compute", "CreateComputeCapacityTopology", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // CreateComputeCluster Creates an empty compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm). A compute cluster // is a remote direct memory access (RDMA) network group. // After the compute cluster is created, you can use the compute cluster's OCID with the @@ -1519,6 +1649,64 @@ func (client ComputeClient) deleteComputeCapacityReservation(ctx context.Context return response, err } +// DeleteComputeCapacityTopology Deletes the specified compute capacity topology. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteComputeCapacityTopology.go.html to see an example of how to use DeleteComputeCapacityTopology API. +// A default retry strategy applies to this operation DeleteComputeCapacityTopology() +func (client ComputeClient) DeleteComputeCapacityTopology(ctx context.Context, request DeleteComputeCapacityTopologyRequest) (response DeleteComputeCapacityTopologyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteComputeCapacityTopology, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteComputeCapacityTopologyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteComputeCapacityTopologyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteComputeCapacityTopologyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteComputeCapacityTopologyResponse") + } + return +} + +// deleteComputeCapacityTopology implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) deleteComputeCapacityTopology(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/computeCapacityTopologies/{computeCapacityTopologyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteComputeCapacityTopologyResponse + 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/ComputeCapacityTopology/DeleteComputeCapacityTopology" + err = common.PostProcessServiceError(err, "Compute", "DeleteComputeCapacityTopology", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteComputeCluster Deletes a compute cluster. A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a // remote direct memory access (RDMA) network group. // Before you delete a compute cluster, first delete all instances in the cluster by using @@ -2406,6 +2594,64 @@ func (client ComputeClient) getComputeCapacityReservation(ctx context.Context, r return response, err } +// GetComputeCapacityTopology Gets information about the specified compute capacity topology. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeCapacityTopology.go.html to see an example of how to use GetComputeCapacityTopology API. +// A default retry strategy applies to this operation GetComputeCapacityTopology() +func (client ComputeClient) GetComputeCapacityTopology(ctx context.Context, request GetComputeCapacityTopologyRequest) (response GetComputeCapacityTopologyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getComputeCapacityTopology, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetComputeCapacityTopologyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetComputeCapacityTopologyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetComputeCapacityTopologyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetComputeCapacityTopologyResponse") + } + return +} + +// getComputeCapacityTopology implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) getComputeCapacityTopology(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeCapacityTopologies/{computeCapacityTopologyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetComputeCapacityTopologyResponse + 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/ComputeCapacityTopology/GetComputeCapacityTopology" + err = common.PostProcessServiceError(err, "Compute", "GetComputeCapacityTopology", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // GetComputeCluster Gets information about a compute cluster. A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) // is a remote direct memory access (RDMA) network group. // @@ -3925,6 +4171,239 @@ func (client ComputeClient) listComputeCapacityReservations(ctx context.Context, return response, err } +// ListComputeCapacityTopologies Lists the compute capacity topologies in the specified compartment. You can filter the list by a compute +// capacity topology display name. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityTopologies.go.html to see an example of how to use ListComputeCapacityTopologies API. +// A default retry strategy applies to this operation ListComputeCapacityTopologies() +func (client ComputeClient) ListComputeCapacityTopologies(ctx context.Context, request ListComputeCapacityTopologiesRequest) (response ListComputeCapacityTopologiesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeCapacityTopologies, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeCapacityTopologiesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeCapacityTopologiesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeCapacityTopologiesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeCapacityTopologiesResponse") + } + return +} + +// listComputeCapacityTopologies implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeCapacityTopologies(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeCapacityTopologies", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListComputeCapacityTopologiesResponse + 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/ComputeCapacityTopology/ListComputeCapacityTopologies" + err = common.PostProcessServiceError(err, "Compute", "ListComputeCapacityTopologies", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeCapacityTopologyComputeBareMetalHosts Lists compute bare metal hosts in the specified compute capacity topology. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityTopologyComputeBareMetalHosts.go.html to see an example of how to use ListComputeCapacityTopologyComputeBareMetalHosts API. +// A default retry strategy applies to this operation ListComputeCapacityTopologyComputeBareMetalHosts() +func (client ComputeClient) ListComputeCapacityTopologyComputeBareMetalHosts(ctx context.Context, request ListComputeCapacityTopologyComputeBareMetalHostsRequest) (response ListComputeCapacityTopologyComputeBareMetalHostsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeCapacityTopologyComputeBareMetalHosts, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeCapacityTopologyComputeBareMetalHostsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeCapacityTopologyComputeBareMetalHostsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeCapacityTopologyComputeBareMetalHostsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeCapacityTopologyComputeBareMetalHostsResponse") + } + return +} + +// listComputeCapacityTopologyComputeBareMetalHosts implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeCapacityTopologyComputeBareMetalHosts(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeCapacityTopologies/{computeCapacityTopologyId}/computeBareMetalHosts", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListComputeCapacityTopologyComputeBareMetalHostsResponse + 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/ComputeBareMetalHost/ListComputeCapacityTopologyComputeBareMetalHosts" + err = common.PostProcessServiceError(err, "Compute", "ListComputeCapacityTopologyComputeBareMetalHosts", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeCapacityTopologyComputeHpcIslands Lists compute HPC islands in the specified compute capacity topology. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityTopologyComputeHpcIslands.go.html to see an example of how to use ListComputeCapacityTopologyComputeHpcIslands API. +// A default retry strategy applies to this operation ListComputeCapacityTopologyComputeHpcIslands() +func (client ComputeClient) ListComputeCapacityTopologyComputeHpcIslands(ctx context.Context, request ListComputeCapacityTopologyComputeHpcIslandsRequest) (response ListComputeCapacityTopologyComputeHpcIslandsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeCapacityTopologyComputeHpcIslands, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeCapacityTopologyComputeHpcIslandsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeCapacityTopologyComputeHpcIslandsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeCapacityTopologyComputeHpcIslandsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeCapacityTopologyComputeHpcIslandsResponse") + } + return +} + +// listComputeCapacityTopologyComputeHpcIslands implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeCapacityTopologyComputeHpcIslands(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeCapacityTopologies/{computeCapacityTopologyId}/computeHpcIslands", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListComputeCapacityTopologyComputeHpcIslandsResponse + 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/ComputeHpcIsland/ListComputeCapacityTopologyComputeHpcIslands" + err = common.PostProcessServiceError(err, "Compute", "ListComputeCapacityTopologyComputeHpcIslands", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListComputeCapacityTopologyComputeNetworkBlocks Lists compute network blocks in the specified compute capacity topology. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityTopologyComputeNetworkBlocks.go.html to see an example of how to use ListComputeCapacityTopologyComputeNetworkBlocks API. +// A default retry strategy applies to this operation ListComputeCapacityTopologyComputeNetworkBlocks() +func (client ComputeClient) ListComputeCapacityTopologyComputeNetworkBlocks(ctx context.Context, request ListComputeCapacityTopologyComputeNetworkBlocksRequest) (response ListComputeCapacityTopologyComputeNetworkBlocksResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listComputeCapacityTopologyComputeNetworkBlocks, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListComputeCapacityTopologyComputeNetworkBlocksResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListComputeCapacityTopologyComputeNetworkBlocksResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListComputeCapacityTopologyComputeNetworkBlocksResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListComputeCapacityTopologyComputeNetworkBlocksResponse") + } + return +} + +// listComputeCapacityTopologyComputeNetworkBlocks implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) listComputeCapacityTopologyComputeNetworkBlocks(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/computeCapacityTopologies/{computeCapacityTopologyId}/computeNetworkBlocks", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListComputeCapacityTopologyComputeNetworkBlocksResponse + 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/ComputeNetworkBlock/ListComputeCapacityTopologyComputeNetworkBlocks" + err = common.PostProcessServiceError(err, "Compute", "ListComputeCapacityTopologyComputeNetworkBlocks", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // ListComputeClusters Lists the compute clusters in the specified compartment. // A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a remote direct memory access (RDMA) network group. // @@ -5117,6 +5596,64 @@ func (client ComputeClient) updateComputeCapacityReservation(ctx context.Context return response, err } +// UpdateComputeCapacityTopology Updates the specified compute capacity topology. Fields that are not provided in the request will not be updated. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeCapacityTopology.go.html to see an example of how to use UpdateComputeCapacityTopology API. +// A default retry strategy applies to this operation UpdateComputeCapacityTopology() +func (client ComputeClient) UpdateComputeCapacityTopology(ctx context.Context, request UpdateComputeCapacityTopologyRequest) (response UpdateComputeCapacityTopologyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateComputeCapacityTopology, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateComputeCapacityTopologyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateComputeCapacityTopologyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateComputeCapacityTopologyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateComputeCapacityTopologyResponse") + } + return +} + +// updateComputeCapacityTopology implements the OCIOperation interface (enables retrying operations) +func (client ComputeClient) updateComputeCapacityTopology(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/computeCapacityTopologies/{computeCapacityTopologyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateComputeCapacityTopologyResponse + 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/ComputeCapacityTopology/UpdateComputeCapacityTopology" + err = common.PostProcessServiceError(err, "Compute", "UpdateComputeCapacityTopology", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateComputeCluster Updates a compute cluster. A compute cluster (https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/compute-clusters.htm) is a // remote direct memory access (RDMA) network group. // To create instances within a compute cluster, use the LaunchInstance diff --git a/core/create_capacity_source_details.go b/core/create_capacity_source_details.go new file mode 100644 index 0000000000..214fb6fec7 --- /dev/null +++ b/core/create_capacity_source_details.go @@ -0,0 +1,83 @@ +// 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" +) + +// CreateCapacitySourceDetails A capacity source of bare metal hosts. +type CreateCapacitySourceDetails interface { +} + +type createcapacitysourcedetails struct { + JsonData []byte + CapacityType string `json:"capacityType"` +} + +// UnmarshalJSON unmarshals json +func (m *createcapacitysourcedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalercreatecapacitysourcedetails createcapacitysourcedetails + s := struct { + Model Unmarshalercreatecapacitysourcedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.CapacityType = s.Model.CapacityType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *createcapacitysourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.CapacityType { + case "DEDICATED": + mm := CreateDedicatedCapacitySourceDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for CreateCapacitySourceDetails: %s.", m.CapacityType) + return *m, nil + } +} + +func (m createcapacitysourcedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m createcapacitysourcedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/core/create_compute_capacity_topology_details.go b/core/create_compute_capacity_topology_details.go new file mode 100644 index 0000000000..92833a218b --- /dev/null +++ b/core/create_compute_capacity_topology_details.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. + +// Core Services API +// +// Use the Core Services API to manage resources 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" +) + +// CreateComputeCapacityTopologyDetails The details for creating a new compute capacity topology. +type CreateComputeCapacityTopologyDetails struct { + + // The availability domain of this compute capacity topology. + // Example: `Uocm:US-CHICAGO-1-AD-2` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + CapacitySource CreateCapacitySourceDetails `mandatory:"true" json:"capacitySource"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains this compute capacity topology. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m CreateComputeCapacityTopologyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateComputeCapacityTopologyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreateComputeCapacityTopologyDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + AvailabilityDomain *string `json:"availabilityDomain"` + CapacitySource createcapacitysourcedetails `json:"capacitySource"` + CompartmentId *string `json:"compartmentId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + m.AvailabilityDomain = model.AvailabilityDomain + + nn, e = model.CapacitySource.UnmarshalPolymorphicJSON(model.CapacitySource.JsonData) + if e != nil { + return + } + if nn != nil { + m.CapacitySource = nn.(CreateCapacitySourceDetails) + } else { + m.CapacitySource = nil + } + + m.CompartmentId = model.CompartmentId + + return +} diff --git a/core/create_compute_capacity_topology_request_response.go b/core/create_compute_capacity_topology_request_response.go new file mode 100644 index 0000000000..446a678a16 --- /dev/null +++ b/core/create_compute_capacity_topology_request_response.go @@ -0,0 +1,109 @@ +// 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" +) + +// CreateComputeCapacityTopologyRequest wrapper for the CreateComputeCapacityTopology operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/CreateComputeCapacityTopology.go.html to see an example of how to use CreateComputeCapacityTopologyRequest. +type CreateComputeCapacityTopologyRequest struct { + + // Details for creating a new compute capacity topology. + CreateComputeCapacityTopologyDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateComputeCapacityTopologyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateComputeCapacityTopologyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateComputeCapacityTopologyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateComputeCapacityTopologyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateComputeCapacityTopologyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateComputeCapacityTopologyResponse wrapper for the CreateComputeCapacityTopology operation +type CreateComputeCapacityTopologyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeCapacityTopology instance + ComputeCapacityTopology `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Location of the resource. + Location *string `presentIn:"header" name:"location"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.cloud.oracle.com/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response CreateComputeCapacityTopologyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateComputeCapacityTopologyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/core/create_dedicated_capacity_source_details.go b/core/create_dedicated_capacity_source_details.go new file mode 100644 index 0000000000..50e50a60ab --- /dev/null +++ b/core/create_dedicated_capacity_source_details.go @@ -0,0 +1,60 @@ +// 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" +) + +// CreateDedicatedCapacitySourceDetails A capacity source of bare metal hosts that is dedicated to a customer. +type CreateDedicatedCapacitySourceDetails struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment of this capacity source. + CompartmentId *string `mandatory:"false" json:"compartmentId"` +} + +func (m CreateDedicatedCapacitySourceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDedicatedCapacitySourceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateDedicatedCapacitySourceDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateDedicatedCapacitySourceDetails CreateDedicatedCapacitySourceDetails + s := struct { + DiscriminatorParam string `json:"capacityType"` + MarshalTypeCreateDedicatedCapacitySourceDetails + }{ + "DEDICATED", + (MarshalTypeCreateDedicatedCapacitySourceDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/core/dedicated_capacity_source.go b/core/dedicated_capacity_source.go new file mode 100644 index 0000000000..5b150d9fec --- /dev/null +++ b/core/dedicated_capacity_source.go @@ -0,0 +1,60 @@ +// 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" +) + +// DedicatedCapacitySource A capacity source of bare metal hosts that is dedicated to a user. +type DedicatedCapacitySource struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment of this capacity source. + CompartmentId *string `mandatory:"false" json:"compartmentId"` +} + +func (m DedicatedCapacitySource) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DedicatedCapacitySource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m DedicatedCapacitySource) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDedicatedCapacitySource DedicatedCapacitySource + s := struct { + DiscriminatorParam string `json:"capacityType"` + MarshalTypeDedicatedCapacitySource + }{ + "DEDICATED", + (MarshalTypeDedicatedCapacitySource)(m), + } + + return json.Marshal(&s) +} diff --git a/core/delete_compute_capacity_topology_request_response.go b/core/delete_compute_capacity_topology_request_response.go new file mode 100644 index 0000000000..5275c5bb42 --- /dev/null +++ b/core/delete_compute_capacity_topology_request_response.go @@ -0,0 +1,98 @@ +// 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" +) + +// DeleteComputeCapacityTopologyRequest wrapper for the DeleteComputeCapacityTopology operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/DeleteComputeCapacityTopology.go.html to see an example of how to use DeleteComputeCapacityTopologyRequest. +type DeleteComputeCapacityTopologyRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" contributesTo:"path" name:"computeCapacityTopologyId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteComputeCapacityTopologyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteComputeCapacityTopologyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteComputeCapacityTopologyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteComputeCapacityTopologyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteComputeCapacityTopologyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteComputeCapacityTopologyResponse wrapper for the DeleteComputeCapacityTopology operation +type DeleteComputeCapacityTopologyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.cloud.oracle.com/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response DeleteComputeCapacityTopologyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteComputeCapacityTopologyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/core/get_compute_capacity_topology_request_response.go b/core/get_compute_capacity_topology_request_response.go new file mode 100644 index 0000000000..83c2e257de --- /dev/null +++ b/core/get_compute_capacity_topology_request_response.go @@ -0,0 +1,94 @@ +// 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" +) + +// GetComputeCapacityTopologyRequest wrapper for the GetComputeCapacityTopology operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetComputeCapacityTopology.go.html to see an example of how to use GetComputeCapacityTopologyRequest. +type GetComputeCapacityTopologyRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" contributesTo:"path" name:"computeCapacityTopologyId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetComputeCapacityTopologyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetComputeCapacityTopologyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetComputeCapacityTopologyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetComputeCapacityTopologyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetComputeCapacityTopologyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetComputeCapacityTopologyResponse wrapper for the GetComputeCapacityTopology operation +type GetComputeCapacityTopologyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ComputeCapacityTopology instance + ComputeCapacityTopology `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetComputeCapacityTopologyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetComputeCapacityTopologyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/core/list_compute_capacity_topologies_request_response.go b/core/list_compute_capacity_topologies_request_response.go new file mode 100644 index 0000000000..72f0b6c2db --- /dev/null +++ b/core/list_compute_capacity_topologies_request_response.go @@ -0,0 +1,217 @@ +// 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" +) + +// ListComputeCapacityTopologiesRequest wrapper for the ListComputeCapacityTopologies operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityTopologies.go.html to see an example of how to use ListComputeCapacityTopologiesRequest. +type ListComputeCapacityTopologiesRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // A filter to return only resources that match the given display name exactly. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.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 identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeCapacityTopologiesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeCapacityTopologiesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeCapacityTopologiesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeCapacityTopologiesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeCapacityTopologiesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeCapacityTopologiesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeCapacityTopologiesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListComputeCapacityTopologiesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeCapacityTopologiesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeCapacityTopologiesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeCapacityTopologiesSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeCapacityTopologiesResponse wrapper for the ListComputeCapacityTopologies operation +type ListComputeCapacityTopologiesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ComputeCapacityTopologyCollection instances + ComputeCapacityTopologyCollection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeCapacityTopologiesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeCapacityTopologiesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeCapacityTopologiesSortByEnum Enum with underlying type: string +type ListComputeCapacityTopologiesSortByEnum string + +// Set of constants representing the allowable values for ListComputeCapacityTopologiesSortByEnum +const ( + ListComputeCapacityTopologiesSortByTimecreated ListComputeCapacityTopologiesSortByEnum = "TIMECREATED" + ListComputeCapacityTopologiesSortByDisplayname ListComputeCapacityTopologiesSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeCapacityTopologiesSortByEnum = map[string]ListComputeCapacityTopologiesSortByEnum{ + "TIMECREATED": ListComputeCapacityTopologiesSortByTimecreated, + "DISPLAYNAME": ListComputeCapacityTopologiesSortByDisplayname, +} + +var mappingListComputeCapacityTopologiesSortByEnumLowerCase = map[string]ListComputeCapacityTopologiesSortByEnum{ + "timecreated": ListComputeCapacityTopologiesSortByTimecreated, + "displayname": ListComputeCapacityTopologiesSortByDisplayname, +} + +// GetListComputeCapacityTopologiesSortByEnumValues Enumerates the set of values for ListComputeCapacityTopologiesSortByEnum +func GetListComputeCapacityTopologiesSortByEnumValues() []ListComputeCapacityTopologiesSortByEnum { + values := make([]ListComputeCapacityTopologiesSortByEnum, 0) + for _, v := range mappingListComputeCapacityTopologiesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityTopologiesSortByEnumStringValues Enumerates the set of values in String for ListComputeCapacityTopologiesSortByEnum +func GetListComputeCapacityTopologiesSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeCapacityTopologiesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityTopologiesSortByEnum(val string) (ListComputeCapacityTopologiesSortByEnum, bool) { + enum, ok := mappingListComputeCapacityTopologiesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeCapacityTopologiesSortOrderEnum Enum with underlying type: string +type ListComputeCapacityTopologiesSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeCapacityTopologiesSortOrderEnum +const ( + ListComputeCapacityTopologiesSortOrderAsc ListComputeCapacityTopologiesSortOrderEnum = "ASC" + ListComputeCapacityTopologiesSortOrderDesc ListComputeCapacityTopologiesSortOrderEnum = "DESC" +) + +var mappingListComputeCapacityTopologiesSortOrderEnum = map[string]ListComputeCapacityTopologiesSortOrderEnum{ + "ASC": ListComputeCapacityTopologiesSortOrderAsc, + "DESC": ListComputeCapacityTopologiesSortOrderDesc, +} + +var mappingListComputeCapacityTopologiesSortOrderEnumLowerCase = map[string]ListComputeCapacityTopologiesSortOrderEnum{ + "asc": ListComputeCapacityTopologiesSortOrderAsc, + "desc": ListComputeCapacityTopologiesSortOrderDesc, +} + +// GetListComputeCapacityTopologiesSortOrderEnumValues Enumerates the set of values for ListComputeCapacityTopologiesSortOrderEnum +func GetListComputeCapacityTopologiesSortOrderEnumValues() []ListComputeCapacityTopologiesSortOrderEnum { + values := make([]ListComputeCapacityTopologiesSortOrderEnum, 0) + for _, v := range mappingListComputeCapacityTopologiesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityTopologiesSortOrderEnumStringValues Enumerates the set of values in String for ListComputeCapacityTopologiesSortOrderEnum +func GetListComputeCapacityTopologiesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeCapacityTopologiesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityTopologiesSortOrderEnum(val string) (ListComputeCapacityTopologiesSortOrderEnum, bool) { + enum, ok := mappingListComputeCapacityTopologiesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/core/list_compute_capacity_topology_compute_bare_metal_hosts_request_response.go b/core/list_compute_capacity_topology_compute_bare_metal_hosts_request_response.go new file mode 100644 index 0000000000..9b932a5b1b --- /dev/null +++ b/core/list_compute_capacity_topology_compute_bare_metal_hosts_request_response.go @@ -0,0 +1,226 @@ +// 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" +) + +// ListComputeCapacityTopologyComputeBareMetalHostsRequest wrapper for the ListComputeCapacityTopologyComputeBareMetalHosts operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityTopologyComputeBareMetalHosts.go.html to see an example of how to use ListComputeCapacityTopologyComputeBareMetalHostsRequest. +type ListComputeCapacityTopologyComputeBareMetalHostsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" contributesTo:"path" name:"computeCapacityTopologyId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + ComputeHpcIslandId *string `mandatory:"false" contributesTo:"query" name:"computeHpcIslandId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute network block. + ComputeNetworkBlockId *string `mandatory:"false" contributesTo:"query" name:"computeNetworkBlockId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute local block. + ComputeLocalBlockId *string `mandatory:"false" contributesTo:"query" name:"computeLocalBlockId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.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 identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeCapacityTopologyComputeBareMetalHostsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeCapacityTopologyComputeBareMetalHostsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeCapacityTopologyComputeBareMetalHostsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeCapacityTopologyComputeBareMetalHostsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeCapacityTopologyComputeBareMetalHostsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListComputeCapacityTopologyComputeBareMetalHostsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeCapacityTopologyComputeBareMetalHostsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeCapacityTopologyComputeBareMetalHostsResponse wrapper for the ListComputeCapacityTopologyComputeBareMetalHosts operation +type ListComputeCapacityTopologyComputeBareMetalHostsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ComputeBareMetalHostCollection instances + ComputeBareMetalHostCollection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeCapacityTopologyComputeBareMetalHostsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeCapacityTopologyComputeBareMetalHostsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum Enum with underlying type: string +type ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum string + +// Set of constants representing the allowable values for ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum +const ( + ListComputeCapacityTopologyComputeBareMetalHostsSortByTimecreated ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum = "TIMECREATED" + ListComputeCapacityTopologyComputeBareMetalHostsSortByDisplayname ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeCapacityTopologyComputeBareMetalHostsSortByEnum = map[string]ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum{ + "TIMECREATED": ListComputeCapacityTopologyComputeBareMetalHostsSortByTimecreated, + "DISPLAYNAME": ListComputeCapacityTopologyComputeBareMetalHostsSortByDisplayname, +} + +var mappingListComputeCapacityTopologyComputeBareMetalHostsSortByEnumLowerCase = map[string]ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum{ + "timecreated": ListComputeCapacityTopologyComputeBareMetalHostsSortByTimecreated, + "displayname": ListComputeCapacityTopologyComputeBareMetalHostsSortByDisplayname, +} + +// GetListComputeCapacityTopologyComputeBareMetalHostsSortByEnumValues Enumerates the set of values for ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum +func GetListComputeCapacityTopologyComputeBareMetalHostsSortByEnumValues() []ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum { + values := make([]ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum, 0) + for _, v := range mappingListComputeCapacityTopologyComputeBareMetalHostsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityTopologyComputeBareMetalHostsSortByEnumStringValues Enumerates the set of values in String for ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum +func GetListComputeCapacityTopologyComputeBareMetalHostsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeCapacityTopologyComputeBareMetalHostsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityTopologyComputeBareMetalHostsSortByEnum(val string) (ListComputeCapacityTopologyComputeBareMetalHostsSortByEnum, bool) { + enum, ok := mappingListComputeCapacityTopologyComputeBareMetalHostsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum Enum with underlying type: string +type ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum +const ( + ListComputeCapacityTopologyComputeBareMetalHostsSortOrderAsc ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum = "ASC" + ListComputeCapacityTopologyComputeBareMetalHostsSortOrderDesc ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum = "DESC" +) + +var mappingListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum = map[string]ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum{ + "ASC": ListComputeCapacityTopologyComputeBareMetalHostsSortOrderAsc, + "DESC": ListComputeCapacityTopologyComputeBareMetalHostsSortOrderDesc, +} + +var mappingListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnumLowerCase = map[string]ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum{ + "asc": ListComputeCapacityTopologyComputeBareMetalHostsSortOrderAsc, + "desc": ListComputeCapacityTopologyComputeBareMetalHostsSortOrderDesc, +} + +// GetListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnumValues Enumerates the set of values for ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum +func GetListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnumValues() []ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum { + values := make([]ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum, 0) + for _, v := range mappingListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnumStringValues Enumerates the set of values in String for ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum +func GetListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum(val string) (ListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnum, bool) { + enum, ok := mappingListComputeCapacityTopologyComputeBareMetalHostsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/core/list_compute_capacity_topology_compute_hpc_islands_request_response.go b/core/list_compute_capacity_topology_compute_hpc_islands_request_response.go new file mode 100644 index 0000000000..b15eec266e --- /dev/null +++ b/core/list_compute_capacity_topology_compute_hpc_islands_request_response.go @@ -0,0 +1,217 @@ +// 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" +) + +// ListComputeCapacityTopologyComputeHpcIslandsRequest wrapper for the ListComputeCapacityTopologyComputeHpcIslands operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityTopologyComputeHpcIslands.go.html to see an example of how to use ListComputeCapacityTopologyComputeHpcIslandsRequest. +type ListComputeCapacityTopologyComputeHpcIslandsRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" contributesTo:"path" name:"computeCapacityTopologyId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.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 identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeCapacityTopologyComputeHpcIslandsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeCapacityTopologyComputeHpcIslandsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeCapacityTopologyComputeHpcIslandsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeCapacityTopologyComputeHpcIslandsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeCapacityTopologyComputeHpcIslandsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeCapacityTopologyComputeHpcIslandsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListComputeCapacityTopologyComputeHpcIslandsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeCapacityTopologyComputeHpcIslandsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeCapacityTopologyComputeHpcIslandsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeCapacityTopologyComputeHpcIslandsResponse wrapper for the ListComputeCapacityTopologyComputeHpcIslands operation +type ListComputeCapacityTopologyComputeHpcIslandsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ComputeHpcIslandCollection instances + ComputeHpcIslandCollection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeCapacityTopologyComputeHpcIslandsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeCapacityTopologyComputeHpcIslandsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeCapacityTopologyComputeHpcIslandsSortByEnum Enum with underlying type: string +type ListComputeCapacityTopologyComputeHpcIslandsSortByEnum string + +// Set of constants representing the allowable values for ListComputeCapacityTopologyComputeHpcIslandsSortByEnum +const ( + ListComputeCapacityTopologyComputeHpcIslandsSortByTimecreated ListComputeCapacityTopologyComputeHpcIslandsSortByEnum = "TIMECREATED" + ListComputeCapacityTopologyComputeHpcIslandsSortByDisplayname ListComputeCapacityTopologyComputeHpcIslandsSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeCapacityTopologyComputeHpcIslandsSortByEnum = map[string]ListComputeCapacityTopologyComputeHpcIslandsSortByEnum{ + "TIMECREATED": ListComputeCapacityTopologyComputeHpcIslandsSortByTimecreated, + "DISPLAYNAME": ListComputeCapacityTopologyComputeHpcIslandsSortByDisplayname, +} + +var mappingListComputeCapacityTopologyComputeHpcIslandsSortByEnumLowerCase = map[string]ListComputeCapacityTopologyComputeHpcIslandsSortByEnum{ + "timecreated": ListComputeCapacityTopologyComputeHpcIslandsSortByTimecreated, + "displayname": ListComputeCapacityTopologyComputeHpcIslandsSortByDisplayname, +} + +// GetListComputeCapacityTopologyComputeHpcIslandsSortByEnumValues Enumerates the set of values for ListComputeCapacityTopologyComputeHpcIslandsSortByEnum +func GetListComputeCapacityTopologyComputeHpcIslandsSortByEnumValues() []ListComputeCapacityTopologyComputeHpcIslandsSortByEnum { + values := make([]ListComputeCapacityTopologyComputeHpcIslandsSortByEnum, 0) + for _, v := range mappingListComputeCapacityTopologyComputeHpcIslandsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityTopologyComputeHpcIslandsSortByEnumStringValues Enumerates the set of values in String for ListComputeCapacityTopologyComputeHpcIslandsSortByEnum +func GetListComputeCapacityTopologyComputeHpcIslandsSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeCapacityTopologyComputeHpcIslandsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityTopologyComputeHpcIslandsSortByEnum(val string) (ListComputeCapacityTopologyComputeHpcIslandsSortByEnum, bool) { + enum, ok := mappingListComputeCapacityTopologyComputeHpcIslandsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum Enum with underlying type: string +type ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum +const ( + ListComputeCapacityTopologyComputeHpcIslandsSortOrderAsc ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum = "ASC" + ListComputeCapacityTopologyComputeHpcIslandsSortOrderDesc ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum = "DESC" +) + +var mappingListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum = map[string]ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum{ + "ASC": ListComputeCapacityTopologyComputeHpcIslandsSortOrderAsc, + "DESC": ListComputeCapacityTopologyComputeHpcIslandsSortOrderDesc, +} + +var mappingListComputeCapacityTopologyComputeHpcIslandsSortOrderEnumLowerCase = map[string]ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum{ + "asc": ListComputeCapacityTopologyComputeHpcIslandsSortOrderAsc, + "desc": ListComputeCapacityTopologyComputeHpcIslandsSortOrderDesc, +} + +// GetListComputeCapacityTopologyComputeHpcIslandsSortOrderEnumValues Enumerates the set of values for ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum +func GetListComputeCapacityTopologyComputeHpcIslandsSortOrderEnumValues() []ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum { + values := make([]ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum, 0) + for _, v := range mappingListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityTopologyComputeHpcIslandsSortOrderEnumStringValues Enumerates the set of values in String for ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum +func GetListComputeCapacityTopologyComputeHpcIslandsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum(val string) (ListComputeCapacityTopologyComputeHpcIslandsSortOrderEnum, bool) { + enum, ok := mappingListComputeCapacityTopologyComputeHpcIslandsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/core/list_compute_capacity_topology_compute_network_blocks_request_response.go b/core/list_compute_capacity_topology_compute_network_blocks_request_response.go new file mode 100644 index 0000000000..cb082464c9 --- /dev/null +++ b/core/list_compute_capacity_topology_compute_network_blocks_request_response.go @@ -0,0 +1,220 @@ +// 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" +) + +// ListComputeCapacityTopologyComputeNetworkBlocksRequest wrapper for the ListComputeCapacityTopologyComputeNetworkBlocks operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListComputeCapacityTopologyComputeNetworkBlocks.go.html to see an example of how to use ListComputeCapacityTopologyComputeNetworkBlocksRequest. +type ListComputeCapacityTopologyComputeNetworkBlocksRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" contributesTo:"path" name:"computeCapacityTopologyId"` + + // The name of the availability domain. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute HPC island. + ComputeHpcIslandId *string `mandatory:"false" contributesTo:"query" name:"computeHpcIslandId"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated + // "List" call. For important details about how pagination works, see + // List Pagination (https://docs.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 identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The field to sort by. You can provide one sort order (`sortOrder`). Default order for + // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME + // sort order is case sensitive. + // **Note:** In general, some "List" operations (for example, `ListInstances`) let you + // optionally filter by availability domain if the scope of the resource type is within a + // single availability domain. If you call one of these "List" operations without specifying + // an availability domain, the resources are grouped by availability domain, then sorted. + SortBy ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComputeCapacityTopologyComputeNetworkBlocksRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComputeCapacityTopologyComputeNetworkBlocksRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComputeCapacityTopologyComputeNetworkBlocksRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComputeCapacityTopologyComputeNetworkBlocksRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComputeCapacityTopologyComputeNetworkBlocksRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListComputeCapacityTopologyComputeNetworkBlocksSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComputeCapacityTopologyComputeNetworkBlocksSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComputeCapacityTopologyComputeNetworkBlocksResponse wrapper for the ListComputeCapacityTopologyComputeNetworkBlocks operation +type ListComputeCapacityTopologyComputeNetworkBlocksResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ComputeNetworkBlockCollection instances + ComputeNetworkBlockCollection `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListComputeCapacityTopologyComputeNetworkBlocksResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComputeCapacityTopologyComputeNetworkBlocksResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum Enum with underlying type: string +type ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum string + +// Set of constants representing the allowable values for ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum +const ( + ListComputeCapacityTopologyComputeNetworkBlocksSortByTimecreated ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum = "TIMECREATED" + ListComputeCapacityTopologyComputeNetworkBlocksSortByDisplayname ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum = "DISPLAYNAME" +) + +var mappingListComputeCapacityTopologyComputeNetworkBlocksSortByEnum = map[string]ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum{ + "TIMECREATED": ListComputeCapacityTopologyComputeNetworkBlocksSortByTimecreated, + "DISPLAYNAME": ListComputeCapacityTopologyComputeNetworkBlocksSortByDisplayname, +} + +var mappingListComputeCapacityTopologyComputeNetworkBlocksSortByEnumLowerCase = map[string]ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum{ + "timecreated": ListComputeCapacityTopologyComputeNetworkBlocksSortByTimecreated, + "displayname": ListComputeCapacityTopologyComputeNetworkBlocksSortByDisplayname, +} + +// GetListComputeCapacityTopologyComputeNetworkBlocksSortByEnumValues Enumerates the set of values for ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum +func GetListComputeCapacityTopologyComputeNetworkBlocksSortByEnumValues() []ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum { + values := make([]ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum, 0) + for _, v := range mappingListComputeCapacityTopologyComputeNetworkBlocksSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityTopologyComputeNetworkBlocksSortByEnumStringValues Enumerates the set of values in String for ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum +func GetListComputeCapacityTopologyComputeNetworkBlocksSortByEnumStringValues() []string { + return []string{ + "TIMECREATED", + "DISPLAYNAME", + } +} + +// GetMappingListComputeCapacityTopologyComputeNetworkBlocksSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityTopologyComputeNetworkBlocksSortByEnum(val string) (ListComputeCapacityTopologyComputeNetworkBlocksSortByEnum, bool) { + enum, ok := mappingListComputeCapacityTopologyComputeNetworkBlocksSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum Enum with underlying type: string +type ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum string + +// Set of constants representing the allowable values for ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum +const ( + ListComputeCapacityTopologyComputeNetworkBlocksSortOrderAsc ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum = "ASC" + ListComputeCapacityTopologyComputeNetworkBlocksSortOrderDesc ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum = "DESC" +) + +var mappingListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum = map[string]ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum{ + "ASC": ListComputeCapacityTopologyComputeNetworkBlocksSortOrderAsc, + "DESC": ListComputeCapacityTopologyComputeNetworkBlocksSortOrderDesc, +} + +var mappingListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnumLowerCase = map[string]ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum{ + "asc": ListComputeCapacityTopologyComputeNetworkBlocksSortOrderAsc, + "desc": ListComputeCapacityTopologyComputeNetworkBlocksSortOrderDesc, +} + +// GetListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnumValues Enumerates the set of values for ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum +func GetListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnumValues() []ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum { + values := make([]ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum, 0) + for _, v := range mappingListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnumStringValues Enumerates the set of values in String for ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum +func GetListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum(val string) (ListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnum, bool) { + enum, ok := mappingListComputeCapacityTopologyComputeNetworkBlocksSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/core/update_capacity_source_details.go b/core/update_capacity_source_details.go new file mode 100644 index 0000000000..c96ef96e5f --- /dev/null +++ b/core/update_capacity_source_details.go @@ -0,0 +1,83 @@ +// 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" +) + +// UpdateCapacitySourceDetails A capacity source of bare metal hosts. +type UpdateCapacitySourceDetails interface { +} + +type updatecapacitysourcedetails struct { + JsonData []byte + CapacityType string `json:"capacityType"` +} + +// UnmarshalJSON unmarshals json +func (m *updatecapacitysourcedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerupdatecapacitysourcedetails updatecapacitysourcedetails + s := struct { + Model Unmarshalerupdatecapacitysourcedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.CapacityType = s.Model.CapacityType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *updatecapacitysourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.CapacityType { + case "DEDICATED": + mm := UpdateDedicatedCapacitySourceDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for UpdateCapacitySourceDetails: %s.", m.CapacityType) + return *m, nil + } +} + +func (m updatecapacitysourcedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m updatecapacitysourcedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/core/update_compute_capacity_topology_details.go b/core/update_compute_capacity_topology_details.go new file mode 100644 index 0000000000..f3f900d7aa --- /dev/null +++ b/core/update_compute_capacity_topology_details.go @@ -0,0 +1,91 @@ +// 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" +) + +// UpdateComputeCapacityTopologyDetails The details for updating the compute capacity topology. +type UpdateComputeCapacityTopologyDetails struct { + CapacitySource UpdateCapacitySourceDetails `mandatory:"false" json:"capacitySource"` + + // Defined tags for this resource. Each key is predefined and scoped to a + // namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no + // predefined name, type, or namespace. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` +} + +func (m UpdateComputeCapacityTopologyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateComputeCapacityTopologyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *UpdateComputeCapacityTopologyDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + CapacitySource updatecapacitysourcedetails `json:"capacitySource"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + FreeformTags map[string]string `json:"freeformTags"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.CapacitySource.UnmarshalPolymorphicJSON(model.CapacitySource.JsonData) + if e != nil { + return + } + if nn != nil { + m.CapacitySource = nn.(UpdateCapacitySourceDetails) + } else { + m.CapacitySource = nil + } + + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.FreeformTags = model.FreeformTags + + return +} diff --git a/core/update_compute_capacity_topology_request_response.go b/core/update_compute_capacity_topology_request_response.go new file mode 100644 index 0000000000..a600db29ff --- /dev/null +++ b/core/update_compute_capacity_topology_request_response.go @@ -0,0 +1,101 @@ +// 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" +) + +// UpdateComputeCapacityTopologyRequest wrapper for the UpdateComputeCapacityTopology operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/UpdateComputeCapacityTopology.go.html to see an example of how to use UpdateComputeCapacityTopologyRequest. +type UpdateComputeCapacityTopologyRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compute capacity topology. + ComputeCapacityTopologyId *string `mandatory:"true" contributesTo:"path" name:"computeCapacityTopologyId"` + + // Update compute capacity topology details. + UpdateComputeCapacityTopologyDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateComputeCapacityTopologyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateComputeCapacityTopologyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateComputeCapacityTopologyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateComputeCapacityTopologyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateComputeCapacityTopologyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateComputeCapacityTopologyResponse wrapper for the UpdateComputeCapacityTopology operation +type UpdateComputeCapacityTopologyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.cloud.oracle.com/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` +} + +func (response UpdateComputeCapacityTopologyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateComputeCapacityTopologyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/core/update_dedicated_capacity_source_details.go b/core/update_dedicated_capacity_source_details.go new file mode 100644 index 0000000000..2194ce779b --- /dev/null +++ b/core/update_dedicated_capacity_source_details.go @@ -0,0 +1,57 @@ +// 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" +) + +// UpdateDedicatedCapacitySourceDetails A capacity source of bare metal hosts that is dedicated to a user. +type UpdateDedicatedCapacitySourceDetails struct { +} + +func (m UpdateDedicatedCapacitySourceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDedicatedCapacitySourceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateDedicatedCapacitySourceDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateDedicatedCapacitySourceDetails UpdateDedicatedCapacitySourceDetails + s := struct { + DiscriminatorParam string `json:"capacityType"` + MarshalTypeUpdateDedicatedCapacitySourceDetails + }{ + "DEDICATED", + (MarshalTypeUpdateDedicatedCapacitySourceDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/identitydomains/app_extension_radius_app_app.go b/identitydomains/app_extension_radius_app_app.go index ec5ddb770b..c726eab24c 100644 --- a/identitydomains/app_extension_radius_app_app.go +++ b/identitydomains/app_extension_radius_app_app.go @@ -67,6 +67,19 @@ type AppExtensionRadiusAppApp struct { // - type: boolean IncludeGroupInResponse *bool `mandatory:"true" json:"includeGroupInResponse"` + // Secret key used to secure communication between RADIUS Proxy and RADIUS client. This will be available only for few releases for an internal migration requirement. Use secretKey attribute instead of this attribute for all other requirements. + // **Added In:** 2306131901 + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - idcsSensitive: encrypt + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: never + // - type: string + SecretKeyTemporary *string `mandatory:"false" json:"secretKeyTemporary"` + // If true, capture the client IP address from the RADIUS request packet. IP Address is used for auditing, policy-evaluation and country-code calculation. // **Added In:** 2205120021 // **SCIM++ Properties:** diff --git a/identitydomains/approval_workflow.go b/identitydomains/approval_workflow.go new file mode 100644 index 0000000000..832a2ffab1 --- /dev/null +++ b/identitydomains/approval_workflow.go @@ -0,0 +1,207 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApprovalWorkflow Schema for ApprovalWorkflow +type ApprovalWorkflow struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // Name of the ApprovalWorkflow. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: true + // - returned: default + // - type: string + // - uniqueness: server + Name *string `mandatory:"true" json:"name"` + + MaxDuration *ApprovalWorkflowMaxDuration `mandatory:"true" json:"maxDuration"` + + // Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: string + // - uniqueness: global + Id *string `mandatory:"false" json:"id"` + + // Unique OCI identifier for the SCIM Resource. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: global + Ocid *string `mandatory:"false" json:"ocid"` + + Meta *Meta `mandatory:"false" json:"meta"` + + IdcsCreatedBy *IdcsCreatedBy `mandatory:"false" json:"idcsCreatedBy"` + + IdcsLastModifiedBy *IdcsLastModifiedBy `mandatory:"false" json:"idcsLastModifiedBy"` + + // Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsPreventedOperations []IdcsPreventedOperationsEnum `mandatory:"false" json:"idcsPreventedOperations,omitempty"` + + // A list of tags on this resource. + // **SCIM++ Properties:** + // - idcsCompositeKey: [key, value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Tags []Tags `mandatory:"false" json:"tags"` + + // A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DeleteInProgress *bool `mandatory:"false" json:"deleteInProgress"` + + // The release number when the resource was upgraded. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsLastUpgradedInRelease *string `mandatory:"false" json:"idcsLastUpgradedInRelease"` + + // OCI Domain Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DomainOcid *string `mandatory:"false" json:"domainOcid"` + + // OCI Compartment Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CompartmentOcid *string `mandatory:"false" json:"compartmentOcid"` + + // OCI Tenant Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TenancyOcid *string `mandatory:"false" json:"tenancyOcid"` + + // Description of the ApprovalWorkflow. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Description *string `mandatory:"false" json:"description"` + + // ApprovalWorkflowSteps applicable for the ApprovalWorkflowInstance. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - idcsCompositeKey: [value, type] + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + // - uniqueness: none + ApprovalWorkflowSteps []ApprovalWorkflowApprovalWorkflowSteps `mandatory:"false" json:"approvalWorkflowSteps"` +} + +func (m ApprovalWorkflow) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ApprovalWorkflow) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.IdcsPreventedOperations { + if _, ok := GetMappingIdcsPreventedOperationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsPreventedOperations: %s. Supported values are: %s.", val, strings.Join(GetIdcsPreventedOperationsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/approval_workflow_approval_workflow_steps.go b/identitydomains/approval_workflow_approval_workflow_steps.go new file mode 100644 index 0000000000..50dde631c8 --- /dev/null +++ b/identitydomains/approval_workflow_approval_workflow_steps.go @@ -0,0 +1,96 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApprovalWorkflowApprovalWorkflowSteps ApprovalWorkflowSteps applicable for the ApprovalWorkflowInstance. +type ApprovalWorkflowApprovalWorkflowSteps struct { + + // The unique identifier of the ApprovalWorkflowStep. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // The type of the ApprovalWorkflowSteps. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Type *string `mandatory:"true" json:"type"` + + // The unique OCI identifier of the ApprovalWorkflowStep. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Ocid *string `mandatory:"false" json:"ocid"` + + // The order of the ApprovalWorkflowSteps. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: integer + // - uniqueness: none + Order *int `mandatory:"false" json:"order"` + + // ApprovalWorkflowSteps URI + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: reference + // - uniqueness: none + Ref *string `mandatory:"false" json:"$ref"` +} + +func (m ApprovalWorkflowApprovalWorkflowSteps) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ApprovalWorkflowApprovalWorkflowSteps) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/approval_workflow_assignment.go b/identitydomains/approval_workflow_assignment.go new file mode 100644 index 0000000000..e298aab81a --- /dev/null +++ b/identitydomains/approval_workflow_assignment.go @@ -0,0 +1,229 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApprovalWorkflowAssignment Schema for ApprovalWorkflowAssignment +type ApprovalWorkflowAssignment struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // Type of approval workflow assignment to the resource. Resources like Group have only one workflow associated (default assignment type is membership), but resources like TemporalBusinessRole can have atleast 2 AWs attached, one for membership to TPR, another for activation of that TPR membership + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + AssignmentType ApprovalWorkflowAssignmentAssignmentTypeEnum `mandatory:"true" json:"assignmentType"` + + ApprovalWorkflow *ApprovalWorkflowAssignmentApprovalWorkflow `mandatory:"true" json:"approvalWorkflow"` + + AssignedTo *ApprovalWorkflowAssignmentAssignedTo `mandatory:"true" json:"assignedTo"` + + // Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: string + // - uniqueness: global + Id *string `mandatory:"false" json:"id"` + + // Unique OCI identifier for the SCIM Resource. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: global + Ocid *string `mandatory:"false" json:"ocid"` + + Meta *Meta `mandatory:"false" json:"meta"` + + IdcsCreatedBy *IdcsCreatedBy `mandatory:"false" json:"idcsCreatedBy"` + + IdcsLastModifiedBy *IdcsLastModifiedBy `mandatory:"false" json:"idcsLastModifiedBy"` + + // Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsPreventedOperations []IdcsPreventedOperationsEnum `mandatory:"false" json:"idcsPreventedOperations,omitempty"` + + // A list of tags on this resource. + // **SCIM++ Properties:** + // - idcsCompositeKey: [key, value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Tags []Tags `mandatory:"false" json:"tags"` + + // A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DeleteInProgress *bool `mandatory:"false" json:"deleteInProgress"` + + // The release number when the resource was upgraded. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsLastUpgradedInRelease *string `mandatory:"false" json:"idcsLastUpgradedInRelease"` + + // OCI Domain Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DomainOcid *string `mandatory:"false" json:"domainOcid"` + + // OCI Compartment Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CompartmentOcid *string `mandatory:"false" json:"compartmentOcid"` + + // OCI Tenant Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TenancyOcid *string `mandatory:"false" json:"tenancyOcid"` +} + +func (m ApprovalWorkflowAssignment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ApprovalWorkflowAssignment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingApprovalWorkflowAssignmentAssignmentTypeEnum(string(m.AssignmentType)); !ok && m.AssignmentType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AssignmentType: %s. Supported values are: %s.", m.AssignmentType, strings.Join(GetApprovalWorkflowAssignmentAssignmentTypeEnumStringValues(), ","))) + } + + for _, val := range m.IdcsPreventedOperations { + if _, ok := GetMappingIdcsPreventedOperationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsPreventedOperations: %s. Supported values are: %s.", val, strings.Join(GetIdcsPreventedOperationsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ApprovalWorkflowAssignmentAssignmentTypeEnum Enum with underlying type: string +type ApprovalWorkflowAssignmentAssignmentTypeEnum string + +// Set of constants representing the allowable values for ApprovalWorkflowAssignmentAssignmentTypeEnum +const ( + ApprovalWorkflowAssignmentAssignmentTypeMembership ApprovalWorkflowAssignmentAssignmentTypeEnum = "MEMBERSHIP" + ApprovalWorkflowAssignmentAssignmentTypeActivation ApprovalWorkflowAssignmentAssignmentTypeEnum = "ACTIVATION" +) + +var mappingApprovalWorkflowAssignmentAssignmentTypeEnum = map[string]ApprovalWorkflowAssignmentAssignmentTypeEnum{ + "MEMBERSHIP": ApprovalWorkflowAssignmentAssignmentTypeMembership, + "ACTIVATION": ApprovalWorkflowAssignmentAssignmentTypeActivation, +} + +var mappingApprovalWorkflowAssignmentAssignmentTypeEnumLowerCase = map[string]ApprovalWorkflowAssignmentAssignmentTypeEnum{ + "membership": ApprovalWorkflowAssignmentAssignmentTypeMembership, + "activation": ApprovalWorkflowAssignmentAssignmentTypeActivation, +} + +// GetApprovalWorkflowAssignmentAssignmentTypeEnumValues Enumerates the set of values for ApprovalWorkflowAssignmentAssignmentTypeEnum +func GetApprovalWorkflowAssignmentAssignmentTypeEnumValues() []ApprovalWorkflowAssignmentAssignmentTypeEnum { + values := make([]ApprovalWorkflowAssignmentAssignmentTypeEnum, 0) + for _, v := range mappingApprovalWorkflowAssignmentAssignmentTypeEnum { + values = append(values, v) + } + return values +} + +// GetApprovalWorkflowAssignmentAssignmentTypeEnumStringValues Enumerates the set of values in String for ApprovalWorkflowAssignmentAssignmentTypeEnum +func GetApprovalWorkflowAssignmentAssignmentTypeEnumStringValues() []string { + return []string{ + "MEMBERSHIP", + "ACTIVATION", + } +} + +// GetMappingApprovalWorkflowAssignmentAssignmentTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingApprovalWorkflowAssignmentAssignmentTypeEnum(val string) (ApprovalWorkflowAssignmentAssignmentTypeEnum, bool) { + enum, ok := mappingApprovalWorkflowAssignmentAssignmentTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/approval_workflow_assignment_approval_workflow.go b/identitydomains/approval_workflow_assignment_approval_workflow.go new file mode 100644 index 0000000000..9524fee670 --- /dev/null +++ b/identitydomains/approval_workflow_assignment_approval_workflow.go @@ -0,0 +1,147 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApprovalWorkflowAssignmentApprovalWorkflow Details of the Approval Workflow +// **SCIM++ Properties:** +// - caseExact: true +// - idcsSearchable: true +// - multiValued: false +// - mutability: readWrite +// - required: true +// - returned: default +// - type: complex +// - uniqueness: none +type ApprovalWorkflowAssignmentApprovalWorkflow struct { + + // Identifier of the approval workflow + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: always + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // Indicates type of the entity that is associated with this assignment (for ARM validation) + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - idcsDefaultValue: ApprovalWorkflow + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: request + // - type: string + // - uniqueness: none + Type ApprovalWorkflowAssignmentApprovalWorkflowTypeEnum `mandatory:"true" json:"type"` + + // Unique OCI Identifier of the approval workflow + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Ocid *string `mandatory:"false" json:"ocid"` + + // Display name of the approval workflow + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + Display *string `mandatory:"false" json:"display"` + + // URI of the approval workflow + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: reference + // - uniqueness: none + Ref *string `mandatory:"false" json:"$ref"` +} + +func (m ApprovalWorkflowAssignmentApprovalWorkflow) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ApprovalWorkflowAssignmentApprovalWorkflow) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingApprovalWorkflowAssignmentApprovalWorkflowTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetApprovalWorkflowAssignmentApprovalWorkflowTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ApprovalWorkflowAssignmentApprovalWorkflowTypeEnum Enum with underlying type: string +type ApprovalWorkflowAssignmentApprovalWorkflowTypeEnum string + +// Set of constants representing the allowable values for ApprovalWorkflowAssignmentApprovalWorkflowTypeEnum +const ( + ApprovalWorkflowAssignmentApprovalWorkflowTypeApprovalworkflow ApprovalWorkflowAssignmentApprovalWorkflowTypeEnum = "ApprovalWorkflow" +) + +var mappingApprovalWorkflowAssignmentApprovalWorkflowTypeEnum = map[string]ApprovalWorkflowAssignmentApprovalWorkflowTypeEnum{ + "ApprovalWorkflow": ApprovalWorkflowAssignmentApprovalWorkflowTypeApprovalworkflow, +} + +var mappingApprovalWorkflowAssignmentApprovalWorkflowTypeEnumLowerCase = map[string]ApprovalWorkflowAssignmentApprovalWorkflowTypeEnum{ + "approvalworkflow": ApprovalWorkflowAssignmentApprovalWorkflowTypeApprovalworkflow, +} + +// GetApprovalWorkflowAssignmentApprovalWorkflowTypeEnumValues Enumerates the set of values for ApprovalWorkflowAssignmentApprovalWorkflowTypeEnum +func GetApprovalWorkflowAssignmentApprovalWorkflowTypeEnumValues() []ApprovalWorkflowAssignmentApprovalWorkflowTypeEnum { + values := make([]ApprovalWorkflowAssignmentApprovalWorkflowTypeEnum, 0) + for _, v := range mappingApprovalWorkflowAssignmentApprovalWorkflowTypeEnum { + values = append(values, v) + } + return values +} + +// GetApprovalWorkflowAssignmentApprovalWorkflowTypeEnumStringValues Enumerates the set of values in String for ApprovalWorkflowAssignmentApprovalWorkflowTypeEnum +func GetApprovalWorkflowAssignmentApprovalWorkflowTypeEnumStringValues() []string { + return []string{ + "ApprovalWorkflow", + } +} + +// GetMappingApprovalWorkflowAssignmentApprovalWorkflowTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingApprovalWorkflowAssignmentApprovalWorkflowTypeEnum(val string) (ApprovalWorkflowAssignmentApprovalWorkflowTypeEnum, bool) { + enum, ok := mappingApprovalWorkflowAssignmentApprovalWorkflowTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/approval_workflow_assignment_assigned_to.go b/identitydomains/approval_workflow_assignment_assigned_to.go new file mode 100644 index 0000000000..a4987e4754 --- /dev/null +++ b/identitydomains/approval_workflow_assignment_assigned_to.go @@ -0,0 +1,147 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApprovalWorkflowAssignmentAssignedTo Details of resource for which Approval Workflow is assigned +// **SCIM++ Properties:** +// - caseExact: true +// - idcsSearchable: true +// - multiValued: false +// - mutability: readWrite +// - required: true +// - returned: default +// - type: complex +// - uniqueness: none +type ApprovalWorkflowAssignmentAssignedTo struct { + + // Identifier of the resource for which Approval Workflow is assigned + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: always + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // Type of the resource (stripe and non-stripe) for which Approval Workflow is assigned + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: always + // - type: string + // - uniqueness: none + Type ApprovalWorkflowAssignmentAssignedToTypeEnum `mandatory:"true" json:"type"` + + // Ocid of the resource for which Approval Workflow is assigned + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: always + // - type: string + // - uniqueness: none + Ocid *string `mandatory:"false" json:"ocid"` + + // Display name of the resource for which Approval Workflow is assigned + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + Display *string `mandatory:"false" json:"display"` + + // Description + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + Description *string `mandatory:"false" json:"description"` +} + +func (m ApprovalWorkflowAssignmentAssignedTo) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ApprovalWorkflowAssignmentAssignedTo) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingApprovalWorkflowAssignmentAssignedToTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetApprovalWorkflowAssignmentAssignedToTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ApprovalWorkflowAssignmentAssignedToTypeEnum Enum with underlying type: string +type ApprovalWorkflowAssignmentAssignedToTypeEnum string + +// Set of constants representing the allowable values for ApprovalWorkflowAssignmentAssignedToTypeEnum +const ( + ApprovalWorkflowAssignmentAssignedToTypeGroup ApprovalWorkflowAssignmentAssignedToTypeEnum = "Group" +) + +var mappingApprovalWorkflowAssignmentAssignedToTypeEnum = map[string]ApprovalWorkflowAssignmentAssignedToTypeEnum{ + "Group": ApprovalWorkflowAssignmentAssignedToTypeGroup, +} + +var mappingApprovalWorkflowAssignmentAssignedToTypeEnumLowerCase = map[string]ApprovalWorkflowAssignmentAssignedToTypeEnum{ + "group": ApprovalWorkflowAssignmentAssignedToTypeGroup, +} + +// GetApprovalWorkflowAssignmentAssignedToTypeEnumValues Enumerates the set of values for ApprovalWorkflowAssignmentAssignedToTypeEnum +func GetApprovalWorkflowAssignmentAssignedToTypeEnumValues() []ApprovalWorkflowAssignmentAssignedToTypeEnum { + values := make([]ApprovalWorkflowAssignmentAssignedToTypeEnum, 0) + for _, v := range mappingApprovalWorkflowAssignmentAssignedToTypeEnum { + values = append(values, v) + } + return values +} + +// GetApprovalWorkflowAssignmentAssignedToTypeEnumStringValues Enumerates the set of values in String for ApprovalWorkflowAssignmentAssignedToTypeEnum +func GetApprovalWorkflowAssignmentAssignedToTypeEnumStringValues() []string { + return []string{ + "Group", + } +} + +// GetMappingApprovalWorkflowAssignmentAssignedToTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingApprovalWorkflowAssignmentAssignedToTypeEnum(val string) (ApprovalWorkflowAssignmentAssignedToTypeEnum, bool) { + enum, ok := mappingApprovalWorkflowAssignmentAssignedToTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/approval_workflow_assignments.go b/identitydomains/approval_workflow_assignments.go new file mode 100644 index 0000000000..495a3c2b79 --- /dev/null +++ b/identitydomains/approval_workflow_assignments.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApprovalWorkflowAssignments The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type ApprovalWorkflowAssignments struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []ApprovalWorkflowAssignment `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m ApprovalWorkflowAssignments) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ApprovalWorkflowAssignments) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/approval_workflow_max_duration.go b/identitydomains/approval_workflow_max_duration.go new file mode 100644 index 0000000000..355b1baf59 --- /dev/null +++ b/identitydomains/approval_workflow_max_duration.go @@ -0,0 +1,127 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApprovalWorkflowMaxDuration Max duration of the ApprovalWorkflow must be acted at all levels. +// **SCIM++ Properties:** +// - caseExact: true +// - idcsSearchable: false +// - multiValued: false +// - mutability: readWrite +// - required: true +// - returned: default +// - type: complex +// - uniqueness: none +type ApprovalWorkflowMaxDuration struct { + + // The value of the max duration. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - idcsMaxValue: 1488 + // - idcsMinValue: 1 + // - idcsDefaultValue: 14 + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: integer + // - uniqueness: none + Value *int `mandatory:"true" json:"value"` + + // The unit of the max duration. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - idcsDefaultValue: DAY + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Unit ApprovalWorkflowMaxDurationUnitEnum `mandatory:"true" json:"unit"` +} + +func (m ApprovalWorkflowMaxDuration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ApprovalWorkflowMaxDuration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingApprovalWorkflowMaxDurationUnitEnum(string(m.Unit)); !ok && m.Unit != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Unit: %s. Supported values are: %s.", m.Unit, strings.Join(GetApprovalWorkflowMaxDurationUnitEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ApprovalWorkflowMaxDurationUnitEnum Enum with underlying type: string +type ApprovalWorkflowMaxDurationUnitEnum string + +// Set of constants representing the allowable values for ApprovalWorkflowMaxDurationUnitEnum +const ( + ApprovalWorkflowMaxDurationUnitMonth ApprovalWorkflowMaxDurationUnitEnum = "MONTH" + ApprovalWorkflowMaxDurationUnitWeek ApprovalWorkflowMaxDurationUnitEnum = "WEEK" + ApprovalWorkflowMaxDurationUnitDay ApprovalWorkflowMaxDurationUnitEnum = "DAY" + ApprovalWorkflowMaxDurationUnitHour ApprovalWorkflowMaxDurationUnitEnum = "HOUR" +) + +var mappingApprovalWorkflowMaxDurationUnitEnum = map[string]ApprovalWorkflowMaxDurationUnitEnum{ + "MONTH": ApprovalWorkflowMaxDurationUnitMonth, + "WEEK": ApprovalWorkflowMaxDurationUnitWeek, + "DAY": ApprovalWorkflowMaxDurationUnitDay, + "HOUR": ApprovalWorkflowMaxDurationUnitHour, +} + +var mappingApprovalWorkflowMaxDurationUnitEnumLowerCase = map[string]ApprovalWorkflowMaxDurationUnitEnum{ + "month": ApprovalWorkflowMaxDurationUnitMonth, + "week": ApprovalWorkflowMaxDurationUnitWeek, + "day": ApprovalWorkflowMaxDurationUnitDay, + "hour": ApprovalWorkflowMaxDurationUnitHour, +} + +// GetApprovalWorkflowMaxDurationUnitEnumValues Enumerates the set of values for ApprovalWorkflowMaxDurationUnitEnum +func GetApprovalWorkflowMaxDurationUnitEnumValues() []ApprovalWorkflowMaxDurationUnitEnum { + values := make([]ApprovalWorkflowMaxDurationUnitEnum, 0) + for _, v := range mappingApprovalWorkflowMaxDurationUnitEnum { + values = append(values, v) + } + return values +} + +// GetApprovalWorkflowMaxDurationUnitEnumStringValues Enumerates the set of values in String for ApprovalWorkflowMaxDurationUnitEnum +func GetApprovalWorkflowMaxDurationUnitEnumStringValues() []string { + return []string{ + "MONTH", + "WEEK", + "DAY", + "HOUR", + } +} + +// GetMappingApprovalWorkflowMaxDurationUnitEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingApprovalWorkflowMaxDurationUnitEnum(val string) (ApprovalWorkflowMaxDurationUnitEnum, bool) { + enum, ok := mappingApprovalWorkflowMaxDurationUnitEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/approval_workflow_step.go b/identitydomains/approval_workflow_step.go new file mode 100644 index 0000000000..7bfb735842 --- /dev/null +++ b/identitydomains/approval_workflow_step.go @@ -0,0 +1,277 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApprovalWorkflowStep Schema for ApprovalWorkflowStep +type ApprovalWorkflowStep struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // Order of the ApprovalWorkflowStep. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - idcsMaxValue: 2147483647 + // - required: true + // - returned: default + // - type: integer + // - uniqueness: none + Order *int `mandatory:"true" json:"order"` + + // Type of ApprovalWorkflowStep + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Type ApprovalWorkflowStepTypeEnum `mandatory:"true" json:"type"` + + // Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: string + // - uniqueness: global + Id *string `mandatory:"false" json:"id"` + + // Unique OCI identifier for the SCIM Resource. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: global + Ocid *string `mandatory:"false" json:"ocid"` + + Meta *Meta `mandatory:"false" json:"meta"` + + IdcsCreatedBy *IdcsCreatedBy `mandatory:"false" json:"idcsCreatedBy"` + + IdcsLastModifiedBy *IdcsLastModifiedBy `mandatory:"false" json:"idcsLastModifiedBy"` + + // Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsPreventedOperations []IdcsPreventedOperationsEnum `mandatory:"false" json:"idcsPreventedOperations,omitempty"` + + // A list of tags on this resource. + // **SCIM++ Properties:** + // - idcsCompositeKey: [key, value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Tags []Tags `mandatory:"false" json:"tags"` + + // A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DeleteInProgress *bool `mandatory:"false" json:"deleteInProgress"` + + // The release number when the resource was upgraded. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsLastUpgradedInRelease *string `mandatory:"false" json:"idcsLastUpgradedInRelease"` + + // OCI Domain Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DomainOcid *string `mandatory:"false" json:"domainOcid"` + + // OCI Compartment Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CompartmentOcid *string `mandatory:"false" json:"compartmentOcid"` + + // OCI Tenant Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TenancyOcid *string `mandatory:"false" json:"tenancyOcid"` + + // Minimum number of Approvals required for this step. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - idcsMinValue: 1 + // - idcsMaxValue: 2147483647 + // - required: false + // - returned: default + // - type: integer + // - uniqueness: none + MinimumApprovals *int `mandatory:"false" json:"minimumApprovals"` + + // approversExpressions of ApprovalWorkflowStep + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ApproversExpressions []string `mandatory:"false" json:"approversExpressions"` + + // Approvers of the ApprovalWorkflowStep. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - idcsCompositeKey: [value, type] + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + // - uniqueness: none + Approvers []ApprovalWorkflowStepApprovers `mandatory:"false" json:"approvers"` +} + +func (m ApprovalWorkflowStep) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ApprovalWorkflowStep) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingApprovalWorkflowStepTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetApprovalWorkflowStepTypeEnumStringValues(), ","))) + } + + for _, val := range m.IdcsPreventedOperations { + if _, ok := GetMappingIdcsPreventedOperationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsPreventedOperations: %s. Supported values are: %s.", val, strings.Join(GetIdcsPreventedOperationsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ApprovalWorkflowStepTypeEnum Enum with underlying type: string +type ApprovalWorkflowStepTypeEnum string + +// Set of constants representing the allowable values for ApprovalWorkflowStepTypeEnum +const ( + ApprovalWorkflowStepTypeEscalation ApprovalWorkflowStepTypeEnum = "escalation" + ApprovalWorkflowStepTypeRegular ApprovalWorkflowStepTypeEnum = "regular" +) + +var mappingApprovalWorkflowStepTypeEnum = map[string]ApprovalWorkflowStepTypeEnum{ + "escalation": ApprovalWorkflowStepTypeEscalation, + "regular": ApprovalWorkflowStepTypeRegular, +} + +var mappingApprovalWorkflowStepTypeEnumLowerCase = map[string]ApprovalWorkflowStepTypeEnum{ + "escalation": ApprovalWorkflowStepTypeEscalation, + "regular": ApprovalWorkflowStepTypeRegular, +} + +// GetApprovalWorkflowStepTypeEnumValues Enumerates the set of values for ApprovalWorkflowStepTypeEnum +func GetApprovalWorkflowStepTypeEnumValues() []ApprovalWorkflowStepTypeEnum { + values := make([]ApprovalWorkflowStepTypeEnum, 0) + for _, v := range mappingApprovalWorkflowStepTypeEnum { + values = append(values, v) + } + return values +} + +// GetApprovalWorkflowStepTypeEnumStringValues Enumerates the set of values in String for ApprovalWorkflowStepTypeEnum +func GetApprovalWorkflowStepTypeEnumStringValues() []string { + return []string{ + "escalation", + "regular", + } +} + +// GetMappingApprovalWorkflowStepTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingApprovalWorkflowStepTypeEnum(val string) (ApprovalWorkflowStepTypeEnum, bool) { + enum, ok := mappingApprovalWorkflowStepTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/approval_workflow_step_approvers.go b/identitydomains/approval_workflow_step_approvers.go new file mode 100644 index 0000000000..ac3cdec4f2 --- /dev/null +++ b/identitydomains/approval_workflow_step_approvers.go @@ -0,0 +1,96 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApprovalWorkflowStepApprovers Approvers of the ApprovalWorkflowStep. +type ApprovalWorkflowStepApprovers struct { + + // The unique identifier of the approver. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // The type of the approver. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: reference + // - uniqueness: none + Type *string `mandatory:"true" json:"type"` + + // The unique OCI identifier of the approver. + // **SCIM++ Properties:** + // - idcsSearchable: true + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Ocid *string `mandatory:"false" json:"ocid"` + + // The display of the approver. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Display *string `mandatory:"false" json:"display"` + + // Approver URI + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: reference + // - uniqueness: none + Ref *string `mandatory:"false" json:"$ref"` +} + +func (m ApprovalWorkflowStepApprovers) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ApprovalWorkflowStepApprovers) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/approval_workflow_steps.go b/identitydomains/approval_workflow_steps.go new file mode 100644 index 0000000000..3c2fb4dd40 --- /dev/null +++ b/identitydomains/approval_workflow_steps.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApprovalWorkflowSteps The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type ApprovalWorkflowSteps struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []ApprovalWorkflowStep `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m ApprovalWorkflowSteps) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ApprovalWorkflowSteps) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/approval_workflows.go b/identitydomains/approval_workflows.go new file mode 100644 index 0000000000..651b426aef --- /dev/null +++ b/identitydomains/approval_workflows.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ApprovalWorkflows The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type ApprovalWorkflows struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []ApprovalWorkflow `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m ApprovalWorkflows) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ApprovalWorkflows) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/authentication_factors_remover.go b/identitydomains/authentication_factors_remover.go index 716600aa7f..482c27023b 100644 --- a/identitydomains/authentication_factors_remover.go +++ b/identitydomains/authentication_factors_remover.go @@ -156,6 +156,17 @@ type AuthenticationFactorsRemover struct { // - uniqueness: none // - idcsSearchable: false Type AuthenticationFactorsRemoverTypeEnum `mandatory:"false" json:"type,omitempty"` + + // Specifies the token to be removed + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - required: false + // - mutability: readWrite + // - returned: request + // - uniqueness: none + // - idcsSearchable: false + Token *string `mandatory:"false" json:"token"` } func (m AuthenticationFactorsRemover) String() string { diff --git a/identitydomains/branding_setting.go b/identitydomains/branding_setting.go new file mode 100644 index 0000000000..98a5ec0eb2 --- /dev/null +++ b/identitydomains/branding_setting.go @@ -0,0 +1,368 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BrandingSetting Brand Settings schema +type BrandingSetting struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: string + // - uniqueness: global + Id *string `mandatory:"false" json:"id"` + + // Unique OCI identifier for the SCIM Resource. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: global + Ocid *string `mandatory:"false" json:"ocid"` + + Meta *Meta `mandatory:"false" json:"meta"` + + IdcsCreatedBy *IdcsCreatedBy `mandatory:"false" json:"idcsCreatedBy"` + + IdcsLastModifiedBy *IdcsLastModifiedBy `mandatory:"false" json:"idcsLastModifiedBy"` + + // Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsPreventedOperations []IdcsPreventedOperationsEnum `mandatory:"false" json:"idcsPreventedOperations,omitempty"` + + // A list of tags on this resource. + // **SCIM++ Properties:** + // - idcsCompositeKey: [key, value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Tags []Tags `mandatory:"false" json:"tags"` + + // A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DeleteInProgress *bool `mandatory:"false" json:"deleteInProgress"` + + // The release number when the resource was upgraded. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsLastUpgradedInRelease *string `mandatory:"false" json:"idcsLastUpgradedInRelease"` + + // OCI Domain Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DomainOcid *string `mandatory:"false" json:"domainOcid"` + + // OCI Compartment Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CompartmentOcid *string `mandatory:"false" json:"compartmentOcid"` + + // OCI Tenant Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TenancyOcid *string `mandatory:"false" json:"tenancyOcid"` + + // An identifier for the Resource as defined by the Service Consumer. The externalId may simplify identification of the Resource between Service Consumer and Service Provider by allowing the Consumer to refer to the Resource with its own identifier, obviating the need to store a local mapping between the local identifier of the Resource and the identifier used by the Service Provider. Each Resource MAY include a non-empty externalId value. The value of the externalId attribute is always issued by the Service Consumer and can never be specified by the Service Provider. The Service Provider MUST always interpret the externalId as scoped to the Service Consumer's tenant. + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ExternalId *string `mandatory:"false" json:"externalId"` + + // Indicates if the branding is default or is custom branding + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + CustomBranding *bool `mandatory:"false" json:"customBranding"` + + // Preferred written or spoken language used for localized user interfaces + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + PreferredLanguage *string `mandatory:"false" json:"preferredLanguage"` + + // User's timezone + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Timezone *string `mandatory:"false" json:"timezone"` + + // Default location for purposes of localizing items such as currency, date and time format, numerical representations, and so on + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Locale *string `mandatory:"false" json:"locale"` + + // Indicates if Terms of Use is enabled in UI + // **Added In:** 18.2.4 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + EnableTermsOfUse *bool `mandatory:"false" json:"enableTermsOfUse"` + + // Terms of Use URL + // **Added In:** 18.2.4 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TermsOfUseUrl *string `mandatory:"false" json:"termsOfUseUrl"` + + // Privacy Policy URL + // **Added In:** 18.2.4 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + PrivacyPolicyUrl *string `mandatory:"false" json:"privacyPolicyUrl"` + + // Indicates if 'hosted' option was selected + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IsHostedPage *bool `mandatory:"false" json:"isHostedPage"` + + // Storage URL location where the sanitized custom html is located + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CustomHtmlLocation *string `mandatory:"false" json:"customHtmlLocation"` + + // Storage URL location where the sanitized custom css is located + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CustomCssLocation *string `mandatory:"false" json:"customCssLocation"` + + // Custom translations (JSON String) + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CustomTranslation *string `mandatory:"false" json:"customTranslation"` + + // Default name of the Company in different locales + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - idcsCompositeKey: [locale] + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: default + // - type: complex + DefaultCompanyNames []BrandingSettingsDefaultCompanyNames `mandatory:"false" json:"defaultCompanyNames"` + + // Default Login text in different locales + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - idcsCompositeKey: [locale] + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: default + // - type: complex + DefaultLoginTexts []BrandingSettingsDefaultLoginTexts `mandatory:"false" json:"defaultLoginTexts"` + + // References to various images + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - idcsCompositeKey: [type] + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: default + // - type: complex + DefaultImages []BrandingSettingsDefaultImages `mandatory:"false" json:"defaultImages"` + + // Name of the company in different locales + // **SCIM++ Properties:** + // - idcsCompositeKey: [locale] + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: default + // - type: complex + CompanyNames []BrandingSettingsCompanyNames `mandatory:"false" json:"companyNames"` + + // Login text in different locales + // **SCIM++ Properties:** + // - idcsCompositeKey: [locale] + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: default + // - type: complex + LoginTexts []BrandingSettingsLoginTexts `mandatory:"false" json:"loginTexts"` + + // References to various images + // **SCIM++ Properties:** + // - idcsCompositeKey: [type] + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: default + // - type: complex + Images []BrandingSettingsImages `mandatory:"false" json:"images"` +} + +func (m BrandingSetting) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BrandingSetting) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.IdcsPreventedOperations { + if _, ok := GetMappingIdcsPreventedOperationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsPreventedOperations: %s. Supported values are: %s.", val, strings.Join(GetIdcsPreventedOperationsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/branding_settings.go b/identitydomains/branding_settings.go new file mode 100644 index 0000000000..7314229c55 --- /dev/null +++ b/identitydomains/branding_settings.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BrandingSettings The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type BrandingSettings struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []BrandingSetting `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m BrandingSettings) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BrandingSettings) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/branding_settings_company_names.go b/identitydomains/branding_settings_company_names.go new file mode 100644 index 0000000000..1ccb2bbd2c --- /dev/null +++ b/identitydomains/branding_settings_company_names.go @@ -0,0 +1,55 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BrandingSettingsCompanyNames Name of the company in different locales +type BrandingSettingsCompanyNames struct { + + // Company name + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + Value *string `mandatory:"true" json:"value"` + + // Locale + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + Locale *string `mandatory:"true" json:"locale"` +} + +func (m BrandingSettingsCompanyNames) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BrandingSettingsCompanyNames) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/branding_settings_default_company_names.go b/identitydomains/branding_settings_default_company_names.go new file mode 100644 index 0000000000..1e783b1ced --- /dev/null +++ b/identitydomains/branding_settings_default_company_names.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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BrandingSettingsDefaultCompanyNames Default name of the Company in different locales +type BrandingSettingsDefaultCompanyNames struct { + + // Company name + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + Value *string `mandatory:"true" json:"value"` + + // Locale + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - idcsCanonicalValueSourceFilter: attrName eq "locales" and attrValues.value eq "$(companyNames.locale)" + // - idcsCanonicalValueSourceResourceType: AllowedValue + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + Locale *string `mandatory:"true" json:"locale"` +} + +func (m BrandingSettingsDefaultCompanyNames) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BrandingSettingsDefaultCompanyNames) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/branding_settings_default_images.go b/identitydomains/branding_settings_default_images.go new file mode 100644 index 0000000000..e03d5d800c --- /dev/null +++ b/identitydomains/branding_settings_default_images.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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BrandingSettingsDefaultImages References to various images +type BrandingSettingsDefaultImages struct { + + // Image URI + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: reference + Value *string `mandatory:"true" json:"value"` + + // Indicates the image type + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + Type *string `mandatory:"true" json:"type"` + + // A human-readable name, primarily used for display purposes + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + Display *string `mandatory:"false" json:"display"` +} + +func (m BrandingSettingsDefaultImages) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BrandingSettingsDefaultImages) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/branding_settings_default_login_texts.go b/identitydomains/branding_settings_default_login_texts.go new file mode 100644 index 0000000000..f7241c299a --- /dev/null +++ b/identitydomains/branding_settings_default_login_texts.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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BrandingSettingsDefaultLoginTexts Default Login text in different locales +type BrandingSettingsDefaultLoginTexts struct { + + // Login text + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + Value *string `mandatory:"true" json:"value"` + + // Locale + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - idcsCanonicalValueSourceFilter: attrName eq "locales" and attrValues.value eq "$(loginTexts.locale)" + // - idcsCanonicalValueSourceResourceType: AllowedValue + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + Locale *string `mandatory:"true" json:"locale"` +} + +func (m BrandingSettingsDefaultLoginTexts) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BrandingSettingsDefaultLoginTexts) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/branding_settings_images.go b/identitydomains/branding_settings_images.go new file mode 100644 index 0000000000..9eb0018f97 --- /dev/null +++ b/identitydomains/branding_settings_images.go @@ -0,0 +1,64 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BrandingSettingsImages References to various images +type BrandingSettingsImages struct { + + // Image URI + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: reference + Value *string `mandatory:"true" json:"value"` + + // Indicates the image type + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + Type *string `mandatory:"true" json:"type"` + + // A human-readable name, primarily used for display purposes + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + Display *string `mandatory:"false" json:"display"` +} + +func (m BrandingSettingsImages) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BrandingSettingsImages) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/branding_settings_login_texts.go b/identitydomains/branding_settings_login_texts.go new file mode 100644 index 0000000000..abbb63ef56 --- /dev/null +++ b/identitydomains/branding_settings_login_texts.go @@ -0,0 +1,55 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BrandingSettingsLoginTexts Login text in different locales +type BrandingSettingsLoginTexts struct { + + // Login text + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + Value *string `mandatory:"true" json:"value"` + + // Locale + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + Locale *string `mandatory:"true" json:"locale"` +} + +func (m BrandingSettingsLoginTexts) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BrandingSettingsLoginTexts) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/cloud_gate.go b/identitydomains/cloud_gate.go new file mode 100644 index 0000000000..ec51484a0d --- /dev/null +++ b/identitydomains/cloud_gate.go @@ -0,0 +1,346 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGate Resource representing a Cloud Gate +type CloudGate struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // Display name/Host identifier for this Cloud Gate + // **Added In:** 19.2.1 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: always + // - type: string + // - uniqueness: server + DisplayName *string `mandatory:"true" json:"displayName"` + + // Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: string + // - uniqueness: global + Id *string `mandatory:"false" json:"id"` + + // Unique OCI identifier for the SCIM Resource. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: global + Ocid *string `mandatory:"false" json:"ocid"` + + Meta *Meta `mandatory:"false" json:"meta"` + + IdcsCreatedBy *IdcsCreatedBy `mandatory:"false" json:"idcsCreatedBy"` + + IdcsLastModifiedBy *IdcsLastModifiedBy `mandatory:"false" json:"idcsLastModifiedBy"` + + // Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsPreventedOperations []IdcsPreventedOperationsEnum `mandatory:"false" json:"idcsPreventedOperations,omitempty"` + + // A list of tags on this resource. + // **SCIM++ Properties:** + // - idcsCompositeKey: [key, value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Tags []Tags `mandatory:"false" json:"tags"` + + // A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DeleteInProgress *bool `mandatory:"false" json:"deleteInProgress"` + + // The release number when the resource was upgraded. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsLastUpgradedInRelease *string `mandatory:"false" json:"idcsLastUpgradedInRelease"` + + // OCI Domain Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DomainOcid *string `mandatory:"false" json:"domainOcid"` + + // OCI Compartment Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CompartmentOcid *string `mandatory:"false" json:"compartmentOcid"` + + // OCI Tenant Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TenancyOcid *string `mandatory:"false" json:"tenancyOcid"` + + // Indicates whether this resource was created by OPC + // **Added In:** 19.3.3 + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: boolean + // - uniqueness: none + IsOPCService *bool `mandatory:"false" json:"isOPCService"` + + // Last updated timestamp for this CloudGate's servers and mappings. + // **Added In:** 19.2.1 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: dateTime + // - uniqueness: none + LastModifiedTime *string `mandatory:"false" json:"lastModifiedTime"` + + // Brief description for this Cloud Gate + // **Added In:** 19.2.1 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Description *string `mandatory:"false" json:"description"` + + // Activation status for this Cloud Gate + // **Added In:** 19.2.1 + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + Active *bool `mandatory:"false" json:"active"` + + // Type of Cloud Gate + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Type CloudGateTypeEnum `mandatory:"false" json:"type,omitempty"` + + // A list of upstream server groups + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsCompositeKey: [value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + UpstreamServerGroups []CloudGateExtUpstreamServerGroups `mandatory:"false" json:"upstreamServerGroups"` + + // A list of upstream servers + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsCompositeKey: [value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + UpstreamServers []CloudGateExtUpstreamServers `mandatory:"false" json:"upstreamServers"` + + OauthClient *CloudGateOauthClient `mandatory:"false" json:"oauthClient"` + + // A list of Server Blocks on this Cloud Gate + // **SCIM++ Properties:** + // - caseExact: true + // - idcsCompositeKey: [hostName] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Servers []CloudGateExtServers `mandatory:"false" json:"servers"` + + // A list of Cloud Gate Mappings that map Apps to this Cloud Gate + // **SCIM++ Properties:** + // - caseExact: true + // - idcsCompositeKey: [serverId, resourcePrefix] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Mappings []CloudGateExtMappings `mandatory:"false" json:"mappings"` +} + +func (m CloudGate) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGate) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.IdcsPreventedOperations { + if _, ok := GetMappingIdcsPreventedOperationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsPreventedOperations: %s. Supported values are: %s.", val, strings.Join(GetIdcsPreventedOperationsEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingCloudGateTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetCloudGateTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CloudGateTypeEnum Enum with underlying type: string +type CloudGateTypeEnum string + +// Set of constants representing the allowable values for CloudGateTypeEnum +const ( + CloudGateTypeLbaas CloudGateTypeEnum = "lbaas" + CloudGateTypeGateway CloudGateTypeEnum = "gateway" +) + +var mappingCloudGateTypeEnum = map[string]CloudGateTypeEnum{ + "lbaas": CloudGateTypeLbaas, + "gateway": CloudGateTypeGateway, +} + +var mappingCloudGateTypeEnumLowerCase = map[string]CloudGateTypeEnum{ + "lbaas": CloudGateTypeLbaas, + "gateway": CloudGateTypeGateway, +} + +// GetCloudGateTypeEnumValues Enumerates the set of values for CloudGateTypeEnum +func GetCloudGateTypeEnumValues() []CloudGateTypeEnum { + values := make([]CloudGateTypeEnum, 0) + for _, v := range mappingCloudGateTypeEnum { + values = append(values, v) + } + return values +} + +// GetCloudGateTypeEnumStringValues Enumerates the set of values in String for CloudGateTypeEnum +func GetCloudGateTypeEnumStringValues() []string { + return []string{ + "lbaas", + "gateway", + } +} + +// GetMappingCloudGateTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCloudGateTypeEnum(val string) (CloudGateTypeEnum, bool) { + enum, ok := mappingCloudGateTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/cloud_gate_ext_mappings.go b/identitydomains/cloud_gate_ext_mappings.go new file mode 100644 index 0000000000..4fb09195f1 --- /dev/null +++ b/identitydomains/cloud_gate_ext_mappings.go @@ -0,0 +1,171 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGateExtMappings A list of Cloud Gate Mappings that map Apps to this Cloud Gate +type CloudGateExtMappings struct { + + // Resource prefix for this mapping. This will be used to define the location block + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + ResourcePrefix *string `mandatory:"true" json:"resourcePrefix"` + + // Server Instance for the Mapping. This is one of the server IDs(server blocks) from the associated Cloud Gate list + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + ServerId *string `mandatory:"true" json:"serverId"` + + // The id of the Cloud Gate Mapping + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + MappingId *string `mandatory:"false" json:"mappingId"` + + // NGINX ProxyPass entry for this Mapping + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ProxyPass *string `mandatory:"false" json:"proxyPass"` + + // More NGINX Settings. JSON encoded key value pairs similar to WTP encoding + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + NginxSettings *string `mandatory:"false" json:"nginxSettings"` + + // The ID of the App being mapped to + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + AppId *string `mandatory:"false" json:"appId"` + + // The id of the App being mapped to + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"false" json:"value"` + + // The name (Client ID) of the App being mapped to + // **Added In:** 19.2.1 + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Name *string `mandatory:"false" json:"name"` + + // URI of the App being mapped to + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: reference + // - uniqueness: none + Ref *string `mandatory:"false" json:"$ref"` + + // The Web Tier policy name used for the App that is mapped to this Cloud Gate + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + PolicyName *string `mandatory:"false" json:"policyName"` + + // Upstream server group instance for the Mapping. This is one of the upstream server group IDs(upstream blocks) from the associated Cloud Gate list + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + UpstreamServerGroupId *string `mandatory:"false" json:"upstreamServerGroupId"` +} + +func (m CloudGateExtMappings) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGateExtMappings) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/cloud_gate_ext_servers.go b/identitydomains/cloud_gate_ext_servers.go new file mode 100644 index 0000000000..44173638e4 --- /dev/null +++ b/identitydomains/cloud_gate_ext_servers.go @@ -0,0 +1,97 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGateExtServers A list of Server Blocks on this Cloud Gate +type CloudGateExtServers struct { + + // Hostname for the Server block + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + HostName *string `mandatory:"true" json:"hostName"` + + // Port for the Server Block + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: integer + // - uniqueness: none + Port *int `mandatory:"true" json:"port"` + + // SSL flag for the Server Block + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: boolean + // - uniqueness: none + Ssl *bool `mandatory:"true" json:"ssl"` + + // Server Name for the Server Block + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ServerId *string `mandatory:"false" json:"serverId"` + + // More nginx Settings. JSON encoded text block + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + NginxSettings *string `mandatory:"false" json:"nginxSettings"` +} + +func (m CloudGateExtServers) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGateExtServers) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/cloud_gate_ext_upstream_server_groups.go b/identitydomains/cloud_gate_ext_upstream_server_groups.go new file mode 100644 index 0000000000..40cad43c07 --- /dev/null +++ b/identitydomains/cloud_gate_ext_upstream_server_groups.go @@ -0,0 +1,102 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGateExtUpstreamServerGroups A list of upstream server groups +type CloudGateExtUpstreamServerGroups struct { + + // Name for the Upstream Block + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // Display name of upstream + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + DisplayName *string `mandatory:"true" json:"displayName"` + + // URI of the upstream server groups + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: reference + // - uniqueness: none + Ref *string `mandatory:"false" json:"$ref"` + + // Any additional settings in nginx configuration form + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + NginxSettings *string `mandatory:"false" json:"nginxSettings"` + + // SSL flag for the Upstream Block + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + Ssl *bool `mandatory:"false" json:"ssl"` +} + +func (m CloudGateExtUpstreamServerGroups) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGateExtUpstreamServerGroups) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/cloud_gate_ext_upstream_servers.go b/identitydomains/cloud_gate_ext_upstream_servers.go new file mode 100644 index 0000000000..628840a7a0 --- /dev/null +++ b/identitydomains/cloud_gate_ext_upstream_servers.go @@ -0,0 +1,128 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGateExtUpstreamServers A list of upstream servers +type CloudGateExtUpstreamServers struct { + + // ID of the upstream server + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // URI of the upstream server + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: reference + // - uniqueness: none + Ref *string `mandatory:"false" json:"$ref"` + + // Any incoming request to cloud gate is finally sent to this host, if selected during load balancing + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + HostName *string `mandatory:"false" json:"hostName"` + + // Port for the Upstream Server + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: integer + // - uniqueness: none + Port *int `mandatory:"false" json:"port"` + + // Any additional settings for this upstream server in nginx configuration form + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + NginxSettings *string `mandatory:"false" json:"nginxSettings"` + + // Upstream Server Group instance for the upstream server. This is one of the upstreamServerGroup IDs(upstream blocks) from the associated Cloud Gate list + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + GroupId *string `mandatory:"false" json:"groupId"` + + // Display name of upstream server + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m CloudGateExtUpstreamServers) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGateExtUpstreamServers) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/cloud_gate_mapping.go b/identitydomains/cloud_gate_mapping.go new file mode 100644 index 0000000000..3d52287346 --- /dev/null +++ b/identitydomains/cloud_gate_mapping.go @@ -0,0 +1,249 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGateMapping Resource representing a Cloud Gate mapping +type CloudGateMapping struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // Resource prefix for this mapping. This will be used to define the location block + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + ResourcePrefix *string `mandatory:"true" json:"resourcePrefix"` + + // The Web Tier policy name used for the App that is mapped to the owning Cloud Gate + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + PolicyName *string `mandatory:"true" json:"policyName"` + + Server *CloudGateMappingServer `mandatory:"true" json:"server"` + + GatewayApp *CloudGateMappingGatewayApp `mandatory:"true" json:"gatewayApp"` + + CloudGate *CloudGateMappingCloudGate `mandatory:"true" json:"cloudGate"` + + // Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: string + // - uniqueness: global + Id *string `mandatory:"false" json:"id"` + + // Unique OCI identifier for the SCIM Resource. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: global + Ocid *string `mandatory:"false" json:"ocid"` + + Meta *Meta `mandatory:"false" json:"meta"` + + IdcsCreatedBy *IdcsCreatedBy `mandatory:"false" json:"idcsCreatedBy"` + + IdcsLastModifiedBy *IdcsLastModifiedBy `mandatory:"false" json:"idcsLastModifiedBy"` + + // Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsPreventedOperations []IdcsPreventedOperationsEnum `mandatory:"false" json:"idcsPreventedOperations,omitempty"` + + // A list of tags on this resource. + // **SCIM++ Properties:** + // - idcsCompositeKey: [key, value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Tags []Tags `mandatory:"false" json:"tags"` + + // A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DeleteInProgress *bool `mandatory:"false" json:"deleteInProgress"` + + // The release number when the resource was upgraded. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsLastUpgradedInRelease *string `mandatory:"false" json:"idcsLastUpgradedInRelease"` + + // OCI Domain Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DomainOcid *string `mandatory:"false" json:"domainOcid"` + + // OCI Compartment Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CompartmentOcid *string `mandatory:"false" json:"compartmentOcid"` + + // OCI Tenant Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TenancyOcid *string `mandatory:"false" json:"tenancyOcid"` + + // Indicates whether this resource was created by OPC + // **Added In:** 19.3.3 + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: boolean + // - uniqueness: none + IsOPCService *bool `mandatory:"false" json:"isOPCService"` + + // Brief description for this Cloud Gate + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Description *string `mandatory:"false" json:"description"` + + // NGINX ProxyPass entry for this Mapping + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ProxyPass *string `mandatory:"false" json:"proxyPass"` + + // More NGINX Settings. JSON encoded key value pairs similar to WTP encoding + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + NginxSettings *string `mandatory:"false" json:"nginxSettings"` + + UpstreamServerGroup *CloudGateMappingUpstreamServerGroup `mandatory:"false" json:"upstreamServerGroup"` +} + +func (m CloudGateMapping) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGateMapping) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.IdcsPreventedOperations { + if _, ok := GetMappingIdcsPreventedOperationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsPreventedOperations: %s. Supported values are: %s.", val, strings.Join(GetIdcsPreventedOperationsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/cloud_gate_mapping_cloud_gate.go b/identitydomains/cloud_gate_mapping_cloud_gate.go new file mode 100644 index 0000000000..722a5acf1b --- /dev/null +++ b/identitydomains/cloud_gate_mapping_cloud_gate.go @@ -0,0 +1,70 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGateMappingCloudGate Reference to owning Cloud Gate +// **SCIM++ Properties:** +// - caseExact: false +// - idcsSearchable: true +// - multiValued: false +// - mutability: readWrite +// - required: true +// - returned: default +// - type: complex +// - uniqueness: none +type CloudGateMappingCloudGate struct { + + // The id of the owning Cloud Gate. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // The URI of the OAuth app for this Cloud Gate. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: reference + // - uniqueness: none + Ref *string `mandatory:"false" json:"$ref"` +} + +func (m CloudGateMappingCloudGate) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGateMappingCloudGate) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/cloud_gate_mapping_gateway_app.go b/identitydomains/cloud_gate_mapping_gateway_app.go new file mode 100644 index 0000000000..d2839ecc8e --- /dev/null +++ b/identitydomains/cloud_gate_mapping_gateway_app.go @@ -0,0 +1,82 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGateMappingGatewayApp Reference to gateway application protected by this Cloud Gate +// **SCIM++ Properties:** +// - caseExact: false +// - idcsSearchable: true +// - multiValued: false +// - mutability: readWrite +// - required: true +// - returned: default +// - type: complex +// - uniqueness: none +type CloudGateMappingGatewayApp struct { + + // The name (Client ID) of the gateway application protected by this Cloud Gate. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Name *string `mandatory:"true" json:"name"` + + // The id of the gateway application protected by this Cloud Gate. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // The URI to the gateway application protected by this Cloud Gate + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: reference + // - uniqueness: none + Ref *string `mandatory:"false" json:"$ref"` +} + +func (m CloudGateMappingGatewayApp) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGateMappingGatewayApp) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/cloud_gate_mapping_search_request.go b/identitydomains/cloud_gate_mapping_search_request.go new file mode 100644 index 0000000000..81bb055734 --- /dev/null +++ b/identitydomains/cloud_gate_mapping_search_request.go @@ -0,0 +1,70 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGateMappingSearchRequest Clients MAY execute queries without passing parameters on the URL by using the HTTP POST verb combined with the **.search** path extension. The inclusion of **.search** on the end of a valid SCIM endpoint SHALL be used to indicate the HTTP POST verb is intended to be a query operation. To create a new query result set, a SCIM client sends an HTTP POST request to the desired SCIM resource endpoint (ending in **.search**). The body of the POST request MAY include any of the parameters. +type CloudGateMappingSearchRequest struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See (additional retrieval query parameters (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + Attributes []string `mandatory:"false" json:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + AttributeSets []AttributeSetsEnum `mandatory:"false" json:"attributeSets,omitempty"` + + // The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See Section 3.4.2.2 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2). OPTIONAL. + Filter *string `mandatory:"false" json:"filter"` + + // A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See Sorting section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + SortBy *string `mandatory:"false" json:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder SortOrderEnum `mandatory:"false" json:"sortOrder,omitempty"` + + // An integer that indicates the 1-based index of the first query result. See Pagination Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + StartIndex *int `mandatory:"false" json:"startIndex"` + + // An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + Count *int `mandatory:"false" json:"count"` +} + +func (m CloudGateMappingSearchRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGateMappingSearchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingSortOrderEnum(string(m.SortOrder)); !ok && m.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", m.SortOrder, strings.Join(GetSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/cloud_gate_mapping_server.go b/identitydomains/cloud_gate_mapping_server.go new file mode 100644 index 0000000000..94cbe768af --- /dev/null +++ b/identitydomains/cloud_gate_mapping_server.go @@ -0,0 +1,70 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGateMappingServer Reference to server block for this mapping +// **SCIM++ Properties:** +// - caseExact: false +// - idcsSearchable: true +// - multiValued: false +// - mutability: readWrite +// - required: true +// - returned: default +// - type: complex +// - uniqueness: none +type CloudGateMappingServer struct { + + // The id of the server block entry. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // The URI to the server block entry + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: reference + // - uniqueness: none + Ref *string `mandatory:"false" json:"$ref"` +} + +func (m CloudGateMappingServer) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGateMappingServer) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/cloud_gate_mapping_upstream_server_group.go b/identitydomains/cloud_gate_mapping_upstream_server_group.go new file mode 100644 index 0000000000..89a4c48748 --- /dev/null +++ b/identitydomains/cloud_gate_mapping_upstream_server_group.go @@ -0,0 +1,85 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGateMappingUpstreamServerGroup Reference to upstream block for this mapping +// **Added In:** 20.1.3 +// **SCIM++ Properties:** +// - caseExact: false +// - multiValued: false +// - mutability: readWrite +// - required: false +// - returned: default +// - type: complex +// - uniqueness: none +type CloudGateMappingUpstreamServerGroup struct { + + // The id of the upstream block entry. + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"false" json:"value"` + + // The URI to the upstream block entry + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: reference + // - uniqueness: none + Ref *string `mandatory:"false" json:"$ref"` + + // SSL flag for the Upstream Block + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + Ssl *bool `mandatory:"false" json:"ssl"` +} + +func (m CloudGateMappingUpstreamServerGroup) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGateMappingUpstreamServerGroup) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/cloud_gate_mappings.go b/identitydomains/cloud_gate_mappings.go new file mode 100644 index 0000000000..259a4a9b75 --- /dev/null +++ b/identitydomains/cloud_gate_mappings.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGateMappings The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type CloudGateMappings struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []CloudGateMapping `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m CloudGateMappings) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGateMappings) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/cloud_gate_oauth_client.go b/identitydomains/cloud_gate_oauth_client.go new file mode 100644 index 0000000000..2dd9f7129b --- /dev/null +++ b/identitydomains/cloud_gate_oauth_client.go @@ -0,0 +1,83 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGateOauthClient A reference to the OAuth client App used by this Cloud Gate instance. +// **SCIM++ Properties:** +// - caseExact: false +// - idcsSearchable: true +// - multiValued: false +// - mutability: readOnly +// - required: false +// - returned: default +// - type: complex +// - uniqueness: none +type CloudGateOauthClient struct { + + // The id of the OAuth app for this CloudGate. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"false" json:"value"` + + // The URI of the OAuth app for this CloudGate. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: reference + // - uniqueness: none + Ref *string `mandatory:"false" json:"$ref"` + + // The Client ID of the OAuth app for this CloudGate. + // **Added In:** 19.2.1 + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ClientId *string `mandatory:"false" json:"clientId"` +} + +func (m CloudGateOauthClient) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGateOauthClient) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/cloud_gate_search_request.go b/identitydomains/cloud_gate_search_request.go new file mode 100644 index 0000000000..7981f9daf7 --- /dev/null +++ b/identitydomains/cloud_gate_search_request.go @@ -0,0 +1,70 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGateSearchRequest Clients MAY execute queries without passing parameters on the URL by using the HTTP POST verb combined with the **.search** path extension. The inclusion of **.search** on the end of a valid SCIM endpoint SHALL be used to indicate the HTTP POST verb is intended to be a query operation. To create a new query result set, a SCIM client sends an HTTP POST request to the desired SCIM resource endpoint (ending in **.search**). The body of the POST request MAY include any of the parameters. +type CloudGateSearchRequest struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See (additional retrieval query parameters (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + Attributes []string `mandatory:"false" json:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + AttributeSets []AttributeSetsEnum `mandatory:"false" json:"attributeSets,omitempty"` + + // The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See Section 3.4.2.2 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2). OPTIONAL. + Filter *string `mandatory:"false" json:"filter"` + + // A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See Sorting section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + SortBy *string `mandatory:"false" json:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder SortOrderEnum `mandatory:"false" json:"sortOrder,omitempty"` + + // An integer that indicates the 1-based index of the first query result. See Pagination Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + StartIndex *int `mandatory:"false" json:"startIndex"` + + // An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + Count *int `mandatory:"false" json:"count"` +} + +func (m CloudGateSearchRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGateSearchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingSortOrderEnum(string(m.SortOrder)); !ok && m.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", m.SortOrder, strings.Join(GetSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/cloud_gate_server.go b/identitydomains/cloud_gate_server.go new file mode 100644 index 0000000000..c06ecadef8 --- /dev/null +++ b/identitydomains/cloud_gate_server.go @@ -0,0 +1,257 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGateServer Resource representing a Cloud Gate server block +type CloudGateServer struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // Display name for the Server block + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: always + // - type: string + // - uniqueness: server + DisplayName *string `mandatory:"true" json:"displayName"` + + // Hostname for the Server block + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: always + // - type: string + // - uniqueness: none + HostName *string `mandatory:"true" json:"hostName"` + + // Port for the Server Block + // **SCIM++ Properties:** + // - caseExact: true + // - idcsMaxValue: 65535 + // - idcsMinValue: 1 + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: integer + // - uniqueness: none + Port *int `mandatory:"true" json:"port"` + + // SSL flag for the Server Block + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: boolean + // - uniqueness: none + Ssl *bool `mandatory:"true" json:"ssl"` + + CloudGate *CloudGateServerCloudGate `mandatory:"true" json:"cloudGate"` + + // Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: string + // - uniqueness: global + Id *string `mandatory:"false" json:"id"` + + // Unique OCI identifier for the SCIM Resource. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: global + Ocid *string `mandatory:"false" json:"ocid"` + + Meta *Meta `mandatory:"false" json:"meta"` + + IdcsCreatedBy *IdcsCreatedBy `mandatory:"false" json:"idcsCreatedBy"` + + IdcsLastModifiedBy *IdcsLastModifiedBy `mandatory:"false" json:"idcsLastModifiedBy"` + + // Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsPreventedOperations []IdcsPreventedOperationsEnum `mandatory:"false" json:"idcsPreventedOperations,omitempty"` + + // A list of tags on this resource. + // **SCIM++ Properties:** + // - idcsCompositeKey: [key, value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Tags []Tags `mandatory:"false" json:"tags"` + + // A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DeleteInProgress *bool `mandatory:"false" json:"deleteInProgress"` + + // The release number when the resource was upgraded. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsLastUpgradedInRelease *string `mandatory:"false" json:"idcsLastUpgradedInRelease"` + + // OCI Domain Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DomainOcid *string `mandatory:"false" json:"domainOcid"` + + // OCI Compartment Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CompartmentOcid *string `mandatory:"false" json:"compartmentOcid"` + + // OCI Tenant Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TenancyOcid *string `mandatory:"false" json:"tenancyOcid"` + + // Indicates whether this resource was created by OPC + // **Added In:** 19.3.3 + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: boolean + // - uniqueness: none + IsOPCService *bool `mandatory:"false" json:"isOPCService"` + + // Brief description for this Cloud Gate server block + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Description *string `mandatory:"false" json:"description"` + + // More nginx Settings. JSON encoded text block + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + NginxSettings *string `mandatory:"false" json:"nginxSettings"` +} + +func (m CloudGateServer) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGateServer) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.IdcsPreventedOperations { + if _, ok := GetMappingIdcsPreventedOperationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsPreventedOperations: %s. Supported values are: %s.", val, strings.Join(GetIdcsPreventedOperationsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/cloud_gate_server_cloud_gate.go b/identitydomains/cloud_gate_server_cloud_gate.go new file mode 100644 index 0000000000..0f83128de6 --- /dev/null +++ b/identitydomains/cloud_gate_server_cloud_gate.go @@ -0,0 +1,70 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGateServerCloudGate Reference to owning Cloud Gate +// **SCIM++ Properties:** +// - caseExact: false +// - idcsSearchable: true +// - multiValued: false +// - mutability: readWrite +// - required: true +// - returned: default +// - type: complex +// - uniqueness: none +type CloudGateServerCloudGate struct { + + // The id of the owning Cloud Gate. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // The URI of the owning Cloud Gate for this server block. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: reference + // - uniqueness: none + Ref *string `mandatory:"false" json:"$ref"` +} + +func (m CloudGateServerCloudGate) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGateServerCloudGate) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/cloud_gate_server_search_request.go b/identitydomains/cloud_gate_server_search_request.go new file mode 100644 index 0000000000..e204cc3cb9 --- /dev/null +++ b/identitydomains/cloud_gate_server_search_request.go @@ -0,0 +1,70 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGateServerSearchRequest Clients MAY execute queries without passing parameters on the URL by using the HTTP POST verb combined with the **.search** path extension. The inclusion of **.search** on the end of a valid SCIM endpoint SHALL be used to indicate the HTTP POST verb is intended to be a query operation. To create a new query result set, a SCIM client sends an HTTP POST request to the desired SCIM resource endpoint (ending in **.search**). The body of the POST request MAY include any of the parameters. +type CloudGateServerSearchRequest struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See (additional retrieval query parameters (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + Attributes []string `mandatory:"false" json:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + AttributeSets []AttributeSetsEnum `mandatory:"false" json:"attributeSets,omitempty"` + + // The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See Section 3.4.2.2 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2). OPTIONAL. + Filter *string `mandatory:"false" json:"filter"` + + // A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See Sorting section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + SortBy *string `mandatory:"false" json:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder SortOrderEnum `mandatory:"false" json:"sortOrder,omitempty"` + + // An integer that indicates the 1-based index of the first query result. See Pagination Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + StartIndex *int `mandatory:"false" json:"startIndex"` + + // An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + Count *int `mandatory:"false" json:"count"` +} + +func (m CloudGateServerSearchRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGateServerSearchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingSortOrderEnum(string(m.SortOrder)); !ok && m.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", m.SortOrder, strings.Join(GetSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/cloud_gate_servers.go b/identitydomains/cloud_gate_servers.go new file mode 100644 index 0000000000..ac5431a4be --- /dev/null +++ b/identitydomains/cloud_gate_servers.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGateServers The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type CloudGateServers struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []CloudGateServer `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m CloudGateServers) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGateServers) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/cloud_gates.go b/identitydomains/cloud_gates.go new file mode 100644 index 0000000000..099905fc0b --- /dev/null +++ b/identitydomains/cloud_gates.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CloudGates The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type CloudGates struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []CloudGate `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m CloudGates) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CloudGates) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/condition.go b/identitydomains/condition.go new file mode 100644 index 0000000000..d54dd7eed8 --- /dev/null +++ b/identitydomains/condition.go @@ -0,0 +1,337 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Condition Condition resource. A unit that captures a condition. +type Condition struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // Condition name + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: always + // - type: string + // - uniqueness: global + Name *string `mandatory:"true" json:"name"` + + // AttributeName - RHS of condition + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + AttributeName *string `mandatory:"true" json:"attributeName"` + + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + // Operator in the condition. It support all SCIM operators like eq, gt, lt, le, sw etc + Operator ConditionOperatorEnum `mandatory:"true" json:"operator"` + + // attributeValue - RHS of condition + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + AttributeValue *string `mandatory:"true" json:"attributeValue"` + + // Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: string + // - uniqueness: global + Id *string `mandatory:"false" json:"id"` + + // Unique OCI identifier for the SCIM Resource. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: global + Ocid *string `mandatory:"false" json:"ocid"` + + Meta *Meta `mandatory:"false" json:"meta"` + + IdcsCreatedBy *IdcsCreatedBy `mandatory:"false" json:"idcsCreatedBy"` + + IdcsLastModifiedBy *IdcsLastModifiedBy `mandatory:"false" json:"idcsLastModifiedBy"` + + // Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsPreventedOperations []IdcsPreventedOperationsEnum `mandatory:"false" json:"idcsPreventedOperations,omitempty"` + + // A list of tags on this resource. + // **SCIM++ Properties:** + // - idcsCompositeKey: [key, value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Tags []Tags `mandatory:"false" json:"tags"` + + // A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DeleteInProgress *bool `mandatory:"false" json:"deleteInProgress"` + + // The release number when the resource was upgraded. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsLastUpgradedInRelease *string `mandatory:"false" json:"idcsLastUpgradedInRelease"` + + // OCI Domain Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DomainOcid *string `mandatory:"false" json:"domainOcid"` + + // OCI Compartment Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CompartmentOcid *string `mandatory:"false" json:"compartmentOcid"` + + // OCI Tenant Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TenancyOcid *string `mandatory:"false" json:"tenancyOcid"` + + // An identifier for the Resource as defined by the Service Consumer. The externalId may simplify identification of the Resource between Service Consumer and Service provider by allowing the Consumer to refer to the Resource with its own identifier, obviating the need to store a local mapping between the local identifier of the Resource and the identifier used by the Service Provider. Each Resource MAY include a non-empty externalId value. The value of the externalId attribute is always issued be the Service Consumer and can never be specified by the Service Provider. The Service Provider MUST always interpret the externalId as scoped to the Service Consumer's tenant. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ExternalId *string `mandatory:"false" json:"externalId"` + + // Condition Description + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Description *string `mandatory:"false" json:"description"` + + // Evaluate the condition if this expression returns true, else skip condition evaluation + // **Added In:** 18.1.6 + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + EvaluateConditionIf *string `mandatory:"false" json:"evaluateConditionIf"` +} + +func (m Condition) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Condition) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingConditionOperatorEnum(string(m.Operator)); !ok && m.Operator != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Operator: %s. Supported values are: %s.", m.Operator, strings.Join(GetConditionOperatorEnumStringValues(), ","))) + } + + for _, val := range m.IdcsPreventedOperations { + if _, ok := GetMappingIdcsPreventedOperationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsPreventedOperations: %s. Supported values are: %s.", val, strings.Join(GetIdcsPreventedOperationsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ConditionOperatorEnum Enum with underlying type: string +type ConditionOperatorEnum string + +// Set of constants representing the allowable values for ConditionOperatorEnum +const ( + ConditionOperatorEq ConditionOperatorEnum = "eq" + ConditionOperatorNe ConditionOperatorEnum = "ne" + ConditionOperatorCo ConditionOperatorEnum = "co" + ConditionOperatorCoany ConditionOperatorEnum = "coany" + ConditionOperatorSw ConditionOperatorEnum = "sw" + ConditionOperatorEw ConditionOperatorEnum = "ew" + ConditionOperatorGt ConditionOperatorEnum = "gt" + ConditionOperatorGe ConditionOperatorEnum = "ge" + ConditionOperatorLt ConditionOperatorEnum = "lt" + ConditionOperatorLe ConditionOperatorEnum = "le" + ConditionOperatorIn ConditionOperatorEnum = "in" + ConditionOperatorNin ConditionOperatorEnum = "nin" +) + +var mappingConditionOperatorEnum = map[string]ConditionOperatorEnum{ + "eq": ConditionOperatorEq, + "ne": ConditionOperatorNe, + "co": ConditionOperatorCo, + "coany": ConditionOperatorCoany, + "sw": ConditionOperatorSw, + "ew": ConditionOperatorEw, + "gt": ConditionOperatorGt, + "ge": ConditionOperatorGe, + "lt": ConditionOperatorLt, + "le": ConditionOperatorLe, + "in": ConditionOperatorIn, + "nin": ConditionOperatorNin, +} + +var mappingConditionOperatorEnumLowerCase = map[string]ConditionOperatorEnum{ + "eq": ConditionOperatorEq, + "ne": ConditionOperatorNe, + "co": ConditionOperatorCo, + "coany": ConditionOperatorCoany, + "sw": ConditionOperatorSw, + "ew": ConditionOperatorEw, + "gt": ConditionOperatorGt, + "ge": ConditionOperatorGe, + "lt": ConditionOperatorLt, + "le": ConditionOperatorLe, + "in": ConditionOperatorIn, + "nin": ConditionOperatorNin, +} + +// GetConditionOperatorEnumValues Enumerates the set of values for ConditionOperatorEnum +func GetConditionOperatorEnumValues() []ConditionOperatorEnum { + values := make([]ConditionOperatorEnum, 0) + for _, v := range mappingConditionOperatorEnum { + values = append(values, v) + } + return values +} + +// GetConditionOperatorEnumStringValues Enumerates the set of values in String for ConditionOperatorEnum +func GetConditionOperatorEnumStringValues() []string { + return []string{ + "eq", + "ne", + "co", + "coany", + "sw", + "ew", + "gt", + "ge", + "lt", + "le", + "in", + "nin", + } +} + +// GetMappingConditionOperatorEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingConditionOperatorEnum(val string) (ConditionOperatorEnum, bool) { + enum, ok := mappingConditionOperatorEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/condition_search_request.go b/identitydomains/condition_search_request.go new file mode 100644 index 0000000000..fe1eea2a2e --- /dev/null +++ b/identitydomains/condition_search_request.go @@ -0,0 +1,70 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConditionSearchRequest Clients MAY execute queries without passing parameters on the URL by using the HTTP POST verb combined with the **.search** path extension. The inclusion of **.search** on the end of a valid SCIM endpoint SHALL be used to indicate the HTTP POST verb is intended to be a query operation. To create a new query result set, a SCIM client sends an HTTP POST request to the desired SCIM resource endpoint (ending in **.search**). The body of the POST request MAY include any of the parameters. +type ConditionSearchRequest struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See (additional retrieval query parameters (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + Attributes []string `mandatory:"false" json:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + AttributeSets []AttributeSetsEnum `mandatory:"false" json:"attributeSets,omitempty"` + + // The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See Section 3.4.2.2 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2). OPTIONAL. + Filter *string `mandatory:"false" json:"filter"` + + // A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See Sorting section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + SortBy *string `mandatory:"false" json:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder SortOrderEnum `mandatory:"false" json:"sortOrder,omitempty"` + + // An integer that indicates the 1-based index of the first query result. See Pagination Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + StartIndex *int `mandatory:"false" json:"startIndex"` + + // An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + Count *int `mandatory:"false" json:"count"` +} + +func (m ConditionSearchRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConditionSearchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingSortOrderEnum(string(m.SortOrder)); !ok && m.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", m.SortOrder, strings.Join(GetSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/conditions.go b/identitydomains/conditions.go new file mode 100644 index 0000000000..144716cf72 --- /dev/null +++ b/identitydomains/conditions.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Conditions The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type Conditions struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []Condition `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m Conditions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Conditions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/create_api_key_request_response.go b/identitydomains/create_api_key_request_response.go index f076e00382..66b69b1566 100644 --- a/identitydomains/create_api_key_request_response.go +++ b/identitydomains/create_api_key_request_response.go @@ -32,15 +32,15 @@ type CreateApiKeyRequest struct { // ApiKey schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. ApiKey `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_app_request_response.go b/identitydomains/create_app_request_response.go index 408e7f68f2..7512ffbc7e 100644 --- a/identitydomains/create_app_request_response.go +++ b/identitydomains/create_app_request_response.go @@ -32,15 +32,15 @@ type CreateAppRequest struct { // App schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. App `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_app_role_request_response.go b/identitydomains/create_app_role_request_response.go index a7fc9ddfb3..0a92615f38 100644 --- a/identitydomains/create_app_role_request_response.go +++ b/identitydomains/create_app_role_request_response.go @@ -32,15 +32,15 @@ type CreateAppRoleRequest struct { // AppRole schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. AppRole `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_approval_workflow_assignment_request_response.go b/identitydomains/create_approval_workflow_assignment_request_response.go new file mode 100644 index 0000000000..0c6557ddca --- /dev/null +++ b/identitydomains/create_approval_workflow_assignment_request_response.go @@ -0,0 +1,124 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateApprovalWorkflowAssignmentRequest wrapper for the CreateApprovalWorkflowAssignment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateApprovalWorkflowAssignment.go.html to see an example of how to use CreateApprovalWorkflowAssignmentRequest. +type CreateApprovalWorkflowAssignmentRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // ApprovalWorkflowAssignment schema. + // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + ApprovalWorkflowAssignment `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateApprovalWorkflowAssignmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateApprovalWorkflowAssignmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateApprovalWorkflowAssignmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateApprovalWorkflowAssignmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateApprovalWorkflowAssignmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateApprovalWorkflowAssignmentResponse wrapper for the CreateApprovalWorkflowAssignment operation +type CreateApprovalWorkflowAssignmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ApprovalWorkflowAssignment instance + ApprovalWorkflowAssignment `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateApprovalWorkflowAssignmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateApprovalWorkflowAssignmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/create_approval_workflow_request_response.go b/identitydomains/create_approval_workflow_request_response.go new file mode 100644 index 0000000000..72a7f94fa7 --- /dev/null +++ b/identitydomains/create_approval_workflow_request_response.go @@ -0,0 +1,124 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateApprovalWorkflowRequest wrapper for the CreateApprovalWorkflow operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateApprovalWorkflow.go.html to see an example of how to use CreateApprovalWorkflowRequest. +type CreateApprovalWorkflowRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // ApprovalWorkflow schema. + // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + ApprovalWorkflow `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateApprovalWorkflowRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateApprovalWorkflowRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateApprovalWorkflowRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateApprovalWorkflowRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateApprovalWorkflowRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateApprovalWorkflowResponse wrapper for the CreateApprovalWorkflow operation +type CreateApprovalWorkflowResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ApprovalWorkflow instance + ApprovalWorkflow `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateApprovalWorkflowResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateApprovalWorkflowResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/create_approval_workflow_step_request_response.go b/identitydomains/create_approval_workflow_step_request_response.go new file mode 100644 index 0000000000..35432ada35 --- /dev/null +++ b/identitydomains/create_approval_workflow_step_request_response.go @@ -0,0 +1,124 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateApprovalWorkflowStepRequest wrapper for the CreateApprovalWorkflowStep operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateApprovalWorkflowStep.go.html to see an example of how to use CreateApprovalWorkflowStepRequest. +type CreateApprovalWorkflowStepRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // ApprovalWorkflowStep schema. + // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + ApprovalWorkflowStep `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateApprovalWorkflowStepRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateApprovalWorkflowStepRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateApprovalWorkflowStepRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateApprovalWorkflowStepRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateApprovalWorkflowStepRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateApprovalWorkflowStepResponse wrapper for the CreateApprovalWorkflowStep operation +type CreateApprovalWorkflowStepResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ApprovalWorkflowStep instance + ApprovalWorkflowStep `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateApprovalWorkflowStepResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateApprovalWorkflowStepResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/create_auth_token_request_response.go b/identitydomains/create_auth_token_request_response.go index 912f9b2fcc..bf3481201d 100644 --- a/identitydomains/create_auth_token_request_response.go +++ b/identitydomains/create_auth_token_request_response.go @@ -32,15 +32,15 @@ type CreateAuthTokenRequest struct { // AuthToken schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. AuthToken `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_authentication_factors_remover_request_response.go b/identitydomains/create_authentication_factors_remover_request_response.go index 6356c4f4e9..93bb1f8f2e 100644 --- a/identitydomains/create_authentication_factors_remover_request_response.go +++ b/identitydomains/create_authentication_factors_remover_request_response.go @@ -26,15 +26,15 @@ type CreateAuthenticationFactorsRemoverRequest struct { // AuthenticationFactorsRemover schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. AuthenticationFactorsRemover `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_cloud_gate_mapping_request_response.go b/identitydomains/create_cloud_gate_mapping_request_response.go new file mode 100644 index 0000000000..d12fc76bb1 --- /dev/null +++ b/identitydomains/create_cloud_gate_mapping_request_response.go @@ -0,0 +1,124 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateCloudGateMappingRequest wrapper for the CreateCloudGateMapping operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateCloudGateMapping.go.html to see an example of how to use CreateCloudGateMappingRequest. +type CreateCloudGateMappingRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // CloudGateMapping schema. + // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + CloudGateMapping `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateCloudGateMappingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateCloudGateMappingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateCloudGateMappingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateCloudGateMappingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateCloudGateMappingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateCloudGateMappingResponse wrapper for the CreateCloudGateMapping operation +type CreateCloudGateMappingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CloudGateMapping instance + CloudGateMapping `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateCloudGateMappingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateCloudGateMappingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/create_cloud_gate_request_response.go b/identitydomains/create_cloud_gate_request_response.go new file mode 100644 index 0000000000..da45e7ac31 --- /dev/null +++ b/identitydomains/create_cloud_gate_request_response.go @@ -0,0 +1,124 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateCloudGateRequest wrapper for the CreateCloudGate operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateCloudGate.go.html to see an example of how to use CreateCloudGateRequest. +type CreateCloudGateRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // CloudGate schema. + // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + CloudGate `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateCloudGateRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateCloudGateRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateCloudGateRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateCloudGateRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateCloudGateRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateCloudGateResponse wrapper for the CreateCloudGate operation +type CreateCloudGateResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CloudGate instance + CloudGate `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateCloudGateResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateCloudGateResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/create_cloud_gate_server_request_response.go b/identitydomains/create_cloud_gate_server_request_response.go new file mode 100644 index 0000000000..fdb8329df1 --- /dev/null +++ b/identitydomains/create_cloud_gate_server_request_response.go @@ -0,0 +1,124 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateCloudGateServerRequest wrapper for the CreateCloudGateServer operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateCloudGateServer.go.html to see an example of how to use CreateCloudGateServerRequest. +type CreateCloudGateServerRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // CloudGateServer schema. + // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + CloudGateServer `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateCloudGateServerRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateCloudGateServerRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateCloudGateServerRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateCloudGateServerRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateCloudGateServerRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateCloudGateServerResponse wrapper for the CreateCloudGateServer operation +type CreateCloudGateServerResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CloudGateServer instance + CloudGateServer `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateCloudGateServerResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateCloudGateServerResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/create_condition_request_response.go b/identitydomains/create_condition_request_response.go new file mode 100644 index 0000000000..5d3856c970 --- /dev/null +++ b/identitydomains/create_condition_request_response.go @@ -0,0 +1,124 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateConditionRequest wrapper for the CreateCondition operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateCondition.go.html to see an example of how to use CreateConditionRequest. +type CreateConditionRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Condition schema. + // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + Condition `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateConditionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateConditionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateConditionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateConditionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateConditionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateConditionResponse wrapper for the CreateCondition operation +type CreateConditionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Condition instance + Condition `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateConditionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateConditionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/create_customer_secret_key_request_response.go b/identitydomains/create_customer_secret_key_request_response.go index a10fe0ff67..0a68f0a47f 100644 --- a/identitydomains/create_customer_secret_key_request_response.go +++ b/identitydomains/create_customer_secret_key_request_response.go @@ -32,15 +32,15 @@ type CreateCustomerSecretKeyRequest struct { // CustomerSecretKey schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. CustomerSecretKey `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_dynamic_resource_group_request_response.go b/identitydomains/create_dynamic_resource_group_request_response.go index 21f1b6a146..2def133662 100644 --- a/identitydomains/create_dynamic_resource_group_request_response.go +++ b/identitydomains/create_dynamic_resource_group_request_response.go @@ -32,15 +32,15 @@ type CreateDynamicResourceGroupRequest struct { // DynamicResourceGroup schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. DynamicResourceGroup `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_grant_request_response.go b/identitydomains/create_grant_request_response.go index c891309090..96f7bbdda4 100644 --- a/identitydomains/create_grant_request_response.go +++ b/identitydomains/create_grant_request_response.go @@ -32,15 +32,15 @@ type CreateGrantRequest struct { // Grant schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. Grant `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_group_request_response.go b/identitydomains/create_group_request_response.go index d47e3e948f..533bbe0e41 100644 --- a/identitydomains/create_group_request_response.go +++ b/identitydomains/create_group_request_response.go @@ -32,15 +32,15 @@ type CreateGroupRequest struct { // Group schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. Group `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_identity_provider_request_response.go b/identitydomains/create_identity_provider_request_response.go index a4d6f50573..f2d864cb27 100644 --- a/identitydomains/create_identity_provider_request_response.go +++ b/identitydomains/create_identity_provider_request_response.go @@ -32,15 +32,15 @@ type CreateIdentityProviderRequest struct { // IdentityProvider schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. IdentityProvider `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_me_request_response.go b/identitydomains/create_me_request_response.go index 552ea4338d..2ac5b05925 100644 --- a/identitydomains/create_me_request_response.go +++ b/identitydomains/create_me_request_response.go @@ -32,15 +32,15 @@ type CreateMeRequest struct { // Me schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. Me `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_my_api_key_request_response.go b/identitydomains/create_my_api_key_request_response.go index 9631a5a434..6b25b94421 100644 --- a/identitydomains/create_my_api_key_request_response.go +++ b/identitydomains/create_my_api_key_request_response.go @@ -26,15 +26,15 @@ type CreateMyApiKeyRequest struct { // MyApiKey schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. MyApiKey `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_my_auth_token_request_response.go b/identitydomains/create_my_auth_token_request_response.go index 0f8bc933fc..a28c590b40 100644 --- a/identitydomains/create_my_auth_token_request_response.go +++ b/identitydomains/create_my_auth_token_request_response.go @@ -26,15 +26,15 @@ type CreateMyAuthTokenRequest struct { // MyAuthToken schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. MyAuthToken `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_my_authentication_factor_initiator_request_response.go b/identitydomains/create_my_authentication_factor_initiator_request_response.go index 07a9463039..f6ab42d08b 100644 --- a/identitydomains/create_my_authentication_factor_initiator_request_response.go +++ b/identitydomains/create_my_authentication_factor_initiator_request_response.go @@ -26,15 +26,15 @@ type CreateMyAuthenticationFactorInitiatorRequest struct { // MyAuthenticationFactorInitiator schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. MyAuthenticationFactorInitiator `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_my_authentication_factor_validator_request_response.go b/identitydomains/create_my_authentication_factor_validator_request_response.go index 06c39573ad..a63f360e45 100644 --- a/identitydomains/create_my_authentication_factor_validator_request_response.go +++ b/identitydomains/create_my_authentication_factor_validator_request_response.go @@ -26,15 +26,15 @@ type CreateMyAuthenticationFactorValidatorRequest struct { // MyAuthenticationFactorValidator schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. MyAuthenticationFactorValidator `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_my_authentication_factors_remover_request_response.go b/identitydomains/create_my_authentication_factors_remover_request_response.go index 48ffff0250..b89ccdcca5 100644 --- a/identitydomains/create_my_authentication_factors_remover_request_response.go +++ b/identitydomains/create_my_authentication_factors_remover_request_response.go @@ -26,15 +26,15 @@ type CreateMyAuthenticationFactorsRemoverRequest struct { // MyAuthenticationFactorsRemover schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. MyAuthenticationFactorsRemover `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_my_customer_secret_key_request_response.go b/identitydomains/create_my_customer_secret_key_request_response.go index 84396c10a9..04946b5eb9 100644 --- a/identitydomains/create_my_customer_secret_key_request_response.go +++ b/identitydomains/create_my_customer_secret_key_request_response.go @@ -26,15 +26,15 @@ type CreateMyCustomerSecretKeyRequest struct { // MyCustomerSecretKey schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. MyCustomerSecretKey `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_my_o_auth2_client_credential_request_response.go b/identitydomains/create_my_o_auth2_client_credential_request_response.go index 2037a115c2..be7a65c45a 100644 --- a/identitydomains/create_my_o_auth2_client_credential_request_response.go +++ b/identitydomains/create_my_o_auth2_client_credential_request_response.go @@ -26,15 +26,15 @@ type CreateMyOAuth2ClientCredentialRequest struct { // MyOAuth2ClientCredential schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. MyOAuth2ClientCredential `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_my_request_request_response.go b/identitydomains/create_my_request_request_response.go index e30047984a..4dcd5772d6 100644 --- a/identitydomains/create_my_request_request_response.go +++ b/identitydomains/create_my_request_request_response.go @@ -32,15 +32,15 @@ type CreateMyRequestRequest struct { // MyRequest schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. MyRequest `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_my_smtp_credential_request_response.go b/identitydomains/create_my_smtp_credential_request_response.go index a48f91b977..a01ab80cbe 100644 --- a/identitydomains/create_my_smtp_credential_request_response.go +++ b/identitydomains/create_my_smtp_credential_request_response.go @@ -26,15 +26,15 @@ type CreateMySmtpCredentialRequest struct { // MySmtpCredential schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. MySmtpCredential `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_my_support_account_request_response.go b/identitydomains/create_my_support_account_request_response.go index 8bbca1f5a1..0b59a096f1 100644 --- a/identitydomains/create_my_support_account_request_response.go +++ b/identitydomains/create_my_support_account_request_response.go @@ -26,15 +26,15 @@ type CreateMySupportAccountRequest struct { // MySupportAccount schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. MySupportAccount `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_my_user_db_credential_request_response.go b/identitydomains/create_my_user_db_credential_request_response.go index 0bf6d2691a..87ec59280e 100644 --- a/identitydomains/create_my_user_db_credential_request_response.go +++ b/identitydomains/create_my_user_db_credential_request_response.go @@ -26,15 +26,15 @@ type CreateMyUserDbCredentialRequest struct { // MyUserDbCredentials schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. MyUserDbCredential `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_network_perimeter_request_response.go b/identitydomains/create_network_perimeter_request_response.go new file mode 100644 index 0000000000..af8f5ebadc --- /dev/null +++ b/identitydomains/create_network_perimeter_request_response.go @@ -0,0 +1,124 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateNetworkPerimeterRequest wrapper for the CreateNetworkPerimeter operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateNetworkPerimeter.go.html to see an example of how to use CreateNetworkPerimeterRequest. +type CreateNetworkPerimeterRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // NetworkPerimeter schema. + // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + NetworkPerimeter `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateNetworkPerimeterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateNetworkPerimeterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateNetworkPerimeterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateNetworkPerimeterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateNetworkPerimeterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateNetworkPerimeterResponse wrapper for the CreateNetworkPerimeter operation +type CreateNetworkPerimeterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NetworkPerimeter instance + NetworkPerimeter `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateNetworkPerimeterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateNetworkPerimeterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/create_o_auth2_client_credential_request_response.go b/identitydomains/create_o_auth2_client_credential_request_response.go index 97c4faec80..cafd8e4056 100644 --- a/identitydomains/create_o_auth2_client_credential_request_response.go +++ b/identitydomains/create_o_auth2_client_credential_request_response.go @@ -32,15 +32,15 @@ type CreateOAuth2ClientCredentialRequest struct { // OAuth2ClientCredential schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. OAuth2ClientCredential `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_o_auth_client_certificate_request_response.go b/identitydomains/create_o_auth_client_certificate_request_response.go new file mode 100644 index 0000000000..6f44c621ca --- /dev/null +++ b/identitydomains/create_o_auth_client_certificate_request_response.go @@ -0,0 +1,112 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateOAuthClientCertificateRequest wrapper for the CreateOAuthClientCertificate operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateOAuthClientCertificate.go.html to see an example of how to use CreateOAuthClientCertificateRequest. +type CreateOAuthClientCertificateRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // OAuthClientCertificate schema. + // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + OAuthClientCertificate `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateOAuthClientCertificateRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateOAuthClientCertificateRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateOAuthClientCertificateRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateOAuthClientCertificateRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateOAuthClientCertificateRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateOAuthClientCertificateResponse wrapper for the CreateOAuthClientCertificate operation +type CreateOAuthClientCertificateResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OAuthClientCertificate instance + OAuthClientCertificate `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateOAuthClientCertificateResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateOAuthClientCertificateResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/create_o_auth_partner_certificate_request_response.go b/identitydomains/create_o_auth_partner_certificate_request_response.go new file mode 100644 index 0000000000..af3a3656b2 --- /dev/null +++ b/identitydomains/create_o_auth_partner_certificate_request_response.go @@ -0,0 +1,112 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateOAuthPartnerCertificateRequest wrapper for the CreateOAuthPartnerCertificate operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateOAuthPartnerCertificate.go.html to see an example of how to use CreateOAuthPartnerCertificateRequest. +type CreateOAuthPartnerCertificateRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // OAuthPartnerCertificate schema. + // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + OAuthPartnerCertificate `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateOAuthPartnerCertificateRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateOAuthPartnerCertificateRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateOAuthPartnerCertificateRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateOAuthPartnerCertificateRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateOAuthPartnerCertificateRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateOAuthPartnerCertificateResponse wrapper for the CreateOAuthPartnerCertificate operation +type CreateOAuthPartnerCertificateResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OAuthPartnerCertificate instance + OAuthPartnerCertificate `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateOAuthPartnerCertificateResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateOAuthPartnerCertificateResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/create_password_policy_request_response.go b/identitydomains/create_password_policy_request_response.go index 59183539aa..cafab653ed 100644 --- a/identitydomains/create_password_policy_request_response.go +++ b/identitydomains/create_password_policy_request_response.go @@ -32,15 +32,15 @@ type CreatePasswordPolicyRequest struct { // PasswordPolicy schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PasswordPolicy `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_policy_request_response.go b/identitydomains/create_policy_request_response.go new file mode 100644 index 0000000000..0de407dd50 --- /dev/null +++ b/identitydomains/create_policy_request_response.go @@ -0,0 +1,124 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreatePolicyRequest wrapper for the CreatePolicy operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreatePolicy.go.html to see an example of how to use CreatePolicyRequest. +type CreatePolicyRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Policy schema. + // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + Policy `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreatePolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreatePolicyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreatePolicyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreatePolicyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreatePolicyResponse wrapper for the CreatePolicy operation +type CreatePolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Policy instance + Policy `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreatePolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreatePolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/create_rule_request_response.go b/identitydomains/create_rule_request_response.go new file mode 100644 index 0000000000..56f7850ac3 --- /dev/null +++ b/identitydomains/create_rule_request_response.go @@ -0,0 +1,124 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateRuleRequest wrapper for the CreateRule operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateRule.go.html to see an example of how to use CreateRuleRequest. +type CreateRuleRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Rule schema. + // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + Rule `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateRuleRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateRuleRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateRuleRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateRuleRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateRuleRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateRuleResponse wrapper for the CreateRule operation +type CreateRuleResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Rule instance + Rule `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateRuleResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateRuleResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/create_security_question_request_response.go b/identitydomains/create_security_question_request_response.go index 922c68e269..09372319da 100644 --- a/identitydomains/create_security_question_request_response.go +++ b/identitydomains/create_security_question_request_response.go @@ -32,15 +32,15 @@ type CreateSecurityQuestionRequest struct { // SecurityQuestion schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. SecurityQuestion `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_self_registration_profile_request_response.go b/identitydomains/create_self_registration_profile_request_response.go new file mode 100644 index 0000000000..6064cd88b7 --- /dev/null +++ b/identitydomains/create_self_registration_profile_request_response.go @@ -0,0 +1,124 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateSelfRegistrationProfileRequest wrapper for the CreateSelfRegistrationProfile operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateSelfRegistrationProfile.go.html to see an example of how to use CreateSelfRegistrationProfileRequest. +type CreateSelfRegistrationProfileRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // SelfRegistrationProfile schema. + // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + SelfRegistrationProfile `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateSelfRegistrationProfileRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateSelfRegistrationProfileRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateSelfRegistrationProfileRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateSelfRegistrationProfileRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateSelfRegistrationProfileRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateSelfRegistrationProfileResponse wrapper for the CreateSelfRegistrationProfile operation +type CreateSelfRegistrationProfileResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SelfRegistrationProfile instance + SelfRegistrationProfile `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateSelfRegistrationProfileResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateSelfRegistrationProfileResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/create_smtp_credential_request_response.go b/identitydomains/create_smtp_credential_request_response.go index 0306654d0d..5892a81371 100644 --- a/identitydomains/create_smtp_credential_request_response.go +++ b/identitydomains/create_smtp_credential_request_response.go @@ -32,15 +32,15 @@ type CreateSmtpCredentialRequest struct { // SmtpCredential schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. SmtpCredential `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_user_db_credential_request_response.go b/identitydomains/create_user_db_credential_request_response.go index 8e125df0ad..14336364e9 100644 --- a/identitydomains/create_user_db_credential_request_response.go +++ b/identitydomains/create_user_db_credential_request_response.go @@ -32,15 +32,15 @@ type CreateUserDbCredentialRequest struct { // UserDbCredentials schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. UserDbCredential `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/create_user_request_response.go b/identitydomains/create_user_request_response.go index 3c95f8afe2..6de9ae0d29 100644 --- a/identitydomains/create_user_request_response.go +++ b/identitydomains/create_user_request_response.go @@ -32,15 +32,15 @@ type CreateUserRequest struct { // User schema. // Before you specify an attribute-value in a request to create a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. User `contributesTo:"body"` // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. diff --git a/identitydomains/defined_tags.go b/identitydomains/defined_tags.go index 55a8d86615..429c453660 100644 --- a/identitydomains/defined_tags.go +++ b/identitydomains/defined_tags.go @@ -57,6 +57,7 @@ type DefinedTags struct { // **SCIM++ Properties:** // - caseExact: false // - required: true + // - idcsReturnEmptyWhenNull: true // - mutability: readWrite // - returned: default // - type: string diff --git a/identitydomains/delete_approval_workflow_assignment_request_response.go b/identitydomains/delete_approval_workflow_assignment_request_response.go new file mode 100644 index 0000000000..76247cb753 --- /dev/null +++ b/identitydomains/delete_approval_workflow_assignment_request_response.go @@ -0,0 +1,102 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteApprovalWorkflowAssignmentRequest wrapper for the DeleteApprovalWorkflowAssignment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteApprovalWorkflowAssignment.go.html to see an example of how to use DeleteApprovalWorkflowAssignmentRequest. +type DeleteApprovalWorkflowAssignmentRequest struct { + + // ID of the resource + ApprovalWorkflowAssignmentId *string `mandatory:"true" contributesTo:"path" name:"approvalWorkflowAssignmentId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // To force delete the resource and all its references (if any). + ForceDelete *bool `mandatory:"false" contributesTo:"query" name:"forceDelete"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteApprovalWorkflowAssignmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteApprovalWorkflowAssignmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteApprovalWorkflowAssignmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteApprovalWorkflowAssignmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteApprovalWorkflowAssignmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteApprovalWorkflowAssignmentResponse wrapper for the DeleteApprovalWorkflowAssignment operation +type DeleteApprovalWorkflowAssignmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteApprovalWorkflowAssignmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteApprovalWorkflowAssignmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/delete_approval_workflow_request_response.go b/identitydomains/delete_approval_workflow_request_response.go new file mode 100644 index 0000000000..55eba64522 --- /dev/null +++ b/identitydomains/delete_approval_workflow_request_response.go @@ -0,0 +1,102 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteApprovalWorkflowRequest wrapper for the DeleteApprovalWorkflow operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteApprovalWorkflow.go.html to see an example of how to use DeleteApprovalWorkflowRequest. +type DeleteApprovalWorkflowRequest struct { + + // ID of the resource + ApprovalWorkflowId *string `mandatory:"true" contributesTo:"path" name:"approvalWorkflowId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // To force delete the resource and all its references (if any). + ForceDelete *bool `mandatory:"false" contributesTo:"query" name:"forceDelete"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteApprovalWorkflowRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteApprovalWorkflowRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteApprovalWorkflowRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteApprovalWorkflowRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteApprovalWorkflowRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteApprovalWorkflowResponse wrapper for the DeleteApprovalWorkflow operation +type DeleteApprovalWorkflowResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteApprovalWorkflowResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteApprovalWorkflowResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/delete_approval_workflow_step_request_response.go b/identitydomains/delete_approval_workflow_step_request_response.go new file mode 100644 index 0000000000..d1831b0237 --- /dev/null +++ b/identitydomains/delete_approval_workflow_step_request_response.go @@ -0,0 +1,102 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteApprovalWorkflowStepRequest wrapper for the DeleteApprovalWorkflowStep operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteApprovalWorkflowStep.go.html to see an example of how to use DeleteApprovalWorkflowStepRequest. +type DeleteApprovalWorkflowStepRequest struct { + + // ID of the resource + ApprovalWorkflowStepId *string `mandatory:"true" contributesTo:"path" name:"approvalWorkflowStepId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // To force delete the resource and all its references (if any). + ForceDelete *bool `mandatory:"false" contributesTo:"query" name:"forceDelete"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteApprovalWorkflowStepRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteApprovalWorkflowStepRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteApprovalWorkflowStepRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteApprovalWorkflowStepRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteApprovalWorkflowStepRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteApprovalWorkflowStepResponse wrapper for the DeleteApprovalWorkflowStep operation +type DeleteApprovalWorkflowStepResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteApprovalWorkflowStepResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteApprovalWorkflowStepResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/delete_cloud_gate_mapping_request_response.go b/identitydomains/delete_cloud_gate_mapping_request_response.go new file mode 100644 index 0000000000..bccad7f626 --- /dev/null +++ b/identitydomains/delete_cloud_gate_mapping_request_response.go @@ -0,0 +1,102 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteCloudGateMappingRequest wrapper for the DeleteCloudGateMapping operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteCloudGateMapping.go.html to see an example of how to use DeleteCloudGateMappingRequest. +type DeleteCloudGateMappingRequest struct { + + // ID of the resource + CloudGateMappingId *string `mandatory:"true" contributesTo:"path" name:"cloudGateMappingId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // To force delete the resource and all its references (if any). + ForceDelete *bool `mandatory:"false" contributesTo:"query" name:"forceDelete"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteCloudGateMappingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteCloudGateMappingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteCloudGateMappingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteCloudGateMappingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteCloudGateMappingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteCloudGateMappingResponse wrapper for the DeleteCloudGateMapping operation +type DeleteCloudGateMappingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteCloudGateMappingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteCloudGateMappingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/delete_cloud_gate_request_response.go b/identitydomains/delete_cloud_gate_request_response.go new file mode 100644 index 0000000000..ae68113549 --- /dev/null +++ b/identitydomains/delete_cloud_gate_request_response.go @@ -0,0 +1,102 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteCloudGateRequest wrapper for the DeleteCloudGate operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteCloudGate.go.html to see an example of how to use DeleteCloudGateRequest. +type DeleteCloudGateRequest struct { + + // ID of the resource + CloudGateId *string `mandatory:"true" contributesTo:"path" name:"cloudGateId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // To force delete the resource and all its references (if any). + ForceDelete *bool `mandatory:"false" contributesTo:"query" name:"forceDelete"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteCloudGateRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteCloudGateRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteCloudGateRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteCloudGateRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteCloudGateRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteCloudGateResponse wrapper for the DeleteCloudGate operation +type DeleteCloudGateResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteCloudGateResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteCloudGateResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/delete_cloud_gate_server_request_response.go b/identitydomains/delete_cloud_gate_server_request_response.go new file mode 100644 index 0000000000..e2506f5036 --- /dev/null +++ b/identitydomains/delete_cloud_gate_server_request_response.go @@ -0,0 +1,102 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteCloudGateServerRequest wrapper for the DeleteCloudGateServer operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteCloudGateServer.go.html to see an example of how to use DeleteCloudGateServerRequest. +type DeleteCloudGateServerRequest struct { + + // ID of the resource + CloudGateServerId *string `mandatory:"true" contributesTo:"path" name:"cloudGateServerId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // To force delete the resource and all its references (if any). + ForceDelete *bool `mandatory:"false" contributesTo:"query" name:"forceDelete"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteCloudGateServerRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteCloudGateServerRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteCloudGateServerRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteCloudGateServerRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteCloudGateServerRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteCloudGateServerResponse wrapper for the DeleteCloudGateServer operation +type DeleteCloudGateServerResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteCloudGateServerResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteCloudGateServerResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/delete_condition_request_response.go b/identitydomains/delete_condition_request_response.go new file mode 100644 index 0000000000..4a01770b36 --- /dev/null +++ b/identitydomains/delete_condition_request_response.go @@ -0,0 +1,102 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteConditionRequest wrapper for the DeleteCondition operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteCondition.go.html to see an example of how to use DeleteConditionRequest. +type DeleteConditionRequest struct { + + // ID of the resource + ConditionId *string `mandatory:"true" contributesTo:"path" name:"conditionId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // To force delete the resource and all its references (if any). + ForceDelete *bool `mandatory:"false" contributesTo:"query" name:"forceDelete"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteConditionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteConditionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteConditionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteConditionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteConditionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteConditionResponse wrapper for the DeleteCondition operation +type DeleteConditionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteConditionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteConditionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/delete_network_perimeter_request_response.go b/identitydomains/delete_network_perimeter_request_response.go new file mode 100644 index 0000000000..ae0d69be8f --- /dev/null +++ b/identitydomains/delete_network_perimeter_request_response.go @@ -0,0 +1,102 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteNetworkPerimeterRequest wrapper for the DeleteNetworkPerimeter operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteNetworkPerimeter.go.html to see an example of how to use DeleteNetworkPerimeterRequest. +type DeleteNetworkPerimeterRequest struct { + + // ID of the resource + NetworkPerimeterId *string `mandatory:"true" contributesTo:"path" name:"networkPerimeterId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // To force delete the resource and all its references (if any). + ForceDelete *bool `mandatory:"false" contributesTo:"query" name:"forceDelete"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteNetworkPerimeterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteNetworkPerimeterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteNetworkPerimeterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteNetworkPerimeterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteNetworkPerimeterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteNetworkPerimeterResponse wrapper for the DeleteNetworkPerimeter operation +type DeleteNetworkPerimeterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteNetworkPerimeterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteNetworkPerimeterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/delete_o_auth_client_certificate_request_response.go b/identitydomains/delete_o_auth_client_certificate_request_response.go new file mode 100644 index 0000000000..44c456ab45 --- /dev/null +++ b/identitydomains/delete_o_auth_client_certificate_request_response.go @@ -0,0 +1,102 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteOAuthClientCertificateRequest wrapper for the DeleteOAuthClientCertificate operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteOAuthClientCertificate.go.html to see an example of how to use DeleteOAuthClientCertificateRequest. +type DeleteOAuthClientCertificateRequest struct { + + // ID of the resource + OAuthClientCertificateId *string `mandatory:"true" contributesTo:"path" name:"oAuthClientCertificateId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // To force delete the resource and all its references (if any). + ForceDelete *bool `mandatory:"false" contributesTo:"query" name:"forceDelete"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteOAuthClientCertificateRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteOAuthClientCertificateRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteOAuthClientCertificateRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteOAuthClientCertificateRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteOAuthClientCertificateRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteOAuthClientCertificateResponse wrapper for the DeleteOAuthClientCertificate operation +type DeleteOAuthClientCertificateResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteOAuthClientCertificateResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteOAuthClientCertificateResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/delete_o_auth_partner_certificate_request_response.go b/identitydomains/delete_o_auth_partner_certificate_request_response.go new file mode 100644 index 0000000000..1f9f1746eb --- /dev/null +++ b/identitydomains/delete_o_auth_partner_certificate_request_response.go @@ -0,0 +1,102 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteOAuthPartnerCertificateRequest wrapper for the DeleteOAuthPartnerCertificate operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteOAuthPartnerCertificate.go.html to see an example of how to use DeleteOAuthPartnerCertificateRequest. +type DeleteOAuthPartnerCertificateRequest struct { + + // ID of the resource + OAuthPartnerCertificateId *string `mandatory:"true" contributesTo:"path" name:"oAuthPartnerCertificateId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // To force delete the resource and all its references (if any). + ForceDelete *bool `mandatory:"false" contributesTo:"query" name:"forceDelete"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteOAuthPartnerCertificateRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteOAuthPartnerCertificateRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteOAuthPartnerCertificateRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteOAuthPartnerCertificateRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteOAuthPartnerCertificateRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteOAuthPartnerCertificateResponse wrapper for the DeleteOAuthPartnerCertificate operation +type DeleteOAuthPartnerCertificateResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteOAuthPartnerCertificateResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteOAuthPartnerCertificateResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/delete_policy_request_response.go b/identitydomains/delete_policy_request_response.go new file mode 100644 index 0000000000..b21f27d34b --- /dev/null +++ b/identitydomains/delete_policy_request_response.go @@ -0,0 +1,102 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeletePolicyRequest wrapper for the DeletePolicy operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeletePolicy.go.html to see an example of how to use DeletePolicyRequest. +type DeletePolicyRequest struct { + + // ID of the resource + PolicyId *string `mandatory:"true" contributesTo:"path" name:"policyId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // To force delete the resource and all its references (if any). + ForceDelete *bool `mandatory:"false" contributesTo:"query" name:"forceDelete"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeletePolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeletePolicyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeletePolicyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeletePolicyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeletePolicyResponse wrapper for the DeletePolicy operation +type DeletePolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeletePolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeletePolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/delete_rule_request_response.go b/identitydomains/delete_rule_request_response.go new file mode 100644 index 0000000000..7e412dc978 --- /dev/null +++ b/identitydomains/delete_rule_request_response.go @@ -0,0 +1,102 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteRuleRequest wrapper for the DeleteRule operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteRule.go.html to see an example of how to use DeleteRuleRequest. +type DeleteRuleRequest struct { + + // ID of the resource + RuleId *string `mandatory:"true" contributesTo:"path" name:"ruleId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // To force delete the resource and all its references (if any). + ForceDelete *bool `mandatory:"false" contributesTo:"query" name:"forceDelete"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteRuleRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteRuleRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteRuleRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteRuleRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteRuleRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteRuleResponse wrapper for the DeleteRule operation +type DeleteRuleResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteRuleResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteRuleResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/delete_self_registration_profile_request_response.go b/identitydomains/delete_self_registration_profile_request_response.go new file mode 100644 index 0000000000..ce83514637 --- /dev/null +++ b/identitydomains/delete_self_registration_profile_request_response.go @@ -0,0 +1,102 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteSelfRegistrationProfileRequest wrapper for the DeleteSelfRegistrationProfile operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteSelfRegistrationProfile.go.html to see an example of how to use DeleteSelfRegistrationProfileRequest. +type DeleteSelfRegistrationProfileRequest struct { + + // ID of the resource + SelfRegistrationProfileId *string `mandatory:"true" contributesTo:"path" name:"selfRegistrationProfileId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // To force delete the resource and all its references (if any). + ForceDelete *bool `mandatory:"false" contributesTo:"query" name:"forceDelete"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteSelfRegistrationProfileRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteSelfRegistrationProfileRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteSelfRegistrationProfileRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteSelfRegistrationProfileRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteSelfRegistrationProfileRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteSelfRegistrationProfileResponse wrapper for the DeleteSelfRegistrationProfile operation +type DeleteSelfRegistrationProfileResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteSelfRegistrationProfileResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteSelfRegistrationProfileResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/extension_social_identity_provider.go b/identitydomains/extension_social_identity_provider.go index 80e29a395c..383b84124e 100644 --- a/identitydomains/extension_social_identity_provider.go +++ b/identitydomains/extension_social_identity_provider.go @@ -124,6 +124,19 @@ type ExtensionSocialIdentityProvider struct { // - uniqueness: none AccessTokenUrl *string `mandatory:"false" json:"accessTokenUrl"` + // Relay Param variable for Social IDP + // **Added In:** 2305190132 + // **SCIM++ Properties:** + // - idcsCompositeKey: [relayParamKey] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + // - uniqueness: none + RelayIdpParamMappings []IdentityProviderRelayIdpParamMappings `mandatory:"false" json:"relayIdpParamMappings"` + // Social IDP User profile URL // **Added In:** 20.1.3 // **SCIM++ Properties:** diff --git a/identitydomains/freeform_tags.go b/identitydomains/freeform_tags.go index cb867ed02e..6a04e01f9b 100644 --- a/identitydomains/freeform_tags.go +++ b/identitydomains/freeform_tags.go @@ -45,6 +45,7 @@ type FreeformTags struct { // **SCIM++ Properties:** // - caseExact: false // - required: true + // - idcsReturnEmptyWhenNull: true // - mutability: readWrite // - returned: default // - type: string diff --git a/identitydomains/get_approval_workflow_assignment_request_response.go b/identitydomains/get_approval_workflow_assignment_request_response.go new file mode 100644 index 0000000000..f69b24c94b --- /dev/null +++ b/identitydomains/get_approval_workflow_assignment_request_response.go @@ -0,0 +1,111 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetApprovalWorkflowAssignmentRequest wrapper for the GetApprovalWorkflowAssignment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetApprovalWorkflowAssignment.go.html to see an example of how to use GetApprovalWorkflowAssignmentRequest. +type GetApprovalWorkflowAssignmentRequest struct { + + // ID of the resource + ApprovalWorkflowAssignmentId *string `mandatory:"true" contributesTo:"path" name:"approvalWorkflowAssignmentId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetApprovalWorkflowAssignmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetApprovalWorkflowAssignmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetApprovalWorkflowAssignmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetApprovalWorkflowAssignmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetApprovalWorkflowAssignmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetApprovalWorkflowAssignmentResponse wrapper for the GetApprovalWorkflowAssignment operation +type GetApprovalWorkflowAssignmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ApprovalWorkflowAssignment instance + ApprovalWorkflowAssignment `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetApprovalWorkflowAssignmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetApprovalWorkflowAssignmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_approval_workflow_request_response.go b/identitydomains/get_approval_workflow_request_response.go new file mode 100644 index 0000000000..1bff1e5512 --- /dev/null +++ b/identitydomains/get_approval_workflow_request_response.go @@ -0,0 +1,111 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetApprovalWorkflowRequest wrapper for the GetApprovalWorkflow operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetApprovalWorkflow.go.html to see an example of how to use GetApprovalWorkflowRequest. +type GetApprovalWorkflowRequest struct { + + // ID of the resource + ApprovalWorkflowId *string `mandatory:"true" contributesTo:"path" name:"approvalWorkflowId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetApprovalWorkflowRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetApprovalWorkflowRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetApprovalWorkflowRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetApprovalWorkflowRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetApprovalWorkflowRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetApprovalWorkflowResponse wrapper for the GetApprovalWorkflow operation +type GetApprovalWorkflowResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ApprovalWorkflow instance + ApprovalWorkflow `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetApprovalWorkflowResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetApprovalWorkflowResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_approval_workflow_step_request_response.go b/identitydomains/get_approval_workflow_step_request_response.go new file mode 100644 index 0000000000..57089b20dc --- /dev/null +++ b/identitydomains/get_approval_workflow_step_request_response.go @@ -0,0 +1,111 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetApprovalWorkflowStepRequest wrapper for the GetApprovalWorkflowStep operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetApprovalWorkflowStep.go.html to see an example of how to use GetApprovalWorkflowStepRequest. +type GetApprovalWorkflowStepRequest struct { + + // ID of the resource + ApprovalWorkflowStepId *string `mandatory:"true" contributesTo:"path" name:"approvalWorkflowStepId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetApprovalWorkflowStepRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetApprovalWorkflowStepRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetApprovalWorkflowStepRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetApprovalWorkflowStepRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetApprovalWorkflowStepRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetApprovalWorkflowStepResponse wrapper for the GetApprovalWorkflowStep operation +type GetApprovalWorkflowStepResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ApprovalWorkflowStep instance + ApprovalWorkflowStep `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetApprovalWorkflowStepResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetApprovalWorkflowStepResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_branding_setting_request_response.go b/identitydomains/get_branding_setting_request_response.go new file mode 100644 index 0000000000..59462c8b54 --- /dev/null +++ b/identitydomains/get_branding_setting_request_response.go @@ -0,0 +1,111 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetBrandingSettingRequest wrapper for the GetBrandingSetting operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetBrandingSetting.go.html to see an example of how to use GetBrandingSettingRequest. +type GetBrandingSettingRequest struct { + + // ID of the resource + BrandingSettingId *string `mandatory:"true" contributesTo:"path" name:"brandingSettingId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetBrandingSettingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetBrandingSettingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetBrandingSettingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetBrandingSettingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetBrandingSettingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetBrandingSettingResponse wrapper for the GetBrandingSetting operation +type GetBrandingSettingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The BrandingSetting instance + BrandingSetting `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetBrandingSettingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetBrandingSettingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_cloud_gate_mapping_request_response.go b/identitydomains/get_cloud_gate_mapping_request_response.go new file mode 100644 index 0000000000..ded90af3aa --- /dev/null +++ b/identitydomains/get_cloud_gate_mapping_request_response.go @@ -0,0 +1,111 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetCloudGateMappingRequest wrapper for the GetCloudGateMapping operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetCloudGateMapping.go.html to see an example of how to use GetCloudGateMappingRequest. +type GetCloudGateMappingRequest struct { + + // ID of the resource + CloudGateMappingId *string `mandatory:"true" contributesTo:"path" name:"cloudGateMappingId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetCloudGateMappingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetCloudGateMappingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetCloudGateMappingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCloudGateMappingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetCloudGateMappingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetCloudGateMappingResponse wrapper for the GetCloudGateMapping operation +type GetCloudGateMappingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CloudGateMapping instance + CloudGateMapping `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetCloudGateMappingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetCloudGateMappingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_cloud_gate_request_response.go b/identitydomains/get_cloud_gate_request_response.go new file mode 100644 index 0000000000..70c3b5597e --- /dev/null +++ b/identitydomains/get_cloud_gate_request_response.go @@ -0,0 +1,111 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetCloudGateRequest wrapper for the GetCloudGate operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetCloudGate.go.html to see an example of how to use GetCloudGateRequest. +type GetCloudGateRequest struct { + + // ID of the resource + CloudGateId *string `mandatory:"true" contributesTo:"path" name:"cloudGateId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetCloudGateRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetCloudGateRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetCloudGateRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCloudGateRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetCloudGateRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetCloudGateResponse wrapper for the GetCloudGate operation +type GetCloudGateResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CloudGate instance + CloudGate `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetCloudGateResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetCloudGateResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_cloud_gate_server_request_response.go b/identitydomains/get_cloud_gate_server_request_response.go new file mode 100644 index 0000000000..cec394d37c --- /dev/null +++ b/identitydomains/get_cloud_gate_server_request_response.go @@ -0,0 +1,111 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetCloudGateServerRequest wrapper for the GetCloudGateServer operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetCloudGateServer.go.html to see an example of how to use GetCloudGateServerRequest. +type GetCloudGateServerRequest struct { + + // ID of the resource + CloudGateServerId *string `mandatory:"true" contributesTo:"path" name:"cloudGateServerId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetCloudGateServerRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetCloudGateServerRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetCloudGateServerRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCloudGateServerRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetCloudGateServerRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetCloudGateServerResponse wrapper for the GetCloudGateServer operation +type GetCloudGateServerResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CloudGateServer instance + CloudGateServer `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetCloudGateServerResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetCloudGateServerResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_condition_request_response.go b/identitydomains/get_condition_request_response.go new file mode 100644 index 0000000000..7de97a2deb --- /dev/null +++ b/identitydomains/get_condition_request_response.go @@ -0,0 +1,111 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetConditionRequest wrapper for the GetCondition operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetCondition.go.html to see an example of how to use GetConditionRequest. +type GetConditionRequest struct { + + // ID of the resource + ConditionId *string `mandatory:"true" contributesTo:"path" name:"conditionId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetConditionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetConditionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetConditionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetConditionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetConditionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetConditionResponse wrapper for the GetCondition operation +type GetConditionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Condition instance + Condition `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetConditionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetConditionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_my_completed_approval_request_response.go b/identitydomains/get_my_completed_approval_request_response.go new file mode 100644 index 0000000000..e4aadf6255 --- /dev/null +++ b/identitydomains/get_my_completed_approval_request_response.go @@ -0,0 +1,99 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetMyCompletedApprovalRequest wrapper for the GetMyCompletedApproval operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyCompletedApproval.go.html to see an example of how to use GetMyCompletedApprovalRequest. +type GetMyCompletedApprovalRequest struct { + + // ID of the resource + MyCompletedApprovalId *string `mandatory:"true" contributesTo:"path" name:"myCompletedApprovalId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetMyCompletedApprovalRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetMyCompletedApprovalRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetMyCompletedApprovalRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetMyCompletedApprovalRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetMyCompletedApprovalRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetMyCompletedApprovalResponse wrapper for the GetMyCompletedApproval operation +type GetMyCompletedApprovalResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The MyCompletedApproval instance + MyCompletedApproval `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetMyCompletedApprovalResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetMyCompletedApprovalResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_my_pending_approval_request_response.go b/identitydomains/get_my_pending_approval_request_response.go new file mode 100644 index 0000000000..5024cf69a4 --- /dev/null +++ b/identitydomains/get_my_pending_approval_request_response.go @@ -0,0 +1,99 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetMyPendingApprovalRequest wrapper for the GetMyPendingApproval operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyPendingApproval.go.html to see an example of how to use GetMyPendingApprovalRequest. +type GetMyPendingApprovalRequest struct { + + // ID of the resource + MyPendingApprovalId *string `mandatory:"true" contributesTo:"path" name:"myPendingApprovalId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetMyPendingApprovalRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetMyPendingApprovalRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetMyPendingApprovalRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetMyPendingApprovalRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetMyPendingApprovalRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetMyPendingApprovalResponse wrapper for the GetMyPendingApproval operation +type GetMyPendingApprovalResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The MyPendingApproval instance + MyPendingApproval `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetMyPendingApprovalResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetMyPendingApprovalResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_my_request_request_response.go b/identitydomains/get_my_request_request_response.go new file mode 100644 index 0000000000..964b705eac --- /dev/null +++ b/identitydomains/get_my_request_request_response.go @@ -0,0 +1,111 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetMyRequestRequest wrapper for the GetMyRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyRequest.go.html to see an example of how to use GetMyRequestRequest. +type GetMyRequestRequest struct { + + // ID of the resource + MyRequestId *string `mandatory:"true" contributesTo:"path" name:"myRequestId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetMyRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetMyRequestRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetMyRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetMyRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetMyRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetMyRequestResponse wrapper for the GetMyRequest operation +type GetMyRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The MyRequest instance + MyRequest `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetMyRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetMyRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_network_perimeter_request_response.go b/identitydomains/get_network_perimeter_request_response.go new file mode 100644 index 0000000000..ad1ff2dfd2 --- /dev/null +++ b/identitydomains/get_network_perimeter_request_response.go @@ -0,0 +1,111 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetNetworkPerimeterRequest wrapper for the GetNetworkPerimeter operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetNetworkPerimeter.go.html to see an example of how to use GetNetworkPerimeterRequest. +type GetNetworkPerimeterRequest struct { + + // ID of the resource + NetworkPerimeterId *string `mandatory:"true" contributesTo:"path" name:"networkPerimeterId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetNetworkPerimeterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetNetworkPerimeterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetNetworkPerimeterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetNetworkPerimeterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetNetworkPerimeterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetNetworkPerimeterResponse wrapper for the GetNetworkPerimeter operation +type GetNetworkPerimeterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NetworkPerimeter instance + NetworkPerimeter `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetNetworkPerimeterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetNetworkPerimeterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_notification_setting_request_response.go b/identitydomains/get_notification_setting_request_response.go new file mode 100644 index 0000000000..8ccefc6ba4 --- /dev/null +++ b/identitydomains/get_notification_setting_request_response.go @@ -0,0 +1,111 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetNotificationSettingRequest wrapper for the GetNotificationSetting operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetNotificationSetting.go.html to see an example of how to use GetNotificationSettingRequest. +type GetNotificationSettingRequest struct { + + // ID of the resource + NotificationSettingId *string `mandatory:"true" contributesTo:"path" name:"notificationSettingId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetNotificationSettingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetNotificationSettingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetNotificationSettingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetNotificationSettingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetNotificationSettingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetNotificationSettingResponse wrapper for the GetNotificationSetting operation +type GetNotificationSettingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NotificationSetting instance + NotificationSetting `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetNotificationSettingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetNotificationSettingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_o_auth_client_certificate_request_response.go b/identitydomains/get_o_auth_client_certificate_request_response.go new file mode 100644 index 0000000000..b161e01bdb --- /dev/null +++ b/identitydomains/get_o_auth_client_certificate_request_response.go @@ -0,0 +1,99 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetOAuthClientCertificateRequest wrapper for the GetOAuthClientCertificate operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetOAuthClientCertificate.go.html to see an example of how to use GetOAuthClientCertificateRequest. +type GetOAuthClientCertificateRequest struct { + + // ID of the resource + OAuthClientCertificateId *string `mandatory:"true" contributesTo:"path" name:"oAuthClientCertificateId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetOAuthClientCertificateRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetOAuthClientCertificateRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetOAuthClientCertificateRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetOAuthClientCertificateRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetOAuthClientCertificateRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetOAuthClientCertificateResponse wrapper for the GetOAuthClientCertificate operation +type GetOAuthClientCertificateResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OAuthClientCertificate instance + OAuthClientCertificate `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetOAuthClientCertificateResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetOAuthClientCertificateResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_o_auth_partner_certificate_request_response.go b/identitydomains/get_o_auth_partner_certificate_request_response.go new file mode 100644 index 0000000000..c9e2463250 --- /dev/null +++ b/identitydomains/get_o_auth_partner_certificate_request_response.go @@ -0,0 +1,99 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetOAuthPartnerCertificateRequest wrapper for the GetOAuthPartnerCertificate operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetOAuthPartnerCertificate.go.html to see an example of how to use GetOAuthPartnerCertificateRequest. +type GetOAuthPartnerCertificateRequest struct { + + // ID of the resource + OAuthPartnerCertificateId *string `mandatory:"true" contributesTo:"path" name:"oAuthPartnerCertificateId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetOAuthPartnerCertificateRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetOAuthPartnerCertificateRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetOAuthPartnerCertificateRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetOAuthPartnerCertificateRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetOAuthPartnerCertificateRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetOAuthPartnerCertificateResponse wrapper for the GetOAuthPartnerCertificate operation +type GetOAuthPartnerCertificateResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OAuthPartnerCertificate instance + OAuthPartnerCertificate `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetOAuthPartnerCertificateResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetOAuthPartnerCertificateResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_policy_request_response.go b/identitydomains/get_policy_request_response.go new file mode 100644 index 0000000000..c1d7d348d2 --- /dev/null +++ b/identitydomains/get_policy_request_response.go @@ -0,0 +1,111 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPolicyRequest wrapper for the GetPolicy operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetPolicy.go.html to see an example of how to use GetPolicyRequest. +type GetPolicyRequest struct { + + // ID of the resource + PolicyId *string `mandatory:"true" contributesTo:"path" name:"policyId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPolicyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetPolicyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetPolicyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPolicyResponse wrapper for the GetPolicy operation +type GetPolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Policy instance + Policy `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_rule_request_response.go b/identitydomains/get_rule_request_response.go new file mode 100644 index 0000000000..6c018ed2a7 --- /dev/null +++ b/identitydomains/get_rule_request_response.go @@ -0,0 +1,111 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetRuleRequest wrapper for the GetRule operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetRule.go.html to see an example of how to use GetRuleRequest. +type GetRuleRequest struct { + + // ID of the resource + RuleId *string `mandatory:"true" contributesTo:"path" name:"ruleId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetRuleRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetRuleRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetRuleRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetRuleRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetRuleRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetRuleResponse wrapper for the GetRule operation +type GetRuleResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Rule instance + Rule `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetRuleResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetRuleResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_schema_request_response.go b/identitydomains/get_schema_request_response.go new file mode 100644 index 0000000000..16771b176f --- /dev/null +++ b/identitydomains/get_schema_request_response.go @@ -0,0 +1,99 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetSchemaRequest wrapper for the GetSchema operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetSchema.go.html to see an example of how to use GetSchemaRequest. +type GetSchemaRequest struct { + + // ID of the resource + SchemaId *string `mandatory:"true" contributesTo:"path" name:"schemaId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetSchemaRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetSchemaRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetSchemaRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetSchemaRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetSchemaRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetSchemaResponse wrapper for the GetSchema operation +type GetSchemaResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Schema instance + Schema `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetSchemaResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetSchemaResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_self_registration_profile_request_response.go b/identitydomains/get_self_registration_profile_request_response.go new file mode 100644 index 0000000000..b8be52b130 --- /dev/null +++ b/identitydomains/get_self_registration_profile_request_response.go @@ -0,0 +1,111 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetSelfRegistrationProfileRequest wrapper for the GetSelfRegistrationProfile operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetSelfRegistrationProfile.go.html to see an example of how to use GetSelfRegistrationProfileRequest. +type GetSelfRegistrationProfileRequest struct { + + // ID of the resource + SelfRegistrationProfileId *string `mandatory:"true" contributesTo:"path" name:"selfRegistrationProfileId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetSelfRegistrationProfileRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetSelfRegistrationProfileRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetSelfRegistrationProfileRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetSelfRegistrationProfileRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetSelfRegistrationProfileRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetSelfRegistrationProfileResponse wrapper for the GetSelfRegistrationProfile operation +type GetSelfRegistrationProfileResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SelfRegistrationProfile instance + SelfRegistrationProfile `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetSelfRegistrationProfileResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetSelfRegistrationProfileResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/get_setting_request_response.go b/identitydomains/get_setting_request_response.go new file mode 100644 index 0000000000..a2a100064e --- /dev/null +++ b/identitydomains/get_setting_request_response.go @@ -0,0 +1,111 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetSettingRequest wrapper for the GetSetting operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetSetting.go.html to see an example of how to use GetSettingRequest. +type GetSettingRequest struct { + + // ID of the resource + SettingId *string `mandatory:"true" contributesTo:"path" name:"settingId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetSettingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetSettingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetSettingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetSettingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetSettingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetSettingResponse wrapper for the GetSetting operation +type GetSettingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Setting instance + Setting `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetSettingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetSettingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/identity_provider_relay_idp_param_mappings.go b/identitydomains/identity_provider_relay_idp_param_mappings.go new file mode 100644 index 0000000000..111183f717 --- /dev/null +++ b/identitydomains/identity_provider_relay_idp_param_mappings.go @@ -0,0 +1,71 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IdentityProviderRelayIdpParamMappings Relay Param variable for Social IDP +// **Added In:** 2305190132 +// **SCIM++ Properties:** +// - idcsCompositeKey: [relayParamKey] +// - idcsSearchable: true +// - multiValued: true +// - mutability: readWrite +// - required: false +// - returned: default +// - type: complex +// - uniqueness: none +type IdentityProviderRelayIdpParamMappings struct { + + // Key or name of the relayParam. + // **Added In:** 2305190132 + // **SCIM++ Properties:** + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + RelayParamKey *string `mandatory:"true" json:"relayParamKey"` + + // Value of the relayParam (if defined) + // **Added In:** 2305190132 + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + RelayParamValue *string `mandatory:"false" json:"relayParamValue"` +} + +func (m IdentityProviderRelayIdpParamMappings) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IdentityProviderRelayIdpParamMappings) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/identitydomains_client.go b/identitydomains/identitydomains_client.go index 5d7f55b19a..555cecda41 100644 --- a/identitydomains/identitydomains_client.go +++ b/identitydomains/identitydomains_client.go @@ -266,12 +266,12 @@ func (client IdentityDomainsClient) createAppRole(ctx context.Context, request c return response, err } -// CreateAuthToken Create a user's Auth token. +// CreateApprovalWorkflow Create ApprovalWorkflow // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateAuthToken.go.html to see an example of how to use CreateAuthToken API. -func (client IdentityDomainsClient) CreateAuthToken(ctx context.Context, request CreateAuthTokenRequest) (response CreateAuthTokenResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateApprovalWorkflow.go.html to see an example of how to use CreateApprovalWorkflow API. +func (client IdentityDomainsClient) CreateApprovalWorkflow(ctx context.Context, request CreateApprovalWorkflowRequest) (response CreateApprovalWorkflowResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -285,42 +285,42 @@ func (client IdentityDomainsClient) CreateAuthToken(ctx context.Context, request request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createAuthToken, policy) + ociResponse, err = common.Retry(ctx, request, client.createApprovalWorkflow, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateAuthTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateApprovalWorkflowResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateAuthTokenResponse{} + response = CreateApprovalWorkflowResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateAuthTokenResponse); ok { + if convertedResponse, ok := ociResponse.(CreateApprovalWorkflowResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateAuthTokenResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateApprovalWorkflowResponse") } return } -// createAuthToken implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createAuthToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createApprovalWorkflow implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createApprovalWorkflow(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/AuthTokens", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/ApprovalWorkflows", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateAuthTokenResponse + var response CreateApprovalWorkflowResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateAuthToken", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateApprovalWorkflow", apiReferenceLink) return response, err } @@ -328,12 +328,12 @@ func (client IdentityDomainsClient) createAuthToken(ctx context.Context, request return response, err } -// CreateAuthenticationFactorsRemover Remove All Authentication Factor Channels for a User +// CreateApprovalWorkflowAssignment Create Approval Workflow Assignment // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateAuthenticationFactorsRemover.go.html to see an example of how to use CreateAuthenticationFactorsRemover API. -func (client IdentityDomainsClient) CreateAuthenticationFactorsRemover(ctx context.Context, request CreateAuthenticationFactorsRemoverRequest) (response CreateAuthenticationFactorsRemoverResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateApprovalWorkflowAssignment.go.html to see an example of how to use CreateApprovalWorkflowAssignment API. +func (client IdentityDomainsClient) CreateApprovalWorkflowAssignment(ctx context.Context, request CreateApprovalWorkflowAssignmentRequest) (response CreateApprovalWorkflowAssignmentResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -347,42 +347,42 @@ func (client IdentityDomainsClient) CreateAuthenticationFactorsRemover(ctx conte request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createAuthenticationFactorsRemover, policy) + ociResponse, err = common.Retry(ctx, request, client.createApprovalWorkflowAssignment, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateAuthenticationFactorsRemoverResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateApprovalWorkflowAssignmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateAuthenticationFactorsRemoverResponse{} + response = CreateApprovalWorkflowAssignmentResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateAuthenticationFactorsRemoverResponse); ok { + if convertedResponse, ok := ociResponse.(CreateApprovalWorkflowAssignmentResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateAuthenticationFactorsRemoverResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateApprovalWorkflowAssignmentResponse") } return } -// createAuthenticationFactorsRemover implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createAuthenticationFactorsRemover(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createApprovalWorkflowAssignment implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createApprovalWorkflowAssignment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/AuthenticationFactorsRemover", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/ApprovalWorkflowAssignments", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateAuthenticationFactorsRemoverResponse + var response CreateApprovalWorkflowAssignmentResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateAuthenticationFactorsRemover", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateApprovalWorkflowAssignment", apiReferenceLink) return response, err } @@ -390,12 +390,12 @@ func (client IdentityDomainsClient) createAuthenticationFactorsRemover(ctx conte return response, err } -// CreateCustomerSecretKey Create a user's customer secret key. +// CreateApprovalWorkflowStep Create ApprovalWorkflowStep // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateCustomerSecretKey.go.html to see an example of how to use CreateCustomerSecretKey API. -func (client IdentityDomainsClient) CreateCustomerSecretKey(ctx context.Context, request CreateCustomerSecretKeyRequest) (response CreateCustomerSecretKeyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateApprovalWorkflowStep.go.html to see an example of how to use CreateApprovalWorkflowStep API. +func (client IdentityDomainsClient) CreateApprovalWorkflowStep(ctx context.Context, request CreateApprovalWorkflowStepRequest) (response CreateApprovalWorkflowStepResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -409,42 +409,42 @@ func (client IdentityDomainsClient) CreateCustomerSecretKey(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createCustomerSecretKey, policy) + ociResponse, err = common.Retry(ctx, request, client.createApprovalWorkflowStep, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateCustomerSecretKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateApprovalWorkflowStepResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateCustomerSecretKeyResponse{} + response = CreateApprovalWorkflowStepResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateCustomerSecretKeyResponse); ok { + if convertedResponse, ok := ociResponse.(CreateApprovalWorkflowStepResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateCustomerSecretKeyResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateApprovalWorkflowStepResponse") } return } -// createCustomerSecretKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createCustomerSecretKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createApprovalWorkflowStep implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createApprovalWorkflowStep(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/CustomerSecretKeys", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/ApprovalWorkflowSteps", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateCustomerSecretKeyResponse + var response CreateApprovalWorkflowStepResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateCustomerSecretKey", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateApprovalWorkflowStep", apiReferenceLink) return response, err } @@ -452,12 +452,12 @@ func (client IdentityDomainsClient) createCustomerSecretKey(ctx context.Context, return response, err } -// CreateDynamicResourceGroup Create a Dynamic Resource Group. +// CreateAuthToken Create a user's Auth token. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateDynamicResourceGroup.go.html to see an example of how to use CreateDynamicResourceGroup API. -func (client IdentityDomainsClient) CreateDynamicResourceGroup(ctx context.Context, request CreateDynamicResourceGroupRequest) (response CreateDynamicResourceGroupResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateAuthToken.go.html to see an example of how to use CreateAuthToken API. +func (client IdentityDomainsClient) CreateAuthToken(ctx context.Context, request CreateAuthTokenRequest) (response CreateAuthTokenResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -471,42 +471,42 @@ func (client IdentityDomainsClient) CreateDynamicResourceGroup(ctx context.Conte request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createDynamicResourceGroup, policy) + ociResponse, err = common.Retry(ctx, request, client.createAuthToken, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateDynamicResourceGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateAuthTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateDynamicResourceGroupResponse{} + response = CreateAuthTokenResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateDynamicResourceGroupResponse); ok { + if convertedResponse, ok := ociResponse.(CreateAuthTokenResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateDynamicResourceGroupResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateAuthTokenResponse") } return } -// createDynamicResourceGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createDynamicResourceGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createAuthToken implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createAuthToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/DynamicResourceGroups", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/AuthTokens", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateDynamicResourceGroupResponse + var response CreateAuthTokenResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateDynamicResourceGroup", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateAuthToken", apiReferenceLink) return response, err } @@ -514,12 +514,12 @@ func (client IdentityDomainsClient) createDynamicResourceGroup(ctx context.Conte return response, err } -// CreateGrant Add a Grantee to an AppRole +// CreateAuthenticationFactorsRemover Remove All Authentication Factor Channels for a User // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateGrant.go.html to see an example of how to use CreateGrant API. -func (client IdentityDomainsClient) CreateGrant(ctx context.Context, request CreateGrantRequest) (response CreateGrantResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateAuthenticationFactorsRemover.go.html to see an example of how to use CreateAuthenticationFactorsRemover API. +func (client IdentityDomainsClient) CreateAuthenticationFactorsRemover(ctx context.Context, request CreateAuthenticationFactorsRemoverRequest) (response CreateAuthenticationFactorsRemoverResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -533,42 +533,42 @@ func (client IdentityDomainsClient) CreateGrant(ctx context.Context, request Cre request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createGrant, policy) + ociResponse, err = common.Retry(ctx, request, client.createAuthenticationFactorsRemover, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateGrantResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateAuthenticationFactorsRemoverResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateGrantResponse{} + response = CreateAuthenticationFactorsRemoverResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateGrantResponse); ok { + if convertedResponse, ok := ociResponse.(CreateAuthenticationFactorsRemoverResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateGrantResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateAuthenticationFactorsRemoverResponse") } return } -// createGrant implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createGrant(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createAuthenticationFactorsRemover implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createAuthenticationFactorsRemover(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Grants", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/AuthenticationFactorsRemover", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateGrantResponse + var response CreateAuthenticationFactorsRemoverResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateGrant", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateAuthenticationFactorsRemover", apiReferenceLink) return response, err } @@ -576,12 +576,12 @@ func (client IdentityDomainsClient) createGrant(ctx context.Context, request com return response, err } -// CreateGroup Create a group. +// CreateCloudGate Create a Cloud Gate // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateGroup.go.html to see an example of how to use CreateGroup API. -func (client IdentityDomainsClient) CreateGroup(ctx context.Context, request CreateGroupRequest) (response CreateGroupResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateCloudGate.go.html to see an example of how to use CreateCloudGate API. +func (client IdentityDomainsClient) CreateCloudGate(ctx context.Context, request CreateCloudGateRequest) (response CreateCloudGateResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -595,42 +595,42 @@ func (client IdentityDomainsClient) CreateGroup(ctx context.Context, request Cre request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createGroup, policy) + ociResponse, err = common.Retry(ctx, request, client.createCloudGate, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateCloudGateResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateGroupResponse{} + response = CreateCloudGateResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateGroupResponse); ok { + if convertedResponse, ok := ociResponse.(CreateCloudGateResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateGroupResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateCloudGateResponse") } return } -// createGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createCloudGate implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createCloudGate(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Groups", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/CloudGates", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateGroupResponse + var response CreateCloudGateResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateGroup", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateCloudGate", apiReferenceLink) return response, err } @@ -638,12 +638,12 @@ func (client IdentityDomainsClient) createGroup(ctx context.Context, request com return response, err } -// CreateIdentityProvider Create an Identity Provider +// CreateCloudGateMapping Create a Cloud Gate mapping // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateIdentityProvider.go.html to see an example of how to use CreateIdentityProvider API. -func (client IdentityDomainsClient) CreateIdentityProvider(ctx context.Context, request CreateIdentityProviderRequest) (response CreateIdentityProviderResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateCloudGateMapping.go.html to see an example of how to use CreateCloudGateMapping API. +func (client IdentityDomainsClient) CreateCloudGateMapping(ctx context.Context, request CreateCloudGateMappingRequest) (response CreateCloudGateMappingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -657,42 +657,42 @@ func (client IdentityDomainsClient) CreateIdentityProvider(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createIdentityProvider, policy) + ociResponse, err = common.Retry(ctx, request, client.createCloudGateMapping, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateIdentityProviderResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateCloudGateMappingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateIdentityProviderResponse{} + response = CreateCloudGateMappingResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateIdentityProviderResponse); ok { + if convertedResponse, ok := ociResponse.(CreateCloudGateMappingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateIdentityProviderResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateCloudGateMappingResponse") } return } -// createIdentityProvider implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createIdentityProvider(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createCloudGateMapping implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createCloudGateMapping(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/IdentityProviders", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/CloudGateMappings", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateIdentityProviderResponse + var response CreateCloudGateMappingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateIdentityProvider", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateCloudGateMapping", apiReferenceLink) return response, err } @@ -700,12 +700,12 @@ func (client IdentityDomainsClient) createIdentityProvider(ctx context.Context, return response, err } -// CreateMe Self register a user. +// CreateCloudGateServer Create a Cloud Gate server // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMe.go.html to see an example of how to use CreateMe API. -func (client IdentityDomainsClient) CreateMe(ctx context.Context, request CreateMeRequest) (response CreateMeResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateCloudGateServer.go.html to see an example of how to use CreateCloudGateServer API. +func (client IdentityDomainsClient) CreateCloudGateServer(ctx context.Context, request CreateCloudGateServerRequest) (response CreateCloudGateServerResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -719,42 +719,42 @@ func (client IdentityDomainsClient) CreateMe(ctx context.Context, request Create request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createMe, policy) + ociResponse, err = common.Retry(ctx, request, client.createCloudGateServer, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateMeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateCloudGateServerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateMeResponse{} + response = CreateCloudGateServerResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateMeResponse); ok { + if convertedResponse, ok := ociResponse.(CreateCloudGateServerResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateMeResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateCloudGateServerResponse") } return } -// createMe implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createMe(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createCloudGateServer implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createCloudGateServer(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Me", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/CloudGateServers", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateMeResponse + var response CreateCloudGateServerResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMe", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateCloudGateServer", apiReferenceLink) return response, err } @@ -762,12 +762,12 @@ func (client IdentityDomainsClient) createMe(ctx context.Context, request common return response, err } -// CreateMyApiKey Add a user's own API key. +// CreateCondition Create a Condition // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMyApiKey.go.html to see an example of how to use CreateMyApiKey API. -func (client IdentityDomainsClient) CreateMyApiKey(ctx context.Context, request CreateMyApiKeyRequest) (response CreateMyApiKeyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateCondition.go.html to see an example of how to use CreateCondition API. +func (client IdentityDomainsClient) CreateCondition(ctx context.Context, request CreateConditionRequest) (response CreateConditionResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -781,42 +781,42 @@ func (client IdentityDomainsClient) CreateMyApiKey(ctx context.Context, request request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createMyApiKey, policy) + ociResponse, err = common.Retry(ctx, request, client.createCondition, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateMyApiKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateConditionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateMyApiKeyResponse{} + response = CreateConditionResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateMyApiKeyResponse); ok { + if convertedResponse, ok := ociResponse.(CreateConditionResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateMyApiKeyResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateConditionResponse") } return } -// createMyApiKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createMyApiKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createCondition implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createCondition(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyApiKeys", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Conditions", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateMyApiKeyResponse + var response CreateConditionResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMyApiKey", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateCondition", apiReferenceLink) return response, err } @@ -824,12 +824,12 @@ func (client IdentityDomainsClient) createMyApiKey(ctx context.Context, request return response, err } -// CreateMyAuthToken Create a user's own Auth token. +// CreateCustomerSecretKey Create a user's customer secret key. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMyAuthToken.go.html to see an example of how to use CreateMyAuthToken API. -func (client IdentityDomainsClient) CreateMyAuthToken(ctx context.Context, request CreateMyAuthTokenRequest) (response CreateMyAuthTokenResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateCustomerSecretKey.go.html to see an example of how to use CreateCustomerSecretKey API. +func (client IdentityDomainsClient) CreateCustomerSecretKey(ctx context.Context, request CreateCustomerSecretKeyRequest) (response CreateCustomerSecretKeyResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -843,42 +843,42 @@ func (client IdentityDomainsClient) CreateMyAuthToken(ctx context.Context, reque request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createMyAuthToken, policy) + ociResponse, err = common.Retry(ctx, request, client.createCustomerSecretKey, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateMyAuthTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateCustomerSecretKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateMyAuthTokenResponse{} + response = CreateCustomerSecretKeyResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateMyAuthTokenResponse); ok { + if convertedResponse, ok := ociResponse.(CreateCustomerSecretKeyResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateMyAuthTokenResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateCustomerSecretKeyResponse") } return } -// createMyAuthToken implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createMyAuthToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createCustomerSecretKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createCustomerSecretKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyAuthTokens", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/CustomerSecretKeys", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateMyAuthTokenResponse + var response CreateCustomerSecretKeyResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMyAuthToken", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateCustomerSecretKey", apiReferenceLink) return response, err } @@ -886,12 +886,12 @@ func (client IdentityDomainsClient) createMyAuthToken(ctx context.Context, reque return response, err } -// CreateMyAuthenticationFactorInitiator Initiate Self Service Enrollment using the Requested MFA Factor +// CreateDynamicResourceGroup Create a Dynamic Resource Group. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMyAuthenticationFactorInitiator.go.html to see an example of how to use CreateMyAuthenticationFactorInitiator API. -func (client IdentityDomainsClient) CreateMyAuthenticationFactorInitiator(ctx context.Context, request CreateMyAuthenticationFactorInitiatorRequest) (response CreateMyAuthenticationFactorInitiatorResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateDynamicResourceGroup.go.html to see an example of how to use CreateDynamicResourceGroup API. +func (client IdentityDomainsClient) CreateDynamicResourceGroup(ctx context.Context, request CreateDynamicResourceGroupRequest) (response CreateDynamicResourceGroupResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -905,42 +905,42 @@ func (client IdentityDomainsClient) CreateMyAuthenticationFactorInitiator(ctx co request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createMyAuthenticationFactorInitiator, policy) + ociResponse, err = common.Retry(ctx, request, client.createDynamicResourceGroup, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateMyAuthenticationFactorInitiatorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateDynamicResourceGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateMyAuthenticationFactorInitiatorResponse{} + response = CreateDynamicResourceGroupResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateMyAuthenticationFactorInitiatorResponse); ok { + if convertedResponse, ok := ociResponse.(CreateDynamicResourceGroupResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateMyAuthenticationFactorInitiatorResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateDynamicResourceGroupResponse") } return } -// createMyAuthenticationFactorInitiator implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createMyAuthenticationFactorInitiator(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createDynamicResourceGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createDynamicResourceGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyAuthenticationFactorInitiator", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/DynamicResourceGroups", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateMyAuthenticationFactorInitiatorResponse + var response CreateDynamicResourceGroupResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMyAuthenticationFactorInitiator", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateDynamicResourceGroup", apiReferenceLink) return response, err } @@ -948,12 +948,12 @@ func (client IdentityDomainsClient) createMyAuthenticationFactorInitiator(ctx co return response, err } -// CreateMyAuthenticationFactorValidator Validate Self Service Enrollment using the Requested MFA Factor +// CreateGrant Add a Grantee to an AppRole // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMyAuthenticationFactorValidator.go.html to see an example of how to use CreateMyAuthenticationFactorValidator API. -func (client IdentityDomainsClient) CreateMyAuthenticationFactorValidator(ctx context.Context, request CreateMyAuthenticationFactorValidatorRequest) (response CreateMyAuthenticationFactorValidatorResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateGrant.go.html to see an example of how to use CreateGrant API. +func (client IdentityDomainsClient) CreateGrant(ctx context.Context, request CreateGrantRequest) (response CreateGrantResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -967,42 +967,42 @@ func (client IdentityDomainsClient) CreateMyAuthenticationFactorValidator(ctx co request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createMyAuthenticationFactorValidator, policy) + ociResponse, err = common.Retry(ctx, request, client.createGrant, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateMyAuthenticationFactorValidatorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateGrantResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateMyAuthenticationFactorValidatorResponse{} + response = CreateGrantResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateMyAuthenticationFactorValidatorResponse); ok { + if convertedResponse, ok := ociResponse.(CreateGrantResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateMyAuthenticationFactorValidatorResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateGrantResponse") } return } -// createMyAuthenticationFactorValidator implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createMyAuthenticationFactorValidator(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createGrant implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createGrant(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyAuthenticationFactorValidator", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Grants", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateMyAuthenticationFactorValidatorResponse + var response CreateGrantResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMyAuthenticationFactorValidator", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateGrant", apiReferenceLink) return response, err } @@ -1010,12 +1010,12 @@ func (client IdentityDomainsClient) createMyAuthenticationFactorValidator(ctx co return response, err } -// CreateMyAuthenticationFactorsRemover Remove All Authentication Factor Channels for a User +// CreateGroup Create a group. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMyAuthenticationFactorsRemover.go.html to see an example of how to use CreateMyAuthenticationFactorsRemover API. -func (client IdentityDomainsClient) CreateMyAuthenticationFactorsRemover(ctx context.Context, request CreateMyAuthenticationFactorsRemoverRequest) (response CreateMyAuthenticationFactorsRemoverResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateGroup.go.html to see an example of how to use CreateGroup API. +func (client IdentityDomainsClient) CreateGroup(ctx context.Context, request CreateGroupRequest) (response CreateGroupResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1029,42 +1029,42 @@ func (client IdentityDomainsClient) CreateMyAuthenticationFactorsRemover(ctx con request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createMyAuthenticationFactorsRemover, policy) + ociResponse, err = common.Retry(ctx, request, client.createGroup, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateMyAuthenticationFactorsRemoverResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateMyAuthenticationFactorsRemoverResponse{} + response = CreateGroupResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateMyAuthenticationFactorsRemoverResponse); ok { + if convertedResponse, ok := ociResponse.(CreateGroupResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateMyAuthenticationFactorsRemoverResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateGroupResponse") } return } -// createMyAuthenticationFactorsRemover implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createMyAuthenticationFactorsRemover(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyAuthenticationFactorsRemover", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Groups", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateMyAuthenticationFactorsRemoverResponse + var response CreateGroupResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMyAuthenticationFactorsRemover", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateGroup", apiReferenceLink) return response, err } @@ -1072,12 +1072,12 @@ func (client IdentityDomainsClient) createMyAuthenticationFactorsRemover(ctx con return response, err } -// CreateMyCustomerSecretKey Add a user's own customer secret key. +// CreateIdentityProvider Create an Identity Provider // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMyCustomerSecretKey.go.html to see an example of how to use CreateMyCustomerSecretKey API. -func (client IdentityDomainsClient) CreateMyCustomerSecretKey(ctx context.Context, request CreateMyCustomerSecretKeyRequest) (response CreateMyCustomerSecretKeyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateIdentityProvider.go.html to see an example of how to use CreateIdentityProvider API. +func (client IdentityDomainsClient) CreateIdentityProvider(ctx context.Context, request CreateIdentityProviderRequest) (response CreateIdentityProviderResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1091,42 +1091,6242 @@ func (client IdentityDomainsClient) CreateMyCustomerSecretKey(ctx context.Contex request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createMyCustomerSecretKey, policy) + ociResponse, err = common.Retry(ctx, request, client.createIdentityProvider, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateMyCustomerSecretKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateIdentityProviderResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateIdentityProviderResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateIdentityProviderResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateIdentityProviderResponse") + } + return +} + +// createIdentityProvider implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createIdentityProvider(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/IdentityProviders", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateIdentityProviderResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateIdentityProvider", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateMe Self register a user. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMe.go.html to see an example of how to use CreateMe API. +func (client IdentityDomainsClient) CreateMe(ctx context.Context, request CreateMeRequest) (response CreateMeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createMe, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateMeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateMeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateMeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateMeResponse") + } + return +} + +// createMe implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createMe(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Me", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateMeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMe", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateMyApiKey Add a user's own API key. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMyApiKey.go.html to see an example of how to use CreateMyApiKey API. +func (client IdentityDomainsClient) CreateMyApiKey(ctx context.Context, request CreateMyApiKeyRequest) (response CreateMyApiKeyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createMyApiKey, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateMyApiKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateMyApiKeyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateMyApiKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateMyApiKeyResponse") + } + return +} + +// createMyApiKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createMyApiKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyApiKeys", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateMyApiKeyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMyApiKey", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateMyAuthToken Create a user's own Auth token. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMyAuthToken.go.html to see an example of how to use CreateMyAuthToken API. +func (client IdentityDomainsClient) CreateMyAuthToken(ctx context.Context, request CreateMyAuthTokenRequest) (response CreateMyAuthTokenResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createMyAuthToken, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateMyAuthTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateMyAuthTokenResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateMyAuthTokenResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateMyAuthTokenResponse") + } + return +} + +// createMyAuthToken implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createMyAuthToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyAuthTokens", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateMyAuthTokenResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMyAuthToken", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateMyAuthenticationFactorInitiator Initiate Self Service Enrollment using the Requested MFA Factor +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMyAuthenticationFactorInitiator.go.html to see an example of how to use CreateMyAuthenticationFactorInitiator API. +func (client IdentityDomainsClient) CreateMyAuthenticationFactorInitiator(ctx context.Context, request CreateMyAuthenticationFactorInitiatorRequest) (response CreateMyAuthenticationFactorInitiatorResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createMyAuthenticationFactorInitiator, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateMyAuthenticationFactorInitiatorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateMyAuthenticationFactorInitiatorResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateMyAuthenticationFactorInitiatorResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateMyAuthenticationFactorInitiatorResponse") + } + return +} + +// createMyAuthenticationFactorInitiator implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createMyAuthenticationFactorInitiator(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyAuthenticationFactorInitiator", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateMyAuthenticationFactorInitiatorResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMyAuthenticationFactorInitiator", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateMyAuthenticationFactorValidator Validate Self Service Enrollment using the Requested MFA Factor +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMyAuthenticationFactorValidator.go.html to see an example of how to use CreateMyAuthenticationFactorValidator API. +func (client IdentityDomainsClient) CreateMyAuthenticationFactorValidator(ctx context.Context, request CreateMyAuthenticationFactorValidatorRequest) (response CreateMyAuthenticationFactorValidatorResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createMyAuthenticationFactorValidator, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateMyAuthenticationFactorValidatorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateMyAuthenticationFactorValidatorResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateMyAuthenticationFactorValidatorResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateMyAuthenticationFactorValidatorResponse") + } + return +} + +// createMyAuthenticationFactorValidator implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createMyAuthenticationFactorValidator(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyAuthenticationFactorValidator", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateMyAuthenticationFactorValidatorResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMyAuthenticationFactorValidator", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateMyAuthenticationFactorsRemover Remove All Authentication Factor Channels for a User +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMyAuthenticationFactorsRemover.go.html to see an example of how to use CreateMyAuthenticationFactorsRemover API. +func (client IdentityDomainsClient) CreateMyAuthenticationFactorsRemover(ctx context.Context, request CreateMyAuthenticationFactorsRemoverRequest) (response CreateMyAuthenticationFactorsRemoverResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createMyAuthenticationFactorsRemover, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateMyAuthenticationFactorsRemoverResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateMyAuthenticationFactorsRemoverResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateMyAuthenticationFactorsRemoverResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateMyAuthenticationFactorsRemoverResponse") + } + return +} + +// createMyAuthenticationFactorsRemover implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createMyAuthenticationFactorsRemover(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyAuthenticationFactorsRemover", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateMyAuthenticationFactorsRemoverResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMyAuthenticationFactorsRemover", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateMyCustomerSecretKey Add a user's own customer secret key. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMyCustomerSecretKey.go.html to see an example of how to use CreateMyCustomerSecretKey API. +func (client IdentityDomainsClient) CreateMyCustomerSecretKey(ctx context.Context, request CreateMyCustomerSecretKeyRequest) (response CreateMyCustomerSecretKeyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createMyCustomerSecretKey, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateMyCustomerSecretKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateMyCustomerSecretKeyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateMyCustomerSecretKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateMyCustomerSecretKeyResponse") + } + return +} + +// createMyCustomerSecretKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createMyCustomerSecretKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyCustomerSecretKeys", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateMyCustomerSecretKeyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMyCustomerSecretKey", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateMyOAuth2ClientCredential Create a user's own OAuth2 client credential. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMyOAuth2ClientCredential.go.html to see an example of how to use CreateMyOAuth2ClientCredential API. +func (client IdentityDomainsClient) CreateMyOAuth2ClientCredential(ctx context.Context, request CreateMyOAuth2ClientCredentialRequest) (response CreateMyOAuth2ClientCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createMyOAuth2ClientCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateMyOAuth2ClientCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateMyOAuth2ClientCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateMyOAuth2ClientCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateMyOAuth2ClientCredentialResponse") + } + return +} + +// createMyOAuth2ClientCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createMyOAuth2ClientCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyOAuth2ClientCredentials", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateMyOAuth2ClientCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMyOAuth2ClientCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateMyRequest Create a Request +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMyRequest.go.html to see an example of how to use CreateMyRequest API. +func (client IdentityDomainsClient) CreateMyRequest(ctx context.Context, request CreateMyRequestRequest) (response CreateMyRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createMyRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateMyRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateMyRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateMyRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateMyRequestResponse") + } + return +} + +// createMyRequest implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createMyRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyRequests", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateMyRequestResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMyRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateMySmtpCredential Create a user's own SMTP credential. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMySmtpCredential.go.html to see an example of how to use CreateMySmtpCredential API. +func (client IdentityDomainsClient) CreateMySmtpCredential(ctx context.Context, request CreateMySmtpCredentialRequest) (response CreateMySmtpCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createMySmtpCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateMySmtpCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateMySmtpCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateMySmtpCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateMySmtpCredentialResponse") + } + return +} + +// createMySmtpCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createMySmtpCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MySmtpCredentials", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateMySmtpCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMySmtpCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateMySupportAccount Create a user's own support account. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMySupportAccount.go.html to see an example of how to use CreateMySupportAccount API. +func (client IdentityDomainsClient) CreateMySupportAccount(ctx context.Context, request CreateMySupportAccountRequest) (response CreateMySupportAccountResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createMySupportAccount, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateMySupportAccountResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateMySupportAccountResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateMySupportAccountResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateMySupportAccountResponse") + } + return +} + +// createMySupportAccount implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createMySupportAccount(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MySupportAccounts", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateMySupportAccountResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMySupportAccount", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateMyUserDbCredential Create a user's own database (DB) credential. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMyUserDbCredential.go.html to see an example of how to use CreateMyUserDbCredential API. +func (client IdentityDomainsClient) CreateMyUserDbCredential(ctx context.Context, request CreateMyUserDbCredentialRequest) (response CreateMyUserDbCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createMyUserDbCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateMyUserDbCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateMyUserDbCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateMyUserDbCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateMyUserDbCredentialResponse") + } + return +} + +// createMyUserDbCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createMyUserDbCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyUserDbCredentials", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateMyUserDbCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMyUserDbCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateNetworkPerimeter Create a NetworkPerimeter +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateNetworkPerimeter.go.html to see an example of how to use CreateNetworkPerimeter API. +func (client IdentityDomainsClient) CreateNetworkPerimeter(ctx context.Context, request CreateNetworkPerimeterRequest) (response CreateNetworkPerimeterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createNetworkPerimeter, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateNetworkPerimeterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateNetworkPerimeterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateNetworkPerimeterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateNetworkPerimeterResponse") + } + return +} + +// createNetworkPerimeter implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createNetworkPerimeter(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/NetworkPerimeters", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateNetworkPerimeterResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateNetworkPerimeter", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateOAuth2ClientCredential Add a user's OAuth2 client credentials. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateOAuth2ClientCredential.go.html to see an example of how to use CreateOAuth2ClientCredential API. +func (client IdentityDomainsClient) CreateOAuth2ClientCredential(ctx context.Context, request CreateOAuth2ClientCredentialRequest) (response CreateOAuth2ClientCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createOAuth2ClientCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateOAuth2ClientCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateOAuth2ClientCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateOAuth2ClientCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateOAuth2ClientCredentialResponse") + } + return +} + +// createOAuth2ClientCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createOAuth2ClientCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/OAuth2ClientCredentials", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateOAuth2ClientCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateOAuth2ClientCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateOAuthClientCertificate Create an OAuth Client Certificate +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateOAuthClientCertificate.go.html to see an example of how to use CreateOAuthClientCertificate API. +func (client IdentityDomainsClient) CreateOAuthClientCertificate(ctx context.Context, request CreateOAuthClientCertificateRequest) (response CreateOAuthClientCertificateResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createOAuthClientCertificate, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateOAuthClientCertificateResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateOAuthClientCertificateResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateOAuthClientCertificateResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateOAuthClientCertificateResponse") + } + return +} + +// createOAuthClientCertificate implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createOAuthClientCertificate(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/OAuthClientCertificates", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateOAuthClientCertificateResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateOAuthClientCertificate", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateOAuthPartnerCertificate Create an OAuth Partner Certificate +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateOAuthPartnerCertificate.go.html to see an example of how to use CreateOAuthPartnerCertificate API. +func (client IdentityDomainsClient) CreateOAuthPartnerCertificate(ctx context.Context, request CreateOAuthPartnerCertificateRequest) (response CreateOAuthPartnerCertificateResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createOAuthPartnerCertificate, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateOAuthPartnerCertificateResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateOAuthPartnerCertificateResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateOAuthPartnerCertificateResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateOAuthPartnerCertificateResponse") + } + return +} + +// createOAuthPartnerCertificate implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createOAuthPartnerCertificate(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/OAuthPartnerCertificates", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateOAuthPartnerCertificateResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateOAuthPartnerCertificate", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreatePasswordPolicy Create a password policy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreatePasswordPolicy.go.html to see an example of how to use CreatePasswordPolicy API. +func (client IdentityDomainsClient) CreatePasswordPolicy(ctx context.Context, request CreatePasswordPolicyRequest) (response CreatePasswordPolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createPasswordPolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreatePasswordPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreatePasswordPolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreatePasswordPolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreatePasswordPolicyResponse") + } + return +} + +// createPasswordPolicy implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createPasswordPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/PasswordPolicies", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreatePasswordPolicyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreatePasswordPolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreatePolicy Create a Policy +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreatePolicy.go.html to see an example of how to use CreatePolicy API. +func (client IdentityDomainsClient) CreatePolicy(ctx context.Context, request CreatePolicyRequest) (response CreatePolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createPolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreatePolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreatePolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreatePolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreatePolicyResponse") + } + return +} + +// createPolicy implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Policies", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreatePolicyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreatePolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateRule Create a Rule +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateRule.go.html to see an example of how to use CreateRule API. +func (client IdentityDomainsClient) CreateRule(ctx context.Context, request CreateRuleRequest) (response CreateRuleResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createRule, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateRuleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateRuleResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateRuleResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateRuleResponse") + } + return +} + +// createRule implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createRule(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Rules", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateRuleResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateRule", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateSecurityQuestion Create a security question. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateSecurityQuestion.go.html to see an example of how to use CreateSecurityQuestion API. +func (client IdentityDomainsClient) CreateSecurityQuestion(ctx context.Context, request CreateSecurityQuestionRequest) (response CreateSecurityQuestionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createSecurityQuestion, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateSecurityQuestionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateSecurityQuestionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateSecurityQuestionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateSecurityQuestionResponse") + } + return +} + +// createSecurityQuestion implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createSecurityQuestion(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/SecurityQuestions", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateSecurityQuestionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateSecurityQuestion", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateSelfRegistrationProfile Create a self-registration profile. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateSelfRegistrationProfile.go.html to see an example of how to use CreateSelfRegistrationProfile API. +func (client IdentityDomainsClient) CreateSelfRegistrationProfile(ctx context.Context, request CreateSelfRegistrationProfileRequest) (response CreateSelfRegistrationProfileResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createSelfRegistrationProfile, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateSelfRegistrationProfileResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateSelfRegistrationProfileResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateSelfRegistrationProfileResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateSelfRegistrationProfileResponse") + } + return +} + +// createSelfRegistrationProfile implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createSelfRegistrationProfile(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/SelfRegistrationProfiles", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateSelfRegistrationProfileResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateSelfRegistrationProfile", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateSmtpCredential Create a user's SMTP credentials. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateSmtpCredential.go.html to see an example of how to use CreateSmtpCredential API. +func (client IdentityDomainsClient) CreateSmtpCredential(ctx context.Context, request CreateSmtpCredentialRequest) (response CreateSmtpCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createSmtpCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateSmtpCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateSmtpCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateSmtpCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateSmtpCredentialResponse") + } + return +} + +// createSmtpCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createSmtpCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/SmtpCredentials", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateSmtpCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateSmtpCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateUser Create a user. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateUser.go.html to see an example of how to use CreateUser API. +func (client IdentityDomainsClient) CreateUser(ctx context.Context, request CreateUserRequest) (response CreateUserResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createUser, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateUserResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateUserResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateUserResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateUserResponse") + } + return +} + +// createUser implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createUser(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Users", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateUserResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateUser", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateUserDbCredential Create a user's database (DB) credentials. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateUserDbCredential.go.html to see an example of how to use CreateUserDbCredential API. +func (client IdentityDomainsClient) CreateUserDbCredential(ctx context.Context, request CreateUserDbCredentialRequest) (response CreateUserDbCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createUserDbCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateUserDbCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateUserDbCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateUserDbCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateUserDbCredentialResponse") + } + return +} + +// createUserDbCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) createUserDbCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/UserDbCredentials", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateUserDbCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "CreateUserDbCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteApiKey Delete a user's API key. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteApiKey.go.html to see an example of how to use DeleteApiKey API. +func (client IdentityDomainsClient) DeleteApiKey(ctx context.Context, request DeleteApiKeyRequest) (response DeleteApiKeyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteApiKey, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteApiKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteApiKeyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteApiKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteApiKeyResponse") + } + return +} + +// deleteApiKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteApiKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/ApiKeys/{apiKeyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteApiKeyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteApiKey", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteApp Delete an App +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteApp.go.html to see an example of how to use DeleteApp API. +func (client IdentityDomainsClient) DeleteApp(ctx context.Context, request DeleteAppRequest) (response DeleteAppResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteApp, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteAppResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteAppResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteAppResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteAppResponse") + } + return +} + +// deleteApp implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteApp(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/Apps/{appId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteAppResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteApp", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteAppRole Delete an AppRole +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteAppRole.go.html to see an example of how to use DeleteAppRole API. +func (client IdentityDomainsClient) DeleteAppRole(ctx context.Context, request DeleteAppRoleRequest) (response DeleteAppRoleResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteAppRole, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteAppRoleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteAppRoleResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteAppRoleResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteAppRoleResponse") + } + return +} + +// deleteAppRole implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteAppRole(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/AppRoles/{appRoleId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteAppRoleResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteAppRole", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteApprovalWorkflow Delete ApprovalWorkflow +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteApprovalWorkflow.go.html to see an example of how to use DeleteApprovalWorkflow API. +func (client IdentityDomainsClient) DeleteApprovalWorkflow(ctx context.Context, request DeleteApprovalWorkflowRequest) (response DeleteApprovalWorkflowResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteApprovalWorkflow, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteApprovalWorkflowResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteApprovalWorkflowResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteApprovalWorkflowResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteApprovalWorkflowResponse") + } + return +} + +// deleteApprovalWorkflow implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteApprovalWorkflow(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/ApprovalWorkflows/{approvalWorkflowId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteApprovalWorkflowResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteApprovalWorkflow", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteApprovalWorkflowAssignment Delete Approval Workflow Assignment +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteApprovalWorkflowAssignment.go.html to see an example of how to use DeleteApprovalWorkflowAssignment API. +func (client IdentityDomainsClient) DeleteApprovalWorkflowAssignment(ctx context.Context, request DeleteApprovalWorkflowAssignmentRequest) (response DeleteApprovalWorkflowAssignmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteApprovalWorkflowAssignment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteApprovalWorkflowAssignmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteApprovalWorkflowAssignmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteApprovalWorkflowAssignmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteApprovalWorkflowAssignmentResponse") + } + return +} + +// deleteApprovalWorkflowAssignment implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteApprovalWorkflowAssignment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/ApprovalWorkflowAssignments/{approvalWorkflowAssignmentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteApprovalWorkflowAssignmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteApprovalWorkflowAssignment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteApprovalWorkflowStep Delete ApprovalWorkflowStep +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteApprovalWorkflowStep.go.html to see an example of how to use DeleteApprovalWorkflowStep API. +func (client IdentityDomainsClient) DeleteApprovalWorkflowStep(ctx context.Context, request DeleteApprovalWorkflowStepRequest) (response DeleteApprovalWorkflowStepResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteApprovalWorkflowStep, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteApprovalWorkflowStepResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteApprovalWorkflowStepResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteApprovalWorkflowStepResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteApprovalWorkflowStepResponse") + } + return +} + +// deleteApprovalWorkflowStep implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteApprovalWorkflowStep(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/ApprovalWorkflowSteps/{approvalWorkflowStepId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteApprovalWorkflowStepResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteApprovalWorkflowStep", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteAuthToken Delete a user's Auth token. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteAuthToken.go.html to see an example of how to use DeleteAuthToken API. +func (client IdentityDomainsClient) DeleteAuthToken(ctx context.Context, request DeleteAuthTokenRequest) (response DeleteAuthTokenResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteAuthToken, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteAuthTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteAuthTokenResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteAuthTokenResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteAuthTokenResponse") + } + return +} + +// deleteAuthToken implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteAuthToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/AuthTokens/{authTokenId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteAuthTokenResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteAuthToken", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteCloudGate Delete a Cloud Gate +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteCloudGate.go.html to see an example of how to use DeleteCloudGate API. +func (client IdentityDomainsClient) DeleteCloudGate(ctx context.Context, request DeleteCloudGateRequest) (response DeleteCloudGateResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteCloudGate, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteCloudGateResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteCloudGateResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteCloudGateResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteCloudGateResponse") + } + return +} + +// deleteCloudGate implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteCloudGate(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/CloudGates/{cloudGateId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteCloudGateResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteCloudGate", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteCloudGateMapping Delete a Cloud Gate mapping +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteCloudGateMapping.go.html to see an example of how to use DeleteCloudGateMapping API. +func (client IdentityDomainsClient) DeleteCloudGateMapping(ctx context.Context, request DeleteCloudGateMappingRequest) (response DeleteCloudGateMappingResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteCloudGateMapping, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteCloudGateMappingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteCloudGateMappingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteCloudGateMappingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteCloudGateMappingResponse") + } + return +} + +// deleteCloudGateMapping implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteCloudGateMapping(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/CloudGateMappings/{cloudGateMappingId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteCloudGateMappingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteCloudGateMapping", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteCloudGateServer Delete a Cloud Gate server +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteCloudGateServer.go.html to see an example of how to use DeleteCloudGateServer API. +func (client IdentityDomainsClient) DeleteCloudGateServer(ctx context.Context, request DeleteCloudGateServerRequest) (response DeleteCloudGateServerResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteCloudGateServer, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteCloudGateServerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteCloudGateServerResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteCloudGateServerResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteCloudGateServerResponse") + } + return +} + +// deleteCloudGateServer implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteCloudGateServer(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/CloudGateServers/{cloudGateServerId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteCloudGateServerResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteCloudGateServer", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteCondition Delete a Condition +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteCondition.go.html to see an example of how to use DeleteCondition API. +func (client IdentityDomainsClient) DeleteCondition(ctx context.Context, request DeleteConditionRequest) (response DeleteConditionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteCondition, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteConditionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteConditionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteConditionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteConditionResponse") + } + return +} + +// deleteCondition implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteCondition(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/Conditions/{conditionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteConditionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteCondition", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteCustomerSecretKey Delete a user's customer secret key. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteCustomerSecretKey.go.html to see an example of how to use DeleteCustomerSecretKey API. +func (client IdentityDomainsClient) DeleteCustomerSecretKey(ctx context.Context, request DeleteCustomerSecretKeyRequest) (response DeleteCustomerSecretKeyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteCustomerSecretKey, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteCustomerSecretKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteCustomerSecretKeyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteCustomerSecretKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteCustomerSecretKeyResponse") + } + return +} + +// deleteCustomerSecretKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteCustomerSecretKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/CustomerSecretKeys/{customerSecretKeyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteCustomerSecretKeyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteCustomerSecretKey", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteDynamicResourceGroup Delete a Dynamic Resource Group. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteDynamicResourceGroup.go.html to see an example of how to use DeleteDynamicResourceGroup API. +func (client IdentityDomainsClient) DeleteDynamicResourceGroup(ctx context.Context, request DeleteDynamicResourceGroupRequest) (response DeleteDynamicResourceGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteDynamicResourceGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteDynamicResourceGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteDynamicResourceGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteDynamicResourceGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteDynamicResourceGroupResponse") + } + return +} + +// deleteDynamicResourceGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteDynamicResourceGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/DynamicResourceGroups/{dynamicResourceGroupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteDynamicResourceGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteDynamicResourceGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteGrant Remove a Grantee from an AppRole +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteGrant.go.html to see an example of how to use DeleteGrant API. +func (client IdentityDomainsClient) DeleteGrant(ctx context.Context, request DeleteGrantRequest) (response DeleteGrantResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteGrant, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteGrantResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteGrantResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteGrantResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteGrantResponse") + } + return +} + +// deleteGrant implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteGrant(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/Grants/{grantId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteGrantResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteGrant", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteGroup Delete a group. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteGroup.go.html to see an example of how to use DeleteGroup API. +func (client IdentityDomainsClient) DeleteGroup(ctx context.Context, request DeleteGroupRequest) (response DeleteGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteGroupResponse") + } + return +} + +// deleteGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/Groups/{groupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteIdentityProvider Delete an Identity Provider +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteIdentityProvider.go.html to see an example of how to use DeleteIdentityProvider API. +func (client IdentityDomainsClient) DeleteIdentityProvider(ctx context.Context, request DeleteIdentityProviderRequest) (response DeleteIdentityProviderResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteIdentityProvider, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteIdentityProviderResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteIdentityProviderResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteIdentityProviderResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteIdentityProviderResponse") + } + return +} + +// deleteIdentityProvider implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteIdentityProvider(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/IdentityProviders/{identityProviderId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteIdentityProviderResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteIdentityProvider", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteMyApiKey Delete a user's own API key. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteMyApiKey.go.html to see an example of how to use DeleteMyApiKey API. +func (client IdentityDomainsClient) DeleteMyApiKey(ctx context.Context, request DeleteMyApiKeyRequest) (response DeleteMyApiKeyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteMyApiKey, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteMyApiKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteMyApiKeyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteMyApiKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteMyApiKeyResponse") + } + return +} + +// deleteMyApiKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteMyApiKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/MyApiKeys/{myApiKeyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteMyApiKeyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteMyApiKey", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteMyAuthToken Delete a user's own Auth token. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteMyAuthToken.go.html to see an example of how to use DeleteMyAuthToken API. +func (client IdentityDomainsClient) DeleteMyAuthToken(ctx context.Context, request DeleteMyAuthTokenRequest) (response DeleteMyAuthTokenResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteMyAuthToken, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteMyAuthTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteMyAuthTokenResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteMyAuthTokenResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteMyAuthTokenResponse") + } + return +} + +// deleteMyAuthToken implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteMyAuthToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/MyAuthTokens/{myAuthTokenId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteMyAuthTokenResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteMyAuthToken", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteMyCustomerSecretKey Delete a user's own customer secret key. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteMyCustomerSecretKey.go.html to see an example of how to use DeleteMyCustomerSecretKey API. +func (client IdentityDomainsClient) DeleteMyCustomerSecretKey(ctx context.Context, request DeleteMyCustomerSecretKeyRequest) (response DeleteMyCustomerSecretKeyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteMyCustomerSecretKey, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteMyCustomerSecretKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteMyCustomerSecretKeyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteMyCustomerSecretKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteMyCustomerSecretKeyResponse") + } + return +} + +// deleteMyCustomerSecretKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteMyCustomerSecretKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/MyCustomerSecretKeys/{myCustomerSecretKeyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteMyCustomerSecretKeyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteMyCustomerSecretKey", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteMyDevice Delete a Device +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteMyDevice.go.html to see an example of how to use DeleteMyDevice API. +func (client IdentityDomainsClient) DeleteMyDevice(ctx context.Context, request DeleteMyDeviceRequest) (response DeleteMyDeviceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteMyDevice, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteMyDeviceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteMyDeviceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteMyDeviceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteMyDeviceResponse") + } + return +} + +// deleteMyDevice implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteMyDevice(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/MyDevices/{myDeviceId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteMyDeviceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteMyDevice", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteMyOAuth2ClientCredential Delete a user's own OAuth2 client credential. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteMyOAuth2ClientCredential.go.html to see an example of how to use DeleteMyOAuth2ClientCredential API. +func (client IdentityDomainsClient) DeleteMyOAuth2ClientCredential(ctx context.Context, request DeleteMyOAuth2ClientCredentialRequest) (response DeleteMyOAuth2ClientCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteMyOAuth2ClientCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteMyOAuth2ClientCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteMyOAuth2ClientCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteMyOAuth2ClientCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteMyOAuth2ClientCredentialResponse") + } + return +} + +// deleteMyOAuth2ClientCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteMyOAuth2ClientCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/MyOAuth2ClientCredentials/{myOAuth2ClientCredentialId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteMyOAuth2ClientCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteMyOAuth2ClientCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteMySmtpCredential Delete a user's own SMTP credential. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteMySmtpCredential.go.html to see an example of how to use DeleteMySmtpCredential API. +func (client IdentityDomainsClient) DeleteMySmtpCredential(ctx context.Context, request DeleteMySmtpCredentialRequest) (response DeleteMySmtpCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteMySmtpCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteMySmtpCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteMySmtpCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteMySmtpCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteMySmtpCredentialResponse") + } + return +} + +// deleteMySmtpCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteMySmtpCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/MySmtpCredentials/{mySmtpCredentialId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteMySmtpCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteMySmtpCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteMySupportAccount Delete a user's own support account. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteMySupportAccount.go.html to see an example of how to use DeleteMySupportAccount API. +func (client IdentityDomainsClient) DeleteMySupportAccount(ctx context.Context, request DeleteMySupportAccountRequest) (response DeleteMySupportAccountResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteMySupportAccount, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteMySupportAccountResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteMySupportAccountResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteMySupportAccountResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteMySupportAccountResponse") + } + return +} + +// deleteMySupportAccount implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteMySupportAccount(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/MySupportAccounts/{mySupportAccountId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteMySupportAccountResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteMySupportAccount", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteMyTrustedUserAgent Delete a Trusted User Agent +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteMyTrustedUserAgent.go.html to see an example of how to use DeleteMyTrustedUserAgent API. +func (client IdentityDomainsClient) DeleteMyTrustedUserAgent(ctx context.Context, request DeleteMyTrustedUserAgentRequest) (response DeleteMyTrustedUserAgentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteMyTrustedUserAgent, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteMyTrustedUserAgentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteMyTrustedUserAgentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteMyTrustedUserAgentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteMyTrustedUserAgentResponse") + } + return +} + +// deleteMyTrustedUserAgent implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteMyTrustedUserAgent(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/MyTrustedUserAgents/{myTrustedUserAgentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteMyTrustedUserAgentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteMyTrustedUserAgent", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteMyUserDbCredential Delete a user's own database (DB) credential. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteMyUserDbCredential.go.html to see an example of how to use DeleteMyUserDbCredential API. +func (client IdentityDomainsClient) DeleteMyUserDbCredential(ctx context.Context, request DeleteMyUserDbCredentialRequest) (response DeleteMyUserDbCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteMyUserDbCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteMyUserDbCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteMyUserDbCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteMyUserDbCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteMyUserDbCredentialResponse") + } + return +} + +// deleteMyUserDbCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteMyUserDbCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/MyUserDbCredentials/{myUserDbCredentialId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteMyUserDbCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteMyUserDbCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteNetworkPerimeter Delete a NetworkPerimeter +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteNetworkPerimeter.go.html to see an example of how to use DeleteNetworkPerimeter API. +func (client IdentityDomainsClient) DeleteNetworkPerimeter(ctx context.Context, request DeleteNetworkPerimeterRequest) (response DeleteNetworkPerimeterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteNetworkPerimeter, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteNetworkPerimeterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteNetworkPerimeterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteNetworkPerimeterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteNetworkPerimeterResponse") + } + return +} + +// deleteNetworkPerimeter implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteNetworkPerimeter(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/NetworkPerimeters/{networkPerimeterId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteNetworkPerimeterResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteNetworkPerimeter", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteOAuth2ClientCredential Delete a user's OAuth2 client credentials. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteOAuth2ClientCredential.go.html to see an example of how to use DeleteOAuth2ClientCredential API. +func (client IdentityDomainsClient) DeleteOAuth2ClientCredential(ctx context.Context, request DeleteOAuth2ClientCredentialRequest) (response DeleteOAuth2ClientCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteOAuth2ClientCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteOAuth2ClientCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteOAuth2ClientCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteOAuth2ClientCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteOAuth2ClientCredentialResponse") + } + return +} + +// deleteOAuth2ClientCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteOAuth2ClientCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/OAuth2ClientCredentials/{oAuth2ClientCredentialId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteOAuth2ClientCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteOAuth2ClientCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteOAuthClientCertificate Delete an OAuth Client Certificate +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteOAuthClientCertificate.go.html to see an example of how to use DeleteOAuthClientCertificate API. +func (client IdentityDomainsClient) DeleteOAuthClientCertificate(ctx context.Context, request DeleteOAuthClientCertificateRequest) (response DeleteOAuthClientCertificateResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteOAuthClientCertificate, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteOAuthClientCertificateResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteOAuthClientCertificateResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteOAuthClientCertificateResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteOAuthClientCertificateResponse") + } + return +} + +// deleteOAuthClientCertificate implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteOAuthClientCertificate(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/OAuthClientCertificates/{oAuthClientCertificateId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteOAuthClientCertificateResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteOAuthClientCertificate", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteOAuthPartnerCertificate Delete an OAuth Partner Certificate +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteOAuthPartnerCertificate.go.html to see an example of how to use DeleteOAuthPartnerCertificate API. +func (client IdentityDomainsClient) DeleteOAuthPartnerCertificate(ctx context.Context, request DeleteOAuthPartnerCertificateRequest) (response DeleteOAuthPartnerCertificateResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteOAuthPartnerCertificate, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteOAuthPartnerCertificateResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteOAuthPartnerCertificateResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteOAuthPartnerCertificateResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteOAuthPartnerCertificateResponse") + } + return +} + +// deleteOAuthPartnerCertificate implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteOAuthPartnerCertificate(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/OAuthPartnerCertificates/{oAuthPartnerCertificateId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteOAuthPartnerCertificateResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteOAuthPartnerCertificate", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeletePasswordPolicy Delete a password policy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeletePasswordPolicy.go.html to see an example of how to use DeletePasswordPolicy API. +func (client IdentityDomainsClient) DeletePasswordPolicy(ctx context.Context, request DeletePasswordPolicyRequest) (response DeletePasswordPolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deletePasswordPolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeletePasswordPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeletePasswordPolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeletePasswordPolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePasswordPolicyResponse") + } + return +} + +// deletePasswordPolicy implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deletePasswordPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/PasswordPolicies/{passwordPolicyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeletePasswordPolicyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeletePasswordPolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeletePolicy Delete a Policy +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeletePolicy.go.html to see an example of how to use DeletePolicy API. +func (client IdentityDomainsClient) DeletePolicy(ctx context.Context, request DeletePolicyRequest) (response DeletePolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deletePolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeletePolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeletePolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeletePolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePolicyResponse") + } + return +} + +// deletePolicy implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deletePolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/Policies/{policyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeletePolicyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeletePolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteRule Delete a Rule +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteRule.go.html to see an example of how to use DeleteRule API. +func (client IdentityDomainsClient) DeleteRule(ctx context.Context, request DeleteRuleRequest) (response DeleteRuleResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteRule, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteRuleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteRuleResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteRuleResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteRuleResponse") + } + return +} + +// deleteRule implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteRule(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/Rules/{ruleId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteRuleResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteRule", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteSecurityQuestion Delete a security question. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteSecurityQuestion.go.html to see an example of how to use DeleteSecurityQuestion API. +func (client IdentityDomainsClient) DeleteSecurityQuestion(ctx context.Context, request DeleteSecurityQuestionRequest) (response DeleteSecurityQuestionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteSecurityQuestion, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteSecurityQuestionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteSecurityQuestionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteSecurityQuestionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteSecurityQuestionResponse") + } + return +} + +// deleteSecurityQuestion implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteSecurityQuestion(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/SecurityQuestions/{securityQuestionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteSecurityQuestionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteSecurityQuestion", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteSelfRegistrationProfile Delete a self-registration profile. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteSelfRegistrationProfile.go.html to see an example of how to use DeleteSelfRegistrationProfile API. +func (client IdentityDomainsClient) DeleteSelfRegistrationProfile(ctx context.Context, request DeleteSelfRegistrationProfileRequest) (response DeleteSelfRegistrationProfileResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteSelfRegistrationProfile, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteSelfRegistrationProfileResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteSelfRegistrationProfileResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteSelfRegistrationProfileResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteSelfRegistrationProfileResponse") + } + return +} + +// deleteSelfRegistrationProfile implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteSelfRegistrationProfile(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/SelfRegistrationProfiles/{selfRegistrationProfileId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteSelfRegistrationProfileResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteSelfRegistrationProfile", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteSmtpCredential Delete a user's SMTP credentials. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteSmtpCredential.go.html to see an example of how to use DeleteSmtpCredential API. +func (client IdentityDomainsClient) DeleteSmtpCredential(ctx context.Context, request DeleteSmtpCredentialRequest) (response DeleteSmtpCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteSmtpCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteSmtpCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteSmtpCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteSmtpCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteSmtpCredentialResponse") + } + return +} + +// deleteSmtpCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteSmtpCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/SmtpCredentials/{smtpCredentialId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteSmtpCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteSmtpCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteUser Delete a user. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteUser.go.html to see an example of how to use DeleteUser API. +func (client IdentityDomainsClient) DeleteUser(ctx context.Context, request DeleteUserRequest) (response DeleteUserResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteUser, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteUserResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteUserResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteUserResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteUserResponse") + } + return +} + +// deleteUser implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteUser(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/Users/{userId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteUserResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteUser", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteUserDbCredential Delete a user's database (DB) credentials. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteUserDbCredential.go.html to see an example of how to use DeleteUserDbCredential API. +func (client IdentityDomainsClient) DeleteUserDbCredential(ctx context.Context, request DeleteUserDbCredentialRequest) (response DeleteUserDbCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.deleteUserDbCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteUserDbCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteUserDbCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteUserDbCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteUserDbCredentialResponse") + } + return +} + +// deleteUserDbCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) deleteUserDbCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/UserDbCredentials/{userDbCredentialId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteUserDbCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteUserDbCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetAccountMgmtInfo Get Account Mgmt Info +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetAccountMgmtInfo.go.html to see an example of how to use GetAccountMgmtInfo API. +func (client IdentityDomainsClient) GetAccountMgmtInfo(ctx context.Context, request GetAccountMgmtInfoRequest) (response GetAccountMgmtInfoResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getAccountMgmtInfo, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetAccountMgmtInfoResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetAccountMgmtInfoResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetAccountMgmtInfoResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetAccountMgmtInfoResponse") + } + return +} + +// getAccountMgmtInfo implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getAccountMgmtInfo(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AccountMgmtInfos/{accountMgmtInfoId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetAccountMgmtInfoResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetAccountMgmtInfo", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetAccountRecoverySetting Get an account recovery setting. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetAccountRecoverySetting.go.html to see an example of how to use GetAccountRecoverySetting API. +func (client IdentityDomainsClient) GetAccountRecoverySetting(ctx context.Context, request GetAccountRecoverySettingRequest) (response GetAccountRecoverySettingResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getAccountRecoverySetting, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetAccountRecoverySettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetAccountRecoverySettingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetAccountRecoverySettingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetAccountRecoverySettingResponse") + } + return +} + +// getAccountRecoverySetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getAccountRecoverySetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AccountRecoverySettings/{accountRecoverySettingId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetAccountRecoverySettingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetAccountRecoverySetting", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetApiKey Get a user's API key. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetApiKey.go.html to see an example of how to use GetApiKey API. +func (client IdentityDomainsClient) GetApiKey(ctx context.Context, request GetApiKeyRequest) (response GetApiKeyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getApiKey, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetApiKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetApiKeyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetApiKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetApiKeyResponse") + } + return +} + +// getApiKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getApiKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/ApiKeys/{apiKeyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetApiKeyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetApiKey", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetApp Get an App +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetApp.go.html to see an example of how to use GetApp API. +func (client IdentityDomainsClient) GetApp(ctx context.Context, request GetAppRequest) (response GetAppResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getApp, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetAppResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetAppResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetAppResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetAppResponse") + } + return +} + +// getApp implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getApp(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Apps/{appId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetAppResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetApp", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetAppRole Get an AppRole +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetAppRole.go.html to see an example of how to use GetAppRole API. +func (client IdentityDomainsClient) GetAppRole(ctx context.Context, request GetAppRoleRequest) (response GetAppRoleResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getAppRole, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetAppRoleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetAppRoleResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetAppRoleResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetAppRoleResponse") + } + return +} + +// getAppRole implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getAppRole(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AppRoles/{appRoleId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetAppRoleResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetAppRole", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetApprovalWorkflow Get ApprovalWorkflow +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetApprovalWorkflow.go.html to see an example of how to use GetApprovalWorkflow API. +func (client IdentityDomainsClient) GetApprovalWorkflow(ctx context.Context, request GetApprovalWorkflowRequest) (response GetApprovalWorkflowResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getApprovalWorkflow, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetApprovalWorkflowResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetApprovalWorkflowResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetApprovalWorkflowResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetApprovalWorkflowResponse") + } + return +} + +// getApprovalWorkflow implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getApprovalWorkflow(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/ApprovalWorkflows/{approvalWorkflowId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetApprovalWorkflowResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetApprovalWorkflow", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetApprovalWorkflowAssignment Get an Approval Workflow Assignment +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetApprovalWorkflowAssignment.go.html to see an example of how to use GetApprovalWorkflowAssignment API. +func (client IdentityDomainsClient) GetApprovalWorkflowAssignment(ctx context.Context, request GetApprovalWorkflowAssignmentRequest) (response GetApprovalWorkflowAssignmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getApprovalWorkflowAssignment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetApprovalWorkflowAssignmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetApprovalWorkflowAssignmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetApprovalWorkflowAssignmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetApprovalWorkflowAssignmentResponse") + } + return +} + +// getApprovalWorkflowAssignment implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getApprovalWorkflowAssignment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/ApprovalWorkflowAssignments/{approvalWorkflowAssignmentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetApprovalWorkflowAssignmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetApprovalWorkflowAssignment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetApprovalWorkflowStep Get ApprovalWorkflowStep +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetApprovalWorkflowStep.go.html to see an example of how to use GetApprovalWorkflowStep API. +func (client IdentityDomainsClient) GetApprovalWorkflowStep(ctx context.Context, request GetApprovalWorkflowStepRequest) (response GetApprovalWorkflowStepResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getApprovalWorkflowStep, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetApprovalWorkflowStepResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetApprovalWorkflowStepResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetApprovalWorkflowStepResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetApprovalWorkflowStepResponse") + } + return +} + +// getApprovalWorkflowStep implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getApprovalWorkflowStep(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/ApprovalWorkflowSteps/{approvalWorkflowStepId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetApprovalWorkflowStepResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetApprovalWorkflowStep", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetAuthToken Get a user's Auth token. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetAuthToken.go.html to see an example of how to use GetAuthToken API. +func (client IdentityDomainsClient) GetAuthToken(ctx context.Context, request GetAuthTokenRequest) (response GetAuthTokenResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getAuthToken, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetAuthTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetAuthTokenResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetAuthTokenResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetAuthTokenResponse") + } + return +} + +// getAuthToken implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getAuthToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AuthTokens/{authTokenId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetAuthTokenResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetAuthToken", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetAuthenticationFactorSetting Get Authentication Factor Settings +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetAuthenticationFactorSetting.go.html to see an example of how to use GetAuthenticationFactorSetting API. +func (client IdentityDomainsClient) GetAuthenticationFactorSetting(ctx context.Context, request GetAuthenticationFactorSettingRequest) (response GetAuthenticationFactorSettingResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getAuthenticationFactorSetting, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetAuthenticationFactorSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetAuthenticationFactorSettingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetAuthenticationFactorSettingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetAuthenticationFactorSettingResponse") + } + return +} + +// getAuthenticationFactorSetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getAuthenticationFactorSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AuthenticationFactorSettings/{authenticationFactorSettingId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetAuthenticationFactorSettingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetAuthenticationFactorSetting", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetBrandingSetting Get Branding Settings +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetBrandingSetting.go.html to see an example of how to use GetBrandingSetting API. +func (client IdentityDomainsClient) GetBrandingSetting(ctx context.Context, request GetBrandingSettingRequest) (response GetBrandingSettingResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getBrandingSetting, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetBrandingSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetBrandingSettingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetBrandingSettingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBrandingSettingResponse") + } + return +} + +// getBrandingSetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getBrandingSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/BrandingSettings/{brandingSettingId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetBrandingSettingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetBrandingSetting", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCloudGate Get a Cloud Gate +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetCloudGate.go.html to see an example of how to use GetCloudGate API. +func (client IdentityDomainsClient) GetCloudGate(ctx context.Context, request GetCloudGateRequest) (response GetCloudGateResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getCloudGate, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCloudGateResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCloudGateResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCloudGateResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCloudGateResponse") + } + return +} + +// getCloudGate implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getCloudGate(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/CloudGates/{cloudGateId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetCloudGateResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetCloudGate", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCloudGateMapping Get a Cloud Gate mapping +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetCloudGateMapping.go.html to see an example of how to use GetCloudGateMapping API. +func (client IdentityDomainsClient) GetCloudGateMapping(ctx context.Context, request GetCloudGateMappingRequest) (response GetCloudGateMappingResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getCloudGateMapping, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCloudGateMappingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCloudGateMappingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCloudGateMappingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCloudGateMappingResponse") + } + return +} + +// getCloudGateMapping implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getCloudGateMapping(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/CloudGateMappings/{cloudGateMappingId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetCloudGateMappingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetCloudGateMapping", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCloudGateServer Get a Cloud Gate server +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetCloudGateServer.go.html to see an example of how to use GetCloudGateServer API. +func (client IdentityDomainsClient) GetCloudGateServer(ctx context.Context, request GetCloudGateServerRequest) (response GetCloudGateServerResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getCloudGateServer, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCloudGateServerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCloudGateServerResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCloudGateServerResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCloudGateServerResponse") + } + return +} + +// getCloudGateServer implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getCloudGateServer(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/CloudGateServers/{cloudGateServerId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetCloudGateServerResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetCloudGateServer", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCondition Get a Condition +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetCondition.go.html to see an example of how to use GetCondition API. +func (client IdentityDomainsClient) GetCondition(ctx context.Context, request GetConditionRequest) (response GetConditionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getCondition, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetConditionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetConditionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetConditionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetConditionResponse") + } + return +} + +// getCondition implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getCondition(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Conditions/{conditionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetConditionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetCondition", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCustomerSecretKey Get a user's customer secret key. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetCustomerSecretKey.go.html to see an example of how to use GetCustomerSecretKey API. +func (client IdentityDomainsClient) GetCustomerSecretKey(ctx context.Context, request GetCustomerSecretKeyRequest) (response GetCustomerSecretKeyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getCustomerSecretKey, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCustomerSecretKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCustomerSecretKeyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCustomerSecretKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCustomerSecretKeyResponse") + } + return +} + +// getCustomerSecretKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getCustomerSecretKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/CustomerSecretKeys/{customerSecretKeyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetCustomerSecretKeyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetCustomerSecretKey", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetDynamicResourceGroup Get a Dynamic Resource Group. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetDynamicResourceGroup.go.html to see an example of how to use GetDynamicResourceGroup API. +func (client IdentityDomainsClient) GetDynamicResourceGroup(ctx context.Context, request GetDynamicResourceGroupRequest) (response GetDynamicResourceGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getDynamicResourceGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDynamicResourceGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDynamicResourceGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDynamicResourceGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDynamicResourceGroupResponse") + } + return +} + +// getDynamicResourceGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getDynamicResourceGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/DynamicResourceGroups/{dynamicResourceGroupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetDynamicResourceGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetDynamicResourceGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetGrant Get a Grant +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetGrant.go.html to see an example of how to use GetGrant API. +func (client IdentityDomainsClient) GetGrant(ctx context.Context, request GetGrantRequest) (response GetGrantResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getGrant, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetGrantResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetGrantResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetGrantResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetGrantResponse") + } + return +} + +// getGrant implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getGrant(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Grants/{grantId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetGrantResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetGrant", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetGroup Get a group. Important: The Group SEARCH and GET operations on users and members will throw an exception if the response has more than 10,000 members. To avoid the exception, use the pagination filter to GET or SEARCH group members. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetGroup.go.html to see an example of how to use GetGroup API. +func (client IdentityDomainsClient) GetGroup(ctx context.Context, request GetGroupRequest) (response GetGroupResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getGroup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetGroupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetGroupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetGroupResponse") + } + return +} + +// getGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Groups/{groupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetGroupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetGroup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetIdentityProvider Get an Identity Provider +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetIdentityProvider.go.html to see an example of how to use GetIdentityProvider API. +func (client IdentityDomainsClient) GetIdentityProvider(ctx context.Context, request GetIdentityProviderRequest) (response GetIdentityProviderResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getIdentityProvider, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetIdentityProviderResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetIdentityProviderResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetIdentityProviderResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetIdentityProviderResponse") + } + return +} + +// getIdentityProvider implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getIdentityProvider(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/IdentityProviders/{identityProviderId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetIdentityProviderResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetIdentityProvider", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetIdentitySetting Get an Identity setting. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetIdentitySetting.go.html to see an example of how to use GetIdentitySetting API. +func (client IdentityDomainsClient) GetIdentitySetting(ctx context.Context, request GetIdentitySettingRequest) (response GetIdentitySettingResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getIdentitySetting, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetIdentitySettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetIdentitySettingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetIdentitySettingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetIdentitySettingResponse") + } + return +} + +// getIdentitySetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getIdentitySetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/IdentitySettings/{identitySettingId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetIdentitySettingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetIdentitySetting", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetKmsiSetting Get KmsiSettings +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetKmsiSetting.go.html to see an example of how to use GetKmsiSetting API. +func (client IdentityDomainsClient) GetKmsiSetting(ctx context.Context, request GetKmsiSettingRequest) (response GetKmsiSettingResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getKmsiSetting, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetKmsiSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetKmsiSettingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetKmsiSettingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetKmsiSettingResponse") + } + return +} + +// getKmsiSetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getKmsiSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/KmsiSettings/{kmsiSettingId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetKmsiSettingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetKmsiSetting", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetMe Get a user's own information. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMe.go.html to see an example of how to use GetMe API. +func (client IdentityDomainsClient) GetMe(ctx context.Context, request GetMeRequest) (response GetMeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getMe, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetMeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetMeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetMeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetMeResponse") + } + return +} + +// getMe implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getMe(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Me", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetMeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetMe", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetMyApiKey Get a user's own API key. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyApiKey.go.html to see an example of how to use GetMyApiKey API. +func (client IdentityDomainsClient) GetMyApiKey(ctx context.Context, request GetMyApiKeyRequest) (response GetMyApiKeyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getMyApiKey, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetMyApiKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetMyApiKeyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetMyApiKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetMyApiKeyResponse") + } + return +} + +// getMyApiKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getMyApiKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyApiKeys/{myApiKeyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetMyApiKeyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetMyApiKey", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetMyAuthToken Get a user's own Auth token. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyAuthToken.go.html to see an example of how to use GetMyAuthToken API. +func (client IdentityDomainsClient) GetMyAuthToken(ctx context.Context, request GetMyAuthTokenRequest) (response GetMyAuthTokenResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getMyAuthToken, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetMyAuthTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetMyAuthTokenResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetMyAuthTokenResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetMyAuthTokenResponse") + } + return +} + +// getMyAuthToken implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getMyAuthToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyAuthTokens/{myAuthTokenId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetMyAuthTokenResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetMyAuthToken", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetMyCompletedApproval Get My MyCompletedApproval +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyCompletedApproval.go.html to see an example of how to use GetMyCompletedApproval API. +func (client IdentityDomainsClient) GetMyCompletedApproval(ctx context.Context, request GetMyCompletedApprovalRequest) (response GetMyCompletedApprovalResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getMyCompletedApproval, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetMyCompletedApprovalResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetMyCompletedApprovalResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetMyCompletedApprovalResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetMyCompletedApprovalResponse") + } + return +} + +// getMyCompletedApproval implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getMyCompletedApproval(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyCompletedApprovals/{myCompletedApprovalId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetMyCompletedApprovalResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetMyCompletedApproval", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetMyCustomerSecretKey Get a user's own customer secret key. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyCustomerSecretKey.go.html to see an example of how to use GetMyCustomerSecretKey API. +func (client IdentityDomainsClient) GetMyCustomerSecretKey(ctx context.Context, request GetMyCustomerSecretKeyRequest) (response GetMyCustomerSecretKeyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getMyCustomerSecretKey, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetMyCustomerSecretKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetMyCustomerSecretKeyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetMyCustomerSecretKeyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetMyCustomerSecretKeyResponse") + } + return +} + +// getMyCustomerSecretKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getMyCustomerSecretKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyCustomerSecretKeys/{myCustomerSecretKeyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetMyCustomerSecretKeyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetMyCustomerSecretKey", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetMyDevice Get a Device +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyDevice.go.html to see an example of how to use GetMyDevice API. +func (client IdentityDomainsClient) GetMyDevice(ctx context.Context, request GetMyDeviceRequest) (response GetMyDeviceResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getMyDevice, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetMyDeviceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetMyDeviceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetMyDeviceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetMyDeviceResponse") + } + return +} + +// getMyDevice implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getMyDevice(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyDevices/{myDeviceId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetMyDeviceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetMyDevice", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetMyOAuth2ClientCredential Get a user's own OAuth2 client credential. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyOAuth2ClientCredential.go.html to see an example of how to use GetMyOAuth2ClientCredential API. +func (client IdentityDomainsClient) GetMyOAuth2ClientCredential(ctx context.Context, request GetMyOAuth2ClientCredentialRequest) (response GetMyOAuth2ClientCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getMyOAuth2ClientCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetMyOAuth2ClientCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetMyOAuth2ClientCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetMyOAuth2ClientCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetMyOAuth2ClientCredentialResponse") + } + return +} + +// getMyOAuth2ClientCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getMyOAuth2ClientCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyOAuth2ClientCredentials/{myOAuth2ClientCredentialId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetMyOAuth2ClientCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetMyOAuth2ClientCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetMyPendingApproval Get My MyPendingApproval +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyPendingApproval.go.html to see an example of how to use GetMyPendingApproval API. +func (client IdentityDomainsClient) GetMyPendingApproval(ctx context.Context, request GetMyPendingApprovalRequest) (response GetMyPendingApprovalResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getMyPendingApproval, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetMyPendingApprovalResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetMyPendingApprovalResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetMyPendingApprovalResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetMyPendingApprovalResponse") + } + return +} + +// getMyPendingApproval implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getMyPendingApproval(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyPendingApprovals/{myPendingApprovalId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetMyPendingApprovalResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetMyPendingApproval", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetMyRequest Get My Requests +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyRequest.go.html to see an example of how to use GetMyRequest API. +func (client IdentityDomainsClient) GetMyRequest(ctx context.Context, request GetMyRequestRequest) (response GetMyRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getMyRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetMyRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetMyRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetMyRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetMyRequestResponse") + } + return +} + +// getMyRequest implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getMyRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyRequests/{myRequestId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetMyRequestResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetMyRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetMySmtpCredential Get a user's own SMTP credential. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMySmtpCredential.go.html to see an example of how to use GetMySmtpCredential API. +func (client IdentityDomainsClient) GetMySmtpCredential(ctx context.Context, request GetMySmtpCredentialRequest) (response GetMySmtpCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getMySmtpCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetMySmtpCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetMySmtpCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetMySmtpCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetMySmtpCredentialResponse") + } + return +} + +// getMySmtpCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getMySmtpCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MySmtpCredentials/{mySmtpCredentialId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetMySmtpCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetMySmtpCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetMySupportAccount Get a user's own support account. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMySupportAccount.go.html to see an example of how to use GetMySupportAccount API. +func (client IdentityDomainsClient) GetMySupportAccount(ctx context.Context, request GetMySupportAccountRequest) (response GetMySupportAccountResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getMySupportAccount, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetMySupportAccountResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetMySupportAccountResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetMySupportAccountResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetMySupportAccountResponse") + } + return +} + +// getMySupportAccount implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getMySupportAccount(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MySupportAccounts/{mySupportAccountId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetMySupportAccountResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetMySupportAccount", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetMyTrustedUserAgent Get a Trusted User Agent +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyTrustedUserAgent.go.html to see an example of how to use GetMyTrustedUserAgent API. +func (client IdentityDomainsClient) GetMyTrustedUserAgent(ctx context.Context, request GetMyTrustedUserAgentRequest) (response GetMyTrustedUserAgentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getMyTrustedUserAgent, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetMyTrustedUserAgentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetMyTrustedUserAgentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetMyTrustedUserAgentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetMyTrustedUserAgentResponse") + } + return +} + +// getMyTrustedUserAgent implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getMyTrustedUserAgent(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyTrustedUserAgents/{myTrustedUserAgentId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetMyTrustedUserAgentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetMyTrustedUserAgent", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetMyUserDbCredential Get a user's own database (DB) credential. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyUserDbCredential.go.html to see an example of how to use GetMyUserDbCredential API. +func (client IdentityDomainsClient) GetMyUserDbCredential(ctx context.Context, request GetMyUserDbCredentialRequest) (response GetMyUserDbCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getMyUserDbCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetMyUserDbCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetMyUserDbCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetMyUserDbCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetMyUserDbCredentialResponse") + } + return +} + +// getMyUserDbCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getMyUserDbCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyUserDbCredentials/{myUserDbCredentialId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetMyUserDbCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetMyUserDbCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetNetworkPerimeter Get a NetworkPerimeter +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetNetworkPerimeter.go.html to see an example of how to use GetNetworkPerimeter API. +func (client IdentityDomainsClient) GetNetworkPerimeter(ctx context.Context, request GetNetworkPerimeterRequest) (response GetNetworkPerimeterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getNetworkPerimeter, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetNetworkPerimeterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetNetworkPerimeterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetNetworkPerimeterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetNetworkPerimeterResponse") + } + return +} + +// getNetworkPerimeter implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getNetworkPerimeter(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/NetworkPerimeters/{networkPerimeterId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetNetworkPerimeterResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetNetworkPerimeter", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetNotificationSetting Get Notification Settings +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetNotificationSetting.go.html to see an example of how to use GetNotificationSetting API. +func (client IdentityDomainsClient) GetNotificationSetting(ctx context.Context, request GetNotificationSettingRequest) (response GetNotificationSettingResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getNotificationSetting, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetNotificationSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetNotificationSettingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetNotificationSettingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetNotificationSettingResponse") + } + return +} + +// getNotificationSetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getNotificationSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/NotificationSettings/{notificationSettingId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetNotificationSettingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetNotificationSetting", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetOAuth2ClientCredential Get a user's OAuth2 client credentials. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetOAuth2ClientCredential.go.html to see an example of how to use GetOAuth2ClientCredential API. +func (client IdentityDomainsClient) GetOAuth2ClientCredential(ctx context.Context, request GetOAuth2ClientCredentialRequest) (response GetOAuth2ClientCredentialResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getOAuth2ClientCredential, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetOAuth2ClientCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetOAuth2ClientCredentialResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetOAuth2ClientCredentialResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetOAuth2ClientCredentialResponse") + } + return +} + +// getOAuth2ClientCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getOAuth2ClientCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/OAuth2ClientCredentials/{oAuth2ClientCredentialId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetOAuth2ClientCredentialResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetOAuth2ClientCredential", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetOAuthClientCertificate Get OAuth Client Certificates +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetOAuthClientCertificate.go.html to see an example of how to use GetOAuthClientCertificate API. +func (client IdentityDomainsClient) GetOAuthClientCertificate(ctx context.Context, request GetOAuthClientCertificateRequest) (response GetOAuthClientCertificateResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getOAuthClientCertificate, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetOAuthClientCertificateResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateMyCustomerSecretKeyResponse{} + response = GetOAuthClientCertificateResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateMyCustomerSecretKeyResponse); ok { + if convertedResponse, ok := ociResponse.(GetOAuthClientCertificateResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateMyCustomerSecretKeyResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetOAuthClientCertificateResponse") } return } -// createMyCustomerSecretKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createMyCustomerSecretKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getOAuthClientCertificate implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getOAuthClientCertificate(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyCustomerSecretKeys", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/OAuthClientCertificates/{oAuthClientCertificateId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateMyCustomerSecretKeyResponse + var response GetOAuthClientCertificateResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMyCustomerSecretKey", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "GetOAuthClientCertificate", apiReferenceLink) return response, err } @@ -1134,12 +7334,12 @@ func (client IdentityDomainsClient) createMyCustomerSecretKey(ctx context.Contex return response, err } -// CreateMyOAuth2ClientCredential Create a user's own OAuth2 client credential. +// GetOAuthPartnerCertificate Get an OAuth Partner Certificate // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMyOAuth2ClientCredential.go.html to see an example of how to use CreateMyOAuth2ClientCredential API. -func (client IdentityDomainsClient) CreateMyOAuth2ClientCredential(ctx context.Context, request CreateMyOAuth2ClientCredentialRequest) (response CreateMyOAuth2ClientCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetOAuthPartnerCertificate.go.html to see an example of how to use GetOAuthPartnerCertificate API. +func (client IdentityDomainsClient) GetOAuthPartnerCertificate(ctx context.Context, request GetOAuthPartnerCertificateRequest) (response GetOAuthPartnerCertificateResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1153,42 +7353,42 @@ func (client IdentityDomainsClient) CreateMyOAuth2ClientCredential(ctx context.C request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createMyOAuth2ClientCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.getOAuthPartnerCertificate, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateMyOAuth2ClientCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetOAuthPartnerCertificateResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateMyOAuth2ClientCredentialResponse{} + response = GetOAuthPartnerCertificateResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateMyOAuth2ClientCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(GetOAuthPartnerCertificateResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateMyOAuth2ClientCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetOAuthPartnerCertificateResponse") } return } -// createMyOAuth2ClientCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createMyOAuth2ClientCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getOAuthPartnerCertificate implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getOAuthPartnerCertificate(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyOAuth2ClientCredentials", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/OAuthPartnerCertificates/{oAuthPartnerCertificateId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateMyOAuth2ClientCredentialResponse + var response GetOAuthPartnerCertificateResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMyOAuth2ClientCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "GetOAuthPartnerCertificate", apiReferenceLink) return response, err } @@ -1196,12 +7396,260 @@ func (client IdentityDomainsClient) createMyOAuth2ClientCredential(ctx context.C return response, err } -// CreateMyRequest Create a Request +// GetPasswordPolicy Get a password policy. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMyRequest.go.html to see an example of how to use CreateMyRequest API. -func (client IdentityDomainsClient) CreateMyRequest(ctx context.Context, request CreateMyRequestRequest) (response CreateMyRequestResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetPasswordPolicy.go.html to see an example of how to use GetPasswordPolicy API. +func (client IdentityDomainsClient) GetPasswordPolicy(ctx context.Context, request GetPasswordPolicyRequest) (response GetPasswordPolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getPasswordPolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPasswordPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPasswordPolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPasswordPolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPasswordPolicyResponse") + } + return +} + +// getPasswordPolicy implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getPasswordPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/PasswordPolicies/{passwordPolicyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetPasswordPolicyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetPasswordPolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPolicy Get a Policy +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetPolicy.go.html to see an example of how to use GetPolicy API. +func (client IdentityDomainsClient) GetPolicy(ctx context.Context, request GetPolicyRequest) (response GetPolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getPolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPolicyResponse") + } + return +} + +// getPolicy implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Policies/{policyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetPolicyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetPolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetRule Get a Rule +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetRule.go.html to see an example of how to use GetRule API. +func (client IdentityDomainsClient) GetRule(ctx context.Context, request GetRuleRequest) (response GetRuleResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getRule, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetRuleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetRuleResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetRuleResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetRuleResponse") + } + return +} + +// getRule implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getRule(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Rules/{ruleId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetRuleResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetRule", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetSchema Get a Schema +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetSchema.go.html to see an example of how to use GetSchema API. +func (client IdentityDomainsClient) GetSchema(ctx context.Context, request GetSchemaRequest) (response GetSchemaResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.getSchema, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetSchemaResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetSchemaResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetSchemaResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetSchemaResponse") + } + return +} + +// getSchema implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getSchema(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Schemas/{schemaId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetSchemaResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "IdentityDomains", "GetSchema", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetSecurityQuestion Get a security question. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetSecurityQuestion.go.html to see an example of how to use GetSecurityQuestion API. +func (client IdentityDomainsClient) GetSecurityQuestion(ctx context.Context, request GetSecurityQuestionRequest) (response GetSecurityQuestionResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1215,42 +7663,42 @@ func (client IdentityDomainsClient) CreateMyRequest(ctx context.Context, request request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createMyRequest, policy) + ociResponse, err = common.Retry(ctx, request, client.getSecurityQuestion, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateMyRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetSecurityQuestionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateMyRequestResponse{} + response = GetSecurityQuestionResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateMyRequestResponse); ok { + if convertedResponse, ok := ociResponse.(GetSecurityQuestionResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateMyRequestResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetSecurityQuestionResponse") } return } -// createMyRequest implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createMyRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getSecurityQuestion implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getSecurityQuestion(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyRequests", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/SecurityQuestions/{securityQuestionId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateMyRequestResponse + var response GetSecurityQuestionResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMyRequest", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "GetSecurityQuestion", apiReferenceLink) return response, err } @@ -1258,12 +7706,12 @@ func (client IdentityDomainsClient) createMyRequest(ctx context.Context, request return response, err } -// CreateMySmtpCredential Create a user's own SMTP credential. +// GetSecurityQuestionSetting Get a security question setting. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMySmtpCredential.go.html to see an example of how to use CreateMySmtpCredential API. -func (client IdentityDomainsClient) CreateMySmtpCredential(ctx context.Context, request CreateMySmtpCredentialRequest) (response CreateMySmtpCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetSecurityQuestionSetting.go.html to see an example of how to use GetSecurityQuestionSetting API. +func (client IdentityDomainsClient) GetSecurityQuestionSetting(ctx context.Context, request GetSecurityQuestionSettingRequest) (response GetSecurityQuestionSettingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1277,42 +7725,42 @@ func (client IdentityDomainsClient) CreateMySmtpCredential(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createMySmtpCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.getSecurityQuestionSetting, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateMySmtpCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetSecurityQuestionSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateMySmtpCredentialResponse{} + response = GetSecurityQuestionSettingResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateMySmtpCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(GetSecurityQuestionSettingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateMySmtpCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetSecurityQuestionSettingResponse") } return } -// createMySmtpCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createMySmtpCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getSecurityQuestionSetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getSecurityQuestionSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MySmtpCredentials", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/SecurityQuestionSettings/{securityQuestionSettingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateMySmtpCredentialResponse + var response GetSecurityQuestionSettingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMySmtpCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "GetSecurityQuestionSetting", apiReferenceLink) return response, err } @@ -1320,12 +7768,12 @@ func (client IdentityDomainsClient) createMySmtpCredential(ctx context.Context, return response, err } -// CreateMySupportAccount Create a user's own support account. +// GetSelfRegistrationProfile Get a self-registration profile. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMySupportAccount.go.html to see an example of how to use CreateMySupportAccount API. -func (client IdentityDomainsClient) CreateMySupportAccount(ctx context.Context, request CreateMySupportAccountRequest) (response CreateMySupportAccountResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetSelfRegistrationProfile.go.html to see an example of how to use GetSelfRegistrationProfile API. +func (client IdentityDomainsClient) GetSelfRegistrationProfile(ctx context.Context, request GetSelfRegistrationProfileRequest) (response GetSelfRegistrationProfileResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1339,42 +7787,42 @@ func (client IdentityDomainsClient) CreateMySupportAccount(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createMySupportAccount, policy) + ociResponse, err = common.Retry(ctx, request, client.getSelfRegistrationProfile, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateMySupportAccountResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetSelfRegistrationProfileResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateMySupportAccountResponse{} + response = GetSelfRegistrationProfileResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateMySupportAccountResponse); ok { + if convertedResponse, ok := ociResponse.(GetSelfRegistrationProfileResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateMySupportAccountResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetSelfRegistrationProfileResponse") } return } -// createMySupportAccount implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createMySupportAccount(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getSelfRegistrationProfile implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getSelfRegistrationProfile(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MySupportAccounts", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/SelfRegistrationProfiles/{selfRegistrationProfileId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateMySupportAccountResponse + var response GetSelfRegistrationProfileResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMySupportAccount", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "GetSelfRegistrationProfile", apiReferenceLink) return response, err } @@ -1382,12 +7830,12 @@ func (client IdentityDomainsClient) createMySupportAccount(ctx context.Context, return response, err } -// CreateMyUserDbCredential Create a user's own database (DB) credential. +// GetSetting Get Settings // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateMyUserDbCredential.go.html to see an example of how to use CreateMyUserDbCredential API. -func (client IdentityDomainsClient) CreateMyUserDbCredential(ctx context.Context, request CreateMyUserDbCredentialRequest) (response CreateMyUserDbCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetSetting.go.html to see an example of how to use GetSetting API. +func (client IdentityDomainsClient) GetSetting(ctx context.Context, request GetSettingRequest) (response GetSettingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1401,42 +7849,42 @@ func (client IdentityDomainsClient) CreateMyUserDbCredential(ctx context.Context request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createMyUserDbCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.getSetting, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateMyUserDbCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateMyUserDbCredentialResponse{} + response = GetSettingResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateMyUserDbCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(GetSettingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateMyUserDbCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetSettingResponse") } return } -// createMyUserDbCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createMyUserDbCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getSetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyUserDbCredentials", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Settings/{settingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateMyUserDbCredentialResponse + var response GetSettingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateMyUserDbCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "GetSetting", apiReferenceLink) return response, err } @@ -1444,12 +7892,12 @@ func (client IdentityDomainsClient) createMyUserDbCredential(ctx context.Context return response, err } -// CreateOAuth2ClientCredential Add a user's OAuth2 client credentials. +// GetSmtpCredential Get a user's SMTP credentials. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateOAuth2ClientCredential.go.html to see an example of how to use CreateOAuth2ClientCredential API. -func (client IdentityDomainsClient) CreateOAuth2ClientCredential(ctx context.Context, request CreateOAuth2ClientCredentialRequest) (response CreateOAuth2ClientCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetSmtpCredential.go.html to see an example of how to use GetSmtpCredential API. +func (client IdentityDomainsClient) GetSmtpCredential(ctx context.Context, request GetSmtpCredentialRequest) (response GetSmtpCredentialResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1463,42 +7911,42 @@ func (client IdentityDomainsClient) CreateOAuth2ClientCredential(ctx context.Con request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createOAuth2ClientCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.getSmtpCredential, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateOAuth2ClientCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetSmtpCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateOAuth2ClientCredentialResponse{} + response = GetSmtpCredentialResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateOAuth2ClientCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(GetSmtpCredentialResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateOAuth2ClientCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetSmtpCredentialResponse") } return } -// createOAuth2ClientCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createOAuth2ClientCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getSmtpCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getSmtpCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/OAuth2ClientCredentials", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/SmtpCredentials/{smtpCredentialId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateOAuth2ClientCredentialResponse + var response GetSmtpCredentialResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateOAuth2ClientCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "GetSmtpCredential", apiReferenceLink) return response, err } @@ -1506,12 +7954,12 @@ func (client IdentityDomainsClient) createOAuth2ClientCredential(ctx context.Con return response, err } -// CreatePasswordPolicy Create a password policy. +// GetUser Get a user. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreatePasswordPolicy.go.html to see an example of how to use CreatePasswordPolicy API. -func (client IdentityDomainsClient) CreatePasswordPolicy(ctx context.Context, request CreatePasswordPolicyRequest) (response CreatePasswordPolicyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetUser.go.html to see an example of how to use GetUser API. +func (client IdentityDomainsClient) GetUser(ctx context.Context, request GetUserRequest) (response GetUserResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1525,42 +7973,42 @@ func (client IdentityDomainsClient) CreatePasswordPolicy(ctx context.Context, re request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createPasswordPolicy, policy) + ociResponse, err = common.Retry(ctx, request, client.getUser, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreatePasswordPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetUserResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreatePasswordPolicyResponse{} + response = GetUserResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreatePasswordPolicyResponse); ok { + if convertedResponse, ok := ociResponse.(GetUserResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreatePasswordPolicyResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetUserResponse") } return } -// createPasswordPolicy implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createPasswordPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getUser implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getUser(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/PasswordPolicies", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Users/{userId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreatePasswordPolicyResponse + var response GetUserResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreatePasswordPolicy", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "GetUser", apiReferenceLink) return response, err } @@ -1568,12 +8016,12 @@ func (client IdentityDomainsClient) createPasswordPolicy(ctx context.Context, re return response, err } -// CreateSecurityQuestion Create a security question. +// GetUserAttributesSetting Get User Schema Attribute Settings // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateSecurityQuestion.go.html to see an example of how to use CreateSecurityQuestion API. -func (client IdentityDomainsClient) CreateSecurityQuestion(ctx context.Context, request CreateSecurityQuestionRequest) (response CreateSecurityQuestionResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetUserAttributesSetting.go.html to see an example of how to use GetUserAttributesSetting API. +func (client IdentityDomainsClient) GetUserAttributesSetting(ctx context.Context, request GetUserAttributesSettingRequest) (response GetUserAttributesSettingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1587,42 +8035,42 @@ func (client IdentityDomainsClient) CreateSecurityQuestion(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createSecurityQuestion, policy) + ociResponse, err = common.Retry(ctx, request, client.getUserAttributesSetting, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateSecurityQuestionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetUserAttributesSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateSecurityQuestionResponse{} + response = GetUserAttributesSettingResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateSecurityQuestionResponse); ok { + if convertedResponse, ok := ociResponse.(GetUserAttributesSettingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateSecurityQuestionResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetUserAttributesSettingResponse") } return } -// createSecurityQuestion implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createSecurityQuestion(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getUserAttributesSetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getUserAttributesSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/SecurityQuestions", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/UserAttributesSettings/{userAttributesSettingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateSecurityQuestionResponse + var response GetUserAttributesSettingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateSecurityQuestion", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "GetUserAttributesSetting", apiReferenceLink) return response, err } @@ -1630,12 +8078,12 @@ func (client IdentityDomainsClient) createSecurityQuestion(ctx context.Context, return response, err } -// CreateSmtpCredential Create a user's SMTP credentials. +// GetUserDbCredential Get a user's database (DB) credentials. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateSmtpCredential.go.html to see an example of how to use CreateSmtpCredential API. -func (client IdentityDomainsClient) CreateSmtpCredential(ctx context.Context, request CreateSmtpCredentialRequest) (response CreateSmtpCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetUserDbCredential.go.html to see an example of how to use GetUserDbCredential API. +func (client IdentityDomainsClient) GetUserDbCredential(ctx context.Context, request GetUserDbCredentialRequest) (response GetUserDbCredentialResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1649,42 +8097,42 @@ func (client IdentityDomainsClient) CreateSmtpCredential(ctx context.Context, re request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createSmtpCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.getUserDbCredential, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateSmtpCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetUserDbCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateSmtpCredentialResponse{} + response = GetUserDbCredentialResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateSmtpCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(GetUserDbCredentialResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateSmtpCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetUserDbCredentialResponse") } return } -// createSmtpCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createSmtpCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getUserDbCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) getUserDbCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/SmtpCredentials", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/UserDbCredentials/{userDbCredentialId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateSmtpCredentialResponse + var response GetUserDbCredentialResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateSmtpCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "GetUserDbCredential", apiReferenceLink) return response, err } @@ -1692,12 +8140,12 @@ func (client IdentityDomainsClient) createSmtpCredential(ctx context.Context, re return response, err } -// CreateUser Create a user. +// ListAccountMgmtInfos Search Account Mgmt Info // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateUser.go.html to see an example of how to use CreateUser API. -func (client IdentityDomainsClient) CreateUser(ctx context.Context, request CreateUserRequest) (response CreateUserResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListAccountMgmtInfos.go.html to see an example of how to use ListAccountMgmtInfos API. +func (client IdentityDomainsClient) ListAccountMgmtInfos(ctx context.Context, request ListAccountMgmtInfosRequest) (response ListAccountMgmtInfosResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1711,42 +8159,42 @@ func (client IdentityDomainsClient) CreateUser(ctx context.Context, request Crea request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createUser, policy) + ociResponse, err = common.Retry(ctx, request, client.listAccountMgmtInfos, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateUserResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListAccountMgmtInfosResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateUserResponse{} + response = ListAccountMgmtInfosResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateUserResponse); ok { + if convertedResponse, ok := ociResponse.(ListAccountMgmtInfosResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateUserResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListAccountMgmtInfosResponse") } return } -// createUser implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createUser(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listAccountMgmtInfos implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listAccountMgmtInfos(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Users", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AccountMgmtInfos", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateUserResponse + var response ListAccountMgmtInfosResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateUser", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListAccountMgmtInfos", apiReferenceLink) return response, err } @@ -1754,12 +8202,12 @@ func (client IdentityDomainsClient) createUser(ctx context.Context, request comm return response, err } -// CreateUserDbCredential Create a user's database (DB) credentials. +// ListAccountRecoverySettings Search for account recovery settings. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/CreateUserDbCredential.go.html to see an example of how to use CreateUserDbCredential API. -func (client IdentityDomainsClient) CreateUserDbCredential(ctx context.Context, request CreateUserDbCredentialRequest) (response CreateUserDbCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListAccountRecoverySettings.go.html to see an example of how to use ListAccountRecoverySettings API. +func (client IdentityDomainsClient) ListAccountRecoverySettings(ctx context.Context, request ListAccountRecoverySettingsRequest) (response ListAccountRecoverySettingsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1773,42 +8221,42 @@ func (client IdentityDomainsClient) CreateUserDbCredential(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createUserDbCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.listAccountRecoverySettings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateUserDbCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListAccountRecoverySettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateUserDbCredentialResponse{} + response = ListAccountRecoverySettingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateUserDbCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(ListAccountRecoverySettingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateUserDbCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListAccountRecoverySettingsResponse") } return } -// createUserDbCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) createUserDbCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listAccountRecoverySettings implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listAccountRecoverySettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/UserDbCredentials", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AccountRecoverySettings", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateUserDbCredentialResponse + var response ListAccountRecoverySettingsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "CreateUserDbCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListAccountRecoverySettings", apiReferenceLink) return response, err } @@ -1816,12 +8264,12 @@ func (client IdentityDomainsClient) createUserDbCredential(ctx context.Context, return response, err } -// DeleteApiKey Delete a user's API key. +// ListApiKeys Search API keys. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteApiKey.go.html to see an example of how to use DeleteApiKey API. -func (client IdentityDomainsClient) DeleteApiKey(ctx context.Context, request DeleteApiKeyRequest) (response DeleteApiKeyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListApiKeys.go.html to see an example of how to use ListApiKeys API. +func (client IdentityDomainsClient) ListApiKeys(ctx context.Context, request ListApiKeysRequest) (response ListApiKeysResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1835,42 +8283,42 @@ func (client IdentityDomainsClient) DeleteApiKey(ctx context.Context, request De request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteApiKey, policy) + ociResponse, err = common.Retry(ctx, request, client.listApiKeys, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteApiKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListApiKeysResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteApiKeyResponse{} + response = ListApiKeysResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteApiKeyResponse); ok { + if convertedResponse, ok := ociResponse.(ListApiKeysResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteApiKeyResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListApiKeysResponse") } return } -// deleteApiKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteApiKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listApiKeys implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listApiKeys(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/ApiKeys/{apiKeyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/ApiKeys", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteApiKeyResponse + var response ListApiKeysResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteApiKey", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListApiKeys", apiReferenceLink) return response, err } @@ -1878,12 +8326,12 @@ func (client IdentityDomainsClient) deleteApiKey(ctx context.Context, request co return response, err } -// DeleteApp Delete an App +// ListAppRoles Search AppRoles // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteApp.go.html to see an example of how to use DeleteApp API. -func (client IdentityDomainsClient) DeleteApp(ctx context.Context, request DeleteAppRequest) (response DeleteAppResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListAppRoles.go.html to see an example of how to use ListAppRoles API. +func (client IdentityDomainsClient) ListAppRoles(ctx context.Context, request ListAppRolesRequest) (response ListAppRolesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1897,42 +8345,42 @@ func (client IdentityDomainsClient) DeleteApp(ctx context.Context, request Delet request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteApp, policy) + ociResponse, err = common.Retry(ctx, request, client.listAppRoles, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteAppResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListAppRolesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteAppResponse{} + response = ListAppRolesResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteAppResponse); ok { + if convertedResponse, ok := ociResponse.(ListAppRolesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteAppResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListAppRolesResponse") } return } -// deleteApp implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteApp(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listAppRoles implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listAppRoles(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/Apps/{appId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AppRoles", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteAppResponse + var response ListAppRolesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteApp", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListAppRoles", apiReferenceLink) return response, err } @@ -1940,12 +8388,12 @@ func (client IdentityDomainsClient) deleteApp(ctx context.Context, request commo return response, err } -// DeleteAppRole Delete an AppRole +// ListApprovalWorkflowAssignments Search Approval Workflow Assignments // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteAppRole.go.html to see an example of how to use DeleteAppRole API. -func (client IdentityDomainsClient) DeleteAppRole(ctx context.Context, request DeleteAppRoleRequest) (response DeleteAppRoleResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListApprovalWorkflowAssignments.go.html to see an example of how to use ListApprovalWorkflowAssignments API. +func (client IdentityDomainsClient) ListApprovalWorkflowAssignments(ctx context.Context, request ListApprovalWorkflowAssignmentsRequest) (response ListApprovalWorkflowAssignmentsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1959,42 +8407,42 @@ func (client IdentityDomainsClient) DeleteAppRole(ctx context.Context, request D request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteAppRole, policy) + ociResponse, err = common.Retry(ctx, request, client.listApprovalWorkflowAssignments, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteAppRoleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListApprovalWorkflowAssignmentsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteAppRoleResponse{} + response = ListApprovalWorkflowAssignmentsResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteAppRoleResponse); ok { + if convertedResponse, ok := ociResponse.(ListApprovalWorkflowAssignmentsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteAppRoleResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListApprovalWorkflowAssignmentsResponse") } return } -// deleteAppRole implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteAppRole(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listApprovalWorkflowAssignments implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listApprovalWorkflowAssignments(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/AppRoles/{appRoleId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/ApprovalWorkflowAssignments", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteAppRoleResponse + var response ListApprovalWorkflowAssignmentsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteAppRole", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListApprovalWorkflowAssignments", apiReferenceLink) return response, err } @@ -2002,12 +8450,12 @@ func (client IdentityDomainsClient) deleteAppRole(ctx context.Context, request c return response, err } -// DeleteAuthToken Delete a user's Auth token. +// ListApprovalWorkflowSteps Search ApprovalWorkflowStep // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteAuthToken.go.html to see an example of how to use DeleteAuthToken API. -func (client IdentityDomainsClient) DeleteAuthToken(ctx context.Context, request DeleteAuthTokenRequest) (response DeleteAuthTokenResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListApprovalWorkflowSteps.go.html to see an example of how to use ListApprovalWorkflowSteps API. +func (client IdentityDomainsClient) ListApprovalWorkflowSteps(ctx context.Context, request ListApprovalWorkflowStepsRequest) (response ListApprovalWorkflowStepsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2021,42 +8469,42 @@ func (client IdentityDomainsClient) DeleteAuthToken(ctx context.Context, request request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteAuthToken, policy) + ociResponse, err = common.Retry(ctx, request, client.listApprovalWorkflowSteps, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteAuthTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListApprovalWorkflowStepsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteAuthTokenResponse{} + response = ListApprovalWorkflowStepsResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteAuthTokenResponse); ok { + if convertedResponse, ok := ociResponse.(ListApprovalWorkflowStepsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteAuthTokenResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListApprovalWorkflowStepsResponse") } return } -// deleteAuthToken implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteAuthToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listApprovalWorkflowSteps implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listApprovalWorkflowSteps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/AuthTokens/{authTokenId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/ApprovalWorkflowSteps", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteAuthTokenResponse + var response ListApprovalWorkflowStepsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteAuthToken", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListApprovalWorkflowSteps", apiReferenceLink) return response, err } @@ -2064,12 +8512,12 @@ func (client IdentityDomainsClient) deleteAuthToken(ctx context.Context, request return response, err } -// DeleteCustomerSecretKey Delete a user's customer secret key. +// ListApprovalWorkflows Search ApprovalWorkflow // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteCustomerSecretKey.go.html to see an example of how to use DeleteCustomerSecretKey API. -func (client IdentityDomainsClient) DeleteCustomerSecretKey(ctx context.Context, request DeleteCustomerSecretKeyRequest) (response DeleteCustomerSecretKeyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListApprovalWorkflows.go.html to see an example of how to use ListApprovalWorkflows API. +func (client IdentityDomainsClient) ListApprovalWorkflows(ctx context.Context, request ListApprovalWorkflowsRequest) (response ListApprovalWorkflowsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2083,42 +8531,42 @@ func (client IdentityDomainsClient) DeleteCustomerSecretKey(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteCustomerSecretKey, policy) + ociResponse, err = common.Retry(ctx, request, client.listApprovalWorkflows, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteCustomerSecretKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListApprovalWorkflowsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteCustomerSecretKeyResponse{} + response = ListApprovalWorkflowsResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteCustomerSecretKeyResponse); ok { + if convertedResponse, ok := ociResponse.(ListApprovalWorkflowsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteCustomerSecretKeyResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListApprovalWorkflowsResponse") } return } -// deleteCustomerSecretKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteCustomerSecretKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listApprovalWorkflows implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listApprovalWorkflows(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/CustomerSecretKeys/{customerSecretKeyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/ApprovalWorkflows", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteCustomerSecretKeyResponse + var response ListApprovalWorkflowsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteCustomerSecretKey", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListApprovalWorkflows", apiReferenceLink) return response, err } @@ -2126,12 +8574,12 @@ func (client IdentityDomainsClient) deleteCustomerSecretKey(ctx context.Context, return response, err } -// DeleteDynamicResourceGroup Delete a Dynamic Resource Group. +// ListApps Search Apps // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteDynamicResourceGroup.go.html to see an example of how to use DeleteDynamicResourceGroup API. -func (client IdentityDomainsClient) DeleteDynamicResourceGroup(ctx context.Context, request DeleteDynamicResourceGroupRequest) (response DeleteDynamicResourceGroupResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListApps.go.html to see an example of how to use ListApps API. +func (client IdentityDomainsClient) ListApps(ctx context.Context, request ListAppsRequest) (response ListAppsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2145,42 +8593,42 @@ func (client IdentityDomainsClient) DeleteDynamicResourceGroup(ctx context.Conte request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteDynamicResourceGroup, policy) + ociResponse, err = common.Retry(ctx, request, client.listApps, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteDynamicResourceGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListAppsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteDynamicResourceGroupResponse{} + response = ListAppsResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteDynamicResourceGroupResponse); ok { + if convertedResponse, ok := ociResponse.(ListAppsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteDynamicResourceGroupResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListAppsResponse") } return } -// deleteDynamicResourceGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteDynamicResourceGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listApps implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listApps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/DynamicResourceGroups/{dynamicResourceGroupId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Apps", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteDynamicResourceGroupResponse + var response ListAppsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteDynamicResourceGroup", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListApps", apiReferenceLink) return response, err } @@ -2188,12 +8636,12 @@ func (client IdentityDomainsClient) deleteDynamicResourceGroup(ctx context.Conte return response, err } -// DeleteGrant Remove a Grantee from an AppRole +// ListAuthTokens Search for Auth tokens. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteGrant.go.html to see an example of how to use DeleteGrant API. -func (client IdentityDomainsClient) DeleteGrant(ctx context.Context, request DeleteGrantRequest) (response DeleteGrantResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListAuthTokens.go.html to see an example of how to use ListAuthTokens API. +func (client IdentityDomainsClient) ListAuthTokens(ctx context.Context, request ListAuthTokensRequest) (response ListAuthTokensResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2207,42 +8655,42 @@ func (client IdentityDomainsClient) DeleteGrant(ctx context.Context, request Del request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteGrant, policy) + ociResponse, err = common.Retry(ctx, request, client.listAuthTokens, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteGrantResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListAuthTokensResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteGrantResponse{} + response = ListAuthTokensResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteGrantResponse); ok { + if convertedResponse, ok := ociResponse.(ListAuthTokensResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteGrantResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListAuthTokensResponse") } return } -// deleteGrant implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteGrant(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listAuthTokens implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listAuthTokens(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/Grants/{grantId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AuthTokens", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteGrantResponse + var response ListAuthTokensResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteGrant", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListAuthTokens", apiReferenceLink) return response, err } @@ -2250,12 +8698,12 @@ func (client IdentityDomainsClient) deleteGrant(ctx context.Context, request com return response, err } -// DeleteGroup Delete a group. +// ListAuthenticationFactorSettings Search Authentication Factor Settings // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteGroup.go.html to see an example of how to use DeleteGroup API. -func (client IdentityDomainsClient) DeleteGroup(ctx context.Context, request DeleteGroupRequest) (response DeleteGroupResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListAuthenticationFactorSettings.go.html to see an example of how to use ListAuthenticationFactorSettings API. +func (client IdentityDomainsClient) ListAuthenticationFactorSettings(ctx context.Context, request ListAuthenticationFactorSettingsRequest) (response ListAuthenticationFactorSettingsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2269,42 +8717,42 @@ func (client IdentityDomainsClient) DeleteGroup(ctx context.Context, request Del request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteGroup, policy) + ociResponse, err = common.Retry(ctx, request, client.listAuthenticationFactorSettings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListAuthenticationFactorSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteGroupResponse{} + response = ListAuthenticationFactorSettingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteGroupResponse); ok { + if convertedResponse, ok := ociResponse.(ListAuthenticationFactorSettingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteGroupResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListAuthenticationFactorSettingsResponse") } return } -// deleteGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listAuthenticationFactorSettings implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listAuthenticationFactorSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/Groups/{groupId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AuthenticationFactorSettings", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteGroupResponse + var response ListAuthenticationFactorSettingsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteGroup", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListAuthenticationFactorSettings", apiReferenceLink) return response, err } @@ -2312,12 +8760,12 @@ func (client IdentityDomainsClient) deleteGroup(ctx context.Context, request com return response, err } -// DeleteIdentityProvider Delete an Identity Provider +// ListBrandingSettings Search Branding Settings // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteIdentityProvider.go.html to see an example of how to use DeleteIdentityProvider API. -func (client IdentityDomainsClient) DeleteIdentityProvider(ctx context.Context, request DeleteIdentityProviderRequest) (response DeleteIdentityProviderResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListBrandingSettings.go.html to see an example of how to use ListBrandingSettings API. +func (client IdentityDomainsClient) ListBrandingSettings(ctx context.Context, request ListBrandingSettingsRequest) (response ListBrandingSettingsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2331,42 +8779,42 @@ func (client IdentityDomainsClient) DeleteIdentityProvider(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteIdentityProvider, policy) + ociResponse, err = common.Retry(ctx, request, client.listBrandingSettings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteIdentityProviderResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListBrandingSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteIdentityProviderResponse{} + response = ListBrandingSettingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteIdentityProviderResponse); ok { + if convertedResponse, ok := ociResponse.(ListBrandingSettingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteIdentityProviderResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListBrandingSettingsResponse") } return } -// deleteIdentityProvider implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteIdentityProvider(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listBrandingSettings implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listBrandingSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/IdentityProviders/{identityProviderId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/BrandingSettings", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteIdentityProviderResponse + var response ListBrandingSettingsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteIdentityProvider", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListBrandingSettings", apiReferenceLink) return response, err } @@ -2374,12 +8822,12 @@ func (client IdentityDomainsClient) deleteIdentityProvider(ctx context.Context, return response, err } -// DeleteMyApiKey Delete a user's own API key. +// ListCloudGateMappings Search Cloud Gate mappings // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteMyApiKey.go.html to see an example of how to use DeleteMyApiKey API. -func (client IdentityDomainsClient) DeleteMyApiKey(ctx context.Context, request DeleteMyApiKeyRequest) (response DeleteMyApiKeyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListCloudGateMappings.go.html to see an example of how to use ListCloudGateMappings API. +func (client IdentityDomainsClient) ListCloudGateMappings(ctx context.Context, request ListCloudGateMappingsRequest) (response ListCloudGateMappingsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2393,42 +8841,42 @@ func (client IdentityDomainsClient) DeleteMyApiKey(ctx context.Context, request request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteMyApiKey, policy) + ociResponse, err = common.Retry(ctx, request, client.listCloudGateMappings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteMyApiKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListCloudGateMappingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteMyApiKeyResponse{} + response = ListCloudGateMappingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteMyApiKeyResponse); ok { + if convertedResponse, ok := ociResponse.(ListCloudGateMappingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteMyApiKeyResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListCloudGateMappingsResponse") } return } -// deleteMyApiKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteMyApiKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listCloudGateMappings implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listCloudGateMappings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/MyApiKeys/{myApiKeyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/CloudGateMappings", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteMyApiKeyResponse + var response ListCloudGateMappingsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteMyApiKey", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListCloudGateMappings", apiReferenceLink) return response, err } @@ -2436,12 +8884,12 @@ func (client IdentityDomainsClient) deleteMyApiKey(ctx context.Context, request return response, err } -// DeleteMyAuthToken Delete a user's own Auth token. +// ListCloudGateServers Search Cloud Gate servers // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteMyAuthToken.go.html to see an example of how to use DeleteMyAuthToken API. -func (client IdentityDomainsClient) DeleteMyAuthToken(ctx context.Context, request DeleteMyAuthTokenRequest) (response DeleteMyAuthTokenResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListCloudGateServers.go.html to see an example of how to use ListCloudGateServers API. +func (client IdentityDomainsClient) ListCloudGateServers(ctx context.Context, request ListCloudGateServersRequest) (response ListCloudGateServersResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2455,42 +8903,42 @@ func (client IdentityDomainsClient) DeleteMyAuthToken(ctx context.Context, reque request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteMyAuthToken, policy) + ociResponse, err = common.Retry(ctx, request, client.listCloudGateServers, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteMyAuthTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListCloudGateServersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteMyAuthTokenResponse{} + response = ListCloudGateServersResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteMyAuthTokenResponse); ok { + if convertedResponse, ok := ociResponse.(ListCloudGateServersResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteMyAuthTokenResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListCloudGateServersResponse") } return } -// deleteMyAuthToken implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteMyAuthToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listCloudGateServers implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listCloudGateServers(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/MyAuthTokens/{myAuthTokenId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/CloudGateServers", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteMyAuthTokenResponse + var response ListCloudGateServersResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteMyAuthToken", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListCloudGateServers", apiReferenceLink) return response, err } @@ -2498,12 +8946,12 @@ func (client IdentityDomainsClient) deleteMyAuthToken(ctx context.Context, reque return response, err } -// DeleteMyCustomerSecretKey Delete a user's own customer secret key. +// ListCloudGates Search Cloud Gates // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteMyCustomerSecretKey.go.html to see an example of how to use DeleteMyCustomerSecretKey API. -func (client IdentityDomainsClient) DeleteMyCustomerSecretKey(ctx context.Context, request DeleteMyCustomerSecretKeyRequest) (response DeleteMyCustomerSecretKeyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListCloudGates.go.html to see an example of how to use ListCloudGates API. +func (client IdentityDomainsClient) ListCloudGates(ctx context.Context, request ListCloudGatesRequest) (response ListCloudGatesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2517,42 +8965,42 @@ func (client IdentityDomainsClient) DeleteMyCustomerSecretKey(ctx context.Contex request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteMyCustomerSecretKey, policy) + ociResponse, err = common.Retry(ctx, request, client.listCloudGates, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteMyCustomerSecretKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListCloudGatesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteMyCustomerSecretKeyResponse{} + response = ListCloudGatesResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteMyCustomerSecretKeyResponse); ok { + if convertedResponse, ok := ociResponse.(ListCloudGatesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteMyCustomerSecretKeyResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListCloudGatesResponse") } return } -// deleteMyCustomerSecretKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteMyCustomerSecretKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listCloudGates implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listCloudGates(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/MyCustomerSecretKeys/{myCustomerSecretKeyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/CloudGates", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteMyCustomerSecretKeyResponse + var response ListCloudGatesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteMyCustomerSecretKey", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListCloudGates", apiReferenceLink) return response, err } @@ -2560,12 +9008,12 @@ func (client IdentityDomainsClient) deleteMyCustomerSecretKey(ctx context.Contex return response, err } -// DeleteMyDevice Delete a Device +// ListConditions Search Conditions // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteMyDevice.go.html to see an example of how to use DeleteMyDevice API. -func (client IdentityDomainsClient) DeleteMyDevice(ctx context.Context, request DeleteMyDeviceRequest) (response DeleteMyDeviceResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListConditions.go.html to see an example of how to use ListConditions API. +func (client IdentityDomainsClient) ListConditions(ctx context.Context, request ListConditionsRequest) (response ListConditionsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2579,42 +9027,42 @@ func (client IdentityDomainsClient) DeleteMyDevice(ctx context.Context, request request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteMyDevice, policy) + ociResponse, err = common.Retry(ctx, request, client.listConditions, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteMyDeviceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListConditionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteMyDeviceResponse{} + response = ListConditionsResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteMyDeviceResponse); ok { + if convertedResponse, ok := ociResponse.(ListConditionsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteMyDeviceResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListConditionsResponse") } return } -// deleteMyDevice implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteMyDevice(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listConditions implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listConditions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/MyDevices/{myDeviceId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Conditions", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteMyDeviceResponse + var response ListConditionsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteMyDevice", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListConditions", apiReferenceLink) return response, err } @@ -2622,12 +9070,12 @@ func (client IdentityDomainsClient) deleteMyDevice(ctx context.Context, request return response, err } -// DeleteMyOAuth2ClientCredential Delete a user's own OAuth2 client credential. +// ListCustomerSecretKeys Search for a user's customer secret keys. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteMyOAuth2ClientCredential.go.html to see an example of how to use DeleteMyOAuth2ClientCredential API. -func (client IdentityDomainsClient) DeleteMyOAuth2ClientCredential(ctx context.Context, request DeleteMyOAuth2ClientCredentialRequest) (response DeleteMyOAuth2ClientCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListCustomerSecretKeys.go.html to see an example of how to use ListCustomerSecretKeys API. +func (client IdentityDomainsClient) ListCustomerSecretKeys(ctx context.Context, request ListCustomerSecretKeysRequest) (response ListCustomerSecretKeysResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2641,42 +9089,42 @@ func (client IdentityDomainsClient) DeleteMyOAuth2ClientCredential(ctx context.C request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteMyOAuth2ClientCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.listCustomerSecretKeys, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteMyOAuth2ClientCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListCustomerSecretKeysResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteMyOAuth2ClientCredentialResponse{} + response = ListCustomerSecretKeysResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteMyOAuth2ClientCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(ListCustomerSecretKeysResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteMyOAuth2ClientCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListCustomerSecretKeysResponse") } return } -// deleteMyOAuth2ClientCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteMyOAuth2ClientCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listCustomerSecretKeys implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listCustomerSecretKeys(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/MyOAuth2ClientCredentials/{myOAuth2ClientCredentialId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/CustomerSecretKeys", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteMyOAuth2ClientCredentialResponse + var response ListCustomerSecretKeysResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteMyOAuth2ClientCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListCustomerSecretKeys", apiReferenceLink) return response, err } @@ -2684,12 +9132,12 @@ func (client IdentityDomainsClient) deleteMyOAuth2ClientCredential(ctx context.C return response, err } -// DeleteMySmtpCredential Delete a user's own SMTP credential. +// ListDynamicResourceGroups Search for Dynamic Resource Groups. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteMySmtpCredential.go.html to see an example of how to use DeleteMySmtpCredential API. -func (client IdentityDomainsClient) DeleteMySmtpCredential(ctx context.Context, request DeleteMySmtpCredentialRequest) (response DeleteMySmtpCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListDynamicResourceGroups.go.html to see an example of how to use ListDynamicResourceGroups API. +func (client IdentityDomainsClient) ListDynamicResourceGroups(ctx context.Context, request ListDynamicResourceGroupsRequest) (response ListDynamicResourceGroupsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2703,42 +9151,42 @@ func (client IdentityDomainsClient) DeleteMySmtpCredential(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteMySmtpCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.listDynamicResourceGroups, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteMySmtpCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListDynamicResourceGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteMySmtpCredentialResponse{} + response = ListDynamicResourceGroupsResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteMySmtpCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(ListDynamicResourceGroupsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteMySmtpCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListDynamicResourceGroupsResponse") } return } -// deleteMySmtpCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteMySmtpCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listDynamicResourceGroups implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listDynamicResourceGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/MySmtpCredentials/{mySmtpCredentialId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/DynamicResourceGroups", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteMySmtpCredentialResponse + var response ListDynamicResourceGroupsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteMySmtpCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListDynamicResourceGroups", apiReferenceLink) return response, err } @@ -2746,12 +9194,12 @@ func (client IdentityDomainsClient) deleteMySmtpCredential(ctx context.Context, return response, err } -// DeleteMySupportAccount Delete a user's own support account. +// ListGrants Search Grants // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteMySupportAccount.go.html to see an example of how to use DeleteMySupportAccount API. -func (client IdentityDomainsClient) DeleteMySupportAccount(ctx context.Context, request DeleteMySupportAccountRequest) (response DeleteMySupportAccountResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListGrants.go.html to see an example of how to use ListGrants API. +func (client IdentityDomainsClient) ListGrants(ctx context.Context, request ListGrantsRequest) (response ListGrantsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2765,42 +9213,42 @@ func (client IdentityDomainsClient) DeleteMySupportAccount(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteMySupportAccount, policy) + ociResponse, err = common.Retry(ctx, request, client.listGrants, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteMySupportAccountResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListGrantsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteMySupportAccountResponse{} + response = ListGrantsResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteMySupportAccountResponse); ok { + if convertedResponse, ok := ociResponse.(ListGrantsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteMySupportAccountResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListGrantsResponse") } return } -// deleteMySupportAccount implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteMySupportAccount(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listGrants implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listGrants(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/MySupportAccounts/{mySupportAccountId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Grants", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteMySupportAccountResponse + var response ListGrantsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteMySupportAccount", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListGrants", apiReferenceLink) return response, err } @@ -2808,12 +9256,12 @@ func (client IdentityDomainsClient) deleteMySupportAccount(ctx context.Context, return response, err } -// DeleteMyTrustedUserAgent Delete a Trusted User Agent +// ListGroups Search for groups. Important: The Group SEARCH and GET operations on users and members will throw an exception if the response has more than 10,000 members. To avoid the exception, use the pagination filter to GET or SEARCH group members. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteMyTrustedUserAgent.go.html to see an example of how to use DeleteMyTrustedUserAgent API. -func (client IdentityDomainsClient) DeleteMyTrustedUserAgent(ctx context.Context, request DeleteMyTrustedUserAgentRequest) (response DeleteMyTrustedUserAgentResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListGroups.go.html to see an example of how to use ListGroups API. +func (client IdentityDomainsClient) ListGroups(ctx context.Context, request ListGroupsRequest) (response ListGroupsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2827,42 +9275,42 @@ func (client IdentityDomainsClient) DeleteMyTrustedUserAgent(ctx context.Context request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteMyTrustedUserAgent, policy) + ociResponse, err = common.Retry(ctx, request, client.listGroups, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteMyTrustedUserAgentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteMyTrustedUserAgentResponse{} + response = ListGroupsResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteMyTrustedUserAgentResponse); ok { + if convertedResponse, ok := ociResponse.(ListGroupsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteMyTrustedUserAgentResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListGroupsResponse") } return } -// deleteMyTrustedUserAgent implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteMyTrustedUserAgent(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listGroups implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/MyTrustedUserAgents/{myTrustedUserAgentId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Groups", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteMyTrustedUserAgentResponse + var response ListGroupsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteMyTrustedUserAgent", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListGroups", apiReferenceLink) return response, err } @@ -2870,12 +9318,12 @@ func (client IdentityDomainsClient) deleteMyTrustedUserAgent(ctx context.Context return response, err } -// DeleteMyUserDbCredential Delete a user's own database (DB) credential. +// ListIdentityProviders Search Identity Providers // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteMyUserDbCredential.go.html to see an example of how to use DeleteMyUserDbCredential API. -func (client IdentityDomainsClient) DeleteMyUserDbCredential(ctx context.Context, request DeleteMyUserDbCredentialRequest) (response DeleteMyUserDbCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListIdentityProviders.go.html to see an example of how to use ListIdentityProviders API. +func (client IdentityDomainsClient) ListIdentityProviders(ctx context.Context, request ListIdentityProvidersRequest) (response ListIdentityProvidersResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2889,42 +9337,42 @@ func (client IdentityDomainsClient) DeleteMyUserDbCredential(ctx context.Context request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteMyUserDbCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.listIdentityProviders, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteMyUserDbCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListIdentityProvidersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteMyUserDbCredentialResponse{} + response = ListIdentityProvidersResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteMyUserDbCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(ListIdentityProvidersResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteMyUserDbCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListIdentityProvidersResponse") } return } -// deleteMyUserDbCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteMyUserDbCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listIdentityProviders implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listIdentityProviders(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/MyUserDbCredentials/{myUserDbCredentialId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/IdentityProviders", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteMyUserDbCredentialResponse + var response ListIdentityProvidersResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteMyUserDbCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListIdentityProviders", apiReferenceLink) return response, err } @@ -2932,12 +9380,12 @@ func (client IdentityDomainsClient) deleteMyUserDbCredential(ctx context.Context return response, err } -// DeleteOAuth2ClientCredential Delete a user's OAuth2 client credentials. +// ListIdentitySettings Search for Identity settings. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteOAuth2ClientCredential.go.html to see an example of how to use DeleteOAuth2ClientCredential API. -func (client IdentityDomainsClient) DeleteOAuth2ClientCredential(ctx context.Context, request DeleteOAuth2ClientCredentialRequest) (response DeleteOAuth2ClientCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListIdentitySettings.go.html to see an example of how to use ListIdentitySettings API. +func (client IdentityDomainsClient) ListIdentitySettings(ctx context.Context, request ListIdentitySettingsRequest) (response ListIdentitySettingsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2951,42 +9399,42 @@ func (client IdentityDomainsClient) DeleteOAuth2ClientCredential(ctx context.Con request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteOAuth2ClientCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.listIdentitySettings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteOAuth2ClientCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListIdentitySettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteOAuth2ClientCredentialResponse{} + response = ListIdentitySettingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteOAuth2ClientCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(ListIdentitySettingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteOAuth2ClientCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListIdentitySettingsResponse") } return } -// deleteOAuth2ClientCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteOAuth2ClientCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listIdentitySettings implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listIdentitySettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/OAuth2ClientCredentials/{oAuth2ClientCredentialId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/IdentitySettings", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteOAuth2ClientCredentialResponse + var response ListIdentitySettingsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteOAuth2ClientCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListIdentitySettings", apiReferenceLink) return response, err } @@ -2994,12 +9442,12 @@ func (client IdentityDomainsClient) deleteOAuth2ClientCredential(ctx context.Con return response, err } -// DeletePasswordPolicy Delete a password policy. +// ListKmsiSettings Search KmsiSettings // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeletePasswordPolicy.go.html to see an example of how to use DeletePasswordPolicy API. -func (client IdentityDomainsClient) DeletePasswordPolicy(ctx context.Context, request DeletePasswordPolicyRequest) (response DeletePasswordPolicyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListKmsiSettings.go.html to see an example of how to use ListKmsiSettings API. +func (client IdentityDomainsClient) ListKmsiSettings(ctx context.Context, request ListKmsiSettingsRequest) (response ListKmsiSettingsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -3013,42 +9461,42 @@ func (client IdentityDomainsClient) DeletePasswordPolicy(ctx context.Context, re request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deletePasswordPolicy, policy) + ociResponse, err = common.Retry(ctx, request, client.listKmsiSettings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeletePasswordPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListKmsiSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeletePasswordPolicyResponse{} + response = ListKmsiSettingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeletePasswordPolicyResponse); ok { + if convertedResponse, ok := ociResponse.(ListKmsiSettingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeletePasswordPolicyResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListKmsiSettingsResponse") } return } -// deletePasswordPolicy implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deletePasswordPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listKmsiSettings implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listKmsiSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/PasswordPolicies/{passwordPolicyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/KmsiSettings", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeletePasswordPolicyResponse + var response ListKmsiSettingsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeletePasswordPolicy", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListKmsiSettings", apiReferenceLink) return response, err } @@ -3056,12 +9504,12 @@ func (client IdentityDomainsClient) deletePasswordPolicy(ctx context.Context, re return response, err } -// DeleteSecurityQuestion Delete a security question. +// ListMyApiKeys Search for a user's own API key. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteSecurityQuestion.go.html to see an example of how to use DeleteSecurityQuestion API. -func (client IdentityDomainsClient) DeleteSecurityQuestion(ctx context.Context, request DeleteSecurityQuestionRequest) (response DeleteSecurityQuestionResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyApiKeys.go.html to see an example of how to use ListMyApiKeys API. +func (client IdentityDomainsClient) ListMyApiKeys(ctx context.Context, request ListMyApiKeysRequest) (response ListMyApiKeysResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -3075,42 +9523,42 @@ func (client IdentityDomainsClient) DeleteSecurityQuestion(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteSecurityQuestion, policy) + ociResponse, err = common.Retry(ctx, request, client.listMyApiKeys, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteSecurityQuestionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListMyApiKeysResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteSecurityQuestionResponse{} + response = ListMyApiKeysResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteSecurityQuestionResponse); ok { + if convertedResponse, ok := ociResponse.(ListMyApiKeysResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteSecurityQuestionResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListMyApiKeysResponse") } return } -// deleteSecurityQuestion implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteSecurityQuestion(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listMyApiKeys implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listMyApiKeys(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/SecurityQuestions/{securityQuestionId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyApiKeys", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteSecurityQuestionResponse + var response ListMyApiKeysResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteSecurityQuestion", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyApiKeys", apiReferenceLink) return response, err } @@ -3118,12 +9566,12 @@ func (client IdentityDomainsClient) deleteSecurityQuestion(ctx context.Context, return response, err } -// DeleteSmtpCredential Delete a user's SMTP credentials. +// ListMyApps Search My Apps // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteSmtpCredential.go.html to see an example of how to use DeleteSmtpCredential API. -func (client IdentityDomainsClient) DeleteSmtpCredential(ctx context.Context, request DeleteSmtpCredentialRequest) (response DeleteSmtpCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyApps.go.html to see an example of how to use ListMyApps API. +func (client IdentityDomainsClient) ListMyApps(ctx context.Context, request ListMyAppsRequest) (response ListMyAppsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -3137,42 +9585,42 @@ func (client IdentityDomainsClient) DeleteSmtpCredential(ctx context.Context, re request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteSmtpCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.listMyApps, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteSmtpCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListMyAppsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteSmtpCredentialResponse{} + response = ListMyAppsResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteSmtpCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(ListMyAppsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteSmtpCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListMyAppsResponse") } return } -// deleteSmtpCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteSmtpCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listMyApps implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listMyApps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/SmtpCredentials/{smtpCredentialId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyApps", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteSmtpCredentialResponse + var response ListMyAppsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteSmtpCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyApps", apiReferenceLink) return response, err } @@ -3180,12 +9628,12 @@ func (client IdentityDomainsClient) deleteSmtpCredential(ctx context.Context, re return response, err } -// DeleteUser Delete a user. +// ListMyAuthTokens Search for a user's own Auth token. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteUser.go.html to see an example of how to use DeleteUser API. -func (client IdentityDomainsClient) DeleteUser(ctx context.Context, request DeleteUserRequest) (response DeleteUserResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyAuthTokens.go.html to see an example of how to use ListMyAuthTokens API. +func (client IdentityDomainsClient) ListMyAuthTokens(ctx context.Context, request ListMyAuthTokensRequest) (response ListMyAuthTokensResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -3199,42 +9647,42 @@ func (client IdentityDomainsClient) DeleteUser(ctx context.Context, request Dele request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteUser, policy) + ociResponse, err = common.Retry(ctx, request, client.listMyAuthTokens, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteUserResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListMyAuthTokensResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteUserResponse{} + response = ListMyAuthTokensResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteUserResponse); ok { + if convertedResponse, ok := ociResponse.(ListMyAuthTokensResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteUserResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListMyAuthTokensResponse") } return } -// deleteUser implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteUser(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listMyAuthTokens implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listMyAuthTokens(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/Users/{userId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyAuthTokens", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteUserResponse + var response ListMyAuthTokensResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteUser", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyAuthTokens", apiReferenceLink) return response, err } @@ -3242,12 +9690,12 @@ func (client IdentityDomainsClient) deleteUser(ctx context.Context, request comm return response, err } -// DeleteUserDbCredential Delete a user's database (DB) credentials. +// ListMyCompletedApprovals Search My MyCompletedApproval // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/DeleteUserDbCredential.go.html to see an example of how to use DeleteUserDbCredential API. -func (client IdentityDomainsClient) DeleteUserDbCredential(ctx context.Context, request DeleteUserDbCredentialRequest) (response DeleteUserDbCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyCompletedApprovals.go.html to see an example of how to use ListMyCompletedApprovals API. +func (client IdentityDomainsClient) ListMyCompletedApprovals(ctx context.Context, request ListMyCompletedApprovalsRequest) (response ListMyCompletedApprovalsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -3261,42 +9709,42 @@ func (client IdentityDomainsClient) DeleteUserDbCredential(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.deleteUserDbCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.listMyCompletedApprovals, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteUserDbCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListMyCompletedApprovalsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteUserDbCredentialResponse{} + response = ListMyCompletedApprovalsResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteUserDbCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(ListMyCompletedApprovalsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteUserDbCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListMyCompletedApprovalsResponse") } return } -// deleteUserDbCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) deleteUserDbCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listMyCompletedApprovals implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listMyCompletedApprovals(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/admin/v1/UserDbCredentials/{userDbCredentialId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyCompletedApprovals", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteUserDbCredentialResponse + var response ListMyCompletedApprovalsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "DeleteUserDbCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyCompletedApprovals", apiReferenceLink) return response, err } @@ -3304,12 +9752,12 @@ func (client IdentityDomainsClient) deleteUserDbCredential(ctx context.Context, return response, err } -// GetAccountMgmtInfo Get Account Mgmt Info +// ListMyCustomerSecretKeys Search for a user's own customer secret key. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetAccountMgmtInfo.go.html to see an example of how to use GetAccountMgmtInfo API. -func (client IdentityDomainsClient) GetAccountMgmtInfo(ctx context.Context, request GetAccountMgmtInfoRequest) (response GetAccountMgmtInfoResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyCustomerSecretKeys.go.html to see an example of how to use ListMyCustomerSecretKeys API. +func (client IdentityDomainsClient) ListMyCustomerSecretKeys(ctx context.Context, request ListMyCustomerSecretKeysRequest) (response ListMyCustomerSecretKeysResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -3323,42 +9771,42 @@ func (client IdentityDomainsClient) GetAccountMgmtInfo(ctx context.Context, requ request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getAccountMgmtInfo, policy) + ociResponse, err = common.Retry(ctx, request, client.listMyCustomerSecretKeys, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetAccountMgmtInfoResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListMyCustomerSecretKeysResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetAccountMgmtInfoResponse{} + response = ListMyCustomerSecretKeysResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetAccountMgmtInfoResponse); ok { + if convertedResponse, ok := ociResponse.(ListMyCustomerSecretKeysResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetAccountMgmtInfoResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListMyCustomerSecretKeysResponse") } return } -// getAccountMgmtInfo implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getAccountMgmtInfo(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listMyCustomerSecretKeys implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listMyCustomerSecretKeys(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AccountMgmtInfos/{accountMgmtInfoId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyCustomerSecretKeys", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetAccountMgmtInfoResponse + var response ListMyCustomerSecretKeysResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetAccountMgmtInfo", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyCustomerSecretKeys", apiReferenceLink) return response, err } @@ -3366,12 +9814,12 @@ func (client IdentityDomainsClient) getAccountMgmtInfo(ctx context.Context, requ return response, err } -// GetAccountRecoverySetting Get an account recovery setting. +// ListMyDevices Search Devices // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetAccountRecoverySetting.go.html to see an example of how to use GetAccountRecoverySetting API. -func (client IdentityDomainsClient) GetAccountRecoverySetting(ctx context.Context, request GetAccountRecoverySettingRequest) (response GetAccountRecoverySettingResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyDevices.go.html to see an example of how to use ListMyDevices API. +func (client IdentityDomainsClient) ListMyDevices(ctx context.Context, request ListMyDevicesRequest) (response ListMyDevicesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -3385,42 +9833,42 @@ func (client IdentityDomainsClient) GetAccountRecoverySetting(ctx context.Contex request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getAccountRecoverySetting, policy) + ociResponse, err = common.Retry(ctx, request, client.listMyDevices, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetAccountRecoverySettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListMyDevicesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetAccountRecoverySettingResponse{} + response = ListMyDevicesResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetAccountRecoverySettingResponse); ok { + if convertedResponse, ok := ociResponse.(ListMyDevicesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetAccountRecoverySettingResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListMyDevicesResponse") } return } -// getAccountRecoverySetting implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getAccountRecoverySetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listMyDevices implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listMyDevices(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AccountRecoverySettings/{accountRecoverySettingId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyDevices", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetAccountRecoverySettingResponse + var response ListMyDevicesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetAccountRecoverySetting", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyDevices", apiReferenceLink) return response, err } @@ -3428,12 +9876,12 @@ func (client IdentityDomainsClient) getAccountRecoverySetting(ctx context.Contex return response, err } -// GetApiKey Get a user's API key. +// ListMyGroups Search for 'My Groups'. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetApiKey.go.html to see an example of how to use GetApiKey API. -func (client IdentityDomainsClient) GetApiKey(ctx context.Context, request GetApiKeyRequest) (response GetApiKeyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyGroups.go.html to see an example of how to use ListMyGroups API. +func (client IdentityDomainsClient) ListMyGroups(ctx context.Context, request ListMyGroupsRequest) (response ListMyGroupsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -3447,42 +9895,42 @@ func (client IdentityDomainsClient) GetApiKey(ctx context.Context, request GetAp request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getApiKey, policy) + ociResponse, err = common.Retry(ctx, request, client.listMyGroups, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetApiKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListMyGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetApiKeyResponse{} + response = ListMyGroupsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetApiKeyResponse); ok { + if convertedResponse, ok := ociResponse.(ListMyGroupsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetApiKeyResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListMyGroupsResponse") } return } -// getApiKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getApiKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listMyGroups implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listMyGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/ApiKeys/{apiKeyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyGroups", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetApiKeyResponse + var response ListMyGroupsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetApiKey", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyGroups", apiReferenceLink) return response, err } @@ -3490,12 +9938,12 @@ func (client IdentityDomainsClient) getApiKey(ctx context.Context, request commo return response, err } -// GetApp Get an App +// ListMyOAuth2ClientCredentials Search for a user's own OAuth2 client credential. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetApp.go.html to see an example of how to use GetApp API. -func (client IdentityDomainsClient) GetApp(ctx context.Context, request GetAppRequest) (response GetAppResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyOAuth2ClientCredentials.go.html to see an example of how to use ListMyOAuth2ClientCredentials API. +func (client IdentityDomainsClient) ListMyOAuth2ClientCredentials(ctx context.Context, request ListMyOAuth2ClientCredentialsRequest) (response ListMyOAuth2ClientCredentialsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -3509,42 +9957,42 @@ func (client IdentityDomainsClient) GetApp(ctx context.Context, request GetAppRe request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getApp, policy) + ociResponse, err = common.Retry(ctx, request, client.listMyOAuth2ClientCredentials, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetAppResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListMyOAuth2ClientCredentialsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetAppResponse{} + response = ListMyOAuth2ClientCredentialsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetAppResponse); ok { + if convertedResponse, ok := ociResponse.(ListMyOAuth2ClientCredentialsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetAppResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListMyOAuth2ClientCredentialsResponse") } return } -// getApp implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getApp(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listMyOAuth2ClientCredentials implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listMyOAuth2ClientCredentials(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Apps/{appId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyOAuth2ClientCredentials", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetAppResponse + var response ListMyOAuth2ClientCredentialsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetApp", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyOAuth2ClientCredentials", apiReferenceLink) return response, err } @@ -3552,12 +10000,12 @@ func (client IdentityDomainsClient) getApp(ctx context.Context, request common.O return response, err } -// GetAppRole Get an AppRole +// ListMyPendingApprovals Search My Approvals // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetAppRole.go.html to see an example of how to use GetAppRole API. -func (client IdentityDomainsClient) GetAppRole(ctx context.Context, request GetAppRoleRequest) (response GetAppRoleResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyPendingApprovals.go.html to see an example of how to use ListMyPendingApprovals API. +func (client IdentityDomainsClient) ListMyPendingApprovals(ctx context.Context, request ListMyPendingApprovalsRequest) (response ListMyPendingApprovalsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -3571,42 +10019,42 @@ func (client IdentityDomainsClient) GetAppRole(ctx context.Context, request GetA request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getAppRole, policy) + ociResponse, err = common.Retry(ctx, request, client.listMyPendingApprovals, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetAppRoleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListMyPendingApprovalsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetAppRoleResponse{} + response = ListMyPendingApprovalsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetAppRoleResponse); ok { + if convertedResponse, ok := ociResponse.(ListMyPendingApprovalsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetAppRoleResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListMyPendingApprovalsResponse") } return } -// getAppRole implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getAppRole(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listMyPendingApprovals implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listMyPendingApprovals(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AppRoles/{appRoleId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyPendingApprovals", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetAppRoleResponse + var response ListMyPendingApprovalsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetAppRole", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyPendingApprovals", apiReferenceLink) return response, err } @@ -3614,12 +10062,12 @@ func (client IdentityDomainsClient) getAppRole(ctx context.Context, request comm return response, err } -// GetAuthToken Get a user's Auth token. +// ListMyRequestableGroups Search My Requestable Groups // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetAuthToken.go.html to see an example of how to use GetAuthToken API. -func (client IdentityDomainsClient) GetAuthToken(ctx context.Context, request GetAuthTokenRequest) (response GetAuthTokenResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyRequestableGroups.go.html to see an example of how to use ListMyRequestableGroups API. +func (client IdentityDomainsClient) ListMyRequestableGroups(ctx context.Context, request ListMyRequestableGroupsRequest) (response ListMyRequestableGroupsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -3633,42 +10081,42 @@ func (client IdentityDomainsClient) GetAuthToken(ctx context.Context, request Ge request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getAuthToken, policy) + ociResponse, err = common.Retry(ctx, request, client.listMyRequestableGroups, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetAuthTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListMyRequestableGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetAuthTokenResponse{} + response = ListMyRequestableGroupsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetAuthTokenResponse); ok { + if convertedResponse, ok := ociResponse.(ListMyRequestableGroupsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetAuthTokenResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListMyRequestableGroupsResponse") } return } -// getAuthToken implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getAuthToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listMyRequestableGroups implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listMyRequestableGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AuthTokens/{authTokenId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyRequestableGroups", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetAuthTokenResponse + var response ListMyRequestableGroupsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetAuthToken", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyRequestableGroups", apiReferenceLink) return response, err } @@ -3676,12 +10124,12 @@ func (client IdentityDomainsClient) getAuthToken(ctx context.Context, request co return response, err } -// GetAuthenticationFactorSetting Get Authentication Factor Settings +// ListMyRequests Search My Requests // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetAuthenticationFactorSetting.go.html to see an example of how to use GetAuthenticationFactorSetting API. -func (client IdentityDomainsClient) GetAuthenticationFactorSetting(ctx context.Context, request GetAuthenticationFactorSettingRequest) (response GetAuthenticationFactorSettingResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyRequests.go.html to see an example of how to use ListMyRequests API. +func (client IdentityDomainsClient) ListMyRequests(ctx context.Context, request ListMyRequestsRequest) (response ListMyRequestsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -3695,42 +10143,42 @@ func (client IdentityDomainsClient) GetAuthenticationFactorSetting(ctx context.C request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getAuthenticationFactorSetting, policy) + ociResponse, err = common.Retry(ctx, request, client.listMyRequests, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetAuthenticationFactorSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListMyRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetAuthenticationFactorSettingResponse{} + response = ListMyRequestsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetAuthenticationFactorSettingResponse); ok { + if convertedResponse, ok := ociResponse.(ListMyRequestsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetAuthenticationFactorSettingResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListMyRequestsResponse") } return } -// getAuthenticationFactorSetting implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getAuthenticationFactorSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listMyRequests implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listMyRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AuthenticationFactorSettings/{authenticationFactorSettingId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyRequests", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetAuthenticationFactorSettingResponse + var response ListMyRequestsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetAuthenticationFactorSetting", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyRequests", apiReferenceLink) return response, err } @@ -3738,12 +10186,12 @@ func (client IdentityDomainsClient) getAuthenticationFactorSetting(ctx context.C return response, err } -// GetCustomerSecretKey Get a user's customer secret key. +// ListMySmtpCredentials Search for a user's own SMTP credential. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetCustomerSecretKey.go.html to see an example of how to use GetCustomerSecretKey API. -func (client IdentityDomainsClient) GetCustomerSecretKey(ctx context.Context, request GetCustomerSecretKeyRequest) (response GetCustomerSecretKeyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMySmtpCredentials.go.html to see an example of how to use ListMySmtpCredentials API. +func (client IdentityDomainsClient) ListMySmtpCredentials(ctx context.Context, request ListMySmtpCredentialsRequest) (response ListMySmtpCredentialsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -3757,42 +10205,42 @@ func (client IdentityDomainsClient) GetCustomerSecretKey(ctx context.Context, re request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getCustomerSecretKey, policy) + ociResponse, err = common.Retry(ctx, request, client.listMySmtpCredentials, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetCustomerSecretKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListMySmtpCredentialsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetCustomerSecretKeyResponse{} + response = ListMySmtpCredentialsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetCustomerSecretKeyResponse); ok { + if convertedResponse, ok := ociResponse.(ListMySmtpCredentialsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetCustomerSecretKeyResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListMySmtpCredentialsResponse") } return } -// getCustomerSecretKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getCustomerSecretKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listMySmtpCredentials implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listMySmtpCredentials(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/CustomerSecretKeys/{customerSecretKeyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MySmtpCredentials", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetCustomerSecretKeyResponse + var response ListMySmtpCredentialsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetCustomerSecretKey", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListMySmtpCredentials", apiReferenceLink) return response, err } @@ -3800,12 +10248,12 @@ func (client IdentityDomainsClient) getCustomerSecretKey(ctx context.Context, re return response, err } -// GetDynamicResourceGroup Get a Dynamic Resource Group. +// ListMySupportAccounts Search for a user's own support account. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetDynamicResourceGroup.go.html to see an example of how to use GetDynamicResourceGroup API. -func (client IdentityDomainsClient) GetDynamicResourceGroup(ctx context.Context, request GetDynamicResourceGroupRequest) (response GetDynamicResourceGroupResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMySupportAccounts.go.html to see an example of how to use ListMySupportAccounts API. +func (client IdentityDomainsClient) ListMySupportAccounts(ctx context.Context, request ListMySupportAccountsRequest) (response ListMySupportAccountsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -3819,42 +10267,42 @@ func (client IdentityDomainsClient) GetDynamicResourceGroup(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getDynamicResourceGroup, policy) + ociResponse, err = common.Retry(ctx, request, client.listMySupportAccounts, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetDynamicResourceGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListMySupportAccountsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetDynamicResourceGroupResponse{} + response = ListMySupportAccountsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetDynamicResourceGroupResponse); ok { + if convertedResponse, ok := ociResponse.(ListMySupportAccountsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetDynamicResourceGroupResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListMySupportAccountsResponse") } return } -// getDynamicResourceGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getDynamicResourceGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listMySupportAccounts implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listMySupportAccounts(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/DynamicResourceGroups/{dynamicResourceGroupId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MySupportAccounts", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetDynamicResourceGroupResponse + var response ListMySupportAccountsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetDynamicResourceGroup", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListMySupportAccounts", apiReferenceLink) return response, err } @@ -3862,12 +10310,12 @@ func (client IdentityDomainsClient) getDynamicResourceGroup(ctx context.Context, return response, err } -// GetGrant Get a Grant +// ListMyTrustedUserAgents Search Trusted User Agents // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetGrant.go.html to see an example of how to use GetGrant API. -func (client IdentityDomainsClient) GetGrant(ctx context.Context, request GetGrantRequest) (response GetGrantResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyTrustedUserAgents.go.html to see an example of how to use ListMyTrustedUserAgents API. +func (client IdentityDomainsClient) ListMyTrustedUserAgents(ctx context.Context, request ListMyTrustedUserAgentsRequest) (response ListMyTrustedUserAgentsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -3881,42 +10329,42 @@ func (client IdentityDomainsClient) GetGrant(ctx context.Context, request GetGra request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getGrant, policy) + ociResponse, err = common.Retry(ctx, request, client.listMyTrustedUserAgents, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetGrantResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListMyTrustedUserAgentsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetGrantResponse{} + response = ListMyTrustedUserAgentsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetGrantResponse); ok { + if convertedResponse, ok := ociResponse.(ListMyTrustedUserAgentsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetGrantResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListMyTrustedUserAgentsResponse") } return } -// getGrant implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getGrant(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listMyTrustedUserAgents implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listMyTrustedUserAgents(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Grants/{grantId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyTrustedUserAgents", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetGrantResponse + var response ListMyTrustedUserAgentsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetGrant", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyTrustedUserAgents", apiReferenceLink) return response, err } @@ -3924,12 +10372,12 @@ func (client IdentityDomainsClient) getGrant(ctx context.Context, request common return response, err } -// GetGroup Get a group. Important: The Group SEARCH and GET operations on users and members will throw an exception if the response has more than 10,000 members. To avoid the exception, use the pagination filter to GET or SEARCH group members. +// ListMyUserDbCredentials Search for a user's own database (DB) credential. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetGroup.go.html to see an example of how to use GetGroup API. -func (client IdentityDomainsClient) GetGroup(ctx context.Context, request GetGroupRequest) (response GetGroupResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyUserDbCredentials.go.html to see an example of how to use ListMyUserDbCredentials API. +func (client IdentityDomainsClient) ListMyUserDbCredentials(ctx context.Context, request ListMyUserDbCredentialsRequest) (response ListMyUserDbCredentialsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -3943,42 +10391,42 @@ func (client IdentityDomainsClient) GetGroup(ctx context.Context, request GetGro request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getGroup, policy) + ociResponse, err = common.Retry(ctx, request, client.listMyUserDbCredentials, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListMyUserDbCredentialsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetGroupResponse{} + response = ListMyUserDbCredentialsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetGroupResponse); ok { + if convertedResponse, ok := ociResponse.(ListMyUserDbCredentialsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetGroupResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListMyUserDbCredentialsResponse") } return } -// getGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listMyUserDbCredentials implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listMyUserDbCredentials(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Groups/{groupId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyUserDbCredentials", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetGroupResponse + var response ListMyUserDbCredentialsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetGroup", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyUserDbCredentials", apiReferenceLink) return response, err } @@ -3986,12 +10434,12 @@ func (client IdentityDomainsClient) getGroup(ctx context.Context, request common return response, err } -// GetIdentityProvider Get an Identity Provider +// ListNetworkPerimeters Search NetworkPerimeters // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetIdentityProvider.go.html to see an example of how to use GetIdentityProvider API. -func (client IdentityDomainsClient) GetIdentityProvider(ctx context.Context, request GetIdentityProviderRequest) (response GetIdentityProviderResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListNetworkPerimeters.go.html to see an example of how to use ListNetworkPerimeters API. +func (client IdentityDomainsClient) ListNetworkPerimeters(ctx context.Context, request ListNetworkPerimetersRequest) (response ListNetworkPerimetersResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -4005,42 +10453,42 @@ func (client IdentityDomainsClient) GetIdentityProvider(ctx context.Context, req request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getIdentityProvider, policy) + ociResponse, err = common.Retry(ctx, request, client.listNetworkPerimeters, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetIdentityProviderResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListNetworkPerimetersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetIdentityProviderResponse{} + response = ListNetworkPerimetersResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetIdentityProviderResponse); ok { + if convertedResponse, ok := ociResponse.(ListNetworkPerimetersResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetIdentityProviderResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListNetworkPerimetersResponse") } return } -// getIdentityProvider implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getIdentityProvider(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listNetworkPerimeters implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listNetworkPerimeters(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/IdentityProviders/{identityProviderId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/NetworkPerimeters", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetIdentityProviderResponse + var response ListNetworkPerimetersResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetIdentityProvider", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListNetworkPerimeters", apiReferenceLink) return response, err } @@ -4048,12 +10496,12 @@ func (client IdentityDomainsClient) getIdentityProvider(ctx context.Context, req return response, err } -// GetIdentitySetting Get an Identity setting. +// ListNotificationSettings Search Notification Settings // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetIdentitySetting.go.html to see an example of how to use GetIdentitySetting API. -func (client IdentityDomainsClient) GetIdentitySetting(ctx context.Context, request GetIdentitySettingRequest) (response GetIdentitySettingResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListNotificationSettings.go.html to see an example of how to use ListNotificationSettings API. +func (client IdentityDomainsClient) ListNotificationSettings(ctx context.Context, request ListNotificationSettingsRequest) (response ListNotificationSettingsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -4067,42 +10515,42 @@ func (client IdentityDomainsClient) GetIdentitySetting(ctx context.Context, requ request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getIdentitySetting, policy) + ociResponse, err = common.Retry(ctx, request, client.listNotificationSettings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetIdentitySettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListNotificationSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetIdentitySettingResponse{} + response = ListNotificationSettingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetIdentitySettingResponse); ok { + if convertedResponse, ok := ociResponse.(ListNotificationSettingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetIdentitySettingResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListNotificationSettingsResponse") } return } -// getIdentitySetting implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getIdentitySetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listNotificationSettings implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listNotificationSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/IdentitySettings/{identitySettingId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/NotificationSettings", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetIdentitySettingResponse + var response ListNotificationSettingsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetIdentitySetting", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListNotificationSettings", apiReferenceLink) return response, err } @@ -4110,12 +10558,12 @@ func (client IdentityDomainsClient) getIdentitySetting(ctx context.Context, requ return response, err } -// GetKmsiSetting Get KmsiSettings +// ListOAuth2ClientCredentials Search for a user's OAuth2 client credentials. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetKmsiSetting.go.html to see an example of how to use GetKmsiSetting API. -func (client IdentityDomainsClient) GetKmsiSetting(ctx context.Context, request GetKmsiSettingRequest) (response GetKmsiSettingResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListOAuth2ClientCredentials.go.html to see an example of how to use ListOAuth2ClientCredentials API. +func (client IdentityDomainsClient) ListOAuth2ClientCredentials(ctx context.Context, request ListOAuth2ClientCredentialsRequest) (response ListOAuth2ClientCredentialsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -4129,42 +10577,42 @@ func (client IdentityDomainsClient) GetKmsiSetting(ctx context.Context, request request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getKmsiSetting, policy) + ociResponse, err = common.Retry(ctx, request, client.listOAuth2ClientCredentials, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetKmsiSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListOAuth2ClientCredentialsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetKmsiSettingResponse{} + response = ListOAuth2ClientCredentialsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetKmsiSettingResponse); ok { + if convertedResponse, ok := ociResponse.(ListOAuth2ClientCredentialsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetKmsiSettingResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListOAuth2ClientCredentialsResponse") } return } -// getKmsiSetting implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getKmsiSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listOAuth2ClientCredentials implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listOAuth2ClientCredentials(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/KmsiSettings/{kmsiSettingId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/OAuth2ClientCredentials", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetKmsiSettingResponse + var response ListOAuth2ClientCredentialsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetKmsiSetting", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListOAuth2ClientCredentials", apiReferenceLink) return response, err } @@ -4172,12 +10620,12 @@ func (client IdentityDomainsClient) getKmsiSetting(ctx context.Context, request return response, err } -// GetMe Get a user's own information. +// ListOAuthClientCertificates Search OAuth Client Certificates // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMe.go.html to see an example of how to use GetMe API. -func (client IdentityDomainsClient) GetMe(ctx context.Context, request GetMeRequest) (response GetMeResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListOAuthClientCertificates.go.html to see an example of how to use ListOAuthClientCertificates API. +func (client IdentityDomainsClient) ListOAuthClientCertificates(ctx context.Context, request ListOAuthClientCertificatesRequest) (response ListOAuthClientCertificatesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -4191,42 +10639,42 @@ func (client IdentityDomainsClient) GetMe(ctx context.Context, request GetMeRequ request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getMe, policy) + ociResponse, err = common.Retry(ctx, request, client.listOAuthClientCertificates, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetMeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListOAuthClientCertificatesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetMeResponse{} + response = ListOAuthClientCertificatesResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetMeResponse); ok { + if convertedResponse, ok := ociResponse.(ListOAuthClientCertificatesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetMeResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListOAuthClientCertificatesResponse") } return } -// getMe implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getMe(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listOAuthClientCertificates implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listOAuthClientCertificates(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Me", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/OAuthClientCertificates", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetMeResponse + var response ListOAuthClientCertificatesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetMe", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListOAuthClientCertificates", apiReferenceLink) return response, err } @@ -4234,12 +10682,12 @@ func (client IdentityDomainsClient) getMe(ctx context.Context, request common.OC return response, err } -// GetMyApiKey Get a user's own API key. +// ListOAuthPartnerCertificates Search OAuth Partner Certificates // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyApiKey.go.html to see an example of how to use GetMyApiKey API. -func (client IdentityDomainsClient) GetMyApiKey(ctx context.Context, request GetMyApiKeyRequest) (response GetMyApiKeyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListOAuthPartnerCertificates.go.html to see an example of how to use ListOAuthPartnerCertificates API. +func (client IdentityDomainsClient) ListOAuthPartnerCertificates(ctx context.Context, request ListOAuthPartnerCertificatesRequest) (response ListOAuthPartnerCertificatesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -4253,42 +10701,42 @@ func (client IdentityDomainsClient) GetMyApiKey(ctx context.Context, request Get request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getMyApiKey, policy) + ociResponse, err = common.Retry(ctx, request, client.listOAuthPartnerCertificates, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetMyApiKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListOAuthPartnerCertificatesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetMyApiKeyResponse{} + response = ListOAuthPartnerCertificatesResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetMyApiKeyResponse); ok { + if convertedResponse, ok := ociResponse.(ListOAuthPartnerCertificatesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetMyApiKeyResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListOAuthPartnerCertificatesResponse") } return } -// getMyApiKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getMyApiKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listOAuthPartnerCertificates implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listOAuthPartnerCertificates(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyApiKeys/{myApiKeyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/OAuthPartnerCertificates", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetMyApiKeyResponse + var response ListOAuthPartnerCertificatesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetMyApiKey", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListOAuthPartnerCertificates", apiReferenceLink) return response, err } @@ -4296,12 +10744,12 @@ func (client IdentityDomainsClient) getMyApiKey(ctx context.Context, request com return response, err } -// GetMyAuthToken Get a user's own Auth token. +// ListPasswordPolicies Search for password policies. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyAuthToken.go.html to see an example of how to use GetMyAuthToken API. -func (client IdentityDomainsClient) GetMyAuthToken(ctx context.Context, request GetMyAuthTokenRequest) (response GetMyAuthTokenResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListPasswordPolicies.go.html to see an example of how to use ListPasswordPolicies API. +func (client IdentityDomainsClient) ListPasswordPolicies(ctx context.Context, request ListPasswordPoliciesRequest) (response ListPasswordPoliciesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -4315,42 +10763,42 @@ func (client IdentityDomainsClient) GetMyAuthToken(ctx context.Context, request request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getMyAuthToken, policy) + ociResponse, err = common.Retry(ctx, request, client.listPasswordPolicies, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetMyAuthTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPasswordPoliciesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetMyAuthTokenResponse{} + response = ListPasswordPoliciesResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetMyAuthTokenResponse); ok { + if convertedResponse, ok := ociResponse.(ListPasswordPoliciesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetMyAuthTokenResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPasswordPoliciesResponse") } return } -// getMyAuthToken implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getMyAuthToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPasswordPolicies implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listPasswordPolicies(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyAuthTokens/{myAuthTokenId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/PasswordPolicies", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetMyAuthTokenResponse + var response ListPasswordPoliciesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetMyAuthToken", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListPasswordPolicies", apiReferenceLink) return response, err } @@ -4358,12 +10806,12 @@ func (client IdentityDomainsClient) getMyAuthToken(ctx context.Context, request return response, err } -// GetMyCustomerSecretKey Get a user's own customer secret key. +// ListPolicies Search Policies // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyCustomerSecretKey.go.html to see an example of how to use GetMyCustomerSecretKey API. -func (client IdentityDomainsClient) GetMyCustomerSecretKey(ctx context.Context, request GetMyCustomerSecretKeyRequest) (response GetMyCustomerSecretKeyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListPolicies.go.html to see an example of how to use ListPolicies API. +func (client IdentityDomainsClient) ListPolicies(ctx context.Context, request ListPoliciesRequest) (response ListPoliciesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -4377,42 +10825,42 @@ func (client IdentityDomainsClient) GetMyCustomerSecretKey(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getMyCustomerSecretKey, policy) + ociResponse, err = common.Retry(ctx, request, client.listPolicies, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetMyCustomerSecretKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPoliciesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetMyCustomerSecretKeyResponse{} + response = ListPoliciesResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetMyCustomerSecretKeyResponse); ok { + if convertedResponse, ok := ociResponse.(ListPoliciesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetMyCustomerSecretKeyResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPoliciesResponse") } return } -// getMyCustomerSecretKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getMyCustomerSecretKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPolicies implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listPolicies(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyCustomerSecretKeys/{myCustomerSecretKeyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Policies", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetMyCustomerSecretKeyResponse + var response ListPoliciesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetMyCustomerSecretKey", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListPolicies", apiReferenceLink) return response, err } @@ -4420,12 +10868,12 @@ func (client IdentityDomainsClient) getMyCustomerSecretKey(ctx context.Context, return response, err } -// GetMyDevice Get a Device +// ListResourceTypeSchemaAttributes Search Resource Type Schema Attributes // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyDevice.go.html to see an example of how to use GetMyDevice API. -func (client IdentityDomainsClient) GetMyDevice(ctx context.Context, request GetMyDeviceRequest) (response GetMyDeviceResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListResourceTypeSchemaAttributes.go.html to see an example of how to use ListResourceTypeSchemaAttributes API. +func (client IdentityDomainsClient) ListResourceTypeSchemaAttributes(ctx context.Context, request ListResourceTypeSchemaAttributesRequest) (response ListResourceTypeSchemaAttributesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -4439,42 +10887,42 @@ func (client IdentityDomainsClient) GetMyDevice(ctx context.Context, request Get request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getMyDevice, policy) + ociResponse, err = common.Retry(ctx, request, client.listResourceTypeSchemaAttributes, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetMyDeviceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListResourceTypeSchemaAttributesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetMyDeviceResponse{} + response = ListResourceTypeSchemaAttributesResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetMyDeviceResponse); ok { + if convertedResponse, ok := ociResponse.(ListResourceTypeSchemaAttributesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetMyDeviceResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListResourceTypeSchemaAttributesResponse") } return } -// getMyDevice implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getMyDevice(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listResourceTypeSchemaAttributes implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listResourceTypeSchemaAttributes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyDevices/{myDeviceId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/ResourceTypeSchemaAttributes", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetMyDeviceResponse + var response ListResourceTypeSchemaAttributesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetMyDevice", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListResourceTypeSchemaAttributes", apiReferenceLink) return response, err } @@ -4482,12 +10930,12 @@ func (client IdentityDomainsClient) getMyDevice(ctx context.Context, request com return response, err } -// GetMyOAuth2ClientCredential Get a user's own OAuth2 client credential. +// ListRules Search Rules // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyOAuth2ClientCredential.go.html to see an example of how to use GetMyOAuth2ClientCredential API. -func (client IdentityDomainsClient) GetMyOAuth2ClientCredential(ctx context.Context, request GetMyOAuth2ClientCredentialRequest) (response GetMyOAuth2ClientCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListRules.go.html to see an example of how to use ListRules API. +func (client IdentityDomainsClient) ListRules(ctx context.Context, request ListRulesRequest) (response ListRulesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -4501,42 +10949,42 @@ func (client IdentityDomainsClient) GetMyOAuth2ClientCredential(ctx context.Cont request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getMyOAuth2ClientCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.listRules, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetMyOAuth2ClientCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListRulesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetMyOAuth2ClientCredentialResponse{} + response = ListRulesResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetMyOAuth2ClientCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(ListRulesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetMyOAuth2ClientCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListRulesResponse") } return } -// getMyOAuth2ClientCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getMyOAuth2ClientCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listRules implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listRules(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyOAuth2ClientCredentials/{myOAuth2ClientCredentialId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Rules", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetMyOAuth2ClientCredentialResponse + var response ListRulesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetMyOAuth2ClientCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListRules", apiReferenceLink) return response, err } @@ -4544,12 +10992,12 @@ func (client IdentityDomainsClient) getMyOAuth2ClientCredential(ctx context.Cont return response, err } -// GetMySmtpCredential Get a user's own SMTP credential. +// ListSchemas Search Schemas // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMySmtpCredential.go.html to see an example of how to use GetMySmtpCredential API. -func (client IdentityDomainsClient) GetMySmtpCredential(ctx context.Context, request GetMySmtpCredentialRequest) (response GetMySmtpCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListSchemas.go.html to see an example of how to use ListSchemas API. +func (client IdentityDomainsClient) ListSchemas(ctx context.Context, request ListSchemasRequest) (response ListSchemasResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -4563,42 +11011,42 @@ func (client IdentityDomainsClient) GetMySmtpCredential(ctx context.Context, req request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getMySmtpCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.listSchemas, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetMySmtpCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListSchemasResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetMySmtpCredentialResponse{} + response = ListSchemasResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetMySmtpCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(ListSchemasResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetMySmtpCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListSchemasResponse") } return } -// getMySmtpCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getMySmtpCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listSchemas implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listSchemas(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MySmtpCredentials/{mySmtpCredentialId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Schemas", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetMySmtpCredentialResponse + var response ListSchemasResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetMySmtpCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListSchemas", apiReferenceLink) return response, err } @@ -4606,12 +11054,12 @@ func (client IdentityDomainsClient) getMySmtpCredential(ctx context.Context, req return response, err } -// GetMySupportAccount Get a user's own support account. +// ListSecurityQuestionSettings Search for security question settings. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMySupportAccount.go.html to see an example of how to use GetMySupportAccount API. -func (client IdentityDomainsClient) GetMySupportAccount(ctx context.Context, request GetMySupportAccountRequest) (response GetMySupportAccountResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListSecurityQuestionSettings.go.html to see an example of how to use ListSecurityQuestionSettings API. +func (client IdentityDomainsClient) ListSecurityQuestionSettings(ctx context.Context, request ListSecurityQuestionSettingsRequest) (response ListSecurityQuestionSettingsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -4625,42 +11073,42 @@ func (client IdentityDomainsClient) GetMySupportAccount(ctx context.Context, req request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getMySupportAccount, policy) + ociResponse, err = common.Retry(ctx, request, client.listSecurityQuestionSettings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetMySupportAccountResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListSecurityQuestionSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetMySupportAccountResponse{} + response = ListSecurityQuestionSettingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetMySupportAccountResponse); ok { + if convertedResponse, ok := ociResponse.(ListSecurityQuestionSettingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetMySupportAccountResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListSecurityQuestionSettingsResponse") } return } -// getMySupportAccount implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getMySupportAccount(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listSecurityQuestionSettings implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listSecurityQuestionSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MySupportAccounts/{mySupportAccountId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/SecurityQuestionSettings", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetMySupportAccountResponse + var response ListSecurityQuestionSettingsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetMySupportAccount", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListSecurityQuestionSettings", apiReferenceLink) return response, err } @@ -4668,12 +11116,12 @@ func (client IdentityDomainsClient) getMySupportAccount(ctx context.Context, req return response, err } -// GetMyTrustedUserAgent Get a Trusted User Agent +// ListSecurityQuestions Search for security questions. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyTrustedUserAgent.go.html to see an example of how to use GetMyTrustedUserAgent API. -func (client IdentityDomainsClient) GetMyTrustedUserAgent(ctx context.Context, request GetMyTrustedUserAgentRequest) (response GetMyTrustedUserAgentResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListSecurityQuestions.go.html to see an example of how to use ListSecurityQuestions API. +func (client IdentityDomainsClient) ListSecurityQuestions(ctx context.Context, request ListSecurityQuestionsRequest) (response ListSecurityQuestionsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -4687,42 +11135,42 @@ func (client IdentityDomainsClient) GetMyTrustedUserAgent(ctx context.Context, r request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getMyTrustedUserAgent, policy) + ociResponse, err = common.Retry(ctx, request, client.listSecurityQuestions, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetMyTrustedUserAgentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListSecurityQuestionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetMyTrustedUserAgentResponse{} + response = ListSecurityQuestionsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetMyTrustedUserAgentResponse); ok { + if convertedResponse, ok := ociResponse.(ListSecurityQuestionsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetMyTrustedUserAgentResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListSecurityQuestionsResponse") } return } -// getMyTrustedUserAgent implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getMyTrustedUserAgent(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listSecurityQuestions implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listSecurityQuestions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyTrustedUserAgents/{myTrustedUserAgentId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/SecurityQuestions", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetMyTrustedUserAgentResponse + var response ListSecurityQuestionsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetMyTrustedUserAgent", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListSecurityQuestions", apiReferenceLink) return response, err } @@ -4730,12 +11178,12 @@ func (client IdentityDomainsClient) getMyTrustedUserAgent(ctx context.Context, r return response, err } -// GetMyUserDbCredential Get a user's own database (DB) credential. +// ListSelfRegistrationProfiles Search for self-registration profiles. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetMyUserDbCredential.go.html to see an example of how to use GetMyUserDbCredential API. -func (client IdentityDomainsClient) GetMyUserDbCredential(ctx context.Context, request GetMyUserDbCredentialRequest) (response GetMyUserDbCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListSelfRegistrationProfiles.go.html to see an example of how to use ListSelfRegistrationProfiles API. +func (client IdentityDomainsClient) ListSelfRegistrationProfiles(ctx context.Context, request ListSelfRegistrationProfilesRequest) (response ListSelfRegistrationProfilesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -4749,42 +11197,42 @@ func (client IdentityDomainsClient) GetMyUserDbCredential(ctx context.Context, r request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getMyUserDbCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.listSelfRegistrationProfiles, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetMyUserDbCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListSelfRegistrationProfilesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetMyUserDbCredentialResponse{} + response = ListSelfRegistrationProfilesResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetMyUserDbCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(ListSelfRegistrationProfilesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetMyUserDbCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListSelfRegistrationProfilesResponse") } return } -// getMyUserDbCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getMyUserDbCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listSelfRegistrationProfiles implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listSelfRegistrationProfiles(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyUserDbCredentials/{myUserDbCredentialId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/SelfRegistrationProfiles", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetMyUserDbCredentialResponse + var response ListSelfRegistrationProfilesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetMyUserDbCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListSelfRegistrationProfiles", apiReferenceLink) return response, err } @@ -4792,12 +11240,12 @@ func (client IdentityDomainsClient) getMyUserDbCredential(ctx context.Context, r return response, err } -// GetOAuth2ClientCredential Get a user's OAuth2 client credentials. +// ListSettings Search Settings // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetOAuth2ClientCredential.go.html to see an example of how to use GetOAuth2ClientCredential API. -func (client IdentityDomainsClient) GetOAuth2ClientCredential(ctx context.Context, request GetOAuth2ClientCredentialRequest) (response GetOAuth2ClientCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListSettings.go.html to see an example of how to use ListSettings API. +func (client IdentityDomainsClient) ListSettings(ctx context.Context, request ListSettingsRequest) (response ListSettingsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -4811,42 +11259,42 @@ func (client IdentityDomainsClient) GetOAuth2ClientCredential(ctx context.Contex request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getOAuth2ClientCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.listSettings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetOAuth2ClientCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetOAuth2ClientCredentialResponse{} + response = ListSettingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetOAuth2ClientCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(ListSettingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetOAuth2ClientCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListSettingsResponse") } return } -// getOAuth2ClientCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getOAuth2ClientCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listSettings implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/OAuth2ClientCredentials/{oAuth2ClientCredentialId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Settings", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetOAuth2ClientCredentialResponse + var response ListSettingsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetOAuth2ClientCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListSettings", apiReferenceLink) return response, err } @@ -4854,12 +11302,12 @@ func (client IdentityDomainsClient) getOAuth2ClientCredential(ctx context.Contex return response, err } -// GetPasswordPolicy Get a password policy. +// ListSmtpCredentials Search for SMTP credentials. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetPasswordPolicy.go.html to see an example of how to use GetPasswordPolicy API. -func (client IdentityDomainsClient) GetPasswordPolicy(ctx context.Context, request GetPasswordPolicyRequest) (response GetPasswordPolicyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListSmtpCredentials.go.html to see an example of how to use ListSmtpCredentials API. +func (client IdentityDomainsClient) ListSmtpCredentials(ctx context.Context, request ListSmtpCredentialsRequest) (response ListSmtpCredentialsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -4873,42 +11321,42 @@ func (client IdentityDomainsClient) GetPasswordPolicy(ctx context.Context, reque request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getPasswordPolicy, policy) + ociResponse, err = common.Retry(ctx, request, client.listSmtpCredentials, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetPasswordPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListSmtpCredentialsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetPasswordPolicyResponse{} + response = ListSmtpCredentialsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetPasswordPolicyResponse); ok { + if convertedResponse, ok := ociResponse.(ListSmtpCredentialsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetPasswordPolicyResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListSmtpCredentialsResponse") } return } -// getPasswordPolicy implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getPasswordPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listSmtpCredentials implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listSmtpCredentials(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/PasswordPolicies/{passwordPolicyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/SmtpCredentials", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetPasswordPolicyResponse + var response ListSmtpCredentialsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetPasswordPolicy", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListSmtpCredentials", apiReferenceLink) return response, err } @@ -4916,12 +11364,12 @@ func (client IdentityDomainsClient) getPasswordPolicy(ctx context.Context, reque return response, err } -// GetSecurityQuestion Get a security question. +// ListUserAttributesSettings Search User Schema Attribute Settings // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetSecurityQuestion.go.html to see an example of how to use GetSecurityQuestion API. -func (client IdentityDomainsClient) GetSecurityQuestion(ctx context.Context, request GetSecurityQuestionRequest) (response GetSecurityQuestionResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListUserAttributesSettings.go.html to see an example of how to use ListUserAttributesSettings API. +func (client IdentityDomainsClient) ListUserAttributesSettings(ctx context.Context, request ListUserAttributesSettingsRequest) (response ListUserAttributesSettingsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -4935,42 +11383,42 @@ func (client IdentityDomainsClient) GetSecurityQuestion(ctx context.Context, req request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getSecurityQuestion, policy) + ociResponse, err = common.Retry(ctx, request, client.listUserAttributesSettings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetSecurityQuestionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListUserAttributesSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetSecurityQuestionResponse{} + response = ListUserAttributesSettingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetSecurityQuestionResponse); ok { + if convertedResponse, ok := ociResponse.(ListUserAttributesSettingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetSecurityQuestionResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListUserAttributesSettingsResponse") } return } -// getSecurityQuestion implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getSecurityQuestion(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listUserAttributesSettings implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listUserAttributesSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/SecurityQuestions/{securityQuestionId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/UserAttributesSettings", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetSecurityQuestionResponse + var response ListUserAttributesSettingsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetSecurityQuestion", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListUserAttributesSettings", apiReferenceLink) return response, err } @@ -4978,12 +11426,12 @@ func (client IdentityDomainsClient) getSecurityQuestion(ctx context.Context, req return response, err } -// GetSecurityQuestionSetting Get a security question setting. +// ListUserDbCredentials Search for a user's database (DB) credentials. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetSecurityQuestionSetting.go.html to see an example of how to use GetSecurityQuestionSetting API. -func (client IdentityDomainsClient) GetSecurityQuestionSetting(ctx context.Context, request GetSecurityQuestionSettingRequest) (response GetSecurityQuestionSettingResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListUserDbCredentials.go.html to see an example of how to use ListUserDbCredentials API. +func (client IdentityDomainsClient) ListUserDbCredentials(ctx context.Context, request ListUserDbCredentialsRequest) (response ListUserDbCredentialsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -4997,42 +11445,42 @@ func (client IdentityDomainsClient) GetSecurityQuestionSetting(ctx context.Conte request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getSecurityQuestionSetting, policy) + ociResponse, err = common.Retry(ctx, request, client.listUserDbCredentials, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetSecurityQuestionSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListUserDbCredentialsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetSecurityQuestionSettingResponse{} + response = ListUserDbCredentialsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetSecurityQuestionSettingResponse); ok { + if convertedResponse, ok := ociResponse.(ListUserDbCredentialsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetSecurityQuestionSettingResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListUserDbCredentialsResponse") } return } -// getSecurityQuestionSetting implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getSecurityQuestionSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listUserDbCredentials implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listUserDbCredentials(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/SecurityQuestionSettings/{securityQuestionSettingId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/UserDbCredentials", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetSecurityQuestionSettingResponse + var response ListUserDbCredentialsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetSecurityQuestionSetting", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListUserDbCredentials", apiReferenceLink) return response, err } @@ -5040,12 +11488,12 @@ func (client IdentityDomainsClient) getSecurityQuestionSetting(ctx context.Conte return response, err } -// GetSmtpCredential Get a user's SMTP credentials. +// ListUsers Search for users. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetSmtpCredential.go.html to see an example of how to use GetSmtpCredential API. -func (client IdentityDomainsClient) GetSmtpCredential(ctx context.Context, request GetSmtpCredentialRequest) (response GetSmtpCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListUsers.go.html to see an example of how to use ListUsers API. +func (client IdentityDomainsClient) ListUsers(ctx context.Context, request ListUsersRequest) (response ListUsersResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -5059,42 +11507,42 @@ func (client IdentityDomainsClient) GetSmtpCredential(ctx context.Context, reque request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getSmtpCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.listUsers, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetSmtpCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListUsersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetSmtpCredentialResponse{} + response = ListUsersResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetSmtpCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(ListUsersResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetSmtpCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListUsersResponse") } return } -// getSmtpCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getSmtpCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listUsers implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) listUsers(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/SmtpCredentials/{smtpCredentialId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Users", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetSmtpCredentialResponse + var response ListUsersResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetSmtpCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "ListUsers", apiReferenceLink) return response, err } @@ -5102,12 +11550,12 @@ func (client IdentityDomainsClient) getSmtpCredential(ctx context.Context, reque return response, err } -// GetUser Get a user. +// PatchAccountRecoverySetting Update an account recovery setting. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetUser.go.html to see an example of how to use GetUser API. -func (client IdentityDomainsClient) GetUser(ctx context.Context, request GetUserRequest) (response GetUserResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchAccountRecoverySetting.go.html to see an example of how to use PatchAccountRecoverySetting API. +func (client IdentityDomainsClient) PatchAccountRecoverySetting(ctx context.Context, request PatchAccountRecoverySettingRequest) (response PatchAccountRecoverySettingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -5121,42 +11569,42 @@ func (client IdentityDomainsClient) GetUser(ctx context.Context, request GetUser request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getUser, policy) + ociResponse, err = common.Retry(ctx, request, client.patchAccountRecoverySetting, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetUserResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchAccountRecoverySettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetUserResponse{} + response = PatchAccountRecoverySettingResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetUserResponse); ok { + if convertedResponse, ok := ociResponse.(PatchAccountRecoverySettingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetUserResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchAccountRecoverySettingResponse") } return } -// getUser implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getUser(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchAccountRecoverySetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchAccountRecoverySetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Users/{userId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/AccountRecoverySettings/{accountRecoverySettingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetUserResponse + var response PatchAccountRecoverySettingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetUser", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchAccountRecoverySetting", apiReferenceLink) return response, err } @@ -5164,12 +11612,12 @@ func (client IdentityDomainsClient) getUser(ctx context.Context, request common. return response, err } -// GetUserAttributesSetting Get User Schema Attribute Settings +// PatchApiKey Update a user's API key. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetUserAttributesSetting.go.html to see an example of how to use GetUserAttributesSetting API. -func (client IdentityDomainsClient) GetUserAttributesSetting(ctx context.Context, request GetUserAttributesSettingRequest) (response GetUserAttributesSettingResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchApiKey.go.html to see an example of how to use PatchApiKey API. +func (client IdentityDomainsClient) PatchApiKey(ctx context.Context, request PatchApiKeyRequest) (response PatchApiKeyResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -5183,42 +11631,42 @@ func (client IdentityDomainsClient) GetUserAttributesSetting(ctx context.Context request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getUserAttributesSetting, policy) + ociResponse, err = common.Retry(ctx, request, client.patchApiKey, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetUserAttributesSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchApiKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetUserAttributesSettingResponse{} + response = PatchApiKeyResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetUserAttributesSettingResponse); ok { + if convertedResponse, ok := ociResponse.(PatchApiKeyResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetUserAttributesSettingResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchApiKeyResponse") } return } -// getUserAttributesSetting implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getUserAttributesSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchApiKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchApiKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/UserAttributesSettings/{userAttributesSettingId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/ApiKeys/{apiKeyId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetUserAttributesSettingResponse + var response PatchApiKeyResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetUserAttributesSetting", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchApiKey", apiReferenceLink) return response, err } @@ -5226,12 +11674,12 @@ func (client IdentityDomainsClient) getUserAttributesSetting(ctx context.Context return response, err } -// GetUserDbCredential Get a user's database (DB) credentials. +// PatchApp Update an App // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/GetUserDbCredential.go.html to see an example of how to use GetUserDbCredential API. -func (client IdentityDomainsClient) GetUserDbCredential(ctx context.Context, request GetUserDbCredentialRequest) (response GetUserDbCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchApp.go.html to see an example of how to use PatchApp API. +func (client IdentityDomainsClient) PatchApp(ctx context.Context, request PatchAppRequest) (response PatchAppResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -5245,42 +11693,42 @@ func (client IdentityDomainsClient) GetUserDbCredential(ctx context.Context, req request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.getUserDbCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.patchApp, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetUserDbCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchAppResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetUserDbCredentialResponse{} + response = PatchAppResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetUserDbCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(PatchAppResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetUserDbCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchAppResponse") } return } -// getUserDbCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) getUserDbCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchApp implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchApp(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/UserDbCredentials/{userDbCredentialId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/Apps/{appId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetUserDbCredentialResponse + var response PatchAppResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "GetUserDbCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchApp", apiReferenceLink) return response, err } @@ -5288,12 +11736,12 @@ func (client IdentityDomainsClient) getUserDbCredential(ctx context.Context, req return response, err } -// ListAccountMgmtInfos Search Account Mgmt Info +// PatchAppRole Update an AppRole // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListAccountMgmtInfos.go.html to see an example of how to use ListAccountMgmtInfos API. -func (client IdentityDomainsClient) ListAccountMgmtInfos(ctx context.Context, request ListAccountMgmtInfosRequest) (response ListAccountMgmtInfosResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchAppRole.go.html to see an example of how to use PatchAppRole API. +func (client IdentityDomainsClient) PatchAppRole(ctx context.Context, request PatchAppRoleRequest) (response PatchAppRoleResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -5307,42 +11755,42 @@ func (client IdentityDomainsClient) ListAccountMgmtInfos(ctx context.Context, re request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listAccountMgmtInfos, policy) + ociResponse, err = common.Retry(ctx, request, client.patchAppRole, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListAccountMgmtInfosResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchAppRoleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListAccountMgmtInfosResponse{} + response = PatchAppRoleResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListAccountMgmtInfosResponse); ok { + if convertedResponse, ok := ociResponse.(PatchAppRoleResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListAccountMgmtInfosResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchAppRoleResponse") } return } -// listAccountMgmtInfos implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listAccountMgmtInfos(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchAppRole implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchAppRole(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AccountMgmtInfos", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/AppRoles/{appRoleId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListAccountMgmtInfosResponse + var response PatchAppRoleResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListAccountMgmtInfos", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchAppRole", apiReferenceLink) return response, err } @@ -5350,12 +11798,12 @@ func (client IdentityDomainsClient) listAccountMgmtInfos(ctx context.Context, re return response, err } -// ListAccountRecoverySettings Search for account recovery settings. +// PatchApprovalWorkflow Update ApprovalWorkflow // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListAccountRecoverySettings.go.html to see an example of how to use ListAccountRecoverySettings API. -func (client IdentityDomainsClient) ListAccountRecoverySettings(ctx context.Context, request ListAccountRecoverySettingsRequest) (response ListAccountRecoverySettingsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchApprovalWorkflow.go.html to see an example of how to use PatchApprovalWorkflow API. +func (client IdentityDomainsClient) PatchApprovalWorkflow(ctx context.Context, request PatchApprovalWorkflowRequest) (response PatchApprovalWorkflowResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -5369,42 +11817,42 @@ func (client IdentityDomainsClient) ListAccountRecoverySettings(ctx context.Cont request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listAccountRecoverySettings, policy) + ociResponse, err = common.Retry(ctx, request, client.patchApprovalWorkflow, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListAccountRecoverySettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchApprovalWorkflowResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListAccountRecoverySettingsResponse{} + response = PatchApprovalWorkflowResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListAccountRecoverySettingsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchApprovalWorkflowResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListAccountRecoverySettingsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchApprovalWorkflowResponse") } return } -// listAccountRecoverySettings implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listAccountRecoverySettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchApprovalWorkflow implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchApprovalWorkflow(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AccountRecoverySettings", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/ApprovalWorkflows/{approvalWorkflowId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListAccountRecoverySettingsResponse + var response PatchApprovalWorkflowResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListAccountRecoverySettings", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchApprovalWorkflow", apiReferenceLink) return response, err } @@ -5412,12 +11860,12 @@ func (client IdentityDomainsClient) listAccountRecoverySettings(ctx context.Cont return response, err } -// ListApiKeys Search API keys. +// PatchApprovalWorkflowStep Update ApprovalWorkflowStep // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListApiKeys.go.html to see an example of how to use ListApiKeys API. -func (client IdentityDomainsClient) ListApiKeys(ctx context.Context, request ListApiKeysRequest) (response ListApiKeysResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchApprovalWorkflowStep.go.html to see an example of how to use PatchApprovalWorkflowStep API. +func (client IdentityDomainsClient) PatchApprovalWorkflowStep(ctx context.Context, request PatchApprovalWorkflowStepRequest) (response PatchApprovalWorkflowStepResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -5431,42 +11879,42 @@ func (client IdentityDomainsClient) ListApiKeys(ctx context.Context, request Lis request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listApiKeys, policy) + ociResponse, err = common.Retry(ctx, request, client.patchApprovalWorkflowStep, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListApiKeysResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchApprovalWorkflowStepResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListApiKeysResponse{} + response = PatchApprovalWorkflowStepResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListApiKeysResponse); ok { + if convertedResponse, ok := ociResponse.(PatchApprovalWorkflowStepResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListApiKeysResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchApprovalWorkflowStepResponse") } return } -// listApiKeys implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listApiKeys(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchApprovalWorkflowStep implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchApprovalWorkflowStep(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/ApiKeys", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/ApprovalWorkflowSteps/{approvalWorkflowStepId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListApiKeysResponse + var response PatchApprovalWorkflowStepResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListApiKeys", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchApprovalWorkflowStep", apiReferenceLink) return response, err } @@ -5474,12 +11922,12 @@ func (client IdentityDomainsClient) listApiKeys(ctx context.Context, request com return response, err } -// ListAppRoles Search AppRoles +// PatchAuthToken Update a user's Auth token. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListAppRoles.go.html to see an example of how to use ListAppRoles API. -func (client IdentityDomainsClient) ListAppRoles(ctx context.Context, request ListAppRolesRequest) (response ListAppRolesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchAuthToken.go.html to see an example of how to use PatchAuthToken API. +func (client IdentityDomainsClient) PatchAuthToken(ctx context.Context, request PatchAuthTokenRequest) (response PatchAuthTokenResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -5493,42 +11941,42 @@ func (client IdentityDomainsClient) ListAppRoles(ctx context.Context, request Li request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listAppRoles, policy) + ociResponse, err = common.Retry(ctx, request, client.patchAuthToken, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListAppRolesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchAuthTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListAppRolesResponse{} + response = PatchAuthTokenResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListAppRolesResponse); ok { + if convertedResponse, ok := ociResponse.(PatchAuthTokenResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListAppRolesResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchAuthTokenResponse") } return } -// listAppRoles implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listAppRoles(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchAuthToken implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchAuthToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AppRoles", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/AuthTokens/{authTokenId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListAppRolesResponse + var response PatchAuthTokenResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListAppRoles", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchAuthToken", apiReferenceLink) return response, err } @@ -5536,12 +11984,12 @@ func (client IdentityDomainsClient) listAppRoles(ctx context.Context, request co return response, err } -// ListApps Search Apps +// PatchCloudGate Update a Cloud Gate // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListApps.go.html to see an example of how to use ListApps API. -func (client IdentityDomainsClient) ListApps(ctx context.Context, request ListAppsRequest) (response ListAppsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchCloudGate.go.html to see an example of how to use PatchCloudGate API. +func (client IdentityDomainsClient) PatchCloudGate(ctx context.Context, request PatchCloudGateRequest) (response PatchCloudGateResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -5555,42 +12003,42 @@ func (client IdentityDomainsClient) ListApps(ctx context.Context, request ListAp request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listApps, policy) + ociResponse, err = common.Retry(ctx, request, client.patchCloudGate, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListAppsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchCloudGateResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListAppsResponse{} + response = PatchCloudGateResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListAppsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchCloudGateResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListAppsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchCloudGateResponse") } return } -// listApps implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listApps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchCloudGate implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchCloudGate(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Apps", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/CloudGates/{cloudGateId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListAppsResponse + var response PatchCloudGateResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListApps", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchCloudGate", apiReferenceLink) return response, err } @@ -5598,12 +12046,12 @@ func (client IdentityDomainsClient) listApps(ctx context.Context, request common return response, err } -// ListAuthTokens Search for Auth tokens. +// PatchCloudGateMapping Update a Cloud Gate mapping // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListAuthTokens.go.html to see an example of how to use ListAuthTokens API. -func (client IdentityDomainsClient) ListAuthTokens(ctx context.Context, request ListAuthTokensRequest) (response ListAuthTokensResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchCloudGateMapping.go.html to see an example of how to use PatchCloudGateMapping API. +func (client IdentityDomainsClient) PatchCloudGateMapping(ctx context.Context, request PatchCloudGateMappingRequest) (response PatchCloudGateMappingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -5617,42 +12065,42 @@ func (client IdentityDomainsClient) ListAuthTokens(ctx context.Context, request request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listAuthTokens, policy) + ociResponse, err = common.Retry(ctx, request, client.patchCloudGateMapping, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListAuthTokensResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchCloudGateMappingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListAuthTokensResponse{} + response = PatchCloudGateMappingResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListAuthTokensResponse); ok { + if convertedResponse, ok := ociResponse.(PatchCloudGateMappingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListAuthTokensResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchCloudGateMappingResponse") } return } -// listAuthTokens implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listAuthTokens(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchCloudGateMapping implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchCloudGateMapping(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AuthTokens", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/CloudGateMappings/{cloudGateMappingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListAuthTokensResponse + var response PatchCloudGateMappingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListAuthTokens", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchCloudGateMapping", apiReferenceLink) return response, err } @@ -5660,12 +12108,12 @@ func (client IdentityDomainsClient) listAuthTokens(ctx context.Context, request return response, err } -// ListAuthenticationFactorSettings Search Authentication Factor Settings +// PatchCloudGateServer Update a Cloud Gate server // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListAuthenticationFactorSettings.go.html to see an example of how to use ListAuthenticationFactorSettings API. -func (client IdentityDomainsClient) ListAuthenticationFactorSettings(ctx context.Context, request ListAuthenticationFactorSettingsRequest) (response ListAuthenticationFactorSettingsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchCloudGateServer.go.html to see an example of how to use PatchCloudGateServer API. +func (client IdentityDomainsClient) PatchCloudGateServer(ctx context.Context, request PatchCloudGateServerRequest) (response PatchCloudGateServerResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -5679,42 +12127,42 @@ func (client IdentityDomainsClient) ListAuthenticationFactorSettings(ctx context request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listAuthenticationFactorSettings, policy) + ociResponse, err = common.Retry(ctx, request, client.patchCloudGateServer, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListAuthenticationFactorSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchCloudGateServerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListAuthenticationFactorSettingsResponse{} + response = PatchCloudGateServerResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListAuthenticationFactorSettingsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchCloudGateServerResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListAuthenticationFactorSettingsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchCloudGateServerResponse") } return } -// listAuthenticationFactorSettings implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listAuthenticationFactorSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchCloudGateServer implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchCloudGateServer(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/AuthenticationFactorSettings", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/CloudGateServers/{cloudGateServerId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListAuthenticationFactorSettingsResponse + var response PatchCloudGateServerResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListAuthenticationFactorSettings", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchCloudGateServer", apiReferenceLink) return response, err } @@ -5722,12 +12170,12 @@ func (client IdentityDomainsClient) listAuthenticationFactorSettings(ctx context return response, err } -// ListCustomerSecretKeys Search for a user's customer secret keys. +// PatchCondition Update a Condition // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListCustomerSecretKeys.go.html to see an example of how to use ListCustomerSecretKeys API. -func (client IdentityDomainsClient) ListCustomerSecretKeys(ctx context.Context, request ListCustomerSecretKeysRequest) (response ListCustomerSecretKeysResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchCondition.go.html to see an example of how to use PatchCondition API. +func (client IdentityDomainsClient) PatchCondition(ctx context.Context, request PatchConditionRequest) (response PatchConditionResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -5741,42 +12189,42 @@ func (client IdentityDomainsClient) ListCustomerSecretKeys(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listCustomerSecretKeys, policy) + ociResponse, err = common.Retry(ctx, request, client.patchCondition, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListCustomerSecretKeysResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchConditionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListCustomerSecretKeysResponse{} + response = PatchConditionResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListCustomerSecretKeysResponse); ok { + if convertedResponse, ok := ociResponse.(PatchConditionResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListCustomerSecretKeysResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchConditionResponse") } return } -// listCustomerSecretKeys implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listCustomerSecretKeys(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchCondition implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchCondition(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/CustomerSecretKeys", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/Conditions/{conditionId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListCustomerSecretKeysResponse + var response PatchConditionResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListCustomerSecretKeys", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchCondition", apiReferenceLink) return response, err } @@ -5784,12 +12232,12 @@ func (client IdentityDomainsClient) listCustomerSecretKeys(ctx context.Context, return response, err } -// ListDynamicResourceGroups Search for Dynamic Resource Groups. +// PatchCustomerSecretKey Update a user's customer secret key. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListDynamicResourceGroups.go.html to see an example of how to use ListDynamicResourceGroups API. -func (client IdentityDomainsClient) ListDynamicResourceGroups(ctx context.Context, request ListDynamicResourceGroupsRequest) (response ListDynamicResourceGroupsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchCustomerSecretKey.go.html to see an example of how to use PatchCustomerSecretKey API. +func (client IdentityDomainsClient) PatchCustomerSecretKey(ctx context.Context, request PatchCustomerSecretKeyRequest) (response PatchCustomerSecretKeyResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -5803,42 +12251,42 @@ func (client IdentityDomainsClient) ListDynamicResourceGroups(ctx context.Contex request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listDynamicResourceGroups, policy) + ociResponse, err = common.Retry(ctx, request, client.patchCustomerSecretKey, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListDynamicResourceGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchCustomerSecretKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListDynamicResourceGroupsResponse{} + response = PatchCustomerSecretKeyResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListDynamicResourceGroupsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchCustomerSecretKeyResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListDynamicResourceGroupsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchCustomerSecretKeyResponse") } return } -// listDynamicResourceGroups implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listDynamicResourceGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchCustomerSecretKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchCustomerSecretKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/DynamicResourceGroups", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/CustomerSecretKeys/{customerSecretKeyId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListDynamicResourceGroupsResponse + var response PatchCustomerSecretKeyResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListDynamicResourceGroups", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchCustomerSecretKey", apiReferenceLink) return response, err } @@ -5846,12 +12294,12 @@ func (client IdentityDomainsClient) listDynamicResourceGroups(ctx context.Contex return response, err } -// ListGrants Search Grants +// PatchDynamicResourceGroup Update a Dynamic Resource Group. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListGrants.go.html to see an example of how to use ListGrants API. -func (client IdentityDomainsClient) ListGrants(ctx context.Context, request ListGrantsRequest) (response ListGrantsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchDynamicResourceGroup.go.html to see an example of how to use PatchDynamicResourceGroup API. +func (client IdentityDomainsClient) PatchDynamicResourceGroup(ctx context.Context, request PatchDynamicResourceGroupRequest) (response PatchDynamicResourceGroupResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -5865,42 +12313,42 @@ func (client IdentityDomainsClient) ListGrants(ctx context.Context, request List request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listGrants, policy) + ociResponse, err = common.Retry(ctx, request, client.patchDynamicResourceGroup, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListGrantsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchDynamicResourceGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListGrantsResponse{} + response = PatchDynamicResourceGroupResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListGrantsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchDynamicResourceGroupResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListGrantsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchDynamicResourceGroupResponse") } return } -// listGrants implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listGrants(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchDynamicResourceGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchDynamicResourceGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Grants", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/DynamicResourceGroups/{dynamicResourceGroupId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListGrantsResponse + var response PatchDynamicResourceGroupResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListGrants", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchDynamicResourceGroup", apiReferenceLink) return response, err } @@ -5908,12 +12356,12 @@ func (client IdentityDomainsClient) listGrants(ctx context.Context, request comm return response, err } -// ListGroups Search for groups. Important: The Group SEARCH and GET operations on users and members will throw an exception if the response has more than 10,000 members. To avoid the exception, use the pagination filter to GET or SEARCH group members. +// PatchGrant Update a Grant // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListGroups.go.html to see an example of how to use ListGroups API. -func (client IdentityDomainsClient) ListGroups(ctx context.Context, request ListGroupsRequest) (response ListGroupsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchGrant.go.html to see an example of how to use PatchGrant API. +func (client IdentityDomainsClient) PatchGrant(ctx context.Context, request PatchGrantRequest) (response PatchGrantResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -5927,42 +12375,42 @@ func (client IdentityDomainsClient) ListGroups(ctx context.Context, request List request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listGroups, policy) + ociResponse, err = common.Retry(ctx, request, client.patchGrant, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchGrantResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListGroupsResponse{} + response = PatchGrantResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListGroupsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchGrantResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListGroupsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchGrantResponse") } return } -// listGroups implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchGrant implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchGrant(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Groups", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/Grants/{grantId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListGroupsResponse + var response PatchGrantResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListGroups", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchGrant", apiReferenceLink) return response, err } @@ -5970,12 +12418,12 @@ func (client IdentityDomainsClient) listGroups(ctx context.Context, request comm return response, err } -// ListIdentityProviders Search Identity Providers +// PatchGroup Update a group. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListIdentityProviders.go.html to see an example of how to use ListIdentityProviders API. -func (client IdentityDomainsClient) ListIdentityProviders(ctx context.Context, request ListIdentityProvidersRequest) (response ListIdentityProvidersResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchGroup.go.html to see an example of how to use PatchGroup API. +func (client IdentityDomainsClient) PatchGroup(ctx context.Context, request PatchGroupRequest) (response PatchGroupResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -5989,42 +12437,42 @@ func (client IdentityDomainsClient) ListIdentityProviders(ctx context.Context, r request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listIdentityProviders, policy) + ociResponse, err = common.Retry(ctx, request, client.patchGroup, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListIdentityProvidersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListIdentityProvidersResponse{} + response = PatchGroupResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListIdentityProvidersResponse); ok { + if convertedResponse, ok := ociResponse.(PatchGroupResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListIdentityProvidersResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchGroupResponse") } return } -// listIdentityProviders implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listIdentityProviders(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/IdentityProviders", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/Groups/{groupId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListIdentityProvidersResponse + var response PatchGroupResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListIdentityProviders", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchGroup", apiReferenceLink) return response, err } @@ -6032,12 +12480,12 @@ func (client IdentityDomainsClient) listIdentityProviders(ctx context.Context, r return response, err } -// ListIdentitySettings Search for Identity settings. +// PatchIdentityProvider Update an Identity Provider // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListIdentitySettings.go.html to see an example of how to use ListIdentitySettings API. -func (client IdentityDomainsClient) ListIdentitySettings(ctx context.Context, request ListIdentitySettingsRequest) (response ListIdentitySettingsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchIdentityProvider.go.html to see an example of how to use PatchIdentityProvider API. +func (client IdentityDomainsClient) PatchIdentityProvider(ctx context.Context, request PatchIdentityProviderRequest) (response PatchIdentityProviderResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -6051,42 +12499,42 @@ func (client IdentityDomainsClient) ListIdentitySettings(ctx context.Context, re request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listIdentitySettings, policy) + ociResponse, err = common.Retry(ctx, request, client.patchIdentityProvider, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListIdentitySettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchIdentityProviderResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListIdentitySettingsResponse{} + response = PatchIdentityProviderResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListIdentitySettingsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchIdentityProviderResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListIdentitySettingsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchIdentityProviderResponse") } return } -// listIdentitySettings implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listIdentitySettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchIdentityProvider implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchIdentityProvider(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/IdentitySettings", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/IdentityProviders/{identityProviderId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListIdentitySettingsResponse + var response PatchIdentityProviderResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListIdentitySettings", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchIdentityProvider", apiReferenceLink) return response, err } @@ -6094,12 +12542,12 @@ func (client IdentityDomainsClient) listIdentitySettings(ctx context.Context, re return response, err } -// ListKmsiSettings Search KmsiSettings +// PatchIdentitySetting Update an Identity setting. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListKmsiSettings.go.html to see an example of how to use ListKmsiSettings API. -func (client IdentityDomainsClient) ListKmsiSettings(ctx context.Context, request ListKmsiSettingsRequest) (response ListKmsiSettingsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchIdentitySetting.go.html to see an example of how to use PatchIdentitySetting API. +func (client IdentityDomainsClient) PatchIdentitySetting(ctx context.Context, request PatchIdentitySettingRequest) (response PatchIdentitySettingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -6113,42 +12561,42 @@ func (client IdentityDomainsClient) ListKmsiSettings(ctx context.Context, reques request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listKmsiSettings, policy) + ociResponse, err = common.Retry(ctx, request, client.patchIdentitySetting, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListKmsiSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchIdentitySettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListKmsiSettingsResponse{} + response = PatchIdentitySettingResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListKmsiSettingsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchIdentitySettingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListKmsiSettingsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchIdentitySettingResponse") } return } -// listKmsiSettings implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listKmsiSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchIdentitySetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchIdentitySetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/KmsiSettings", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/IdentitySettings/{identitySettingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListKmsiSettingsResponse + var response PatchIdentitySettingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListKmsiSettings", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchIdentitySetting", apiReferenceLink) return response, err } @@ -6156,12 +12604,12 @@ func (client IdentityDomainsClient) listKmsiSettings(ctx context.Context, reques return response, err } -// ListMyApiKeys Search for a user's own API key. +// PatchKmsiSetting Update a Setting // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyApiKeys.go.html to see an example of how to use ListMyApiKeys API. -func (client IdentityDomainsClient) ListMyApiKeys(ctx context.Context, request ListMyApiKeysRequest) (response ListMyApiKeysResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchKmsiSetting.go.html to see an example of how to use PatchKmsiSetting API. +func (client IdentityDomainsClient) PatchKmsiSetting(ctx context.Context, request PatchKmsiSettingRequest) (response PatchKmsiSettingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -6175,42 +12623,42 @@ func (client IdentityDomainsClient) ListMyApiKeys(ctx context.Context, request L request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listMyApiKeys, policy) + ociResponse, err = common.Retry(ctx, request, client.patchKmsiSetting, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListMyApiKeysResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchKmsiSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListMyApiKeysResponse{} + response = PatchKmsiSettingResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListMyApiKeysResponse); ok { + if convertedResponse, ok := ociResponse.(PatchKmsiSettingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMyApiKeysResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchKmsiSettingResponse") } return } -// listMyApiKeys implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listMyApiKeys(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchKmsiSetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchKmsiSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyApiKeys", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/KmsiSettings/{kmsiSettingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListMyApiKeysResponse + var response PatchKmsiSettingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyApiKeys", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchKmsiSetting", apiReferenceLink) return response, err } @@ -6218,12 +12666,12 @@ func (client IdentityDomainsClient) listMyApiKeys(ctx context.Context, request c return response, err } -// ListMyApps Search My Apps +// PatchMe Update a user's own information. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyApps.go.html to see an example of how to use ListMyApps API. -func (client IdentityDomainsClient) ListMyApps(ctx context.Context, request ListMyAppsRequest) (response ListMyAppsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchMe.go.html to see an example of how to use PatchMe API. +func (client IdentityDomainsClient) PatchMe(ctx context.Context, request PatchMeRequest) (response PatchMeResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -6237,42 +12685,42 @@ func (client IdentityDomainsClient) ListMyApps(ctx context.Context, request List request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listMyApps, policy) + ociResponse, err = common.Retry(ctx, request, client.patchMe, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListMyAppsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchMeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListMyAppsResponse{} + response = PatchMeResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListMyAppsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchMeResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMyAppsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchMeResponse") } return } -// listMyApps implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listMyApps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchMe implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchMe(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyApps", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/Me", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListMyAppsResponse + var response PatchMeResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyApps", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchMe", apiReferenceLink) return response, err } @@ -6280,12 +12728,12 @@ func (client IdentityDomainsClient) listMyApps(ctx context.Context, request comm return response, err } -// ListMyAuthTokens Search for a user's own Auth token. +// PatchMyApiKey Update a user's own API key. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyAuthTokens.go.html to see an example of how to use ListMyAuthTokens API. -func (client IdentityDomainsClient) ListMyAuthTokens(ctx context.Context, request ListMyAuthTokensRequest) (response ListMyAuthTokensResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchMyApiKey.go.html to see an example of how to use PatchMyApiKey API. +func (client IdentityDomainsClient) PatchMyApiKey(ctx context.Context, request PatchMyApiKeyRequest) (response PatchMyApiKeyResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -6299,42 +12747,42 @@ func (client IdentityDomainsClient) ListMyAuthTokens(ctx context.Context, reques request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listMyAuthTokens, policy) + ociResponse, err = common.Retry(ctx, request, client.patchMyApiKey, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListMyAuthTokensResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchMyApiKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListMyAuthTokensResponse{} + response = PatchMyApiKeyResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListMyAuthTokensResponse); ok { + if convertedResponse, ok := ociResponse.(PatchMyApiKeyResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMyAuthTokensResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchMyApiKeyResponse") } return } -// listMyAuthTokens implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listMyAuthTokens(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchMyApiKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchMyApiKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyAuthTokens", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/MyApiKeys/{myApiKeyId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListMyAuthTokensResponse + var response PatchMyApiKeyResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyAuthTokens", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchMyApiKey", apiReferenceLink) return response, err } @@ -6342,12 +12790,12 @@ func (client IdentityDomainsClient) listMyAuthTokens(ctx context.Context, reques return response, err } -// ListMyCustomerSecretKeys Search for a user's own customer secret key. +// PatchMyAuthToken Update a user's own Auth token. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyCustomerSecretKeys.go.html to see an example of how to use ListMyCustomerSecretKeys API. -func (client IdentityDomainsClient) ListMyCustomerSecretKeys(ctx context.Context, request ListMyCustomerSecretKeysRequest) (response ListMyCustomerSecretKeysResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchMyAuthToken.go.html to see an example of how to use PatchMyAuthToken API. +func (client IdentityDomainsClient) PatchMyAuthToken(ctx context.Context, request PatchMyAuthTokenRequest) (response PatchMyAuthTokenResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -6361,42 +12809,42 @@ func (client IdentityDomainsClient) ListMyCustomerSecretKeys(ctx context.Context request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listMyCustomerSecretKeys, policy) + ociResponse, err = common.Retry(ctx, request, client.patchMyAuthToken, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListMyCustomerSecretKeysResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchMyAuthTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListMyCustomerSecretKeysResponse{} + response = PatchMyAuthTokenResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListMyCustomerSecretKeysResponse); ok { + if convertedResponse, ok := ociResponse.(PatchMyAuthTokenResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMyCustomerSecretKeysResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchMyAuthTokenResponse") } return } -// listMyCustomerSecretKeys implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listMyCustomerSecretKeys(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchMyAuthToken implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchMyAuthToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyCustomerSecretKeys", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/MyAuthTokens/{myAuthTokenId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListMyCustomerSecretKeysResponse + var response PatchMyAuthTokenResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyCustomerSecretKeys", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchMyAuthToken", apiReferenceLink) return response, err } @@ -6404,12 +12852,12 @@ func (client IdentityDomainsClient) listMyCustomerSecretKeys(ctx context.Context return response, err } -// ListMyDevices Search Devices +// PatchMyCustomerSecretKey Update a user's own customer secret key. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyDevices.go.html to see an example of how to use ListMyDevices API. -func (client IdentityDomainsClient) ListMyDevices(ctx context.Context, request ListMyDevicesRequest) (response ListMyDevicesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchMyCustomerSecretKey.go.html to see an example of how to use PatchMyCustomerSecretKey API. +func (client IdentityDomainsClient) PatchMyCustomerSecretKey(ctx context.Context, request PatchMyCustomerSecretKeyRequest) (response PatchMyCustomerSecretKeyResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -6423,42 +12871,42 @@ func (client IdentityDomainsClient) ListMyDevices(ctx context.Context, request L request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listMyDevices, policy) + ociResponse, err = common.Retry(ctx, request, client.patchMyCustomerSecretKey, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListMyDevicesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchMyCustomerSecretKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListMyDevicesResponse{} + response = PatchMyCustomerSecretKeyResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListMyDevicesResponse); ok { + if convertedResponse, ok := ociResponse.(PatchMyCustomerSecretKeyResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMyDevicesResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchMyCustomerSecretKeyResponse") } return } -// listMyDevices implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listMyDevices(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchMyCustomerSecretKey implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchMyCustomerSecretKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyDevices", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/MyCustomerSecretKeys/{myCustomerSecretKeyId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListMyDevicesResponse + var response PatchMyCustomerSecretKeyResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyDevices", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchMyCustomerSecretKey", apiReferenceLink) return response, err } @@ -6466,12 +12914,12 @@ func (client IdentityDomainsClient) listMyDevices(ctx context.Context, request c return response, err } -// ListMyGroups Search for 'My Groups'. +// PatchMyDevice Update a Device // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyGroups.go.html to see an example of how to use ListMyGroups API. -func (client IdentityDomainsClient) ListMyGroups(ctx context.Context, request ListMyGroupsRequest) (response ListMyGroupsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchMyDevice.go.html to see an example of how to use PatchMyDevice API. +func (client IdentityDomainsClient) PatchMyDevice(ctx context.Context, request PatchMyDeviceRequest) (response PatchMyDeviceResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -6485,42 +12933,42 @@ func (client IdentityDomainsClient) ListMyGroups(ctx context.Context, request Li request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listMyGroups, policy) + ociResponse, err = common.Retry(ctx, request, client.patchMyDevice, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListMyGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchMyDeviceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListMyGroupsResponse{} + response = PatchMyDeviceResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListMyGroupsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchMyDeviceResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMyGroupsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchMyDeviceResponse") } return } -// listMyGroups implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listMyGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchMyDevice implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchMyDevice(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyGroups", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/MyDevices/{myDeviceId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListMyGroupsResponse + var response PatchMyDeviceResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyGroups", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchMyDevice", apiReferenceLink) return response, err } @@ -6528,12 +12976,12 @@ func (client IdentityDomainsClient) listMyGroups(ctx context.Context, request co return response, err } -// ListMyOAuth2ClientCredentials Search for a user's own OAuth2 client credential. +// PatchMyOAuth2ClientCredential Update a user's own OAuth2 client credential. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyOAuth2ClientCredentials.go.html to see an example of how to use ListMyOAuth2ClientCredentials API. -func (client IdentityDomainsClient) ListMyOAuth2ClientCredentials(ctx context.Context, request ListMyOAuth2ClientCredentialsRequest) (response ListMyOAuth2ClientCredentialsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchMyOAuth2ClientCredential.go.html to see an example of how to use PatchMyOAuth2ClientCredential API. +func (client IdentityDomainsClient) PatchMyOAuth2ClientCredential(ctx context.Context, request PatchMyOAuth2ClientCredentialRequest) (response PatchMyOAuth2ClientCredentialResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -6547,42 +12995,42 @@ func (client IdentityDomainsClient) ListMyOAuth2ClientCredentials(ctx context.Co request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listMyOAuth2ClientCredentials, policy) + ociResponse, err = common.Retry(ctx, request, client.patchMyOAuth2ClientCredential, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListMyOAuth2ClientCredentialsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchMyOAuth2ClientCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListMyOAuth2ClientCredentialsResponse{} + response = PatchMyOAuth2ClientCredentialResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListMyOAuth2ClientCredentialsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchMyOAuth2ClientCredentialResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMyOAuth2ClientCredentialsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchMyOAuth2ClientCredentialResponse") } return } -// listMyOAuth2ClientCredentials implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listMyOAuth2ClientCredentials(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchMyOAuth2ClientCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchMyOAuth2ClientCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyOAuth2ClientCredentials", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/MyOAuth2ClientCredentials/{myOAuth2ClientCredentialId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListMyOAuth2ClientCredentialsResponse + var response PatchMyOAuth2ClientCredentialResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyOAuth2ClientCredentials", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchMyOAuth2ClientCredential", apiReferenceLink) return response, err } @@ -6590,12 +13038,12 @@ func (client IdentityDomainsClient) listMyOAuth2ClientCredentials(ctx context.Co return response, err } -// ListMyRequestableGroups Search My Requestable Groups +// PatchMyPendingApproval Update MyPendingApproval // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyRequestableGroups.go.html to see an example of how to use ListMyRequestableGroups API. -func (client IdentityDomainsClient) ListMyRequestableGroups(ctx context.Context, request ListMyRequestableGroupsRequest) (response ListMyRequestableGroupsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchMyPendingApproval.go.html to see an example of how to use PatchMyPendingApproval API. +func (client IdentityDomainsClient) PatchMyPendingApproval(ctx context.Context, request PatchMyPendingApprovalRequest) (response PatchMyPendingApprovalResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -6609,42 +13057,42 @@ func (client IdentityDomainsClient) ListMyRequestableGroups(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listMyRequestableGroups, policy) + ociResponse, err = common.Retry(ctx, request, client.patchMyPendingApproval, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListMyRequestableGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchMyPendingApprovalResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListMyRequestableGroupsResponse{} + response = PatchMyPendingApprovalResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListMyRequestableGroupsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchMyPendingApprovalResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMyRequestableGroupsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchMyPendingApprovalResponse") } return } -// listMyRequestableGroups implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listMyRequestableGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchMyPendingApproval implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchMyPendingApproval(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyRequestableGroups", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/MyPendingApprovals/{myPendingApprovalId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListMyRequestableGroupsResponse + var response PatchMyPendingApprovalResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyRequestableGroups", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchMyPendingApproval", apiReferenceLink) return response, err } @@ -6652,12 +13100,12 @@ func (client IdentityDomainsClient) listMyRequestableGroups(ctx context.Context, return response, err } -// ListMyRequests Search My Requests +// PatchMyRequest Update My Requests // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyRequests.go.html to see an example of how to use ListMyRequests API. -func (client IdentityDomainsClient) ListMyRequests(ctx context.Context, request ListMyRequestsRequest) (response ListMyRequestsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchMyRequest.go.html to see an example of how to use PatchMyRequest API. +func (client IdentityDomainsClient) PatchMyRequest(ctx context.Context, request PatchMyRequestRequest) (response PatchMyRequestResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -6671,42 +13119,42 @@ func (client IdentityDomainsClient) ListMyRequests(ctx context.Context, request request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listMyRequests, policy) + ociResponse, err = common.Retry(ctx, request, client.patchMyRequest, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListMyRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchMyRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListMyRequestsResponse{} + response = PatchMyRequestResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListMyRequestsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchMyRequestResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMyRequestsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchMyRequestResponse") } return } -// listMyRequests implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listMyRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchMyRequest implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchMyRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyRequests", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/MyRequests/{myRequestId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListMyRequestsResponse + var response PatchMyRequestResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyRequests", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchMyRequest", apiReferenceLink) return response, err } @@ -6714,12 +13162,12 @@ func (client IdentityDomainsClient) listMyRequests(ctx context.Context, request return response, err } -// ListMySmtpCredentials Search for a user's own SMTP credential. +// PatchMySmtpCredential Update a user's own SMTP credential. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMySmtpCredentials.go.html to see an example of how to use ListMySmtpCredentials API. -func (client IdentityDomainsClient) ListMySmtpCredentials(ctx context.Context, request ListMySmtpCredentialsRequest) (response ListMySmtpCredentialsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchMySmtpCredential.go.html to see an example of how to use PatchMySmtpCredential API. +func (client IdentityDomainsClient) PatchMySmtpCredential(ctx context.Context, request PatchMySmtpCredentialRequest) (response PatchMySmtpCredentialResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -6733,42 +13181,42 @@ func (client IdentityDomainsClient) ListMySmtpCredentials(ctx context.Context, r request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listMySmtpCredentials, policy) + ociResponse, err = common.Retry(ctx, request, client.patchMySmtpCredential, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListMySmtpCredentialsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchMySmtpCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListMySmtpCredentialsResponse{} + response = PatchMySmtpCredentialResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListMySmtpCredentialsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchMySmtpCredentialResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMySmtpCredentialsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchMySmtpCredentialResponse") } return } -// listMySmtpCredentials implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listMySmtpCredentials(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchMySmtpCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchMySmtpCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MySmtpCredentials", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/MySmtpCredentials/{mySmtpCredentialId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListMySmtpCredentialsResponse + var response PatchMySmtpCredentialResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListMySmtpCredentials", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchMySmtpCredential", apiReferenceLink) return response, err } @@ -6776,12 +13224,12 @@ func (client IdentityDomainsClient) listMySmtpCredentials(ctx context.Context, r return response, err } -// ListMySupportAccounts Search for a user's own support account. +// PatchNetworkPerimeter Update a NetworkPerimeter // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMySupportAccounts.go.html to see an example of how to use ListMySupportAccounts API. -func (client IdentityDomainsClient) ListMySupportAccounts(ctx context.Context, request ListMySupportAccountsRequest) (response ListMySupportAccountsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchNetworkPerimeter.go.html to see an example of how to use PatchNetworkPerimeter API. +func (client IdentityDomainsClient) PatchNetworkPerimeter(ctx context.Context, request PatchNetworkPerimeterRequest) (response PatchNetworkPerimeterResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -6795,42 +13243,42 @@ func (client IdentityDomainsClient) ListMySupportAccounts(ctx context.Context, r request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listMySupportAccounts, policy) + ociResponse, err = common.Retry(ctx, request, client.patchNetworkPerimeter, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListMySupportAccountsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchNetworkPerimeterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListMySupportAccountsResponse{} + response = PatchNetworkPerimeterResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListMySupportAccountsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchNetworkPerimeterResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMySupportAccountsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchNetworkPerimeterResponse") } return } -// listMySupportAccounts implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listMySupportAccounts(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchNetworkPerimeter implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchNetworkPerimeter(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MySupportAccounts", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/NetworkPerimeters/{networkPerimeterId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListMySupportAccountsResponse + var response PatchNetworkPerimeterResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListMySupportAccounts", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchNetworkPerimeter", apiReferenceLink) return response, err } @@ -6838,12 +13286,12 @@ func (client IdentityDomainsClient) listMySupportAccounts(ctx context.Context, r return response, err } -// ListMyTrustedUserAgents Search Trusted User Agents +// PatchOAuth2ClientCredential Update a user's OAuth2 client credentials. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyTrustedUserAgents.go.html to see an example of how to use ListMyTrustedUserAgents API. -func (client IdentityDomainsClient) ListMyTrustedUserAgents(ctx context.Context, request ListMyTrustedUserAgentsRequest) (response ListMyTrustedUserAgentsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchOAuth2ClientCredential.go.html to see an example of how to use PatchOAuth2ClientCredential API. +func (client IdentityDomainsClient) PatchOAuth2ClientCredential(ctx context.Context, request PatchOAuth2ClientCredentialRequest) (response PatchOAuth2ClientCredentialResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -6857,42 +13305,42 @@ func (client IdentityDomainsClient) ListMyTrustedUserAgents(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listMyTrustedUserAgents, policy) + ociResponse, err = common.Retry(ctx, request, client.patchOAuth2ClientCredential, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListMyTrustedUserAgentsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchOAuth2ClientCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListMyTrustedUserAgentsResponse{} + response = PatchOAuth2ClientCredentialResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListMyTrustedUserAgentsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchOAuth2ClientCredentialResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMyTrustedUserAgentsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchOAuth2ClientCredentialResponse") } return } -// listMyTrustedUserAgents implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listMyTrustedUserAgents(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchOAuth2ClientCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchOAuth2ClientCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyTrustedUserAgents", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/OAuth2ClientCredentials/{oAuth2ClientCredentialId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListMyTrustedUserAgentsResponse + var response PatchOAuth2ClientCredentialResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyTrustedUserAgents", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchOAuth2ClientCredential", apiReferenceLink) return response, err } @@ -6900,12 +13348,12 @@ func (client IdentityDomainsClient) listMyTrustedUserAgents(ctx context.Context, return response, err } -// ListMyUserDbCredentials Search for a user's own database (DB) credential. +// PatchPasswordPolicy Update a password policy. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyUserDbCredentials.go.html to see an example of how to use ListMyUserDbCredentials API. -func (client IdentityDomainsClient) ListMyUserDbCredentials(ctx context.Context, request ListMyUserDbCredentialsRequest) (response ListMyUserDbCredentialsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchPasswordPolicy.go.html to see an example of how to use PatchPasswordPolicy API. +func (client IdentityDomainsClient) PatchPasswordPolicy(ctx context.Context, request PatchPasswordPolicyRequest) (response PatchPasswordPolicyResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -6919,42 +13367,42 @@ func (client IdentityDomainsClient) ListMyUserDbCredentials(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listMyUserDbCredentials, policy) + ociResponse, err = common.Retry(ctx, request, client.patchPasswordPolicy, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListMyUserDbCredentialsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchPasswordPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListMyUserDbCredentialsResponse{} + response = PatchPasswordPolicyResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListMyUserDbCredentialsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchPasswordPolicyResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMyUserDbCredentialsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchPasswordPolicyResponse") } return } -// listMyUserDbCredentials implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listMyUserDbCredentials(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchPasswordPolicy implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchPasswordPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/MyUserDbCredentials", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/PasswordPolicies/{passwordPolicyId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListMyUserDbCredentialsResponse + var response PatchPasswordPolicyResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListMyUserDbCredentials", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchPasswordPolicy", apiReferenceLink) return response, err } @@ -6962,12 +13410,12 @@ func (client IdentityDomainsClient) listMyUserDbCredentials(ctx context.Context, return response, err } -// ListOAuth2ClientCredentials Search for a user's OAuth2 client credentials. +// PatchPolicy Update a Policy // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListOAuth2ClientCredentials.go.html to see an example of how to use ListOAuth2ClientCredentials API. -func (client IdentityDomainsClient) ListOAuth2ClientCredentials(ctx context.Context, request ListOAuth2ClientCredentialsRequest) (response ListOAuth2ClientCredentialsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchPolicy.go.html to see an example of how to use PatchPolicy API. +func (client IdentityDomainsClient) PatchPolicy(ctx context.Context, request PatchPolicyRequest) (response PatchPolicyResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -6981,42 +13429,42 @@ func (client IdentityDomainsClient) ListOAuth2ClientCredentials(ctx context.Cont request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listOAuth2ClientCredentials, policy) + ociResponse, err = common.Retry(ctx, request, client.patchPolicy, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListOAuth2ClientCredentialsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListOAuth2ClientCredentialsResponse{} + response = PatchPolicyResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListOAuth2ClientCredentialsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchPolicyResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListOAuth2ClientCredentialsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchPolicyResponse") } return } -// listOAuth2ClientCredentials implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listOAuth2ClientCredentials(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchPolicy implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/OAuth2ClientCredentials", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/Policies/{policyId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListOAuth2ClientCredentialsResponse + var response PatchPolicyResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListOAuth2ClientCredentials", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchPolicy", apiReferenceLink) return response, err } @@ -7024,12 +13472,12 @@ func (client IdentityDomainsClient) listOAuth2ClientCredentials(ctx context.Cont return response, err } -// ListPasswordPolicies Search for password policies. +// PatchRule Update a Rule // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListPasswordPolicies.go.html to see an example of how to use ListPasswordPolicies API. -func (client IdentityDomainsClient) ListPasswordPolicies(ctx context.Context, request ListPasswordPoliciesRequest) (response ListPasswordPoliciesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchRule.go.html to see an example of how to use PatchRule API. +func (client IdentityDomainsClient) PatchRule(ctx context.Context, request PatchRuleRequest) (response PatchRuleResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -7043,42 +13491,42 @@ func (client IdentityDomainsClient) ListPasswordPolicies(ctx context.Context, re request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listPasswordPolicies, policy) + ociResponse, err = common.Retry(ctx, request, client.patchRule, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListPasswordPoliciesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchRuleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListPasswordPoliciesResponse{} + response = PatchRuleResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListPasswordPoliciesResponse); ok { + if convertedResponse, ok := ociResponse.(PatchRuleResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListPasswordPoliciesResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchRuleResponse") } return } -// listPasswordPolicies implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listPasswordPolicies(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchRule implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchRule(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/PasswordPolicies", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/Rules/{ruleId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListPasswordPoliciesResponse + var response PatchRuleResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListPasswordPolicies", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchRule", apiReferenceLink) return response, err } @@ -7086,12 +13534,12 @@ func (client IdentityDomainsClient) listPasswordPolicies(ctx context.Context, re return response, err } -// ListResourceTypeSchemaAttributes Search Resource Type Schema Attributes +// PatchSchema Update a Schema Def // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListResourceTypeSchemaAttributes.go.html to see an example of how to use ListResourceTypeSchemaAttributes API. -func (client IdentityDomainsClient) ListResourceTypeSchemaAttributes(ctx context.Context, request ListResourceTypeSchemaAttributesRequest) (response ListResourceTypeSchemaAttributesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchSchema.go.html to see an example of how to use PatchSchema API. +func (client IdentityDomainsClient) PatchSchema(ctx context.Context, request PatchSchemaRequest) (response PatchSchemaResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -7105,42 +13553,42 @@ func (client IdentityDomainsClient) ListResourceTypeSchemaAttributes(ctx context request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listResourceTypeSchemaAttributes, policy) + ociResponse, err = common.Retry(ctx, request, client.patchSchema, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListResourceTypeSchemaAttributesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchSchemaResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListResourceTypeSchemaAttributesResponse{} + response = PatchSchemaResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListResourceTypeSchemaAttributesResponse); ok { + if convertedResponse, ok := ociResponse.(PatchSchemaResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListResourceTypeSchemaAttributesResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchSchemaResponse") } return } -// listResourceTypeSchemaAttributes implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listResourceTypeSchemaAttributes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchSchema implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchSchema(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/ResourceTypeSchemaAttributes", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/Schemas/{schemaId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListResourceTypeSchemaAttributesResponse + var response PatchSchemaResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListResourceTypeSchemaAttributes", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchSchema", apiReferenceLink) return response, err } @@ -7148,12 +13596,12 @@ func (client IdentityDomainsClient) listResourceTypeSchemaAttributes(ctx context return response, err } -// ListSecurityQuestionSettings Search for security question settings. +// PatchSecurityQuestion Update a security question. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListSecurityQuestionSettings.go.html to see an example of how to use ListSecurityQuestionSettings API. -func (client IdentityDomainsClient) ListSecurityQuestionSettings(ctx context.Context, request ListSecurityQuestionSettingsRequest) (response ListSecurityQuestionSettingsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchSecurityQuestion.go.html to see an example of how to use PatchSecurityQuestion API. +func (client IdentityDomainsClient) PatchSecurityQuestion(ctx context.Context, request PatchSecurityQuestionRequest) (response PatchSecurityQuestionResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -7167,42 +13615,42 @@ func (client IdentityDomainsClient) ListSecurityQuestionSettings(ctx context.Con request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listSecurityQuestionSettings, policy) + ociResponse, err = common.Retry(ctx, request, client.patchSecurityQuestion, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListSecurityQuestionSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchSecurityQuestionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListSecurityQuestionSettingsResponse{} + response = PatchSecurityQuestionResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListSecurityQuestionSettingsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchSecurityQuestionResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListSecurityQuestionSettingsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchSecurityQuestionResponse") } return } -// listSecurityQuestionSettings implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listSecurityQuestionSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchSecurityQuestion implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchSecurityQuestion(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/SecurityQuestionSettings", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/SecurityQuestions/{securityQuestionId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListSecurityQuestionSettingsResponse + var response PatchSecurityQuestionResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListSecurityQuestionSettings", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchSecurityQuestion", apiReferenceLink) return response, err } @@ -7210,12 +13658,12 @@ func (client IdentityDomainsClient) listSecurityQuestionSettings(ctx context.Con return response, err } -// ListSecurityQuestions Search for security questions. +// PatchSecurityQuestionSetting Update a security question setting. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListSecurityQuestions.go.html to see an example of how to use ListSecurityQuestions API. -func (client IdentityDomainsClient) ListSecurityQuestions(ctx context.Context, request ListSecurityQuestionsRequest) (response ListSecurityQuestionsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchSecurityQuestionSetting.go.html to see an example of how to use PatchSecurityQuestionSetting API. +func (client IdentityDomainsClient) PatchSecurityQuestionSetting(ctx context.Context, request PatchSecurityQuestionSettingRequest) (response PatchSecurityQuestionSettingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -7229,42 +13677,42 @@ func (client IdentityDomainsClient) ListSecurityQuestions(ctx context.Context, r request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listSecurityQuestions, policy) + ociResponse, err = common.Retry(ctx, request, client.patchSecurityQuestionSetting, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListSecurityQuestionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchSecurityQuestionSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListSecurityQuestionsResponse{} + response = PatchSecurityQuestionSettingResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListSecurityQuestionsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchSecurityQuestionSettingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListSecurityQuestionsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchSecurityQuestionSettingResponse") } return } -// listSecurityQuestions implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listSecurityQuestions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchSecurityQuestionSetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchSecurityQuestionSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/SecurityQuestions", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/SecurityQuestionSettings/{securityQuestionSettingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListSecurityQuestionsResponse + var response PatchSecurityQuestionSettingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListSecurityQuestions", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchSecurityQuestionSetting", apiReferenceLink) return response, err } @@ -7272,12 +13720,12 @@ func (client IdentityDomainsClient) listSecurityQuestions(ctx context.Context, r return response, err } -// ListSmtpCredentials Search for SMTP credentials. +// PatchSelfRegistrationProfile Update a self-registration profile. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListSmtpCredentials.go.html to see an example of how to use ListSmtpCredentials API. -func (client IdentityDomainsClient) ListSmtpCredentials(ctx context.Context, request ListSmtpCredentialsRequest) (response ListSmtpCredentialsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchSelfRegistrationProfile.go.html to see an example of how to use PatchSelfRegistrationProfile API. +func (client IdentityDomainsClient) PatchSelfRegistrationProfile(ctx context.Context, request PatchSelfRegistrationProfileRequest) (response PatchSelfRegistrationProfileResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -7291,42 +13739,42 @@ func (client IdentityDomainsClient) ListSmtpCredentials(ctx context.Context, req request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listSmtpCredentials, policy) + ociResponse, err = common.Retry(ctx, request, client.patchSelfRegistrationProfile, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListSmtpCredentialsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchSelfRegistrationProfileResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListSmtpCredentialsResponse{} + response = PatchSelfRegistrationProfileResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListSmtpCredentialsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchSelfRegistrationProfileResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListSmtpCredentialsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchSelfRegistrationProfileResponse") } return } -// listSmtpCredentials implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listSmtpCredentials(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchSelfRegistrationProfile implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchSelfRegistrationProfile(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/SmtpCredentials", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/SelfRegistrationProfiles/{selfRegistrationProfileId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListSmtpCredentialsResponse + var response PatchSelfRegistrationProfileResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListSmtpCredentials", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchSelfRegistrationProfile", apiReferenceLink) return response, err } @@ -7334,12 +13782,12 @@ func (client IdentityDomainsClient) listSmtpCredentials(ctx context.Context, req return response, err } -// ListUserAttributesSettings Search User Schema Attribute Settings +// PatchSetting Update a Setting // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListUserAttributesSettings.go.html to see an example of how to use ListUserAttributesSettings API. -func (client IdentityDomainsClient) ListUserAttributesSettings(ctx context.Context, request ListUserAttributesSettingsRequest) (response ListUserAttributesSettingsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchSetting.go.html to see an example of how to use PatchSetting API. +func (client IdentityDomainsClient) PatchSetting(ctx context.Context, request PatchSettingRequest) (response PatchSettingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -7353,42 +13801,42 @@ func (client IdentityDomainsClient) ListUserAttributesSettings(ctx context.Conte request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listUserAttributesSettings, policy) + ociResponse, err = common.Retry(ctx, request, client.patchSetting, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListUserAttributesSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListUserAttributesSettingsResponse{} + response = PatchSettingResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListUserAttributesSettingsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchSettingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListUserAttributesSettingsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchSettingResponse") } return } -// listUserAttributesSettings implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listUserAttributesSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchSetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/UserAttributesSettings", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/Settings/{settingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListUserAttributesSettingsResponse + var response PatchSettingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListUserAttributesSettings", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchSetting", apiReferenceLink) return response, err } @@ -7396,12 +13844,12 @@ func (client IdentityDomainsClient) listUserAttributesSettings(ctx context.Conte return response, err } -// ListUserDbCredentials Search for a user's database (DB) credentials. +// PatchSmtpCredential Update a user's SMTP credentials. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListUserDbCredentials.go.html to see an example of how to use ListUserDbCredentials API. -func (client IdentityDomainsClient) ListUserDbCredentials(ctx context.Context, request ListUserDbCredentialsRequest) (response ListUserDbCredentialsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchSmtpCredential.go.html to see an example of how to use PatchSmtpCredential API. +func (client IdentityDomainsClient) PatchSmtpCredential(ctx context.Context, request PatchSmtpCredentialRequest) (response PatchSmtpCredentialResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -7415,42 +13863,42 @@ func (client IdentityDomainsClient) ListUserDbCredentials(ctx context.Context, r request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listUserDbCredentials, policy) + ociResponse, err = common.Retry(ctx, request, client.patchSmtpCredential, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListUserDbCredentialsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchSmtpCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListUserDbCredentialsResponse{} + response = PatchSmtpCredentialResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListUserDbCredentialsResponse); ok { + if convertedResponse, ok := ociResponse.(PatchSmtpCredentialResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListUserDbCredentialsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchSmtpCredentialResponse") } return } -// listUserDbCredentials implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listUserDbCredentials(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchSmtpCredential implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchSmtpCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/UserDbCredentials", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/SmtpCredentials/{smtpCredentialId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListUserDbCredentialsResponse + var response PatchSmtpCredentialResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListUserDbCredentials", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchSmtpCredential", apiReferenceLink) return response, err } @@ -7458,12 +13906,12 @@ func (client IdentityDomainsClient) listUserDbCredentials(ctx context.Context, r return response, err } -// ListUsers Search for users. +// PatchUser Update a user. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListUsers.go.html to see an example of how to use ListUsers API. -func (client IdentityDomainsClient) ListUsers(ctx context.Context, request ListUsersRequest) (response ListUsersResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchUser.go.html to see an example of how to use PatchUser API. +func (client IdentityDomainsClient) PatchUser(ctx context.Context, request PatchUserRequest) (response PatchUserResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -7477,42 +13925,42 @@ func (client IdentityDomainsClient) ListUsers(ctx context.Context, request ListU request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.listUsers, policy) + ociResponse, err = common.Retry(ctx, request, client.patchUser, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListUsersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchUserResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListUsersResponse{} + response = PatchUserResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListUsersResponse); ok { + if convertedResponse, ok := ociResponse.(PatchUserResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListUsersResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchUserResponse") } return } -// listUsers implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) listUsers(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchUser implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchUser(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/admin/v1/Users", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/Users/{userId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListUsersResponse + var response PatchUserResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "ListUsers", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchUser", apiReferenceLink) return response, err } @@ -7520,12 +13968,12 @@ func (client IdentityDomainsClient) listUsers(ctx context.Context, request commo return response, err } -// PatchAccountRecoverySetting Update an account recovery setting. +// PatchUserAttributesSetting Update User Schema Attribute Settings // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchAccountRecoverySetting.go.html to see an example of how to use PatchAccountRecoverySetting API. -func (client IdentityDomainsClient) PatchAccountRecoverySetting(ctx context.Context, request PatchAccountRecoverySettingRequest) (response PatchAccountRecoverySettingResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchUserAttributesSetting.go.html to see an example of how to use PatchUserAttributesSetting API. +func (client IdentityDomainsClient) PatchUserAttributesSetting(ctx context.Context, request PatchUserAttributesSettingRequest) (response PatchUserAttributesSettingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -7539,42 +13987,42 @@ func (client IdentityDomainsClient) PatchAccountRecoverySetting(ctx context.Cont request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchAccountRecoverySetting, policy) + ociResponse, err = common.Retry(ctx, request, client.patchUserAttributesSetting, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchAccountRecoverySettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PatchUserAttributesSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchAccountRecoverySettingResponse{} + response = PatchUserAttributesSettingResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchAccountRecoverySettingResponse); ok { + if convertedResponse, ok := ociResponse.(PatchUserAttributesSettingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchAccountRecoverySettingResponse") + err = fmt.Errorf("failed to convert OCIResponse into PatchUserAttributesSettingResponse") } return } -// patchAccountRecoverySetting implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchAccountRecoverySetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// patchUserAttributesSetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) patchUserAttributesSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/AccountRecoverySettings/{accountRecoverySettingId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/UserAttributesSettings/{userAttributesSettingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchAccountRecoverySettingResponse + var response PatchUserAttributesSettingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchAccountRecoverySetting", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PatchUserAttributesSetting", apiReferenceLink) return response, err } @@ -7582,12 +14030,12 @@ func (client IdentityDomainsClient) patchAccountRecoverySetting(ctx context.Cont return response, err } -// PatchApiKey Update a user's API key. +// PutAccountRecoverySetting Replace an account recovery setting. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchApiKey.go.html to see an example of how to use PatchApiKey API. -func (client IdentityDomainsClient) PatchApiKey(ctx context.Context, request PatchApiKeyRequest) (response PatchApiKeyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutAccountRecoverySetting.go.html to see an example of how to use PutAccountRecoverySetting API. +func (client IdentityDomainsClient) PutAccountRecoverySetting(ctx context.Context, request PutAccountRecoverySettingRequest) (response PutAccountRecoverySettingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -7601,42 +14049,42 @@ func (client IdentityDomainsClient) PatchApiKey(ctx context.Context, request Pat request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchApiKey, policy) + ociResponse, err = common.Retry(ctx, request, client.putAccountRecoverySetting, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchApiKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutAccountRecoverySettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchApiKeyResponse{} + response = PutAccountRecoverySettingResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchApiKeyResponse); ok { + if convertedResponse, ok := ociResponse.(PutAccountRecoverySettingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchApiKeyResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutAccountRecoverySettingResponse") } return } -// patchApiKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchApiKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putAccountRecoverySetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putAccountRecoverySetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/ApiKeys/{apiKeyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/AccountRecoverySettings/{accountRecoverySettingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchApiKeyResponse + var response PutAccountRecoverySettingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchApiKey", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutAccountRecoverySetting", apiReferenceLink) return response, err } @@ -7644,12 +14092,12 @@ func (client IdentityDomainsClient) patchApiKey(ctx context.Context, request com return response, err } -// PatchApp Update an App +// PutApp Replace an App // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchApp.go.html to see an example of how to use PatchApp API. -func (client IdentityDomainsClient) PatchApp(ctx context.Context, request PatchAppRequest) (response PatchAppResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutApp.go.html to see an example of how to use PutApp API. +func (client IdentityDomainsClient) PutApp(ctx context.Context, request PutAppRequest) (response PutAppResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -7663,42 +14111,42 @@ func (client IdentityDomainsClient) PatchApp(ctx context.Context, request PatchA request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchApp, policy) + ociResponse, err = common.Retry(ctx, request, client.putApp, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchAppResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutAppResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchAppResponse{} + response = PutAppResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchAppResponse); ok { + if convertedResponse, ok := ociResponse.(PutAppResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchAppResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutAppResponse") } return } -// patchApp implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchApp(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putApp implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putApp(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/Apps/{appId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/Apps/{appId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchAppResponse + var response PutAppResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchApp", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutApp", apiReferenceLink) return response, err } @@ -7706,12 +14154,12 @@ func (client IdentityDomainsClient) patchApp(ctx context.Context, request common return response, err } -// PatchAppRole Update an AppRole +// PutAppStatusChanger Activate/Deactivate an App // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchAppRole.go.html to see an example of how to use PatchAppRole API. -func (client IdentityDomainsClient) PatchAppRole(ctx context.Context, request PatchAppRoleRequest) (response PatchAppRoleResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutAppStatusChanger.go.html to see an example of how to use PutAppStatusChanger API. +func (client IdentityDomainsClient) PutAppStatusChanger(ctx context.Context, request PutAppStatusChangerRequest) (response PutAppStatusChangerResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -7725,42 +14173,42 @@ func (client IdentityDomainsClient) PatchAppRole(ctx context.Context, request Pa request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchAppRole, policy) + ociResponse, err = common.Retry(ctx, request, client.putAppStatusChanger, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchAppRoleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutAppStatusChangerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchAppRoleResponse{} + response = PutAppStatusChangerResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchAppRoleResponse); ok { + if convertedResponse, ok := ociResponse.(PutAppStatusChangerResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchAppRoleResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutAppStatusChangerResponse") } return } -// patchAppRole implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchAppRole(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putAppStatusChanger implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putAppStatusChanger(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/AppRoles/{appRoleId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/AppStatusChanger/{appStatusChangerId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchAppRoleResponse + var response PutAppStatusChangerResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchAppRole", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutAppStatusChanger", apiReferenceLink) return response, err } @@ -7768,12 +14216,12 @@ func (client IdentityDomainsClient) patchAppRole(ctx context.Context, request co return response, err } -// PatchAuthToken Update a user's Auth token. +// PutApprovalWorkflow Replace ApprovalWorkflow // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchAuthToken.go.html to see an example of how to use PatchAuthToken API. -func (client IdentityDomainsClient) PatchAuthToken(ctx context.Context, request PatchAuthTokenRequest) (response PatchAuthTokenResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutApprovalWorkflow.go.html to see an example of how to use PutApprovalWorkflow API. +func (client IdentityDomainsClient) PutApprovalWorkflow(ctx context.Context, request PutApprovalWorkflowRequest) (response PutApprovalWorkflowResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -7787,42 +14235,42 @@ func (client IdentityDomainsClient) PatchAuthToken(ctx context.Context, request request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchAuthToken, policy) + ociResponse, err = common.Retry(ctx, request, client.putApprovalWorkflow, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchAuthTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutApprovalWorkflowResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchAuthTokenResponse{} + response = PutApprovalWorkflowResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchAuthTokenResponse); ok { + if convertedResponse, ok := ociResponse.(PutApprovalWorkflowResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchAuthTokenResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutApprovalWorkflowResponse") } return } -// patchAuthToken implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchAuthToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putApprovalWorkflow implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putApprovalWorkflow(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/AuthTokens/{authTokenId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/ApprovalWorkflows/{approvalWorkflowId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchAuthTokenResponse + var response PutApprovalWorkflowResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchAuthToken", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutApprovalWorkflow", apiReferenceLink) return response, err } @@ -7830,12 +14278,12 @@ func (client IdentityDomainsClient) patchAuthToken(ctx context.Context, request return response, err } -// PatchCustomerSecretKey Update a user's customer secret key. +// PutAuthenticationFactorSetting Replace Authentication Factor Settings // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchCustomerSecretKey.go.html to see an example of how to use PatchCustomerSecretKey API. -func (client IdentityDomainsClient) PatchCustomerSecretKey(ctx context.Context, request PatchCustomerSecretKeyRequest) (response PatchCustomerSecretKeyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutAuthenticationFactorSetting.go.html to see an example of how to use PutAuthenticationFactorSetting API. +func (client IdentityDomainsClient) PutAuthenticationFactorSetting(ctx context.Context, request PutAuthenticationFactorSettingRequest) (response PutAuthenticationFactorSettingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -7849,42 +14297,42 @@ func (client IdentityDomainsClient) PatchCustomerSecretKey(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchCustomerSecretKey, policy) + ociResponse, err = common.Retry(ctx, request, client.putAuthenticationFactorSetting, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchCustomerSecretKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutAuthenticationFactorSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchCustomerSecretKeyResponse{} + response = PutAuthenticationFactorSettingResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchCustomerSecretKeyResponse); ok { + if convertedResponse, ok := ociResponse.(PutAuthenticationFactorSettingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchCustomerSecretKeyResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutAuthenticationFactorSettingResponse") } return } -// patchCustomerSecretKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchCustomerSecretKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putAuthenticationFactorSetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putAuthenticationFactorSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/CustomerSecretKeys/{customerSecretKeyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/AuthenticationFactorSettings/{authenticationFactorSettingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchCustomerSecretKeyResponse + var response PutAuthenticationFactorSettingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchCustomerSecretKey", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutAuthenticationFactorSetting", apiReferenceLink) return response, err } @@ -7892,12 +14340,12 @@ func (client IdentityDomainsClient) patchCustomerSecretKey(ctx context.Context, return response, err } -// PatchDynamicResourceGroup Update a Dynamic Resource Group. +// PutCloudGate Replace a Cloud Gate // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchDynamicResourceGroup.go.html to see an example of how to use PatchDynamicResourceGroup API. -func (client IdentityDomainsClient) PatchDynamicResourceGroup(ctx context.Context, request PatchDynamicResourceGroupRequest) (response PatchDynamicResourceGroupResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutCloudGate.go.html to see an example of how to use PutCloudGate API. +func (client IdentityDomainsClient) PutCloudGate(ctx context.Context, request PutCloudGateRequest) (response PutCloudGateResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -7911,42 +14359,42 @@ func (client IdentityDomainsClient) PatchDynamicResourceGroup(ctx context.Contex request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchDynamicResourceGroup, policy) + ociResponse, err = common.Retry(ctx, request, client.putCloudGate, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchDynamicResourceGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutCloudGateResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchDynamicResourceGroupResponse{} + response = PutCloudGateResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchDynamicResourceGroupResponse); ok { + if convertedResponse, ok := ociResponse.(PutCloudGateResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchDynamicResourceGroupResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutCloudGateResponse") } return } -// patchDynamicResourceGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchDynamicResourceGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putCloudGate implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putCloudGate(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/DynamicResourceGroups/{dynamicResourceGroupId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/CloudGates/{cloudGateId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchDynamicResourceGroupResponse + var response PutCloudGateResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchDynamicResourceGroup", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutCloudGate", apiReferenceLink) return response, err } @@ -7954,12 +14402,12 @@ func (client IdentityDomainsClient) patchDynamicResourceGroup(ctx context.Contex return response, err } -// PatchGrant Update a Grant +// PutCloudGateMapping Replace a Cloud Gate mapping // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchGrant.go.html to see an example of how to use PatchGrant API. -func (client IdentityDomainsClient) PatchGrant(ctx context.Context, request PatchGrantRequest) (response PatchGrantResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutCloudGateMapping.go.html to see an example of how to use PutCloudGateMapping API. +func (client IdentityDomainsClient) PutCloudGateMapping(ctx context.Context, request PutCloudGateMappingRequest) (response PutCloudGateMappingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -7973,42 +14421,42 @@ func (client IdentityDomainsClient) PatchGrant(ctx context.Context, request Patc request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchGrant, policy) + ociResponse, err = common.Retry(ctx, request, client.putCloudGateMapping, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchGrantResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutCloudGateMappingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchGrantResponse{} + response = PutCloudGateMappingResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchGrantResponse); ok { + if convertedResponse, ok := ociResponse.(PutCloudGateMappingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchGrantResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutCloudGateMappingResponse") } return } -// patchGrant implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchGrant(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putCloudGateMapping implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putCloudGateMapping(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/Grants/{grantId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/CloudGateMappings/{cloudGateMappingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchGrantResponse + var response PutCloudGateMappingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchGrant", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutCloudGateMapping", apiReferenceLink) return response, err } @@ -8016,12 +14464,12 @@ func (client IdentityDomainsClient) patchGrant(ctx context.Context, request comm return response, err } -// PatchGroup Update a group. +// PutCloudGateServer Replace a Cloud Gate server // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchGroup.go.html to see an example of how to use PatchGroup API. -func (client IdentityDomainsClient) PatchGroup(ctx context.Context, request PatchGroupRequest) (response PatchGroupResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutCloudGateServer.go.html to see an example of how to use PutCloudGateServer API. +func (client IdentityDomainsClient) PutCloudGateServer(ctx context.Context, request PutCloudGateServerRequest) (response PutCloudGateServerResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -8035,42 +14483,42 @@ func (client IdentityDomainsClient) PatchGroup(ctx context.Context, request Patc request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchGroup, policy) + ociResponse, err = common.Retry(ctx, request, client.putCloudGateServer, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutCloudGateServerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchGroupResponse{} + response = PutCloudGateServerResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchGroupResponse); ok { + if convertedResponse, ok := ociResponse.(PutCloudGateServerResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchGroupResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutCloudGateServerResponse") } return } -// patchGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putCloudGateServer implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putCloudGateServer(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/Groups/{groupId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/CloudGateServers/{cloudGateServerId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchGroupResponse + var response PutCloudGateServerResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchGroup", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutCloudGateServer", apiReferenceLink) return response, err } @@ -8078,12 +14526,12 @@ func (client IdentityDomainsClient) patchGroup(ctx context.Context, request comm return response, err } -// PatchIdentityProvider Update an Identity Provider +// PutCondition Replace a Condition // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchIdentityProvider.go.html to see an example of how to use PatchIdentityProvider API. -func (client IdentityDomainsClient) PatchIdentityProvider(ctx context.Context, request PatchIdentityProviderRequest) (response PatchIdentityProviderResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutCondition.go.html to see an example of how to use PutCondition API. +func (client IdentityDomainsClient) PutCondition(ctx context.Context, request PutConditionRequest) (response PutConditionResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -8097,42 +14545,42 @@ func (client IdentityDomainsClient) PatchIdentityProvider(ctx context.Context, r request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchIdentityProvider, policy) + ociResponse, err = common.Retry(ctx, request, client.putCondition, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchIdentityProviderResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutConditionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchIdentityProviderResponse{} + response = PutConditionResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchIdentityProviderResponse); ok { + if convertedResponse, ok := ociResponse.(PutConditionResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchIdentityProviderResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutConditionResponse") } return } -// patchIdentityProvider implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchIdentityProvider(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putCondition implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putCondition(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/IdentityProviders/{identityProviderId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/Conditions/{conditionId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchIdentityProviderResponse + var response PutConditionResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchIdentityProvider", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutCondition", apiReferenceLink) return response, err } @@ -8140,12 +14588,12 @@ func (client IdentityDomainsClient) patchIdentityProvider(ctx context.Context, r return response, err } -// PatchIdentitySetting Update an Identity setting. +// PutDynamicResourceGroup Replace a Dynamic Resource Group. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchIdentitySetting.go.html to see an example of how to use PatchIdentitySetting API. -func (client IdentityDomainsClient) PatchIdentitySetting(ctx context.Context, request PatchIdentitySettingRequest) (response PatchIdentitySettingResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutDynamicResourceGroup.go.html to see an example of how to use PutDynamicResourceGroup API. +func (client IdentityDomainsClient) PutDynamicResourceGroup(ctx context.Context, request PutDynamicResourceGroupRequest) (response PutDynamicResourceGroupResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -8159,42 +14607,42 @@ func (client IdentityDomainsClient) PatchIdentitySetting(ctx context.Context, re request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchIdentitySetting, policy) + ociResponse, err = common.Retry(ctx, request, client.putDynamicResourceGroup, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchIdentitySettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutDynamicResourceGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchIdentitySettingResponse{} + response = PutDynamicResourceGroupResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchIdentitySettingResponse); ok { + if convertedResponse, ok := ociResponse.(PutDynamicResourceGroupResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchIdentitySettingResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutDynamicResourceGroupResponse") } return } -// patchIdentitySetting implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchIdentitySetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putDynamicResourceGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putDynamicResourceGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/IdentitySettings/{identitySettingId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/DynamicResourceGroups/{dynamicResourceGroupId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchIdentitySettingResponse + var response PutDynamicResourceGroupResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchIdentitySetting", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutDynamicResourceGroup", apiReferenceLink) return response, err } @@ -8202,12 +14650,12 @@ func (client IdentityDomainsClient) patchIdentitySetting(ctx context.Context, re return response, err } -// PatchKmsiSetting Update a Setting +// PutGroup Replace a group. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchKmsiSetting.go.html to see an example of how to use PatchKmsiSetting API. -func (client IdentityDomainsClient) PatchKmsiSetting(ctx context.Context, request PatchKmsiSettingRequest) (response PatchKmsiSettingResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutGroup.go.html to see an example of how to use PutGroup API. +func (client IdentityDomainsClient) PutGroup(ctx context.Context, request PutGroupRequest) (response PutGroupResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -8221,42 +14669,42 @@ func (client IdentityDomainsClient) PatchKmsiSetting(ctx context.Context, reques request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchKmsiSetting, policy) + ociResponse, err = common.Retry(ctx, request, client.putGroup, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchKmsiSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchKmsiSettingResponse{} + response = PutGroupResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchKmsiSettingResponse); ok { + if convertedResponse, ok := ociResponse.(PutGroupResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchKmsiSettingResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutGroupResponse") } return } -// patchKmsiSetting implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchKmsiSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putGroup implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/KmsiSettings/{kmsiSettingId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/Groups/{groupId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchKmsiSettingResponse + var response PutGroupResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchKmsiSetting", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutGroup", apiReferenceLink) return response, err } @@ -8264,12 +14712,12 @@ func (client IdentityDomainsClient) patchKmsiSetting(ctx context.Context, reques return response, err } -// PatchMe Update a user's own information. +// PutIdentityProvider Replace an Identity Provider // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchMe.go.html to see an example of how to use PatchMe API. -func (client IdentityDomainsClient) PatchMe(ctx context.Context, request PatchMeRequest) (response PatchMeResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutIdentityProvider.go.html to see an example of how to use PutIdentityProvider API. +func (client IdentityDomainsClient) PutIdentityProvider(ctx context.Context, request PutIdentityProviderRequest) (response PutIdentityProviderResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -8283,42 +14731,42 @@ func (client IdentityDomainsClient) PatchMe(ctx context.Context, request PatchMe request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchMe, policy) + ociResponse, err = common.Retry(ctx, request, client.putIdentityProvider, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchMeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutIdentityProviderResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchMeResponse{} + response = PutIdentityProviderResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchMeResponse); ok { + if convertedResponse, ok := ociResponse.(PutIdentityProviderResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchMeResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutIdentityProviderResponse") } return } -// patchMe implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchMe(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putIdentityProvider implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putIdentityProvider(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/Me", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/IdentityProviders/{identityProviderId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchMeResponse + var response PutIdentityProviderResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchMe", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutIdentityProvider", apiReferenceLink) return response, err } @@ -8326,12 +14774,12 @@ func (client IdentityDomainsClient) patchMe(ctx context.Context, request common. return response, err } -// PatchMyApiKey Update a user's own API key. +// PutIdentitySetting Replace an Identity setting. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchMyApiKey.go.html to see an example of how to use PatchMyApiKey API. -func (client IdentityDomainsClient) PatchMyApiKey(ctx context.Context, request PatchMyApiKeyRequest) (response PatchMyApiKeyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutIdentitySetting.go.html to see an example of how to use PutIdentitySetting API. +func (client IdentityDomainsClient) PutIdentitySetting(ctx context.Context, request PutIdentitySettingRequest) (response PutIdentitySettingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -8345,42 +14793,42 @@ func (client IdentityDomainsClient) PatchMyApiKey(ctx context.Context, request P request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchMyApiKey, policy) + ociResponse, err = common.Retry(ctx, request, client.putIdentitySetting, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchMyApiKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutIdentitySettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchMyApiKeyResponse{} + response = PutIdentitySettingResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchMyApiKeyResponse); ok { + if convertedResponse, ok := ociResponse.(PutIdentitySettingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchMyApiKeyResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutIdentitySettingResponse") } return } -// patchMyApiKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchMyApiKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putIdentitySetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putIdentitySetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/MyApiKeys/{myApiKeyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/IdentitySettings/{identitySettingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchMyApiKeyResponse + var response PutIdentitySettingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchMyApiKey", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutIdentitySetting", apiReferenceLink) return response, err } @@ -8388,12 +14836,12 @@ func (client IdentityDomainsClient) patchMyApiKey(ctx context.Context, request c return response, err } -// PatchMyAuthToken Update a user's own Auth token. +// PutKmsiSetting Replace KmsiSettings // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchMyAuthToken.go.html to see an example of how to use PatchMyAuthToken API. -func (client IdentityDomainsClient) PatchMyAuthToken(ctx context.Context, request PatchMyAuthTokenRequest) (response PatchMyAuthTokenResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutKmsiSetting.go.html to see an example of how to use PutKmsiSetting API. +func (client IdentityDomainsClient) PutKmsiSetting(ctx context.Context, request PutKmsiSettingRequest) (response PutKmsiSettingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -8407,42 +14855,42 @@ func (client IdentityDomainsClient) PatchMyAuthToken(ctx context.Context, reques request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchMyAuthToken, policy) + ociResponse, err = common.Retry(ctx, request, client.putKmsiSetting, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchMyAuthTokenResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutKmsiSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchMyAuthTokenResponse{} + response = PutKmsiSettingResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchMyAuthTokenResponse); ok { + if convertedResponse, ok := ociResponse.(PutKmsiSettingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchMyAuthTokenResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutKmsiSettingResponse") } return } -// patchMyAuthToken implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchMyAuthToken(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putKmsiSetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putKmsiSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/MyAuthTokens/{myAuthTokenId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/KmsiSettings/{kmsiSettingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchMyAuthTokenResponse + var response PutKmsiSettingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchMyAuthToken", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutKmsiSetting", apiReferenceLink) return response, err } @@ -8450,12 +14898,12 @@ func (client IdentityDomainsClient) patchMyAuthToken(ctx context.Context, reques return response, err } -// PatchMyCustomerSecretKey Update a user's own customer secret key. +// PutMe Replace a user's own information. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchMyCustomerSecretKey.go.html to see an example of how to use PatchMyCustomerSecretKey API. -func (client IdentityDomainsClient) PatchMyCustomerSecretKey(ctx context.Context, request PatchMyCustomerSecretKeyRequest) (response PatchMyCustomerSecretKeyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutMe.go.html to see an example of how to use PutMe API. +func (client IdentityDomainsClient) PutMe(ctx context.Context, request PutMeRequest) (response PutMeResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -8469,42 +14917,42 @@ func (client IdentityDomainsClient) PatchMyCustomerSecretKey(ctx context.Context request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchMyCustomerSecretKey, policy) + ociResponse, err = common.Retry(ctx, request, client.putMe, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchMyCustomerSecretKeyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutMeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchMyCustomerSecretKeyResponse{} + response = PutMeResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchMyCustomerSecretKeyResponse); ok { + if convertedResponse, ok := ociResponse.(PutMeResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchMyCustomerSecretKeyResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutMeResponse") } return } -// patchMyCustomerSecretKey implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchMyCustomerSecretKey(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putMe implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putMe(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/MyCustomerSecretKeys/{myCustomerSecretKeyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/Me", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchMyCustomerSecretKeyResponse + var response PutMeResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchMyCustomerSecretKey", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutMe", apiReferenceLink) return response, err } @@ -8512,12 +14960,12 @@ func (client IdentityDomainsClient) patchMyCustomerSecretKey(ctx context.Context return response, err } -// PatchMyDevice Update a Device +// PutMePasswordChanger Update a user's own password. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchMyDevice.go.html to see an example of how to use PatchMyDevice API. -func (client IdentityDomainsClient) PatchMyDevice(ctx context.Context, request PatchMyDeviceRequest) (response PatchMyDeviceResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutMePasswordChanger.go.html to see an example of how to use PutMePasswordChanger API. +func (client IdentityDomainsClient) PutMePasswordChanger(ctx context.Context, request PutMePasswordChangerRequest) (response PutMePasswordChangerResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -8531,42 +14979,42 @@ func (client IdentityDomainsClient) PatchMyDevice(ctx context.Context, request P request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchMyDevice, policy) + ociResponse, err = common.Retry(ctx, request, client.putMePasswordChanger, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchMyDeviceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutMePasswordChangerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchMyDeviceResponse{} + response = PutMePasswordChangerResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchMyDeviceResponse); ok { + if convertedResponse, ok := ociResponse.(PutMePasswordChangerResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchMyDeviceResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutMePasswordChangerResponse") } return } -// patchMyDevice implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchMyDevice(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putMePasswordChanger implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putMePasswordChanger(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/MyDevices/{myDeviceId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/MePasswordChanger", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchMyDeviceResponse + var response PutMePasswordChangerResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchMyDevice", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutMePasswordChanger", apiReferenceLink) return response, err } @@ -8574,12 +15022,12 @@ func (client IdentityDomainsClient) patchMyDevice(ctx context.Context, request c return response, err } -// PatchMyOAuth2ClientCredential Update a user's own OAuth2 client credential. +// PutNetworkPerimeter Replace a NetworkPerimeter // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchMyOAuth2ClientCredential.go.html to see an example of how to use PatchMyOAuth2ClientCredential API. -func (client IdentityDomainsClient) PatchMyOAuth2ClientCredential(ctx context.Context, request PatchMyOAuth2ClientCredentialRequest) (response PatchMyOAuth2ClientCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutNetworkPerimeter.go.html to see an example of how to use PutNetworkPerimeter API. +func (client IdentityDomainsClient) PutNetworkPerimeter(ctx context.Context, request PutNetworkPerimeterRequest) (response PutNetworkPerimeterResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -8593,42 +15041,42 @@ func (client IdentityDomainsClient) PatchMyOAuth2ClientCredential(ctx context.Co request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchMyOAuth2ClientCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.putNetworkPerimeter, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchMyOAuth2ClientCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutNetworkPerimeterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchMyOAuth2ClientCredentialResponse{} + response = PutNetworkPerimeterResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchMyOAuth2ClientCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(PutNetworkPerimeterResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchMyOAuth2ClientCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutNetworkPerimeterResponse") } return } -// patchMyOAuth2ClientCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchMyOAuth2ClientCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putNetworkPerimeter implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putNetworkPerimeter(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/MyOAuth2ClientCredentials/{myOAuth2ClientCredentialId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/NetworkPerimeters/{networkPerimeterId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchMyOAuth2ClientCredentialResponse + var response PutNetworkPerimeterResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchMyOAuth2ClientCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutNetworkPerimeter", apiReferenceLink) return response, err } @@ -8636,12 +15084,12 @@ func (client IdentityDomainsClient) patchMyOAuth2ClientCredential(ctx context.Co return response, err } -// PatchMySmtpCredential Update a user's own SMTP credential. +// PutNotificationSetting Replace Notification Settings // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchMySmtpCredential.go.html to see an example of how to use PatchMySmtpCredential API. -func (client IdentityDomainsClient) PatchMySmtpCredential(ctx context.Context, request PatchMySmtpCredentialRequest) (response PatchMySmtpCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutNotificationSetting.go.html to see an example of how to use PutNotificationSetting API. +func (client IdentityDomainsClient) PutNotificationSetting(ctx context.Context, request PutNotificationSettingRequest) (response PutNotificationSettingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -8655,42 +15103,42 @@ func (client IdentityDomainsClient) PatchMySmtpCredential(ctx context.Context, r request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchMySmtpCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.putNotificationSetting, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchMySmtpCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutNotificationSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchMySmtpCredentialResponse{} + response = PutNotificationSettingResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchMySmtpCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(PutNotificationSettingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchMySmtpCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutNotificationSettingResponse") } return } -// patchMySmtpCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchMySmtpCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putNotificationSetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putNotificationSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/MySmtpCredentials/{mySmtpCredentialId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/NotificationSettings/{notificationSettingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchMySmtpCredentialResponse + var response PutNotificationSettingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchMySmtpCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutNotificationSetting", apiReferenceLink) return response, err } @@ -8698,12 +15146,12 @@ func (client IdentityDomainsClient) patchMySmtpCredential(ctx context.Context, r return response, err } -// PatchOAuth2ClientCredential Update a user's OAuth2 client credentials. +// PutPasswordPolicy Replace a password policy. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchOAuth2ClientCredential.go.html to see an example of how to use PatchOAuth2ClientCredential API. -func (client IdentityDomainsClient) PatchOAuth2ClientCredential(ctx context.Context, request PatchOAuth2ClientCredentialRequest) (response PatchOAuth2ClientCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutPasswordPolicy.go.html to see an example of how to use PutPasswordPolicy API. +func (client IdentityDomainsClient) PutPasswordPolicy(ctx context.Context, request PutPasswordPolicyRequest) (response PutPasswordPolicyResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -8717,42 +15165,42 @@ func (client IdentityDomainsClient) PatchOAuth2ClientCredential(ctx context.Cont request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchOAuth2ClientCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.putPasswordPolicy, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchOAuth2ClientCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutPasswordPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchOAuth2ClientCredentialResponse{} + response = PutPasswordPolicyResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchOAuth2ClientCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(PutPasswordPolicyResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchOAuth2ClientCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutPasswordPolicyResponse") } return } -// patchOAuth2ClientCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchOAuth2ClientCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putPasswordPolicy implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putPasswordPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/OAuth2ClientCredentials/{oAuth2ClientCredentialId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/PasswordPolicies/{passwordPolicyId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchOAuth2ClientCredentialResponse + var response PutPasswordPolicyResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchOAuth2ClientCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutPasswordPolicy", apiReferenceLink) return response, err } @@ -8760,12 +15208,12 @@ func (client IdentityDomainsClient) patchOAuth2ClientCredential(ctx context.Cont return response, err } -// PatchPasswordPolicy Update a password policy. +// PutPolicy Replace a Policy // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchPasswordPolicy.go.html to see an example of how to use PatchPasswordPolicy API. -func (client IdentityDomainsClient) PatchPasswordPolicy(ctx context.Context, request PatchPasswordPolicyRequest) (response PatchPasswordPolicyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutPolicy.go.html to see an example of how to use PutPolicy API. +func (client IdentityDomainsClient) PutPolicy(ctx context.Context, request PutPolicyRequest) (response PutPolicyResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -8779,42 +15227,42 @@ func (client IdentityDomainsClient) PatchPasswordPolicy(ctx context.Context, req request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchPasswordPolicy, policy) + ociResponse, err = common.Retry(ctx, request, client.putPolicy, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchPasswordPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchPasswordPolicyResponse{} + response = PutPolicyResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchPasswordPolicyResponse); ok { + if convertedResponse, ok := ociResponse.(PutPolicyResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchPasswordPolicyResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutPolicyResponse") } return } -// patchPasswordPolicy implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchPasswordPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putPolicy implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/PasswordPolicies/{passwordPolicyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/Policies/{policyId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchPasswordPolicyResponse + var response PutPolicyResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchPasswordPolicy", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutPolicy", apiReferenceLink) return response, err } @@ -8822,12 +15270,12 @@ func (client IdentityDomainsClient) patchPasswordPolicy(ctx context.Context, req return response, err } -// PatchSecurityQuestion Update a security question. +// PutRule Replace a Rule // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchSecurityQuestion.go.html to see an example of how to use PatchSecurityQuestion API. -func (client IdentityDomainsClient) PatchSecurityQuestion(ctx context.Context, request PatchSecurityQuestionRequest) (response PatchSecurityQuestionResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutRule.go.html to see an example of how to use PutRule API. +func (client IdentityDomainsClient) PutRule(ctx context.Context, request PutRuleRequest) (response PutRuleResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -8841,42 +15289,42 @@ func (client IdentityDomainsClient) PatchSecurityQuestion(ctx context.Context, r request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchSecurityQuestion, policy) + ociResponse, err = common.Retry(ctx, request, client.putRule, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchSecurityQuestionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutRuleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchSecurityQuestionResponse{} + response = PutRuleResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchSecurityQuestionResponse); ok { + if convertedResponse, ok := ociResponse.(PutRuleResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchSecurityQuestionResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutRuleResponse") } return } -// patchSecurityQuestion implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchSecurityQuestion(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putRule implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putRule(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/SecurityQuestions/{securityQuestionId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/Rules/{ruleId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchSecurityQuestionResponse + var response PutRuleResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchSecurityQuestion", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutRule", apiReferenceLink) return response, err } @@ -8884,12 +15332,12 @@ func (client IdentityDomainsClient) patchSecurityQuestion(ctx context.Context, r return response, err } -// PatchSecurityQuestionSetting Update a security question setting. +// PutSchema Replace a Schema Def // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchSecurityQuestionSetting.go.html to see an example of how to use PatchSecurityQuestionSetting API. -func (client IdentityDomainsClient) PatchSecurityQuestionSetting(ctx context.Context, request PatchSecurityQuestionSettingRequest) (response PatchSecurityQuestionSettingResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutSchema.go.html to see an example of how to use PutSchema API. +func (client IdentityDomainsClient) PutSchema(ctx context.Context, request PutSchemaRequest) (response PutSchemaResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -8903,42 +15351,42 @@ func (client IdentityDomainsClient) PatchSecurityQuestionSetting(ctx context.Con request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchSecurityQuestionSetting, policy) + ociResponse, err = common.Retry(ctx, request, client.putSchema, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchSecurityQuestionSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutSchemaResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchSecurityQuestionSettingResponse{} + response = PutSchemaResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchSecurityQuestionSettingResponse); ok { + if convertedResponse, ok := ociResponse.(PutSchemaResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchSecurityQuestionSettingResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutSchemaResponse") } return } -// patchSecurityQuestionSetting implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchSecurityQuestionSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putSchema implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putSchema(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/SecurityQuestionSettings/{securityQuestionSettingId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/Schemas/{schemaId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchSecurityQuestionSettingResponse + var response PutSchemaResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchSecurityQuestionSetting", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutSchema", apiReferenceLink) return response, err } @@ -8946,12 +15394,12 @@ func (client IdentityDomainsClient) patchSecurityQuestionSetting(ctx context.Con return response, err } -// PatchSmtpCredential Update a user's SMTP credentials. +// PutSecurityQuestionSetting Replace a security question setting. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchSmtpCredential.go.html to see an example of how to use PatchSmtpCredential API. -func (client IdentityDomainsClient) PatchSmtpCredential(ctx context.Context, request PatchSmtpCredentialRequest) (response PatchSmtpCredentialResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutSecurityQuestionSetting.go.html to see an example of how to use PutSecurityQuestionSetting API. +func (client IdentityDomainsClient) PutSecurityQuestionSetting(ctx context.Context, request PutSecurityQuestionSettingRequest) (response PutSecurityQuestionSettingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -8965,42 +15413,42 @@ func (client IdentityDomainsClient) PatchSmtpCredential(ctx context.Context, req request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchSmtpCredential, policy) + ociResponse, err = common.Retry(ctx, request, client.putSecurityQuestionSetting, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchSmtpCredentialResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutSecurityQuestionSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchSmtpCredentialResponse{} + response = PutSecurityQuestionSettingResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchSmtpCredentialResponse); ok { + if convertedResponse, ok := ociResponse.(PutSecurityQuestionSettingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchSmtpCredentialResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutSecurityQuestionSettingResponse") } return } -// patchSmtpCredential implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchSmtpCredential(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putSecurityQuestionSetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putSecurityQuestionSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/SmtpCredentials/{smtpCredentialId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/SecurityQuestionSettings/{securityQuestionSettingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchSmtpCredentialResponse + var response PutSecurityQuestionSettingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchSmtpCredential", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutSecurityQuestionSetting", apiReferenceLink) return response, err } @@ -9008,12 +15456,12 @@ func (client IdentityDomainsClient) patchSmtpCredential(ctx context.Context, req return response, err } -// PatchUser Update a user. +// PutSelfRegistrationProfile Replace a self-registration profile. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchUser.go.html to see an example of how to use PatchUser API. -func (client IdentityDomainsClient) PatchUser(ctx context.Context, request PatchUserRequest) (response PatchUserResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutSelfRegistrationProfile.go.html to see an example of how to use PutSelfRegistrationProfile API. +func (client IdentityDomainsClient) PutSelfRegistrationProfile(ctx context.Context, request PutSelfRegistrationProfileRequest) (response PutSelfRegistrationProfileResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -9027,42 +15475,42 @@ func (client IdentityDomainsClient) PatchUser(ctx context.Context, request Patch request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchUser, policy) + ociResponse, err = common.Retry(ctx, request, client.putSelfRegistrationProfile, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchUserResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutSelfRegistrationProfileResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchUserResponse{} + response = PutSelfRegistrationProfileResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchUserResponse); ok { + if convertedResponse, ok := ociResponse.(PutSelfRegistrationProfileResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchUserResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutSelfRegistrationProfileResponse") } return } -// patchUser implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchUser(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putSelfRegistrationProfile implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putSelfRegistrationProfile(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/Users/{userId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/SelfRegistrationProfiles/{selfRegistrationProfileId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchUserResponse + var response PutSelfRegistrationProfileResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchUser", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutSelfRegistrationProfile", apiReferenceLink) return response, err } @@ -9070,12 +15518,12 @@ func (client IdentityDomainsClient) patchUser(ctx context.Context, request commo return response, err } -// PatchUserAttributesSetting Update User Schema Attribute Settings +// PutSetting Replace Settings // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchUserAttributesSetting.go.html to see an example of how to use PatchUserAttributesSetting API. -func (client IdentityDomainsClient) PatchUserAttributesSetting(ctx context.Context, request PatchUserAttributesSettingRequest) (response PatchUserAttributesSettingResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutSetting.go.html to see an example of how to use PutSetting API. +func (client IdentityDomainsClient) PutSetting(ctx context.Context, request PutSettingRequest) (response PutSettingResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -9089,42 +15537,42 @@ func (client IdentityDomainsClient) PatchUserAttributesSetting(ctx context.Conte request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.patchUserAttributesSetting, policy) + ociResponse, err = common.Retry(ctx, request, client.putSetting, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PatchUserAttributesSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PatchUserAttributesSettingResponse{} + response = PutSettingResponse{} } } return } - if convertedResponse, ok := ociResponse.(PatchUserAttributesSettingResponse); ok { + if convertedResponse, ok := ociResponse.(PutSettingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PatchUserAttributesSettingResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutSettingResponse") } return } -// patchUserAttributesSetting implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) patchUserAttributesSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putSetting implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPatch, "/admin/v1/UserAttributesSettings/{userAttributesSettingId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/Settings/{settingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PatchUserAttributesSettingResponse + var response PutSettingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PatchUserAttributesSetting", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutSetting", apiReferenceLink) return response, err } @@ -9132,12 +15580,12 @@ func (client IdentityDomainsClient) patchUserAttributesSetting(ctx context.Conte return response, err } -// PutAccountRecoverySetting Replace an account recovery setting. +// PutUser Replace a user. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutAccountRecoverySetting.go.html to see an example of how to use PutAccountRecoverySetting API. -func (client IdentityDomainsClient) PutAccountRecoverySetting(ctx context.Context, request PutAccountRecoverySettingRequest) (response PutAccountRecoverySettingResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutUser.go.html to see an example of how to use PutUser API. +func (client IdentityDomainsClient) PutUser(ctx context.Context, request PutUserRequest) (response PutUserResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -9151,42 +15599,42 @@ func (client IdentityDomainsClient) PutAccountRecoverySetting(ctx context.Contex request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.putAccountRecoverySetting, policy) + ociResponse, err = common.Retry(ctx, request, client.putUser, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutAccountRecoverySettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutUserResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutAccountRecoverySettingResponse{} + response = PutUserResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutAccountRecoverySettingResponse); ok { + if convertedResponse, ok := ociResponse.(PutUserResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutAccountRecoverySettingResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutUserResponse") } return } -// putAccountRecoverySetting implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) putAccountRecoverySetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putUser implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putUser(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/AccountRecoverySettings/{accountRecoverySettingId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/Users/{userId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutAccountRecoverySettingResponse + var response PutUserResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PutAccountRecoverySetting", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutUser", apiReferenceLink) return response, err } @@ -9194,12 +15642,12 @@ func (client IdentityDomainsClient) putAccountRecoverySetting(ctx context.Contex return response, err } -// PutApp Replace an App +// PutUserCapabilitiesChanger Change a user's capabilities. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutApp.go.html to see an example of how to use PutApp API. -func (client IdentityDomainsClient) PutApp(ctx context.Context, request PutAppRequest) (response PutAppResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutUserCapabilitiesChanger.go.html to see an example of how to use PutUserCapabilitiesChanger API. +func (client IdentityDomainsClient) PutUserCapabilitiesChanger(ctx context.Context, request PutUserCapabilitiesChangerRequest) (response PutUserCapabilitiesChangerResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -9213,42 +15661,42 @@ func (client IdentityDomainsClient) PutApp(ctx context.Context, request PutAppRe request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.putApp, policy) + ociResponse, err = common.Retry(ctx, request, client.putUserCapabilitiesChanger, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutAppResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutUserCapabilitiesChangerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutAppResponse{} + response = PutUserCapabilitiesChangerResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutAppResponse); ok { + if convertedResponse, ok := ociResponse.(PutUserCapabilitiesChangerResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutAppResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutUserCapabilitiesChangerResponse") } return } -// putApp implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) putApp(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putUserCapabilitiesChanger implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putUserCapabilitiesChanger(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/Apps/{appId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/UserCapabilitiesChanger/{userCapabilitiesChangerId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutAppResponse + var response PutUserCapabilitiesChangerResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PutApp", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutUserCapabilitiesChanger", apiReferenceLink) return response, err } @@ -9256,12 +15704,12 @@ func (client IdentityDomainsClient) putApp(ctx context.Context, request common.O return response, err } -// PutAppStatusChanger Activate/Deactivate an App +// PutUserPasswordChanger Change a user's password to a known value. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutAppStatusChanger.go.html to see an example of how to use PutAppStatusChanger API. -func (client IdentityDomainsClient) PutAppStatusChanger(ctx context.Context, request PutAppStatusChangerRequest) (response PutAppStatusChangerResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutUserPasswordChanger.go.html to see an example of how to use PutUserPasswordChanger API. +func (client IdentityDomainsClient) PutUserPasswordChanger(ctx context.Context, request PutUserPasswordChangerRequest) (response PutUserPasswordChangerResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -9275,42 +15723,42 @@ func (client IdentityDomainsClient) PutAppStatusChanger(ctx context.Context, req request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.putAppStatusChanger, policy) + ociResponse, err = common.Retry(ctx, request, client.putUserPasswordChanger, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutAppStatusChangerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutUserPasswordChangerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutAppStatusChangerResponse{} + response = PutUserPasswordChangerResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutAppStatusChangerResponse); ok { + if convertedResponse, ok := ociResponse.(PutUserPasswordChangerResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutAppStatusChangerResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutUserPasswordChangerResponse") } return } -// putAppStatusChanger implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) putAppStatusChanger(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putUserPasswordChanger implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putUserPasswordChanger(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/AppStatusChanger/{appStatusChangerId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/UserPasswordChanger/{userPasswordChangerId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutAppStatusChangerResponse + var response PutUserPasswordChangerResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PutAppStatusChanger", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutUserPasswordChanger", apiReferenceLink) return response, err } @@ -9318,12 +15766,12 @@ func (client IdentityDomainsClient) putAppStatusChanger(ctx context.Context, req return response, err } -// PutAuthenticationFactorSetting Replace Authentication Factor Settings +// PutUserPasswordResetter Reset a user's password to a randomly-generated value. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutAuthenticationFactorSetting.go.html to see an example of how to use PutAuthenticationFactorSetting API. -func (client IdentityDomainsClient) PutAuthenticationFactorSetting(ctx context.Context, request PutAuthenticationFactorSettingRequest) (response PutAuthenticationFactorSettingResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutUserPasswordResetter.go.html to see an example of how to use PutUserPasswordResetter API. +func (client IdentityDomainsClient) PutUserPasswordResetter(ctx context.Context, request PutUserPasswordResetterRequest) (response PutUserPasswordResetterResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -9337,42 +15785,42 @@ func (client IdentityDomainsClient) PutAuthenticationFactorSetting(ctx context.C request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.putAuthenticationFactorSetting, policy) + ociResponse, err = common.Retry(ctx, request, client.putUserPasswordResetter, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutAuthenticationFactorSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutUserPasswordResetterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutAuthenticationFactorSettingResponse{} + response = PutUserPasswordResetterResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutAuthenticationFactorSettingResponse); ok { + if convertedResponse, ok := ociResponse.(PutUserPasswordResetterResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutAuthenticationFactorSettingResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutUserPasswordResetterResponse") } return } -// putAuthenticationFactorSetting implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) putAuthenticationFactorSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putUserPasswordResetter implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putUserPasswordResetter(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/AuthenticationFactorSettings/{authenticationFactorSettingId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/UserPasswordResetter/{userPasswordResetterId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutAuthenticationFactorSettingResponse + var response PutUserPasswordResetterResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PutAuthenticationFactorSetting", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutUserPasswordResetter", apiReferenceLink) return response, err } @@ -9380,12 +15828,12 @@ func (client IdentityDomainsClient) putAuthenticationFactorSetting(ctx context.C return response, err } -// PutDynamicResourceGroup Replace a Dynamic Resource Group. +// PutUserStatusChanger Change a user's status. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutDynamicResourceGroup.go.html to see an example of how to use PutDynamicResourceGroup API. -func (client IdentityDomainsClient) PutDynamicResourceGroup(ctx context.Context, request PutDynamicResourceGroupRequest) (response PutDynamicResourceGroupResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutUserStatusChanger.go.html to see an example of how to use PutUserStatusChanger API. +func (client IdentityDomainsClient) PutUserStatusChanger(ctx context.Context, request PutUserStatusChangerRequest) (response PutUserStatusChangerResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -9399,42 +15847,42 @@ func (client IdentityDomainsClient) PutDynamicResourceGroup(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.putDynamicResourceGroup, policy) + ociResponse, err = common.Retry(ctx, request, client.putUserStatusChanger, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutDynamicResourceGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PutUserStatusChangerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutDynamicResourceGroupResponse{} + response = PutUserStatusChangerResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutDynamicResourceGroupResponse); ok { + if convertedResponse, ok := ociResponse.(PutUserStatusChangerResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutDynamicResourceGroupResponse") + err = fmt.Errorf("failed to convert OCIResponse into PutUserStatusChangerResponse") } return } -// putDynamicResourceGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) putDynamicResourceGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// putUserStatusChanger implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) putUserStatusChanger(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/DynamicResourceGroups/{dynamicResourceGroupId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/UserStatusChanger/{userStatusChangerId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutDynamicResourceGroupResponse + var response PutUserStatusChangerResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PutDynamicResourceGroup", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "PutUserStatusChanger", apiReferenceLink) return response, err } @@ -9442,12 +15890,12 @@ func (client IdentityDomainsClient) putDynamicResourceGroup(ctx context.Context, return response, err } -// PutGroup Replace a group. +// SearchAccountMgmtInfos Search Account Mgmt Info Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutGroup.go.html to see an example of how to use PutGroup API. -func (client IdentityDomainsClient) PutGroup(ctx context.Context, request PutGroupRequest) (response PutGroupResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchAccountMgmtInfos.go.html to see an example of how to use SearchAccountMgmtInfos API. +func (client IdentityDomainsClient) SearchAccountMgmtInfos(ctx context.Context, request SearchAccountMgmtInfosRequest) (response SearchAccountMgmtInfosResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -9461,42 +15909,42 @@ func (client IdentityDomainsClient) PutGroup(ctx context.Context, request PutGro request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.putGroup, policy) + ociResponse, err = common.Retry(ctx, request, client.searchAccountMgmtInfos, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutGroupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchAccountMgmtInfosResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutGroupResponse{} + response = SearchAccountMgmtInfosResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutGroupResponse); ok { + if convertedResponse, ok := ociResponse.(SearchAccountMgmtInfosResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutGroupResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchAccountMgmtInfosResponse") } return } -// putGroup implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) putGroup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchAccountMgmtInfos implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchAccountMgmtInfos(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/Groups/{groupId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/AccountMgmtInfos/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutGroupResponse + var response SearchAccountMgmtInfosResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PutGroup", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchAccountMgmtInfos", apiReferenceLink) return response, err } @@ -9504,12 +15952,12 @@ func (client IdentityDomainsClient) putGroup(ctx context.Context, request common return response, err } -// PutIdentityProvider Replace an Identity Provider +// SearchApiKeys Search for API keys using POST. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutIdentityProvider.go.html to see an example of how to use PutIdentityProvider API. -func (client IdentityDomainsClient) PutIdentityProvider(ctx context.Context, request PutIdentityProviderRequest) (response PutIdentityProviderResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchApiKeys.go.html to see an example of how to use SearchApiKeys API. +func (client IdentityDomainsClient) SearchApiKeys(ctx context.Context, request SearchApiKeysRequest) (response SearchApiKeysResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -9523,42 +15971,42 @@ func (client IdentityDomainsClient) PutIdentityProvider(ctx context.Context, req request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.putIdentityProvider, policy) + ociResponse, err = common.Retry(ctx, request, client.searchApiKeys, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutIdentityProviderResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchApiKeysResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutIdentityProviderResponse{} + response = SearchApiKeysResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutIdentityProviderResponse); ok { + if convertedResponse, ok := ociResponse.(SearchApiKeysResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutIdentityProviderResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchApiKeysResponse") } return } -// putIdentityProvider implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) putIdentityProvider(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchApiKeys implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchApiKeys(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/IdentityProviders/{identityProviderId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/ApiKeys/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutIdentityProviderResponse + var response SearchApiKeysResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PutIdentityProvider", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchApiKeys", apiReferenceLink) return response, err } @@ -9566,12 +16014,12 @@ func (client IdentityDomainsClient) putIdentityProvider(ctx context.Context, req return response, err } -// PutIdentitySetting Replace an Identity setting. +// SearchAppRoles Search AppRoles Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutIdentitySetting.go.html to see an example of how to use PutIdentitySetting API. -func (client IdentityDomainsClient) PutIdentitySetting(ctx context.Context, request PutIdentitySettingRequest) (response PutIdentitySettingResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchAppRoles.go.html to see an example of how to use SearchAppRoles API. +func (client IdentityDomainsClient) SearchAppRoles(ctx context.Context, request SearchAppRolesRequest) (response SearchAppRolesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -9585,42 +16033,42 @@ func (client IdentityDomainsClient) PutIdentitySetting(ctx context.Context, requ request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.putIdentitySetting, policy) + ociResponse, err = common.Retry(ctx, request, client.searchAppRoles, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutIdentitySettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchAppRolesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutIdentitySettingResponse{} + response = SearchAppRolesResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutIdentitySettingResponse); ok { + if convertedResponse, ok := ociResponse.(SearchAppRolesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutIdentitySettingResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchAppRolesResponse") } return } -// putIdentitySetting implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) putIdentitySetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchAppRoles implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchAppRoles(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/IdentitySettings/{identitySettingId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/AppRoles/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutIdentitySettingResponse + var response SearchAppRolesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PutIdentitySetting", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchAppRoles", apiReferenceLink) return response, err } @@ -9628,12 +16076,12 @@ func (client IdentityDomainsClient) putIdentitySetting(ctx context.Context, requ return response, err } -// PutKmsiSetting Replace KmsiSettings +// SearchApps Search Apps Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutKmsiSetting.go.html to see an example of how to use PutKmsiSetting API. -func (client IdentityDomainsClient) PutKmsiSetting(ctx context.Context, request PutKmsiSettingRequest) (response PutKmsiSettingResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchApps.go.html to see an example of how to use SearchApps API. +func (client IdentityDomainsClient) SearchApps(ctx context.Context, request SearchAppsRequest) (response SearchAppsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -9647,42 +16095,42 @@ func (client IdentityDomainsClient) PutKmsiSetting(ctx context.Context, request request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.putKmsiSetting, policy) + ociResponse, err = common.Retry(ctx, request, client.searchApps, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutKmsiSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchAppsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutKmsiSettingResponse{} + response = SearchAppsResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutKmsiSettingResponse); ok { + if convertedResponse, ok := ociResponse.(SearchAppsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutKmsiSettingResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchAppsResponse") } return } -// putKmsiSetting implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) putKmsiSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchApps implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchApps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/KmsiSettings/{kmsiSettingId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Apps/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutKmsiSettingResponse + var response SearchAppsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PutKmsiSetting", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchApps", apiReferenceLink) return response, err } @@ -9690,12 +16138,12 @@ func (client IdentityDomainsClient) putKmsiSetting(ctx context.Context, request return response, err } -// PutMe Replace a user's own information. +// SearchAuthTokens Search for Auth tokens using POST. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutMe.go.html to see an example of how to use PutMe API. -func (client IdentityDomainsClient) PutMe(ctx context.Context, request PutMeRequest) (response PutMeResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchAuthTokens.go.html to see an example of how to use SearchAuthTokens API. +func (client IdentityDomainsClient) SearchAuthTokens(ctx context.Context, request SearchAuthTokensRequest) (response SearchAuthTokensResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -9709,42 +16157,42 @@ func (client IdentityDomainsClient) PutMe(ctx context.Context, request PutMeRequ request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.putMe, policy) + ociResponse, err = common.Retry(ctx, request, client.searchAuthTokens, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutMeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchAuthTokensResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutMeResponse{} + response = SearchAuthTokensResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutMeResponse); ok { + if convertedResponse, ok := ociResponse.(SearchAuthTokensResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutMeResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchAuthTokensResponse") } return } -// putMe implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) putMe(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchAuthTokens implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchAuthTokens(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/Me", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/AuthTokens/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutMeResponse + var response SearchAuthTokensResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PutMe", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchAuthTokens", apiReferenceLink) return response, err } @@ -9752,12 +16200,12 @@ func (client IdentityDomainsClient) putMe(ctx context.Context, request common.OC return response, err } -// PutMePasswordChanger Update a user's own password. +// SearchAuthenticationFactorSettings Search Authentication Factor Settings Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutMePasswordChanger.go.html to see an example of how to use PutMePasswordChanger API. -func (client IdentityDomainsClient) PutMePasswordChanger(ctx context.Context, request PutMePasswordChangerRequest) (response PutMePasswordChangerResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchAuthenticationFactorSettings.go.html to see an example of how to use SearchAuthenticationFactorSettings API. +func (client IdentityDomainsClient) SearchAuthenticationFactorSettings(ctx context.Context, request SearchAuthenticationFactorSettingsRequest) (response SearchAuthenticationFactorSettingsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -9771,42 +16219,42 @@ func (client IdentityDomainsClient) PutMePasswordChanger(ctx context.Context, re request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.putMePasswordChanger, policy) + ociResponse, err = common.Retry(ctx, request, client.searchAuthenticationFactorSettings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutMePasswordChangerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchAuthenticationFactorSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutMePasswordChangerResponse{} + response = SearchAuthenticationFactorSettingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutMePasswordChangerResponse); ok { + if convertedResponse, ok := ociResponse.(SearchAuthenticationFactorSettingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutMePasswordChangerResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchAuthenticationFactorSettingsResponse") } return } -// putMePasswordChanger implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) putMePasswordChanger(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchAuthenticationFactorSettings implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchAuthenticationFactorSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/MePasswordChanger", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/AuthenticationFactorSettings/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutMePasswordChangerResponse + var response SearchAuthenticationFactorSettingsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PutMePasswordChanger", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchAuthenticationFactorSettings", apiReferenceLink) return response, err } @@ -9814,12 +16262,12 @@ func (client IdentityDomainsClient) putMePasswordChanger(ctx context.Context, re return response, err } -// PutPasswordPolicy Replace a password policy. +// SearchCloudGateMappings Search Cloud Gate mappings Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutPasswordPolicy.go.html to see an example of how to use PutPasswordPolicy API. -func (client IdentityDomainsClient) PutPasswordPolicy(ctx context.Context, request PutPasswordPolicyRequest) (response PutPasswordPolicyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchCloudGateMappings.go.html to see an example of how to use SearchCloudGateMappings API. +func (client IdentityDomainsClient) SearchCloudGateMappings(ctx context.Context, request SearchCloudGateMappingsRequest) (response SearchCloudGateMappingsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -9833,42 +16281,42 @@ func (client IdentityDomainsClient) PutPasswordPolicy(ctx context.Context, reque request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.putPasswordPolicy, policy) + ociResponse, err = common.Retry(ctx, request, client.searchCloudGateMappings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutPasswordPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchCloudGateMappingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutPasswordPolicyResponse{} + response = SearchCloudGateMappingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutPasswordPolicyResponse); ok { + if convertedResponse, ok := ociResponse.(SearchCloudGateMappingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutPasswordPolicyResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchCloudGateMappingsResponse") } return } -// putPasswordPolicy implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) putPasswordPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchCloudGateMappings implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchCloudGateMappings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/PasswordPolicies/{passwordPolicyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/CloudGateMappings/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutPasswordPolicyResponse + var response SearchCloudGateMappingsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PutPasswordPolicy", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchCloudGateMappings", apiReferenceLink) return response, err } @@ -9876,12 +16324,12 @@ func (client IdentityDomainsClient) putPasswordPolicy(ctx context.Context, reque return response, err } -// PutSecurityQuestionSetting Replace a security question setting. +// SearchCloudGateServers Search Cloud Gate servers Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutSecurityQuestionSetting.go.html to see an example of how to use PutSecurityQuestionSetting API. -func (client IdentityDomainsClient) PutSecurityQuestionSetting(ctx context.Context, request PutSecurityQuestionSettingRequest) (response PutSecurityQuestionSettingResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchCloudGateServers.go.html to see an example of how to use SearchCloudGateServers API. +func (client IdentityDomainsClient) SearchCloudGateServers(ctx context.Context, request SearchCloudGateServersRequest) (response SearchCloudGateServersResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -9895,42 +16343,42 @@ func (client IdentityDomainsClient) PutSecurityQuestionSetting(ctx context.Conte request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.putSecurityQuestionSetting, policy) + ociResponse, err = common.Retry(ctx, request, client.searchCloudGateServers, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutSecurityQuestionSettingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchCloudGateServersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutSecurityQuestionSettingResponse{} + response = SearchCloudGateServersResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutSecurityQuestionSettingResponse); ok { + if convertedResponse, ok := ociResponse.(SearchCloudGateServersResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutSecurityQuestionSettingResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchCloudGateServersResponse") } return } -// putSecurityQuestionSetting implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) putSecurityQuestionSetting(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchCloudGateServers implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchCloudGateServers(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/SecurityQuestionSettings/{securityQuestionSettingId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/CloudGateServers/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutSecurityQuestionSettingResponse + var response SearchCloudGateServersResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PutSecurityQuestionSetting", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchCloudGateServers", apiReferenceLink) return response, err } @@ -9938,12 +16386,12 @@ func (client IdentityDomainsClient) putSecurityQuestionSetting(ctx context.Conte return response, err } -// PutUser Replace a user. +// SearchCloudGates Search Cloud Gates Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutUser.go.html to see an example of how to use PutUser API. -func (client IdentityDomainsClient) PutUser(ctx context.Context, request PutUserRequest) (response PutUserResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchCloudGates.go.html to see an example of how to use SearchCloudGates API. +func (client IdentityDomainsClient) SearchCloudGates(ctx context.Context, request SearchCloudGatesRequest) (response SearchCloudGatesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -9957,42 +16405,42 @@ func (client IdentityDomainsClient) PutUser(ctx context.Context, request PutUser request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.putUser, policy) + ociResponse, err = common.Retry(ctx, request, client.searchCloudGates, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutUserResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchCloudGatesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutUserResponse{} + response = SearchCloudGatesResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutUserResponse); ok { + if convertedResponse, ok := ociResponse.(SearchCloudGatesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutUserResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchCloudGatesResponse") } return } -// putUser implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) putUser(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchCloudGates implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchCloudGates(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/Users/{userId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/CloudGates/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutUserResponse + var response SearchCloudGatesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PutUser", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchCloudGates", apiReferenceLink) return response, err } @@ -10000,12 +16448,12 @@ func (client IdentityDomainsClient) putUser(ctx context.Context, request common. return response, err } -// PutUserCapabilitiesChanger Change a user's capabilities. +// SearchConditions Search Conditions Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutUserCapabilitiesChanger.go.html to see an example of how to use PutUserCapabilitiesChanger API. -func (client IdentityDomainsClient) PutUserCapabilitiesChanger(ctx context.Context, request PutUserCapabilitiesChangerRequest) (response PutUserCapabilitiesChangerResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchConditions.go.html to see an example of how to use SearchConditions API. +func (client IdentityDomainsClient) SearchConditions(ctx context.Context, request SearchConditionsRequest) (response SearchConditionsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -10019,42 +16467,42 @@ func (client IdentityDomainsClient) PutUserCapabilitiesChanger(ctx context.Conte request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.putUserCapabilitiesChanger, policy) + ociResponse, err = common.Retry(ctx, request, client.searchConditions, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutUserCapabilitiesChangerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchConditionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutUserCapabilitiesChangerResponse{} + response = SearchConditionsResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutUserCapabilitiesChangerResponse); ok { + if convertedResponse, ok := ociResponse.(SearchConditionsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutUserCapabilitiesChangerResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchConditionsResponse") } return } -// putUserCapabilitiesChanger implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) putUserCapabilitiesChanger(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchConditions implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchConditions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/UserCapabilitiesChanger/{userCapabilitiesChangerId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Conditions/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutUserCapabilitiesChangerResponse + var response SearchConditionsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PutUserCapabilitiesChanger", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchConditions", apiReferenceLink) return response, err } @@ -10062,12 +16510,12 @@ func (client IdentityDomainsClient) putUserCapabilitiesChanger(ctx context.Conte return response, err } -// PutUserPasswordChanger Change a user's password to a known value. +// SearchCustomerSecretKeys Search for customer secret keys using POST. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutUserPasswordChanger.go.html to see an example of how to use PutUserPasswordChanger API. -func (client IdentityDomainsClient) PutUserPasswordChanger(ctx context.Context, request PutUserPasswordChangerRequest) (response PutUserPasswordChangerResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchCustomerSecretKeys.go.html to see an example of how to use SearchCustomerSecretKeys API. +func (client IdentityDomainsClient) SearchCustomerSecretKeys(ctx context.Context, request SearchCustomerSecretKeysRequest) (response SearchCustomerSecretKeysResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -10081,42 +16529,42 @@ func (client IdentityDomainsClient) PutUserPasswordChanger(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.putUserPasswordChanger, policy) + ociResponse, err = common.Retry(ctx, request, client.searchCustomerSecretKeys, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutUserPasswordChangerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchCustomerSecretKeysResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutUserPasswordChangerResponse{} + response = SearchCustomerSecretKeysResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutUserPasswordChangerResponse); ok { + if convertedResponse, ok := ociResponse.(SearchCustomerSecretKeysResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutUserPasswordChangerResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchCustomerSecretKeysResponse") } return } -// putUserPasswordChanger implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) putUserPasswordChanger(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchCustomerSecretKeys implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchCustomerSecretKeys(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/UserPasswordChanger/{userPasswordChangerId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/CustomerSecretKeys/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutUserPasswordChangerResponse + var response SearchCustomerSecretKeysResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PutUserPasswordChanger", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchCustomerSecretKeys", apiReferenceLink) return response, err } @@ -10124,12 +16572,12 @@ func (client IdentityDomainsClient) putUserPasswordChanger(ctx context.Context, return response, err } -// PutUserPasswordResetter Reset a user's password to a randomly-generated value. +// SearchDynamicResourceGroups Search for Dynamic Resource Groups using POST. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutUserPasswordResetter.go.html to see an example of how to use PutUserPasswordResetter API. -func (client IdentityDomainsClient) PutUserPasswordResetter(ctx context.Context, request PutUserPasswordResetterRequest) (response PutUserPasswordResetterResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchDynamicResourceGroups.go.html to see an example of how to use SearchDynamicResourceGroups API. +func (client IdentityDomainsClient) SearchDynamicResourceGroups(ctx context.Context, request SearchDynamicResourceGroupsRequest) (response SearchDynamicResourceGroupsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -10143,42 +16591,42 @@ func (client IdentityDomainsClient) PutUserPasswordResetter(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.putUserPasswordResetter, policy) + ociResponse, err = common.Retry(ctx, request, client.searchDynamicResourceGroups, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutUserPasswordResetterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchDynamicResourceGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutUserPasswordResetterResponse{} + response = SearchDynamicResourceGroupsResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutUserPasswordResetterResponse); ok { + if convertedResponse, ok := ociResponse.(SearchDynamicResourceGroupsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutUserPasswordResetterResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchDynamicResourceGroupsResponse") } return } -// putUserPasswordResetter implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) putUserPasswordResetter(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchDynamicResourceGroups implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchDynamicResourceGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/UserPasswordResetter/{userPasswordResetterId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/DynamicResourceGroups/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutUserPasswordResetterResponse + var response SearchDynamicResourceGroupsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PutUserPasswordResetter", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchDynamicResourceGroups", apiReferenceLink) return response, err } @@ -10186,12 +16634,12 @@ func (client IdentityDomainsClient) putUserPasswordResetter(ctx context.Context, return response, err } -// PutUserStatusChanger Change a user's status. +// SearchGrants Search Grants Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutUserStatusChanger.go.html to see an example of how to use PutUserStatusChanger API. -func (client IdentityDomainsClient) PutUserStatusChanger(ctx context.Context, request PutUserStatusChangerRequest) (response PutUserStatusChangerResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchGrants.go.html to see an example of how to use SearchGrants API. +func (client IdentityDomainsClient) SearchGrants(ctx context.Context, request SearchGrantsRequest) (response SearchGrantsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -10205,42 +16653,42 @@ func (client IdentityDomainsClient) PutUserStatusChanger(ctx context.Context, re request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.putUserStatusChanger, policy) + ociResponse, err = common.Retry(ctx, request, client.searchGrants, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PutUserStatusChangerResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchGrantsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PutUserStatusChangerResponse{} + response = SearchGrantsResponse{} } } return } - if convertedResponse, ok := ociResponse.(PutUserStatusChangerResponse); ok { + if convertedResponse, ok := ociResponse.(SearchGrantsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PutUserStatusChangerResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchGrantsResponse") } return } -// putUserStatusChanger implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) putUserStatusChanger(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchGrants implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchGrants(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPut, "/admin/v1/UserStatusChanger/{userStatusChangerId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Grants/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PutUserStatusChangerResponse + var response SearchGrantsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "PutUserStatusChanger", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchGrants", apiReferenceLink) return response, err } @@ -10248,12 +16696,12 @@ func (client IdentityDomainsClient) putUserStatusChanger(ctx context.Context, re return response, err } -// SearchAccountMgmtInfos Search Account Mgmt Info Using POST +// SearchGroups Search for groups using POST. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchAccountMgmtInfos.go.html to see an example of how to use SearchAccountMgmtInfos API. -func (client IdentityDomainsClient) SearchAccountMgmtInfos(ctx context.Context, request SearchAccountMgmtInfosRequest) (response SearchAccountMgmtInfosResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchGroups.go.html to see an example of how to use SearchGroups API. +func (client IdentityDomainsClient) SearchGroups(ctx context.Context, request SearchGroupsRequest) (response SearchGroupsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -10267,42 +16715,42 @@ func (client IdentityDomainsClient) SearchAccountMgmtInfos(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchAccountMgmtInfos, policy) + ociResponse, err = common.Retry(ctx, request, client.searchGroups, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchAccountMgmtInfosResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchAccountMgmtInfosResponse{} + response = SearchGroupsResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchAccountMgmtInfosResponse); ok { + if convertedResponse, ok := ociResponse.(SearchGroupsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchAccountMgmtInfosResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchGroupsResponse") } return } -// searchAccountMgmtInfos implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchAccountMgmtInfos(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchGroups implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/AccountMgmtInfos/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Groups/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchAccountMgmtInfosResponse + var response SearchGroupsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchAccountMgmtInfos", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchGroups", apiReferenceLink) return response, err } @@ -10310,12 +16758,12 @@ func (client IdentityDomainsClient) searchAccountMgmtInfos(ctx context.Context, return response, err } -// SearchApiKeys Search ApiKeys Using POST +// SearchIdentityProviders Search Identity Providers Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchApiKeys.go.html to see an example of how to use SearchApiKeys API. -func (client IdentityDomainsClient) SearchApiKeys(ctx context.Context, request SearchApiKeysRequest) (response SearchApiKeysResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchIdentityProviders.go.html to see an example of how to use SearchIdentityProviders API. +func (client IdentityDomainsClient) SearchIdentityProviders(ctx context.Context, request SearchIdentityProvidersRequest) (response SearchIdentityProvidersResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -10329,42 +16777,42 @@ func (client IdentityDomainsClient) SearchApiKeys(ctx context.Context, request S request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchApiKeys, policy) + ociResponse, err = common.Retry(ctx, request, client.searchIdentityProviders, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchApiKeysResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchIdentityProvidersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchApiKeysResponse{} + response = SearchIdentityProvidersResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchApiKeysResponse); ok { + if convertedResponse, ok := ociResponse.(SearchIdentityProvidersResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchApiKeysResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchIdentityProvidersResponse") } return } -// searchApiKeys implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchApiKeys(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchIdentityProviders implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchIdentityProviders(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/ApiKeys/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/IdentityProviders/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchApiKeysResponse + var response SearchIdentityProvidersResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchApiKeys", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchIdentityProviders", apiReferenceLink) return response, err } @@ -10372,12 +16820,12 @@ func (client IdentityDomainsClient) searchApiKeys(ctx context.Context, request c return response, err } -// SearchAppRoles Search AppRoles Using POST +// SearchIdentitySettings Search for Identity settings using POST. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchAppRoles.go.html to see an example of how to use SearchAppRoles API. -func (client IdentityDomainsClient) SearchAppRoles(ctx context.Context, request SearchAppRolesRequest) (response SearchAppRolesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchIdentitySettings.go.html to see an example of how to use SearchIdentitySettings API. +func (client IdentityDomainsClient) SearchIdentitySettings(ctx context.Context, request SearchIdentitySettingsRequest) (response SearchIdentitySettingsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -10391,42 +16839,42 @@ func (client IdentityDomainsClient) SearchAppRoles(ctx context.Context, request request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchAppRoles, policy) + ociResponse, err = common.Retry(ctx, request, client.searchIdentitySettings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchAppRolesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchIdentitySettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchAppRolesResponse{} + response = SearchIdentitySettingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchAppRolesResponse); ok { + if convertedResponse, ok := ociResponse.(SearchIdentitySettingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchAppRolesResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchIdentitySettingsResponse") } return } -// searchAppRoles implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchAppRoles(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchIdentitySettings implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchIdentitySettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/AppRoles/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/IdentitySettings/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchAppRolesResponse + var response SearchIdentitySettingsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchAppRoles", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchIdentitySettings", apiReferenceLink) return response, err } @@ -10434,12 +16882,12 @@ func (client IdentityDomainsClient) searchAppRoles(ctx context.Context, request return response, err } -// SearchApps Search Apps Using POST +// SearchKmsiSettings Search KmsiSettings Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchApps.go.html to see an example of how to use SearchApps API. -func (client IdentityDomainsClient) SearchApps(ctx context.Context, request SearchAppsRequest) (response SearchAppsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchKmsiSettings.go.html to see an example of how to use SearchKmsiSettings API. +func (client IdentityDomainsClient) SearchKmsiSettings(ctx context.Context, request SearchKmsiSettingsRequest) (response SearchKmsiSettingsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -10453,42 +16901,42 @@ func (client IdentityDomainsClient) SearchApps(ctx context.Context, request Sear request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchApps, policy) + ociResponse, err = common.Retry(ctx, request, client.searchKmsiSettings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchAppsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchKmsiSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchAppsResponse{} + response = SearchKmsiSettingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchAppsResponse); ok { + if convertedResponse, ok := ociResponse.(SearchKmsiSettingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchAppsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchKmsiSettingsResponse") } return } -// searchApps implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchApps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchKmsiSettings implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchKmsiSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Apps/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/KmsiSettings/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchAppsResponse + var response SearchKmsiSettingsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchApps", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchKmsiSettings", apiReferenceLink) return response, err } @@ -10496,12 +16944,12 @@ func (client IdentityDomainsClient) searchApps(ctx context.Context, request comm return response, err } -// SearchAuthTokens Search for Auth tokens using POST. +// SearchMyApps Search My Apps Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchAuthTokens.go.html to see an example of how to use SearchAuthTokens API. -func (client IdentityDomainsClient) SearchAuthTokens(ctx context.Context, request SearchAuthTokensRequest) (response SearchAuthTokensResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchMyApps.go.html to see an example of how to use SearchMyApps API. +func (client IdentityDomainsClient) SearchMyApps(ctx context.Context, request SearchMyAppsRequest) (response SearchMyAppsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -10515,42 +16963,42 @@ func (client IdentityDomainsClient) SearchAuthTokens(ctx context.Context, reques request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchAuthTokens, policy) + ociResponse, err = common.Retry(ctx, request, client.searchMyApps, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchAuthTokensResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchMyAppsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchAuthTokensResponse{} + response = SearchMyAppsResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchAuthTokensResponse); ok { + if convertedResponse, ok := ociResponse.(SearchMyAppsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchAuthTokensResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchMyAppsResponse") } return } -// searchAuthTokens implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchAuthTokens(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchMyApps implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchMyApps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/AuthTokens/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyApps/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchAuthTokensResponse + var response SearchMyAppsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchAuthTokens", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchMyApps", apiReferenceLink) return response, err } @@ -10558,12 +17006,12 @@ func (client IdentityDomainsClient) searchAuthTokens(ctx context.Context, reques return response, err } -// SearchAuthenticationFactorSettings Search Authentication Factor Settings Using POST +// SearchMyGroups Search for 'My Groups' using POST. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchAuthenticationFactorSettings.go.html to see an example of how to use SearchAuthenticationFactorSettings API. -func (client IdentityDomainsClient) SearchAuthenticationFactorSettings(ctx context.Context, request SearchAuthenticationFactorSettingsRequest) (response SearchAuthenticationFactorSettingsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchMyGroups.go.html to see an example of how to use SearchMyGroups API. +func (client IdentityDomainsClient) SearchMyGroups(ctx context.Context, request SearchMyGroupsRequest) (response SearchMyGroupsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -10577,42 +17025,42 @@ func (client IdentityDomainsClient) SearchAuthenticationFactorSettings(ctx conte request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchAuthenticationFactorSettings, policy) + ociResponse, err = common.Retry(ctx, request, client.searchMyGroups, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchAuthenticationFactorSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchMyGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchAuthenticationFactorSettingsResponse{} + response = SearchMyGroupsResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchAuthenticationFactorSettingsResponse); ok { + if convertedResponse, ok := ociResponse.(SearchMyGroupsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchAuthenticationFactorSettingsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchMyGroupsResponse") } return } -// searchAuthenticationFactorSettings implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchAuthenticationFactorSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchMyGroups implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchMyGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/AuthenticationFactorSettings/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyGroups/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchAuthenticationFactorSettingsResponse + var response SearchMyGroupsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchAuthenticationFactorSettings", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchMyGroups", apiReferenceLink) return response, err } @@ -10620,12 +17068,12 @@ func (client IdentityDomainsClient) searchAuthenticationFactorSettings(ctx conte return response, err } -// SearchCustomerSecretKeys Search for customer secret keys using POST. +// SearchMyRequestableGroups Search My Requestable Groups Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchCustomerSecretKeys.go.html to see an example of how to use SearchCustomerSecretKeys API. -func (client IdentityDomainsClient) SearchCustomerSecretKeys(ctx context.Context, request SearchCustomerSecretKeysRequest) (response SearchCustomerSecretKeysResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchMyRequestableGroups.go.html to see an example of how to use SearchMyRequestableGroups API. +func (client IdentityDomainsClient) SearchMyRequestableGroups(ctx context.Context, request SearchMyRequestableGroupsRequest) (response SearchMyRequestableGroupsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -10639,42 +17087,42 @@ func (client IdentityDomainsClient) SearchCustomerSecretKeys(ctx context.Context request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchCustomerSecretKeys, policy) + ociResponse, err = common.Retry(ctx, request, client.searchMyRequestableGroups, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchCustomerSecretKeysResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchMyRequestableGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchCustomerSecretKeysResponse{} + response = SearchMyRequestableGroupsResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchCustomerSecretKeysResponse); ok { + if convertedResponse, ok := ociResponse.(SearchMyRequestableGroupsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchCustomerSecretKeysResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchMyRequestableGroupsResponse") } return } -// searchCustomerSecretKeys implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchCustomerSecretKeys(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchMyRequestableGroups implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchMyRequestableGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/CustomerSecretKeys/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyRequestableGroups/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchCustomerSecretKeysResponse + var response SearchMyRequestableGroupsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchCustomerSecretKeys", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchMyRequestableGroups", apiReferenceLink) return response, err } @@ -10682,12 +17130,12 @@ func (client IdentityDomainsClient) searchCustomerSecretKeys(ctx context.Context return response, err } -// SearchDynamicResourceGroups Search for Dynamic Resource Groups using POST. +// SearchMyRequests Search My Requests Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchDynamicResourceGroups.go.html to see an example of how to use SearchDynamicResourceGroups API. -func (client IdentityDomainsClient) SearchDynamicResourceGroups(ctx context.Context, request SearchDynamicResourceGroupsRequest) (response SearchDynamicResourceGroupsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchMyRequests.go.html to see an example of how to use SearchMyRequests API. +func (client IdentityDomainsClient) SearchMyRequests(ctx context.Context, request SearchMyRequestsRequest) (response SearchMyRequestsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -10701,42 +17149,42 @@ func (client IdentityDomainsClient) SearchDynamicResourceGroups(ctx context.Cont request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchDynamicResourceGroups, policy) + ociResponse, err = common.Retry(ctx, request, client.searchMyRequests, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchDynamicResourceGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchMyRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchDynamicResourceGroupsResponse{} + response = SearchMyRequestsResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchDynamicResourceGroupsResponse); ok { + if convertedResponse, ok := ociResponse.(SearchMyRequestsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchDynamicResourceGroupsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchMyRequestsResponse") } return } -// searchDynamicResourceGroups implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchDynamicResourceGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/DynamicResourceGroups/.search", binaryReqBody, extraHeaders) +// searchMyRequests implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchMyRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyRequests/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchDynamicResourceGroupsResponse + var response SearchMyRequestsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchDynamicResourceGroups", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchMyRequests", apiReferenceLink) return response, err } @@ -10744,12 +17192,12 @@ func (client IdentityDomainsClient) searchDynamicResourceGroups(ctx context.Cont return response, err } -// SearchGrants Search Grants Using POST +// SearchNetworkPerimeters Search NetworkPerimeters Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchGrants.go.html to see an example of how to use SearchGrants API. -func (client IdentityDomainsClient) SearchGrants(ctx context.Context, request SearchGrantsRequest) (response SearchGrantsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchNetworkPerimeters.go.html to see an example of how to use SearchNetworkPerimeters API. +func (client IdentityDomainsClient) SearchNetworkPerimeters(ctx context.Context, request SearchNetworkPerimetersRequest) (response SearchNetworkPerimetersResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -10763,42 +17211,42 @@ func (client IdentityDomainsClient) SearchGrants(ctx context.Context, request Se request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchGrants, policy) + ociResponse, err = common.Retry(ctx, request, client.searchNetworkPerimeters, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchGrantsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchNetworkPerimetersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchGrantsResponse{} + response = SearchNetworkPerimetersResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchGrantsResponse); ok { + if convertedResponse, ok := ociResponse.(SearchNetworkPerimetersResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchGrantsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchNetworkPerimetersResponse") } return } -// searchGrants implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchGrants(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchNetworkPerimeters implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchNetworkPerimeters(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Grants/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/NetworkPerimeters/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchGrantsResponse + var response SearchNetworkPerimetersResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchGrants", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchNetworkPerimeters", apiReferenceLink) return response, err } @@ -10806,12 +17254,12 @@ func (client IdentityDomainsClient) searchGrants(ctx context.Context, request co return response, err } -// SearchGroups Search for groups using POST. +// SearchNotificationSettings Search Notification Settings Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchGroups.go.html to see an example of how to use SearchGroups API. -func (client IdentityDomainsClient) SearchGroups(ctx context.Context, request SearchGroupsRequest) (response SearchGroupsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchNotificationSettings.go.html to see an example of how to use SearchNotificationSettings API. +func (client IdentityDomainsClient) SearchNotificationSettings(ctx context.Context, request SearchNotificationSettingsRequest) (response SearchNotificationSettingsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -10825,42 +17273,42 @@ func (client IdentityDomainsClient) SearchGroups(ctx context.Context, request Se request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchGroups, policy) + ociResponse, err = common.Retry(ctx, request, client.searchNotificationSettings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchNotificationSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchGroupsResponse{} + response = SearchNotificationSettingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchGroupsResponse); ok { + if convertedResponse, ok := ociResponse.(SearchNotificationSettingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchGroupsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchNotificationSettingsResponse") } return } -// searchGroups implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchNotificationSettings implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchNotificationSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Groups/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/NotificationSettings/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchGroupsResponse + var response SearchNotificationSettingsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchGroups", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchNotificationSettings", apiReferenceLink) return response, err } @@ -10868,12 +17316,12 @@ func (client IdentityDomainsClient) searchGroups(ctx context.Context, request co return response, err } -// SearchIdentityProviders Search Identity Providers Using POST +// SearchOAuth2ClientCredentials Search for OAuth2 client credentials using POST. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchIdentityProviders.go.html to see an example of how to use SearchIdentityProviders API. -func (client IdentityDomainsClient) SearchIdentityProviders(ctx context.Context, request SearchIdentityProvidersRequest) (response SearchIdentityProvidersResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchOAuth2ClientCredentials.go.html to see an example of how to use SearchOAuth2ClientCredentials API. +func (client IdentityDomainsClient) SearchOAuth2ClientCredentials(ctx context.Context, request SearchOAuth2ClientCredentialsRequest) (response SearchOAuth2ClientCredentialsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -10887,42 +17335,42 @@ func (client IdentityDomainsClient) SearchIdentityProviders(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchIdentityProviders, policy) + ociResponse, err = common.Retry(ctx, request, client.searchOAuth2ClientCredentials, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchIdentityProvidersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchOAuth2ClientCredentialsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchIdentityProvidersResponse{} + response = SearchOAuth2ClientCredentialsResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchIdentityProvidersResponse); ok { + if convertedResponse, ok := ociResponse.(SearchOAuth2ClientCredentialsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchIdentityProvidersResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchOAuth2ClientCredentialsResponse") } return } -// searchIdentityProviders implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchIdentityProviders(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchOAuth2ClientCredentials implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchOAuth2ClientCredentials(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/IdentityProviders/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/OAuth2ClientCredentials/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchIdentityProvidersResponse + var response SearchOAuth2ClientCredentialsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchIdentityProviders", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchOAuth2ClientCredentials", apiReferenceLink) return response, err } @@ -10930,12 +17378,12 @@ func (client IdentityDomainsClient) searchIdentityProviders(ctx context.Context, return response, err } -// SearchIdentitySettings Search for Identity settings using POST. +// SearchOAuthClientCertificates Search OAuth Client Certificates Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchIdentitySettings.go.html to see an example of how to use SearchIdentitySettings API. -func (client IdentityDomainsClient) SearchIdentitySettings(ctx context.Context, request SearchIdentitySettingsRequest) (response SearchIdentitySettingsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchOAuthClientCertificates.go.html to see an example of how to use SearchOAuthClientCertificates API. +func (client IdentityDomainsClient) SearchOAuthClientCertificates(ctx context.Context, request SearchOAuthClientCertificatesRequest) (response SearchOAuthClientCertificatesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -10949,42 +17397,42 @@ func (client IdentityDomainsClient) SearchIdentitySettings(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchIdentitySettings, policy) + ociResponse, err = common.Retry(ctx, request, client.searchOAuthClientCertificates, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchIdentitySettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchOAuthClientCertificatesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchIdentitySettingsResponse{} + response = SearchOAuthClientCertificatesResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchIdentitySettingsResponse); ok { + if convertedResponse, ok := ociResponse.(SearchOAuthClientCertificatesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchIdentitySettingsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchOAuthClientCertificatesResponse") } return } -// searchIdentitySettings implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchIdentitySettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchOAuthClientCertificates implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchOAuthClientCertificates(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/IdentitySettings/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/OAuthClientCertificates/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchIdentitySettingsResponse + var response SearchOAuthClientCertificatesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchIdentitySettings", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchOAuthClientCertificates", apiReferenceLink) return response, err } @@ -10992,12 +17440,12 @@ func (client IdentityDomainsClient) searchIdentitySettings(ctx context.Context, return response, err } -// SearchKmsiSettings Search KmsiSettings Using POST +// SearchOAuthPartnerCertificates Search OAuth Partner Certificates Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchKmsiSettings.go.html to see an example of how to use SearchKmsiSettings API. -func (client IdentityDomainsClient) SearchKmsiSettings(ctx context.Context, request SearchKmsiSettingsRequest) (response SearchKmsiSettingsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchOAuthPartnerCertificates.go.html to see an example of how to use SearchOAuthPartnerCertificates API. +func (client IdentityDomainsClient) SearchOAuthPartnerCertificates(ctx context.Context, request SearchOAuthPartnerCertificatesRequest) (response SearchOAuthPartnerCertificatesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -11011,42 +17459,42 @@ func (client IdentityDomainsClient) SearchKmsiSettings(ctx context.Context, requ request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchKmsiSettings, policy) + ociResponse, err = common.Retry(ctx, request, client.searchOAuthPartnerCertificates, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchKmsiSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchOAuthPartnerCertificatesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchKmsiSettingsResponse{} + response = SearchOAuthPartnerCertificatesResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchKmsiSettingsResponse); ok { + if convertedResponse, ok := ociResponse.(SearchOAuthPartnerCertificatesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchKmsiSettingsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchOAuthPartnerCertificatesResponse") } return } -// searchKmsiSettings implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchKmsiSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchOAuthPartnerCertificates implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchOAuthPartnerCertificates(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/KmsiSettings/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/OAuthPartnerCertificates/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchKmsiSettingsResponse + var response SearchOAuthPartnerCertificatesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchKmsiSettings", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchOAuthPartnerCertificates", apiReferenceLink) return response, err } @@ -11054,12 +17502,12 @@ func (client IdentityDomainsClient) searchKmsiSettings(ctx context.Context, requ return response, err } -// SearchMyApps Search My Apps Using POST +// SearchPasswordPolicies Search for password policies using POST. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchMyApps.go.html to see an example of how to use SearchMyApps API. -func (client IdentityDomainsClient) SearchMyApps(ctx context.Context, request SearchMyAppsRequest) (response SearchMyAppsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchPasswordPolicies.go.html to see an example of how to use SearchPasswordPolicies API. +func (client IdentityDomainsClient) SearchPasswordPolicies(ctx context.Context, request SearchPasswordPoliciesRequest) (response SearchPasswordPoliciesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -11073,42 +17521,42 @@ func (client IdentityDomainsClient) SearchMyApps(ctx context.Context, request Se request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchMyApps, policy) + ociResponse, err = common.Retry(ctx, request, client.searchPasswordPolicies, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchMyAppsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchPasswordPoliciesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchMyAppsResponse{} + response = SearchPasswordPoliciesResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchMyAppsResponse); ok { + if convertedResponse, ok := ociResponse.(SearchPasswordPoliciesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchMyAppsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchPasswordPoliciesResponse") } return } -// searchMyApps implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchMyApps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchPasswordPolicies implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchPasswordPolicies(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyApps/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/PasswordPolicies/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchMyAppsResponse + var response SearchPasswordPoliciesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchMyApps", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchPasswordPolicies", apiReferenceLink) return response, err } @@ -11116,12 +17564,12 @@ func (client IdentityDomainsClient) searchMyApps(ctx context.Context, request co return response, err } -// SearchMyGroups Search for 'My Groups' using POST. +// SearchPolicies Search Policies Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchMyGroups.go.html to see an example of how to use SearchMyGroups API. -func (client IdentityDomainsClient) SearchMyGroups(ctx context.Context, request SearchMyGroupsRequest) (response SearchMyGroupsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchPolicies.go.html to see an example of how to use SearchPolicies API. +func (client IdentityDomainsClient) SearchPolicies(ctx context.Context, request SearchPoliciesRequest) (response SearchPoliciesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -11135,42 +17583,42 @@ func (client IdentityDomainsClient) SearchMyGroups(ctx context.Context, request request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchMyGroups, policy) + ociResponse, err = common.Retry(ctx, request, client.searchPolicies, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchMyGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchPoliciesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchMyGroupsResponse{} + response = SearchPoliciesResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchMyGroupsResponse); ok { + if convertedResponse, ok := ociResponse.(SearchPoliciesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchMyGroupsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchPoliciesResponse") } return } -// searchMyGroups implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchMyGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchPolicies implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchPolicies(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyGroups/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Policies/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchMyGroupsResponse + var response SearchPoliciesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchMyGroups", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchPolicies", apiReferenceLink) return response, err } @@ -11178,12 +17626,12 @@ func (client IdentityDomainsClient) searchMyGroups(ctx context.Context, request return response, err } -// SearchMyRequestableGroups Search My Requestable Groups Using POST +// SearchResourceTypeSchemaAttributes Search Resource Type Schema Attributes Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchMyRequestableGroups.go.html to see an example of how to use SearchMyRequestableGroups API. -func (client IdentityDomainsClient) SearchMyRequestableGroups(ctx context.Context, request SearchMyRequestableGroupsRequest) (response SearchMyRequestableGroupsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchResourceTypeSchemaAttributes.go.html to see an example of how to use SearchResourceTypeSchemaAttributes API. +func (client IdentityDomainsClient) SearchResourceTypeSchemaAttributes(ctx context.Context, request SearchResourceTypeSchemaAttributesRequest) (response SearchResourceTypeSchemaAttributesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -11197,42 +17645,42 @@ func (client IdentityDomainsClient) SearchMyRequestableGroups(ctx context.Contex request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchMyRequestableGroups, policy) + ociResponse, err = common.Retry(ctx, request, client.searchResourceTypeSchemaAttributes, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchMyRequestableGroupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchResourceTypeSchemaAttributesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchMyRequestableGroupsResponse{} + response = SearchResourceTypeSchemaAttributesResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchMyRequestableGroupsResponse); ok { + if convertedResponse, ok := ociResponse.(SearchResourceTypeSchemaAttributesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchMyRequestableGroupsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchResourceTypeSchemaAttributesResponse") } return } -// searchMyRequestableGroups implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchMyRequestableGroups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchResourceTypeSchemaAttributes implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchResourceTypeSchemaAttributes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyRequestableGroups/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/ResourceTypeSchemaAttributes/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchMyRequestableGroupsResponse + var response SearchResourceTypeSchemaAttributesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchMyRequestableGroups", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchResourceTypeSchemaAttributes", apiReferenceLink) return response, err } @@ -11240,12 +17688,12 @@ func (client IdentityDomainsClient) searchMyRequestableGroups(ctx context.Contex return response, err } -// SearchMyRequests Search My Requests Using POST +// SearchRules Search Rules Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchMyRequests.go.html to see an example of how to use SearchMyRequests API. -func (client IdentityDomainsClient) SearchMyRequests(ctx context.Context, request SearchMyRequestsRequest) (response SearchMyRequestsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchRules.go.html to see an example of how to use SearchRules API. +func (client IdentityDomainsClient) SearchRules(ctx context.Context, request SearchRulesRequest) (response SearchRulesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -11259,42 +17707,42 @@ func (client IdentityDomainsClient) SearchMyRequests(ctx context.Context, reques request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchMyRequests, policy) + ociResponse, err = common.Retry(ctx, request, client.searchRules, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchMyRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchRulesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchMyRequestsResponse{} + response = SearchRulesResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchMyRequestsResponse); ok { + if convertedResponse, ok := ociResponse.(SearchRulesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchMyRequestsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchRulesResponse") } return } -// searchMyRequests implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchMyRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchRules implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchRules(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/MyRequests/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Rules/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchMyRequestsResponse + var response SearchRulesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchMyRequests", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchRules", apiReferenceLink) return response, err } @@ -11302,12 +17750,12 @@ func (client IdentityDomainsClient) searchMyRequests(ctx context.Context, reques return response, err } -// SearchOAuth2ClientCredentials Search for OAuth2 client credentials using POST. +// SearchSchemas Search Schemas Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchOAuth2ClientCredentials.go.html to see an example of how to use SearchOAuth2ClientCredentials API. -func (client IdentityDomainsClient) SearchOAuth2ClientCredentials(ctx context.Context, request SearchOAuth2ClientCredentialsRequest) (response SearchOAuth2ClientCredentialsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchSchemas.go.html to see an example of how to use SearchSchemas API. +func (client IdentityDomainsClient) SearchSchemas(ctx context.Context, request SearchSchemasRequest) (response SearchSchemasResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -11321,42 +17769,42 @@ func (client IdentityDomainsClient) SearchOAuth2ClientCredentials(ctx context.Co request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchOAuth2ClientCredentials, policy) + ociResponse, err = common.Retry(ctx, request, client.searchSchemas, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchOAuth2ClientCredentialsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchSchemasResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchOAuth2ClientCredentialsResponse{} + response = SearchSchemasResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchOAuth2ClientCredentialsResponse); ok { + if convertedResponse, ok := ociResponse.(SearchSchemasResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchOAuth2ClientCredentialsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchSchemasResponse") } return } -// searchOAuth2ClientCredentials implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchOAuth2ClientCredentials(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchSchemas implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchSchemas(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/OAuth2ClientCredentials/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Schemas/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchOAuth2ClientCredentialsResponse + var response SearchSchemasResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchOAuth2ClientCredentials", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchSchemas", apiReferenceLink) return response, err } @@ -11364,12 +17812,12 @@ func (client IdentityDomainsClient) searchOAuth2ClientCredentials(ctx context.Co return response, err } -// SearchPasswordPolicies Search for password policies using POST. +// SearchSecurityQuestionSettings Search for security question settings using POST. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchPasswordPolicies.go.html to see an example of how to use SearchPasswordPolicies API. -func (client IdentityDomainsClient) SearchPasswordPolicies(ctx context.Context, request SearchPasswordPoliciesRequest) (response SearchPasswordPoliciesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchSecurityQuestionSettings.go.html to see an example of how to use SearchSecurityQuestionSettings API. +func (client IdentityDomainsClient) SearchSecurityQuestionSettings(ctx context.Context, request SearchSecurityQuestionSettingsRequest) (response SearchSecurityQuestionSettingsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -11383,42 +17831,42 @@ func (client IdentityDomainsClient) SearchPasswordPolicies(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchPasswordPolicies, policy) + ociResponse, err = common.Retry(ctx, request, client.searchSecurityQuestionSettings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchPasswordPoliciesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchSecurityQuestionSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchPasswordPoliciesResponse{} + response = SearchSecurityQuestionSettingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchPasswordPoliciesResponse); ok { + if convertedResponse, ok := ociResponse.(SearchSecurityQuestionSettingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchPasswordPoliciesResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchSecurityQuestionSettingsResponse") } return } -// searchPasswordPolicies implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchPasswordPolicies(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchSecurityQuestionSettings implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchSecurityQuestionSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/PasswordPolicies/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/SecurityQuestionSettings/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchPasswordPoliciesResponse + var response SearchSecurityQuestionSettingsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchPasswordPolicies", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchSecurityQuestionSettings", apiReferenceLink) return response, err } @@ -11426,12 +17874,12 @@ func (client IdentityDomainsClient) searchPasswordPolicies(ctx context.Context, return response, err } -// SearchResourceTypeSchemaAttributes Search Resource Type Schema Attributes Using POST +// SearchSecurityQuestions Search for security questions using POST. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchResourceTypeSchemaAttributes.go.html to see an example of how to use SearchResourceTypeSchemaAttributes API. -func (client IdentityDomainsClient) SearchResourceTypeSchemaAttributes(ctx context.Context, request SearchResourceTypeSchemaAttributesRequest) (response SearchResourceTypeSchemaAttributesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchSecurityQuestions.go.html to see an example of how to use SearchSecurityQuestions API. +func (client IdentityDomainsClient) SearchSecurityQuestions(ctx context.Context, request SearchSecurityQuestionsRequest) (response SearchSecurityQuestionsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -11445,42 +17893,42 @@ func (client IdentityDomainsClient) SearchResourceTypeSchemaAttributes(ctx conte request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchResourceTypeSchemaAttributes, policy) + ociResponse, err = common.Retry(ctx, request, client.searchSecurityQuestions, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchResourceTypeSchemaAttributesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchSecurityQuestionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchResourceTypeSchemaAttributesResponse{} + response = SearchSecurityQuestionsResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchResourceTypeSchemaAttributesResponse); ok { + if convertedResponse, ok := ociResponse.(SearchSecurityQuestionsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchResourceTypeSchemaAttributesResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchSecurityQuestionsResponse") } return } -// searchResourceTypeSchemaAttributes implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchResourceTypeSchemaAttributes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchSecurityQuestions implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchSecurityQuestions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/ResourceTypeSchemaAttributes/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/SecurityQuestions/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchResourceTypeSchemaAttributesResponse + var response SearchSecurityQuestionsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchResourceTypeSchemaAttributes", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchSecurityQuestions", apiReferenceLink) return response, err } @@ -11488,12 +17936,12 @@ func (client IdentityDomainsClient) searchResourceTypeSchemaAttributes(ctx conte return response, err } -// SearchSecurityQuestionSettings Search for security question settings using POST. +// SearchSelfRegistrationProfiles Search for self-registration profile using POST. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchSecurityQuestionSettings.go.html to see an example of how to use SearchSecurityQuestionSettings API. -func (client IdentityDomainsClient) SearchSecurityQuestionSettings(ctx context.Context, request SearchSecurityQuestionSettingsRequest) (response SearchSecurityQuestionSettingsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchSelfRegistrationProfiles.go.html to see an example of how to use SearchSelfRegistrationProfiles API. +func (client IdentityDomainsClient) SearchSelfRegistrationProfiles(ctx context.Context, request SearchSelfRegistrationProfilesRequest) (response SearchSelfRegistrationProfilesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -11507,42 +17955,42 @@ func (client IdentityDomainsClient) SearchSecurityQuestionSettings(ctx context.C request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchSecurityQuestionSettings, policy) + ociResponse, err = common.Retry(ctx, request, client.searchSelfRegistrationProfiles, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchSecurityQuestionSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchSelfRegistrationProfilesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchSecurityQuestionSettingsResponse{} + response = SearchSelfRegistrationProfilesResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchSecurityQuestionSettingsResponse); ok { + if convertedResponse, ok := ociResponse.(SearchSelfRegistrationProfilesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchSecurityQuestionSettingsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchSelfRegistrationProfilesResponse") } return } -// searchSecurityQuestionSettings implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchSecurityQuestionSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchSelfRegistrationProfiles implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchSelfRegistrationProfiles(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/SecurityQuestionSettings/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/SelfRegistrationProfiles/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchSecurityQuestionSettingsResponse + var response SearchSelfRegistrationProfilesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchSecurityQuestionSettings", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchSelfRegistrationProfiles", apiReferenceLink) return response, err } @@ -11550,12 +17998,12 @@ func (client IdentityDomainsClient) searchSecurityQuestionSettings(ctx context.C return response, err } -// SearchSecurityQuestions Search for security questions using POST. +// SearchSettings Search Settings Using POST // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchSecurityQuestions.go.html to see an example of how to use SearchSecurityQuestions API. -func (client IdentityDomainsClient) SearchSecurityQuestions(ctx context.Context, request SearchSecurityQuestionsRequest) (response SearchSecurityQuestionsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchSettings.go.html to see an example of how to use SearchSettings API. +func (client IdentityDomainsClient) SearchSettings(ctx context.Context, request SearchSettingsRequest) (response SearchSettingsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -11569,42 +18017,42 @@ func (client IdentityDomainsClient) SearchSecurityQuestions(ctx context.Context, request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.searchSecurityQuestions, policy) + ociResponse, err = common.Retry(ctx, request, client.searchSettings, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = SearchSecurityQuestionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = SearchSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = SearchSecurityQuestionsResponse{} + response = SearchSettingsResponse{} } } return } - if convertedResponse, ok := ociResponse.(SearchSecurityQuestionsResponse); ok { + if convertedResponse, ok := ociResponse.(SearchSettingsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into SearchSecurityQuestionsResponse") + err = fmt.Errorf("failed to convert OCIResponse into SearchSettingsResponse") } return } -// searchSecurityQuestions implements the OCIOperation interface (enables retrying operations) -func (client IdentityDomainsClient) searchSecurityQuestions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// searchSettings implements the OCIOperation interface (enables retrying operations) +func (client IdentityDomainsClient) searchSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/SecurityQuestions/.search", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/admin/v1/Settings/.search", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response SearchSecurityQuestionsResponse + var response SearchSettingsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { apiReferenceLink := "" - err = common.PostProcessServiceError(err, "IdentityDomains", "SearchSecurityQuestions", apiReferenceLink) + err = common.PostProcessServiceError(err, "IdentityDomains", "SearchSettings", apiReferenceLink) return response, err } diff --git a/identitydomains/list_approval_workflow_assignments_request_response.go b/identitydomains/list_approval_workflow_assignments_request_response.go new file mode 100644 index 0000000000..74ef6990e5 --- /dev/null +++ b/identitydomains/list_approval_workflow_assignments_request_response.go @@ -0,0 +1,177 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListApprovalWorkflowAssignmentsRequest wrapper for the ListApprovalWorkflowAssignments operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListApprovalWorkflowAssignments.go.html to see an example of how to use ListApprovalWorkflowAssignmentsRequest. +type ListApprovalWorkflowAssignmentsRequest struct { + + // OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + Filter *string `mandatory:"false" contributesTo:"query" name:"filter"` + + // OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + SortBy *string `mandatory:"false" contributesTo:"query" name:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder ListApprovalWorkflowAssignmentsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + StartIndex *int `mandatory:"false" contributesTo:"query" name:"startIndex"` + + // OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + Count *int `mandatory:"false" contributesTo:"query" name:"count"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListApprovalWorkflowAssignmentsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListApprovalWorkflowAssignmentsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListApprovalWorkflowAssignmentsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListApprovalWorkflowAssignmentsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListApprovalWorkflowAssignmentsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListApprovalWorkflowAssignmentsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListApprovalWorkflowAssignmentsSortOrderEnumStringValues(), ","))) + } + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListApprovalWorkflowAssignmentsResponse wrapper for the ListApprovalWorkflowAssignments operation +type ListApprovalWorkflowAssignmentsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ApprovalWorkflowAssignments instances + ApprovalWorkflowAssignments `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListApprovalWorkflowAssignmentsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListApprovalWorkflowAssignmentsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListApprovalWorkflowAssignmentsSortOrderEnum Enum with underlying type: string +type ListApprovalWorkflowAssignmentsSortOrderEnum string + +// Set of constants representing the allowable values for ListApprovalWorkflowAssignmentsSortOrderEnum +const ( + ListApprovalWorkflowAssignmentsSortOrderAscending ListApprovalWorkflowAssignmentsSortOrderEnum = "ASCENDING" + ListApprovalWorkflowAssignmentsSortOrderDescending ListApprovalWorkflowAssignmentsSortOrderEnum = "DESCENDING" +) + +var mappingListApprovalWorkflowAssignmentsSortOrderEnum = map[string]ListApprovalWorkflowAssignmentsSortOrderEnum{ + "ASCENDING": ListApprovalWorkflowAssignmentsSortOrderAscending, + "DESCENDING": ListApprovalWorkflowAssignmentsSortOrderDescending, +} + +var mappingListApprovalWorkflowAssignmentsSortOrderEnumLowerCase = map[string]ListApprovalWorkflowAssignmentsSortOrderEnum{ + "ascending": ListApprovalWorkflowAssignmentsSortOrderAscending, + "descending": ListApprovalWorkflowAssignmentsSortOrderDescending, +} + +// GetListApprovalWorkflowAssignmentsSortOrderEnumValues Enumerates the set of values for ListApprovalWorkflowAssignmentsSortOrderEnum +func GetListApprovalWorkflowAssignmentsSortOrderEnumValues() []ListApprovalWorkflowAssignmentsSortOrderEnum { + values := make([]ListApprovalWorkflowAssignmentsSortOrderEnum, 0) + for _, v := range mappingListApprovalWorkflowAssignmentsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListApprovalWorkflowAssignmentsSortOrderEnumStringValues Enumerates the set of values in String for ListApprovalWorkflowAssignmentsSortOrderEnum +func GetListApprovalWorkflowAssignmentsSortOrderEnumStringValues() []string { + return []string{ + "ASCENDING", + "DESCENDING", + } +} + +// GetMappingListApprovalWorkflowAssignmentsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListApprovalWorkflowAssignmentsSortOrderEnum(val string) (ListApprovalWorkflowAssignmentsSortOrderEnum, bool) { + enum, ok := mappingListApprovalWorkflowAssignmentsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/list_approval_workflow_steps_request_response.go b/identitydomains/list_approval_workflow_steps_request_response.go new file mode 100644 index 0000000000..cdcdf59fe0 --- /dev/null +++ b/identitydomains/list_approval_workflow_steps_request_response.go @@ -0,0 +1,177 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListApprovalWorkflowStepsRequest wrapper for the ListApprovalWorkflowSteps operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListApprovalWorkflowSteps.go.html to see an example of how to use ListApprovalWorkflowStepsRequest. +type ListApprovalWorkflowStepsRequest struct { + + // OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + Filter *string `mandatory:"false" contributesTo:"query" name:"filter"` + + // OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + SortBy *string `mandatory:"false" contributesTo:"query" name:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder ListApprovalWorkflowStepsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + StartIndex *int `mandatory:"false" contributesTo:"query" name:"startIndex"` + + // OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + Count *int `mandatory:"false" contributesTo:"query" name:"count"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListApprovalWorkflowStepsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListApprovalWorkflowStepsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListApprovalWorkflowStepsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListApprovalWorkflowStepsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListApprovalWorkflowStepsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListApprovalWorkflowStepsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListApprovalWorkflowStepsSortOrderEnumStringValues(), ","))) + } + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListApprovalWorkflowStepsResponse wrapper for the ListApprovalWorkflowSteps operation +type ListApprovalWorkflowStepsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ApprovalWorkflowSteps instances + ApprovalWorkflowSteps `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListApprovalWorkflowStepsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListApprovalWorkflowStepsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListApprovalWorkflowStepsSortOrderEnum Enum with underlying type: string +type ListApprovalWorkflowStepsSortOrderEnum string + +// Set of constants representing the allowable values for ListApprovalWorkflowStepsSortOrderEnum +const ( + ListApprovalWorkflowStepsSortOrderAscending ListApprovalWorkflowStepsSortOrderEnum = "ASCENDING" + ListApprovalWorkflowStepsSortOrderDescending ListApprovalWorkflowStepsSortOrderEnum = "DESCENDING" +) + +var mappingListApprovalWorkflowStepsSortOrderEnum = map[string]ListApprovalWorkflowStepsSortOrderEnum{ + "ASCENDING": ListApprovalWorkflowStepsSortOrderAscending, + "DESCENDING": ListApprovalWorkflowStepsSortOrderDescending, +} + +var mappingListApprovalWorkflowStepsSortOrderEnumLowerCase = map[string]ListApprovalWorkflowStepsSortOrderEnum{ + "ascending": ListApprovalWorkflowStepsSortOrderAscending, + "descending": ListApprovalWorkflowStepsSortOrderDescending, +} + +// GetListApprovalWorkflowStepsSortOrderEnumValues Enumerates the set of values for ListApprovalWorkflowStepsSortOrderEnum +func GetListApprovalWorkflowStepsSortOrderEnumValues() []ListApprovalWorkflowStepsSortOrderEnum { + values := make([]ListApprovalWorkflowStepsSortOrderEnum, 0) + for _, v := range mappingListApprovalWorkflowStepsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListApprovalWorkflowStepsSortOrderEnumStringValues Enumerates the set of values in String for ListApprovalWorkflowStepsSortOrderEnum +func GetListApprovalWorkflowStepsSortOrderEnumStringValues() []string { + return []string{ + "ASCENDING", + "DESCENDING", + } +} + +// GetMappingListApprovalWorkflowStepsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListApprovalWorkflowStepsSortOrderEnum(val string) (ListApprovalWorkflowStepsSortOrderEnum, bool) { + enum, ok := mappingListApprovalWorkflowStepsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/list_approval_workflows_request_response.go b/identitydomains/list_approval_workflows_request_response.go new file mode 100644 index 0000000000..9f7be76762 --- /dev/null +++ b/identitydomains/list_approval_workflows_request_response.go @@ -0,0 +1,177 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListApprovalWorkflowsRequest wrapper for the ListApprovalWorkflows operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListApprovalWorkflows.go.html to see an example of how to use ListApprovalWorkflowsRequest. +type ListApprovalWorkflowsRequest struct { + + // OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + Filter *string `mandatory:"false" contributesTo:"query" name:"filter"` + + // OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + SortBy *string `mandatory:"false" contributesTo:"query" name:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder ListApprovalWorkflowsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + StartIndex *int `mandatory:"false" contributesTo:"query" name:"startIndex"` + + // OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + Count *int `mandatory:"false" contributesTo:"query" name:"count"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListApprovalWorkflowsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListApprovalWorkflowsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListApprovalWorkflowsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListApprovalWorkflowsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListApprovalWorkflowsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListApprovalWorkflowsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListApprovalWorkflowsSortOrderEnumStringValues(), ","))) + } + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListApprovalWorkflowsResponse wrapper for the ListApprovalWorkflows operation +type ListApprovalWorkflowsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ApprovalWorkflows instances + ApprovalWorkflows `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListApprovalWorkflowsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListApprovalWorkflowsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListApprovalWorkflowsSortOrderEnum Enum with underlying type: string +type ListApprovalWorkflowsSortOrderEnum string + +// Set of constants representing the allowable values for ListApprovalWorkflowsSortOrderEnum +const ( + ListApprovalWorkflowsSortOrderAscending ListApprovalWorkflowsSortOrderEnum = "ASCENDING" + ListApprovalWorkflowsSortOrderDescending ListApprovalWorkflowsSortOrderEnum = "DESCENDING" +) + +var mappingListApprovalWorkflowsSortOrderEnum = map[string]ListApprovalWorkflowsSortOrderEnum{ + "ASCENDING": ListApprovalWorkflowsSortOrderAscending, + "DESCENDING": ListApprovalWorkflowsSortOrderDescending, +} + +var mappingListApprovalWorkflowsSortOrderEnumLowerCase = map[string]ListApprovalWorkflowsSortOrderEnum{ + "ascending": ListApprovalWorkflowsSortOrderAscending, + "descending": ListApprovalWorkflowsSortOrderDescending, +} + +// GetListApprovalWorkflowsSortOrderEnumValues Enumerates the set of values for ListApprovalWorkflowsSortOrderEnum +func GetListApprovalWorkflowsSortOrderEnumValues() []ListApprovalWorkflowsSortOrderEnum { + values := make([]ListApprovalWorkflowsSortOrderEnum, 0) + for _, v := range mappingListApprovalWorkflowsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListApprovalWorkflowsSortOrderEnumStringValues Enumerates the set of values in String for ListApprovalWorkflowsSortOrderEnum +func GetListApprovalWorkflowsSortOrderEnumStringValues() []string { + return []string{ + "ASCENDING", + "DESCENDING", + } +} + +// GetMappingListApprovalWorkflowsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListApprovalWorkflowsSortOrderEnum(val string) (ListApprovalWorkflowsSortOrderEnum, bool) { + enum, ok := mappingListApprovalWorkflowsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/list_branding_settings_request_response.go b/identitydomains/list_branding_settings_request_response.go new file mode 100644 index 0000000000..53764f68cf --- /dev/null +++ b/identitydomains/list_branding_settings_request_response.go @@ -0,0 +1,117 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListBrandingSettingsRequest wrapper for the ListBrandingSettings operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListBrandingSettings.go.html to see an example of how to use ListBrandingSettingsRequest. +type ListBrandingSettingsRequest struct { + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListBrandingSettingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListBrandingSettingsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListBrandingSettingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListBrandingSettingsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListBrandingSettingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListBrandingSettingsResponse wrapper for the ListBrandingSettings operation +type ListBrandingSettingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of BrandingSettings instances + BrandingSettings `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListBrandingSettingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListBrandingSettingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/list_cloud_gate_mappings_request_response.go b/identitydomains/list_cloud_gate_mappings_request_response.go new file mode 100644 index 0000000000..7a3028c759 --- /dev/null +++ b/identitydomains/list_cloud_gate_mappings_request_response.go @@ -0,0 +1,177 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListCloudGateMappingsRequest wrapper for the ListCloudGateMappings operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListCloudGateMappings.go.html to see an example of how to use ListCloudGateMappingsRequest. +type ListCloudGateMappingsRequest struct { + + // OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + Filter *string `mandatory:"false" contributesTo:"query" name:"filter"` + + // OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + SortBy *string `mandatory:"false" contributesTo:"query" name:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder ListCloudGateMappingsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + StartIndex *int `mandatory:"false" contributesTo:"query" name:"startIndex"` + + // OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + Count *int `mandatory:"false" contributesTo:"query" name:"count"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListCloudGateMappingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListCloudGateMappingsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListCloudGateMappingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCloudGateMappingsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListCloudGateMappingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListCloudGateMappingsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListCloudGateMappingsSortOrderEnumStringValues(), ","))) + } + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListCloudGateMappingsResponse wrapper for the ListCloudGateMappings operation +type ListCloudGateMappingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of CloudGateMappings instances + CloudGateMappings `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListCloudGateMappingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListCloudGateMappingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListCloudGateMappingsSortOrderEnum Enum with underlying type: string +type ListCloudGateMappingsSortOrderEnum string + +// Set of constants representing the allowable values for ListCloudGateMappingsSortOrderEnum +const ( + ListCloudGateMappingsSortOrderAscending ListCloudGateMappingsSortOrderEnum = "ASCENDING" + ListCloudGateMappingsSortOrderDescending ListCloudGateMappingsSortOrderEnum = "DESCENDING" +) + +var mappingListCloudGateMappingsSortOrderEnum = map[string]ListCloudGateMappingsSortOrderEnum{ + "ASCENDING": ListCloudGateMappingsSortOrderAscending, + "DESCENDING": ListCloudGateMappingsSortOrderDescending, +} + +var mappingListCloudGateMappingsSortOrderEnumLowerCase = map[string]ListCloudGateMappingsSortOrderEnum{ + "ascending": ListCloudGateMappingsSortOrderAscending, + "descending": ListCloudGateMappingsSortOrderDescending, +} + +// GetListCloudGateMappingsSortOrderEnumValues Enumerates the set of values for ListCloudGateMappingsSortOrderEnum +func GetListCloudGateMappingsSortOrderEnumValues() []ListCloudGateMappingsSortOrderEnum { + values := make([]ListCloudGateMappingsSortOrderEnum, 0) + for _, v := range mappingListCloudGateMappingsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListCloudGateMappingsSortOrderEnumStringValues Enumerates the set of values in String for ListCloudGateMappingsSortOrderEnum +func GetListCloudGateMappingsSortOrderEnumStringValues() []string { + return []string{ + "ASCENDING", + "DESCENDING", + } +} + +// GetMappingListCloudGateMappingsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListCloudGateMappingsSortOrderEnum(val string) (ListCloudGateMappingsSortOrderEnum, bool) { + enum, ok := mappingListCloudGateMappingsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/list_cloud_gate_servers_request_response.go b/identitydomains/list_cloud_gate_servers_request_response.go new file mode 100644 index 0000000000..81f011d3b2 --- /dev/null +++ b/identitydomains/list_cloud_gate_servers_request_response.go @@ -0,0 +1,177 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListCloudGateServersRequest wrapper for the ListCloudGateServers operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListCloudGateServers.go.html to see an example of how to use ListCloudGateServersRequest. +type ListCloudGateServersRequest struct { + + // OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + Filter *string `mandatory:"false" contributesTo:"query" name:"filter"` + + // OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + SortBy *string `mandatory:"false" contributesTo:"query" name:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder ListCloudGateServersSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + StartIndex *int `mandatory:"false" contributesTo:"query" name:"startIndex"` + + // OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + Count *int `mandatory:"false" contributesTo:"query" name:"count"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListCloudGateServersRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListCloudGateServersRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListCloudGateServersRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCloudGateServersRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListCloudGateServersRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListCloudGateServersSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListCloudGateServersSortOrderEnumStringValues(), ","))) + } + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListCloudGateServersResponse wrapper for the ListCloudGateServers operation +type ListCloudGateServersResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of CloudGateServers instances + CloudGateServers `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListCloudGateServersResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListCloudGateServersResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListCloudGateServersSortOrderEnum Enum with underlying type: string +type ListCloudGateServersSortOrderEnum string + +// Set of constants representing the allowable values for ListCloudGateServersSortOrderEnum +const ( + ListCloudGateServersSortOrderAscending ListCloudGateServersSortOrderEnum = "ASCENDING" + ListCloudGateServersSortOrderDescending ListCloudGateServersSortOrderEnum = "DESCENDING" +) + +var mappingListCloudGateServersSortOrderEnum = map[string]ListCloudGateServersSortOrderEnum{ + "ASCENDING": ListCloudGateServersSortOrderAscending, + "DESCENDING": ListCloudGateServersSortOrderDescending, +} + +var mappingListCloudGateServersSortOrderEnumLowerCase = map[string]ListCloudGateServersSortOrderEnum{ + "ascending": ListCloudGateServersSortOrderAscending, + "descending": ListCloudGateServersSortOrderDescending, +} + +// GetListCloudGateServersSortOrderEnumValues Enumerates the set of values for ListCloudGateServersSortOrderEnum +func GetListCloudGateServersSortOrderEnumValues() []ListCloudGateServersSortOrderEnum { + values := make([]ListCloudGateServersSortOrderEnum, 0) + for _, v := range mappingListCloudGateServersSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListCloudGateServersSortOrderEnumStringValues Enumerates the set of values in String for ListCloudGateServersSortOrderEnum +func GetListCloudGateServersSortOrderEnumStringValues() []string { + return []string{ + "ASCENDING", + "DESCENDING", + } +} + +// GetMappingListCloudGateServersSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListCloudGateServersSortOrderEnum(val string) (ListCloudGateServersSortOrderEnum, bool) { + enum, ok := mappingListCloudGateServersSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/list_cloud_gates_request_response.go b/identitydomains/list_cloud_gates_request_response.go new file mode 100644 index 0000000000..ca403ccc88 --- /dev/null +++ b/identitydomains/list_cloud_gates_request_response.go @@ -0,0 +1,177 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListCloudGatesRequest wrapper for the ListCloudGates operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListCloudGates.go.html to see an example of how to use ListCloudGatesRequest. +type ListCloudGatesRequest struct { + + // OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + Filter *string `mandatory:"false" contributesTo:"query" name:"filter"` + + // OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + SortBy *string `mandatory:"false" contributesTo:"query" name:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder ListCloudGatesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + StartIndex *int `mandatory:"false" contributesTo:"query" name:"startIndex"` + + // OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + Count *int `mandatory:"false" contributesTo:"query" name:"count"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListCloudGatesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListCloudGatesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListCloudGatesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCloudGatesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListCloudGatesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListCloudGatesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListCloudGatesSortOrderEnumStringValues(), ","))) + } + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListCloudGatesResponse wrapper for the ListCloudGates operation +type ListCloudGatesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of CloudGates instances + CloudGates `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListCloudGatesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListCloudGatesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListCloudGatesSortOrderEnum Enum with underlying type: string +type ListCloudGatesSortOrderEnum string + +// Set of constants representing the allowable values for ListCloudGatesSortOrderEnum +const ( + ListCloudGatesSortOrderAscending ListCloudGatesSortOrderEnum = "ASCENDING" + ListCloudGatesSortOrderDescending ListCloudGatesSortOrderEnum = "DESCENDING" +) + +var mappingListCloudGatesSortOrderEnum = map[string]ListCloudGatesSortOrderEnum{ + "ASCENDING": ListCloudGatesSortOrderAscending, + "DESCENDING": ListCloudGatesSortOrderDescending, +} + +var mappingListCloudGatesSortOrderEnumLowerCase = map[string]ListCloudGatesSortOrderEnum{ + "ascending": ListCloudGatesSortOrderAscending, + "descending": ListCloudGatesSortOrderDescending, +} + +// GetListCloudGatesSortOrderEnumValues Enumerates the set of values for ListCloudGatesSortOrderEnum +func GetListCloudGatesSortOrderEnumValues() []ListCloudGatesSortOrderEnum { + values := make([]ListCloudGatesSortOrderEnum, 0) + for _, v := range mappingListCloudGatesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListCloudGatesSortOrderEnumStringValues Enumerates the set of values in String for ListCloudGatesSortOrderEnum +func GetListCloudGatesSortOrderEnumStringValues() []string { + return []string{ + "ASCENDING", + "DESCENDING", + } +} + +// GetMappingListCloudGatesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListCloudGatesSortOrderEnum(val string) (ListCloudGatesSortOrderEnum, bool) { + enum, ok := mappingListCloudGatesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/list_conditions_request_response.go b/identitydomains/list_conditions_request_response.go new file mode 100644 index 0000000000..4e3fc002bc --- /dev/null +++ b/identitydomains/list_conditions_request_response.go @@ -0,0 +1,177 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListConditionsRequest wrapper for the ListConditions operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListConditions.go.html to see an example of how to use ListConditionsRequest. +type ListConditionsRequest struct { + + // OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + Filter *string `mandatory:"false" contributesTo:"query" name:"filter"` + + // OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + SortBy *string `mandatory:"false" contributesTo:"query" name:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder ListConditionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + StartIndex *int `mandatory:"false" contributesTo:"query" name:"startIndex"` + + // OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + Count *int `mandatory:"false" contributesTo:"query" name:"count"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListConditionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListConditionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListConditionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListConditionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListConditionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListConditionsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListConditionsSortOrderEnumStringValues(), ","))) + } + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListConditionsResponse wrapper for the ListConditions operation +type ListConditionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of Conditions instances + Conditions `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListConditionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListConditionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListConditionsSortOrderEnum Enum with underlying type: string +type ListConditionsSortOrderEnum string + +// Set of constants representing the allowable values for ListConditionsSortOrderEnum +const ( + ListConditionsSortOrderAscending ListConditionsSortOrderEnum = "ASCENDING" + ListConditionsSortOrderDescending ListConditionsSortOrderEnum = "DESCENDING" +) + +var mappingListConditionsSortOrderEnum = map[string]ListConditionsSortOrderEnum{ + "ASCENDING": ListConditionsSortOrderAscending, + "DESCENDING": ListConditionsSortOrderDescending, +} + +var mappingListConditionsSortOrderEnumLowerCase = map[string]ListConditionsSortOrderEnum{ + "ascending": ListConditionsSortOrderAscending, + "descending": ListConditionsSortOrderDescending, +} + +// GetListConditionsSortOrderEnumValues Enumerates the set of values for ListConditionsSortOrderEnum +func GetListConditionsSortOrderEnumValues() []ListConditionsSortOrderEnum { + values := make([]ListConditionsSortOrderEnum, 0) + for _, v := range mappingListConditionsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListConditionsSortOrderEnumStringValues Enumerates the set of values in String for ListConditionsSortOrderEnum +func GetListConditionsSortOrderEnumStringValues() []string { + return []string{ + "ASCENDING", + "DESCENDING", + } +} + +// GetMappingListConditionsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListConditionsSortOrderEnum(val string) (ListConditionsSortOrderEnum, bool) { + enum, ok := mappingListConditionsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/list_my_completed_approvals_request_response.go b/identitydomains/list_my_completed_approvals_request_response.go new file mode 100644 index 0000000000..753a772b05 --- /dev/null +++ b/identitydomains/list_my_completed_approvals_request_response.go @@ -0,0 +1,165 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListMyCompletedApprovalsRequest wrapper for the ListMyCompletedApprovals operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyCompletedApprovals.go.html to see an example of how to use ListMyCompletedApprovalsRequest. +type ListMyCompletedApprovalsRequest struct { + + // OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + Filter *string `mandatory:"false" contributesTo:"query" name:"filter"` + + // OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + SortBy *string `mandatory:"false" contributesTo:"query" name:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder ListMyCompletedApprovalsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + StartIndex *int `mandatory:"false" contributesTo:"query" name:"startIndex"` + + // OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + Count *int `mandatory:"false" contributesTo:"query" name:"count"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListMyCompletedApprovalsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListMyCompletedApprovalsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListMyCompletedApprovalsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListMyCompletedApprovalsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListMyCompletedApprovalsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListMyCompletedApprovalsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListMyCompletedApprovalsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListMyCompletedApprovalsResponse wrapper for the ListMyCompletedApprovals operation +type ListMyCompletedApprovalsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of MyCompletedApprovals instances + MyCompletedApprovals `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListMyCompletedApprovalsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListMyCompletedApprovalsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListMyCompletedApprovalsSortOrderEnum Enum with underlying type: string +type ListMyCompletedApprovalsSortOrderEnum string + +// Set of constants representing the allowable values for ListMyCompletedApprovalsSortOrderEnum +const ( + ListMyCompletedApprovalsSortOrderAscending ListMyCompletedApprovalsSortOrderEnum = "ASCENDING" + ListMyCompletedApprovalsSortOrderDescending ListMyCompletedApprovalsSortOrderEnum = "DESCENDING" +) + +var mappingListMyCompletedApprovalsSortOrderEnum = map[string]ListMyCompletedApprovalsSortOrderEnum{ + "ASCENDING": ListMyCompletedApprovalsSortOrderAscending, + "DESCENDING": ListMyCompletedApprovalsSortOrderDescending, +} + +var mappingListMyCompletedApprovalsSortOrderEnumLowerCase = map[string]ListMyCompletedApprovalsSortOrderEnum{ + "ascending": ListMyCompletedApprovalsSortOrderAscending, + "descending": ListMyCompletedApprovalsSortOrderDescending, +} + +// GetListMyCompletedApprovalsSortOrderEnumValues Enumerates the set of values for ListMyCompletedApprovalsSortOrderEnum +func GetListMyCompletedApprovalsSortOrderEnumValues() []ListMyCompletedApprovalsSortOrderEnum { + values := make([]ListMyCompletedApprovalsSortOrderEnum, 0) + for _, v := range mappingListMyCompletedApprovalsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListMyCompletedApprovalsSortOrderEnumStringValues Enumerates the set of values in String for ListMyCompletedApprovalsSortOrderEnum +func GetListMyCompletedApprovalsSortOrderEnumStringValues() []string { + return []string{ + "ASCENDING", + "DESCENDING", + } +} + +// GetMappingListMyCompletedApprovalsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListMyCompletedApprovalsSortOrderEnum(val string) (ListMyCompletedApprovalsSortOrderEnum, bool) { + enum, ok := mappingListMyCompletedApprovalsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/list_my_pending_approvals_request_response.go b/identitydomains/list_my_pending_approvals_request_response.go new file mode 100644 index 0000000000..6ce9e3e787 --- /dev/null +++ b/identitydomains/list_my_pending_approvals_request_response.go @@ -0,0 +1,165 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListMyPendingApprovalsRequest wrapper for the ListMyPendingApprovals operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListMyPendingApprovals.go.html to see an example of how to use ListMyPendingApprovalsRequest. +type ListMyPendingApprovalsRequest struct { + + // OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + Filter *string `mandatory:"false" contributesTo:"query" name:"filter"` + + // OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + SortBy *string `mandatory:"false" contributesTo:"query" name:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder ListMyPendingApprovalsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + StartIndex *int `mandatory:"false" contributesTo:"query" name:"startIndex"` + + // OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + Count *int `mandatory:"false" contributesTo:"query" name:"count"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListMyPendingApprovalsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListMyPendingApprovalsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListMyPendingApprovalsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListMyPendingApprovalsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListMyPendingApprovalsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListMyPendingApprovalsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListMyPendingApprovalsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListMyPendingApprovalsResponse wrapper for the ListMyPendingApprovals operation +type ListMyPendingApprovalsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of MyPendingApprovals instances + MyPendingApprovals `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListMyPendingApprovalsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListMyPendingApprovalsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListMyPendingApprovalsSortOrderEnum Enum with underlying type: string +type ListMyPendingApprovalsSortOrderEnum string + +// Set of constants representing the allowable values for ListMyPendingApprovalsSortOrderEnum +const ( + ListMyPendingApprovalsSortOrderAscending ListMyPendingApprovalsSortOrderEnum = "ASCENDING" + ListMyPendingApprovalsSortOrderDescending ListMyPendingApprovalsSortOrderEnum = "DESCENDING" +) + +var mappingListMyPendingApprovalsSortOrderEnum = map[string]ListMyPendingApprovalsSortOrderEnum{ + "ASCENDING": ListMyPendingApprovalsSortOrderAscending, + "DESCENDING": ListMyPendingApprovalsSortOrderDescending, +} + +var mappingListMyPendingApprovalsSortOrderEnumLowerCase = map[string]ListMyPendingApprovalsSortOrderEnum{ + "ascending": ListMyPendingApprovalsSortOrderAscending, + "descending": ListMyPendingApprovalsSortOrderDescending, +} + +// GetListMyPendingApprovalsSortOrderEnumValues Enumerates the set of values for ListMyPendingApprovalsSortOrderEnum +func GetListMyPendingApprovalsSortOrderEnumValues() []ListMyPendingApprovalsSortOrderEnum { + values := make([]ListMyPendingApprovalsSortOrderEnum, 0) + for _, v := range mappingListMyPendingApprovalsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListMyPendingApprovalsSortOrderEnumStringValues Enumerates the set of values in String for ListMyPendingApprovalsSortOrderEnum +func GetListMyPendingApprovalsSortOrderEnumStringValues() []string { + return []string{ + "ASCENDING", + "DESCENDING", + } +} + +// GetMappingListMyPendingApprovalsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListMyPendingApprovalsSortOrderEnum(val string) (ListMyPendingApprovalsSortOrderEnum, bool) { + enum, ok := mappingListMyPendingApprovalsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/list_network_perimeters_request_response.go b/identitydomains/list_network_perimeters_request_response.go new file mode 100644 index 0000000000..1d05cb90e4 --- /dev/null +++ b/identitydomains/list_network_perimeters_request_response.go @@ -0,0 +1,177 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListNetworkPerimetersRequest wrapper for the ListNetworkPerimeters operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListNetworkPerimeters.go.html to see an example of how to use ListNetworkPerimetersRequest. +type ListNetworkPerimetersRequest struct { + + // OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + Filter *string `mandatory:"false" contributesTo:"query" name:"filter"` + + // OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + SortBy *string `mandatory:"false" contributesTo:"query" name:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder ListNetworkPerimetersSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + StartIndex *int `mandatory:"false" contributesTo:"query" name:"startIndex"` + + // OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + Count *int `mandatory:"false" contributesTo:"query" name:"count"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListNetworkPerimetersRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListNetworkPerimetersRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListNetworkPerimetersRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListNetworkPerimetersRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListNetworkPerimetersRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListNetworkPerimetersSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListNetworkPerimetersSortOrderEnumStringValues(), ","))) + } + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListNetworkPerimetersResponse wrapper for the ListNetworkPerimeters operation +type ListNetworkPerimetersResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of NetworkPerimeters instances + NetworkPerimeters `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListNetworkPerimetersResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListNetworkPerimetersResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListNetworkPerimetersSortOrderEnum Enum with underlying type: string +type ListNetworkPerimetersSortOrderEnum string + +// Set of constants representing the allowable values for ListNetworkPerimetersSortOrderEnum +const ( + ListNetworkPerimetersSortOrderAscending ListNetworkPerimetersSortOrderEnum = "ASCENDING" + ListNetworkPerimetersSortOrderDescending ListNetworkPerimetersSortOrderEnum = "DESCENDING" +) + +var mappingListNetworkPerimetersSortOrderEnum = map[string]ListNetworkPerimetersSortOrderEnum{ + "ASCENDING": ListNetworkPerimetersSortOrderAscending, + "DESCENDING": ListNetworkPerimetersSortOrderDescending, +} + +var mappingListNetworkPerimetersSortOrderEnumLowerCase = map[string]ListNetworkPerimetersSortOrderEnum{ + "ascending": ListNetworkPerimetersSortOrderAscending, + "descending": ListNetworkPerimetersSortOrderDescending, +} + +// GetListNetworkPerimetersSortOrderEnumValues Enumerates the set of values for ListNetworkPerimetersSortOrderEnum +func GetListNetworkPerimetersSortOrderEnumValues() []ListNetworkPerimetersSortOrderEnum { + values := make([]ListNetworkPerimetersSortOrderEnum, 0) + for _, v := range mappingListNetworkPerimetersSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListNetworkPerimetersSortOrderEnumStringValues Enumerates the set of values in String for ListNetworkPerimetersSortOrderEnum +func GetListNetworkPerimetersSortOrderEnumStringValues() []string { + return []string{ + "ASCENDING", + "DESCENDING", + } +} + +// GetMappingListNetworkPerimetersSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListNetworkPerimetersSortOrderEnum(val string) (ListNetworkPerimetersSortOrderEnum, bool) { + enum, ok := mappingListNetworkPerimetersSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/list_notification_settings_request_response.go b/identitydomains/list_notification_settings_request_response.go new file mode 100644 index 0000000000..38cf9fc2d8 --- /dev/null +++ b/identitydomains/list_notification_settings_request_response.go @@ -0,0 +1,117 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListNotificationSettingsRequest wrapper for the ListNotificationSettings operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListNotificationSettings.go.html to see an example of how to use ListNotificationSettingsRequest. +type ListNotificationSettingsRequest struct { + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListNotificationSettingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListNotificationSettingsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListNotificationSettingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListNotificationSettingsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListNotificationSettingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListNotificationSettingsResponse wrapper for the ListNotificationSettings operation +type ListNotificationSettingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of NotificationSettings instances + NotificationSettings `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListNotificationSettingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListNotificationSettingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/list_o_auth_client_certificates_request_response.go b/identitydomains/list_o_auth_client_certificates_request_response.go new file mode 100644 index 0000000000..df8edcf06f --- /dev/null +++ b/identitydomains/list_o_auth_client_certificates_request_response.go @@ -0,0 +1,165 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListOAuthClientCertificatesRequest wrapper for the ListOAuthClientCertificates operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListOAuthClientCertificates.go.html to see an example of how to use ListOAuthClientCertificatesRequest. +type ListOAuthClientCertificatesRequest struct { + + // OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + Filter *string `mandatory:"false" contributesTo:"query" name:"filter"` + + // OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + SortBy *string `mandatory:"false" contributesTo:"query" name:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder ListOAuthClientCertificatesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + StartIndex *int `mandatory:"false" contributesTo:"query" name:"startIndex"` + + // OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + Count *int `mandatory:"false" contributesTo:"query" name:"count"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListOAuthClientCertificatesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListOAuthClientCertificatesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListOAuthClientCertificatesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListOAuthClientCertificatesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListOAuthClientCertificatesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListOAuthClientCertificatesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListOAuthClientCertificatesSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListOAuthClientCertificatesResponse wrapper for the ListOAuthClientCertificates operation +type ListOAuthClientCertificatesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of OAuthClientCertificates instances + OAuthClientCertificates `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListOAuthClientCertificatesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListOAuthClientCertificatesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListOAuthClientCertificatesSortOrderEnum Enum with underlying type: string +type ListOAuthClientCertificatesSortOrderEnum string + +// Set of constants representing the allowable values for ListOAuthClientCertificatesSortOrderEnum +const ( + ListOAuthClientCertificatesSortOrderAscending ListOAuthClientCertificatesSortOrderEnum = "ASCENDING" + ListOAuthClientCertificatesSortOrderDescending ListOAuthClientCertificatesSortOrderEnum = "DESCENDING" +) + +var mappingListOAuthClientCertificatesSortOrderEnum = map[string]ListOAuthClientCertificatesSortOrderEnum{ + "ASCENDING": ListOAuthClientCertificatesSortOrderAscending, + "DESCENDING": ListOAuthClientCertificatesSortOrderDescending, +} + +var mappingListOAuthClientCertificatesSortOrderEnumLowerCase = map[string]ListOAuthClientCertificatesSortOrderEnum{ + "ascending": ListOAuthClientCertificatesSortOrderAscending, + "descending": ListOAuthClientCertificatesSortOrderDescending, +} + +// GetListOAuthClientCertificatesSortOrderEnumValues Enumerates the set of values for ListOAuthClientCertificatesSortOrderEnum +func GetListOAuthClientCertificatesSortOrderEnumValues() []ListOAuthClientCertificatesSortOrderEnum { + values := make([]ListOAuthClientCertificatesSortOrderEnum, 0) + for _, v := range mappingListOAuthClientCertificatesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListOAuthClientCertificatesSortOrderEnumStringValues Enumerates the set of values in String for ListOAuthClientCertificatesSortOrderEnum +func GetListOAuthClientCertificatesSortOrderEnumStringValues() []string { + return []string{ + "ASCENDING", + "DESCENDING", + } +} + +// GetMappingListOAuthClientCertificatesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListOAuthClientCertificatesSortOrderEnum(val string) (ListOAuthClientCertificatesSortOrderEnum, bool) { + enum, ok := mappingListOAuthClientCertificatesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/list_o_auth_partner_certificates_request_response.go b/identitydomains/list_o_auth_partner_certificates_request_response.go new file mode 100644 index 0000000000..dd2840f6af --- /dev/null +++ b/identitydomains/list_o_auth_partner_certificates_request_response.go @@ -0,0 +1,165 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListOAuthPartnerCertificatesRequest wrapper for the ListOAuthPartnerCertificates operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListOAuthPartnerCertificates.go.html to see an example of how to use ListOAuthPartnerCertificatesRequest. +type ListOAuthPartnerCertificatesRequest struct { + + // OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + Filter *string `mandatory:"false" contributesTo:"query" name:"filter"` + + // OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + SortBy *string `mandatory:"false" contributesTo:"query" name:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder ListOAuthPartnerCertificatesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + StartIndex *int `mandatory:"false" contributesTo:"query" name:"startIndex"` + + // OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + Count *int `mandatory:"false" contributesTo:"query" name:"count"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListOAuthPartnerCertificatesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListOAuthPartnerCertificatesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListOAuthPartnerCertificatesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListOAuthPartnerCertificatesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListOAuthPartnerCertificatesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListOAuthPartnerCertificatesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListOAuthPartnerCertificatesSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListOAuthPartnerCertificatesResponse wrapper for the ListOAuthPartnerCertificates operation +type ListOAuthPartnerCertificatesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of OAuthPartnerCertificates instances + OAuthPartnerCertificates `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListOAuthPartnerCertificatesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListOAuthPartnerCertificatesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListOAuthPartnerCertificatesSortOrderEnum Enum with underlying type: string +type ListOAuthPartnerCertificatesSortOrderEnum string + +// Set of constants representing the allowable values for ListOAuthPartnerCertificatesSortOrderEnum +const ( + ListOAuthPartnerCertificatesSortOrderAscending ListOAuthPartnerCertificatesSortOrderEnum = "ASCENDING" + ListOAuthPartnerCertificatesSortOrderDescending ListOAuthPartnerCertificatesSortOrderEnum = "DESCENDING" +) + +var mappingListOAuthPartnerCertificatesSortOrderEnum = map[string]ListOAuthPartnerCertificatesSortOrderEnum{ + "ASCENDING": ListOAuthPartnerCertificatesSortOrderAscending, + "DESCENDING": ListOAuthPartnerCertificatesSortOrderDescending, +} + +var mappingListOAuthPartnerCertificatesSortOrderEnumLowerCase = map[string]ListOAuthPartnerCertificatesSortOrderEnum{ + "ascending": ListOAuthPartnerCertificatesSortOrderAscending, + "descending": ListOAuthPartnerCertificatesSortOrderDescending, +} + +// GetListOAuthPartnerCertificatesSortOrderEnumValues Enumerates the set of values for ListOAuthPartnerCertificatesSortOrderEnum +func GetListOAuthPartnerCertificatesSortOrderEnumValues() []ListOAuthPartnerCertificatesSortOrderEnum { + values := make([]ListOAuthPartnerCertificatesSortOrderEnum, 0) + for _, v := range mappingListOAuthPartnerCertificatesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListOAuthPartnerCertificatesSortOrderEnumStringValues Enumerates the set of values in String for ListOAuthPartnerCertificatesSortOrderEnum +func GetListOAuthPartnerCertificatesSortOrderEnumStringValues() []string { + return []string{ + "ASCENDING", + "DESCENDING", + } +} + +// GetMappingListOAuthPartnerCertificatesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListOAuthPartnerCertificatesSortOrderEnum(val string) (ListOAuthPartnerCertificatesSortOrderEnum, bool) { + enum, ok := mappingListOAuthPartnerCertificatesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/list_policies_request_response.go b/identitydomains/list_policies_request_response.go new file mode 100644 index 0000000000..c6713925d6 --- /dev/null +++ b/identitydomains/list_policies_request_response.go @@ -0,0 +1,177 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPoliciesRequest wrapper for the ListPolicies operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListPolicies.go.html to see an example of how to use ListPoliciesRequest. +type ListPoliciesRequest struct { + + // OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + Filter *string `mandatory:"false" contributesTo:"query" name:"filter"` + + // OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + SortBy *string `mandatory:"false" contributesTo:"query" name:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder ListPoliciesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + StartIndex *int `mandatory:"false" contributesTo:"query" name:"startIndex"` + + // OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + Count *int `mandatory:"false" contributesTo:"query" name:"count"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPoliciesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPoliciesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListPoliciesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPoliciesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListPoliciesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListPoliciesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListPoliciesSortOrderEnumStringValues(), ","))) + } + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPoliciesResponse wrapper for the ListPolicies operation +type ListPoliciesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of Policies instances + Policies `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListPoliciesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPoliciesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPoliciesSortOrderEnum Enum with underlying type: string +type ListPoliciesSortOrderEnum string + +// Set of constants representing the allowable values for ListPoliciesSortOrderEnum +const ( + ListPoliciesSortOrderAscending ListPoliciesSortOrderEnum = "ASCENDING" + ListPoliciesSortOrderDescending ListPoliciesSortOrderEnum = "DESCENDING" +) + +var mappingListPoliciesSortOrderEnum = map[string]ListPoliciesSortOrderEnum{ + "ASCENDING": ListPoliciesSortOrderAscending, + "DESCENDING": ListPoliciesSortOrderDescending, +} + +var mappingListPoliciesSortOrderEnumLowerCase = map[string]ListPoliciesSortOrderEnum{ + "ascending": ListPoliciesSortOrderAscending, + "descending": ListPoliciesSortOrderDescending, +} + +// GetListPoliciesSortOrderEnumValues Enumerates the set of values for ListPoliciesSortOrderEnum +func GetListPoliciesSortOrderEnumValues() []ListPoliciesSortOrderEnum { + values := make([]ListPoliciesSortOrderEnum, 0) + for _, v := range mappingListPoliciesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPoliciesSortOrderEnumStringValues Enumerates the set of values in String for ListPoliciesSortOrderEnum +func GetListPoliciesSortOrderEnumStringValues() []string { + return []string{ + "ASCENDING", + "DESCENDING", + } +} + +// GetMappingListPoliciesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPoliciesSortOrderEnum(val string) (ListPoliciesSortOrderEnum, bool) { + enum, ok := mappingListPoliciesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/list_rules_request_response.go b/identitydomains/list_rules_request_response.go new file mode 100644 index 0000000000..01ec249419 --- /dev/null +++ b/identitydomains/list_rules_request_response.go @@ -0,0 +1,177 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListRulesRequest wrapper for the ListRules operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListRules.go.html to see an example of how to use ListRulesRequest. +type ListRulesRequest struct { + + // OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + Filter *string `mandatory:"false" contributesTo:"query" name:"filter"` + + // OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + SortBy *string `mandatory:"false" contributesTo:"query" name:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder ListRulesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + StartIndex *int `mandatory:"false" contributesTo:"query" name:"startIndex"` + + // OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + Count *int `mandatory:"false" contributesTo:"query" name:"count"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListRulesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListRulesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListRulesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListRulesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListRulesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListRulesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListRulesSortOrderEnumStringValues(), ","))) + } + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListRulesResponse wrapper for the ListRules operation +type ListRulesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of Rules instances + Rules `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListRulesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListRulesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListRulesSortOrderEnum Enum with underlying type: string +type ListRulesSortOrderEnum string + +// Set of constants representing the allowable values for ListRulesSortOrderEnum +const ( + ListRulesSortOrderAscending ListRulesSortOrderEnum = "ASCENDING" + ListRulesSortOrderDescending ListRulesSortOrderEnum = "DESCENDING" +) + +var mappingListRulesSortOrderEnum = map[string]ListRulesSortOrderEnum{ + "ASCENDING": ListRulesSortOrderAscending, + "DESCENDING": ListRulesSortOrderDescending, +} + +var mappingListRulesSortOrderEnumLowerCase = map[string]ListRulesSortOrderEnum{ + "ascending": ListRulesSortOrderAscending, + "descending": ListRulesSortOrderDescending, +} + +// GetListRulesSortOrderEnumValues Enumerates the set of values for ListRulesSortOrderEnum +func GetListRulesSortOrderEnumValues() []ListRulesSortOrderEnum { + values := make([]ListRulesSortOrderEnum, 0) + for _, v := range mappingListRulesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListRulesSortOrderEnumStringValues Enumerates the set of values in String for ListRulesSortOrderEnum +func GetListRulesSortOrderEnumStringValues() []string { + return []string{ + "ASCENDING", + "DESCENDING", + } +} + +// GetMappingListRulesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListRulesSortOrderEnum(val string) (ListRulesSortOrderEnum, bool) { + enum, ok := mappingListRulesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/list_schemas_request_response.go b/identitydomains/list_schemas_request_response.go new file mode 100644 index 0000000000..9d6af3d484 --- /dev/null +++ b/identitydomains/list_schemas_request_response.go @@ -0,0 +1,162 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListSchemasRequest wrapper for the ListSchemas operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListSchemas.go.html to see an example of how to use ListSchemasRequest. +type ListSchemasRequest struct { + + // OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + SortBy *string `mandatory:"false" contributesTo:"query" name:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder ListSchemasSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + StartIndex *int `mandatory:"false" contributesTo:"query" name:"startIndex"` + + // OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + Count *int `mandatory:"false" contributesTo:"query" name:"count"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListSchemasRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListSchemasRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListSchemasRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSchemasRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListSchemasRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListSchemasSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListSchemasSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListSchemasResponse wrapper for the ListSchemas operation +type ListSchemasResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of Schemas instances + Schemas `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListSchemasResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListSchemasResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListSchemasSortOrderEnum Enum with underlying type: string +type ListSchemasSortOrderEnum string + +// Set of constants representing the allowable values for ListSchemasSortOrderEnum +const ( + ListSchemasSortOrderAscending ListSchemasSortOrderEnum = "ASCENDING" + ListSchemasSortOrderDescending ListSchemasSortOrderEnum = "DESCENDING" +) + +var mappingListSchemasSortOrderEnum = map[string]ListSchemasSortOrderEnum{ + "ASCENDING": ListSchemasSortOrderAscending, + "DESCENDING": ListSchemasSortOrderDescending, +} + +var mappingListSchemasSortOrderEnumLowerCase = map[string]ListSchemasSortOrderEnum{ + "ascending": ListSchemasSortOrderAscending, + "descending": ListSchemasSortOrderDescending, +} + +// GetListSchemasSortOrderEnumValues Enumerates the set of values for ListSchemasSortOrderEnum +func GetListSchemasSortOrderEnumValues() []ListSchemasSortOrderEnum { + values := make([]ListSchemasSortOrderEnum, 0) + for _, v := range mappingListSchemasSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListSchemasSortOrderEnumStringValues Enumerates the set of values in String for ListSchemasSortOrderEnum +func GetListSchemasSortOrderEnumStringValues() []string { + return []string{ + "ASCENDING", + "DESCENDING", + } +} + +// GetMappingListSchemasSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSchemasSortOrderEnum(val string) (ListSchemasSortOrderEnum, bool) { + enum, ok := mappingListSchemasSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/list_self_registration_profiles_request_response.go b/identitydomains/list_self_registration_profiles_request_response.go new file mode 100644 index 0000000000..e917f9f4ad --- /dev/null +++ b/identitydomains/list_self_registration_profiles_request_response.go @@ -0,0 +1,177 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListSelfRegistrationProfilesRequest wrapper for the ListSelfRegistrationProfiles operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListSelfRegistrationProfiles.go.html to see an example of how to use ListSelfRegistrationProfilesRequest. +type ListSelfRegistrationProfilesRequest struct { + + // OPTIONAL. The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See the Filtering section of the SCIM specification for more information (Section 3.4.2.2). The string should contain at least one condition that each item must match in order to be returned in the search results. Each condition specifies an attribute, an operator, and a value. Conditions within a filter can be connected by logical operators (such as AND and OR). Sets of conditions can be grouped together using parentheses. + Filter *string `mandatory:"false" contributesTo:"query" name:"filter"` + + // OPTIONAL. A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation form. See the Attribute Notation section of the SCIM specification for more information (Section 3.10). Also, see the Sorting section of the SCIM specification for more information (Section 3.4.2.3). + SortBy *string `mandatory:"false" contributesTo:"query" name:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are 'ascending' and 'descending'. See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder ListSelfRegistrationProfilesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // OPTIONAL. An integer that indicates the 1-based index of the first query result. See the Pagination section of the SCIM specification for more information. (Section 3.4.2.4). The number of results pages to return. The first page is 1. Specify 2 to access the second page of results, and so on. + StartIndex *int `mandatory:"false" contributesTo:"query" name:"startIndex"` + + // OPTIONAL. An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4). + Count *int `mandatory:"false" contributesTo:"query" name:"count"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListSelfRegistrationProfilesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListSelfRegistrationProfilesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListSelfRegistrationProfilesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSelfRegistrationProfilesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListSelfRegistrationProfilesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListSelfRegistrationProfilesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListSelfRegistrationProfilesSortOrderEnumStringValues(), ","))) + } + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListSelfRegistrationProfilesResponse wrapper for the ListSelfRegistrationProfiles operation +type ListSelfRegistrationProfilesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of SelfRegistrationProfiles instances + SelfRegistrationProfiles `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListSelfRegistrationProfilesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListSelfRegistrationProfilesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListSelfRegistrationProfilesSortOrderEnum Enum with underlying type: string +type ListSelfRegistrationProfilesSortOrderEnum string + +// Set of constants representing the allowable values for ListSelfRegistrationProfilesSortOrderEnum +const ( + ListSelfRegistrationProfilesSortOrderAscending ListSelfRegistrationProfilesSortOrderEnum = "ASCENDING" + ListSelfRegistrationProfilesSortOrderDescending ListSelfRegistrationProfilesSortOrderEnum = "DESCENDING" +) + +var mappingListSelfRegistrationProfilesSortOrderEnum = map[string]ListSelfRegistrationProfilesSortOrderEnum{ + "ASCENDING": ListSelfRegistrationProfilesSortOrderAscending, + "DESCENDING": ListSelfRegistrationProfilesSortOrderDescending, +} + +var mappingListSelfRegistrationProfilesSortOrderEnumLowerCase = map[string]ListSelfRegistrationProfilesSortOrderEnum{ + "ascending": ListSelfRegistrationProfilesSortOrderAscending, + "descending": ListSelfRegistrationProfilesSortOrderDescending, +} + +// GetListSelfRegistrationProfilesSortOrderEnumValues Enumerates the set of values for ListSelfRegistrationProfilesSortOrderEnum +func GetListSelfRegistrationProfilesSortOrderEnumValues() []ListSelfRegistrationProfilesSortOrderEnum { + values := make([]ListSelfRegistrationProfilesSortOrderEnum, 0) + for _, v := range mappingListSelfRegistrationProfilesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListSelfRegistrationProfilesSortOrderEnumStringValues Enumerates the set of values in String for ListSelfRegistrationProfilesSortOrderEnum +func GetListSelfRegistrationProfilesSortOrderEnumStringValues() []string { + return []string{ + "ASCENDING", + "DESCENDING", + } +} + +// GetMappingListSelfRegistrationProfilesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSelfRegistrationProfilesSortOrderEnum(val string) (ListSelfRegistrationProfilesSortOrderEnum, bool) { + enum, ok := mappingListSelfRegistrationProfilesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/list_settings_request_response.go b/identitydomains/list_settings_request_response.go new file mode 100644 index 0000000000..69aeaa0c82 --- /dev/null +++ b/identitydomains/list_settings_request_response.go @@ -0,0 +1,117 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListSettingsRequest wrapper for the ListSettings operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/ListSettings.go.html to see an example of how to use ListSettingsRequest. +type ListSettingsRequest struct { + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListSettingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListSettingsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListSettingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSettingsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListSettingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListSettingsResponse wrapper for the ListSettings operation +type ListSettingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of Settings instances + Settings `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListSettingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListSettingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/me_password_changer.go b/identitydomains/me_password_changer.go index 7699cd24e4..2b296d54d4 100644 --- a/identitydomains/me_password_changer.go +++ b/identitydomains/me_password_changer.go @@ -31,7 +31,7 @@ type MePasswordChanger struct { // - uniqueness: none Schemas []string `mandatory:"true" json:"schemas"` - // Password attribute. Max length for password is controlled via Password Policy. + // Password attribute. The maximum length for a password is controlled by a password policy. // **SCIM++ Properties:** // - type: string // - multiValued: false diff --git a/identitydomains/my_authentication_factors_remover.go b/identitydomains/my_authentication_factors_remover.go index b4c92d486f..6d588b6ea7 100644 --- a/identitydomains/my_authentication_factors_remover.go +++ b/identitydomains/my_authentication_factors_remover.go @@ -156,6 +156,17 @@ type MyAuthenticationFactorsRemover struct { // - uniqueness: none // - idcsSearchable: false Type MyAuthenticationFactorsRemoverTypeEnum `mandatory:"false" json:"type,omitempty"` + + // Specifies the token to be removed + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - required: false + // - mutability: readWrite + // - returned: request + // - uniqueness: none + // - idcsSearchable: false + Token *string `mandatory:"false" json:"token"` } func (m MyAuthenticationFactorsRemover) String() string { diff --git a/identitydomains/my_completed_approval.go b/identitydomains/my_completed_approval.go new file mode 100644 index 0000000000..035bf02080 --- /dev/null +++ b/identitydomains/my_completed_approval.go @@ -0,0 +1,281 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MyCompletedApproval Schema for MyPendingApproval and MyCompletedApproval +type MyCompletedApproval struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: string + // - uniqueness: global + Id *string `mandatory:"false" json:"id"` + + // Unique OCI identifier for the SCIM Resource. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: global + Ocid *string `mandatory:"false" json:"ocid"` + + Meta *Meta `mandatory:"false" json:"meta"` + + IdcsCreatedBy *IdcsCreatedBy `mandatory:"false" json:"idcsCreatedBy"` + + IdcsLastModifiedBy *IdcsLastModifiedBy `mandatory:"false" json:"idcsLastModifiedBy"` + + // Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsPreventedOperations []IdcsPreventedOperationsEnum `mandatory:"false" json:"idcsPreventedOperations,omitempty"` + + // A list of tags on this resource. + // **SCIM++ Properties:** + // - idcsCompositeKey: [key, value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Tags []Tags `mandatory:"false" json:"tags"` + + // A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DeleteInProgress *bool `mandatory:"false" json:"deleteInProgress"` + + // The release number when the resource was upgraded. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsLastUpgradedInRelease *string `mandatory:"false" json:"idcsLastUpgradedInRelease"` + + // OCI Domain Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DomainOcid *string `mandatory:"false" json:"domainOcid"` + + // OCI Compartment Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CompartmentOcid *string `mandatory:"false" json:"compartmentOcid"` + + // OCI Tenant Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TenancyOcid *string `mandatory:"false" json:"tenancyOcid"` + + // The Unique Identifier of the request. + // **SCIM++ Properties:** + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + RequestId *string `mandatory:"false" json:"requestId"` + + // The OCI Unique Identifier of the request. + // **SCIM++ Properties:** + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + RequestOcid *string `mandatory:"false" json:"requestOcid"` + + // Requested Resource display name + // **SCIM++ Properties:** + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ResourceDisplayName *string `mandatory:"false" json:"resourceDisplayName"` + + // Requested Resource type + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ResourceType *string `mandatory:"false" json:"resourceType"` + + // Time by when ApprovalWorkflowInstance expires + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: dateTime + // - uniqueness: none + Expires *string `mandatory:"false" json:"expires"` + + // Request Details + // **SCIM++ Properties:** + // - idcsSearchable: false + // - idcsScimCompliant: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + RequestDetails *string `mandatory:"false" json:"requestDetails"` + + // Status of the approver's response on the approval + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + Status *string `mandatory:"false" json:"status"` + + // The time that the user responded to the Approval + // **SCIM++ Properties:** + // - multiValued: false + // - idcsSearchable: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: dateTime + // - uniqueness: none + ResponseTime *string `mandatory:"false" json:"responseTime"` + + // Justification for approval + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: writeOnly + // - required: false + // - returned: never + // - type: string + // - uniqueness: none + Justification *string `mandatory:"false" json:"justification"` + + // The time that the Request was created + // **SCIM++ Properties:** + // - multiValued: false + // - idcsSearchable: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: dateTime + // - uniqueness: none + RequestCreatedTime *string `mandatory:"false" json:"requestCreatedTime"` +} + +func (m MyCompletedApproval) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MyCompletedApproval) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.IdcsPreventedOperations { + if _, ok := GetMappingIdcsPreventedOperationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsPreventedOperations: %s. Supported values are: %s.", val, strings.Join(GetIdcsPreventedOperationsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/my_completed_approvals.go b/identitydomains/my_completed_approvals.go new file mode 100644 index 0000000000..516a17c1f5 --- /dev/null +++ b/identitydomains/my_completed_approvals.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MyCompletedApprovals The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type MyCompletedApprovals struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []MyCompletedApproval `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m MyCompletedApprovals) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MyCompletedApprovals) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/my_pending_approval.go b/identitydomains/my_pending_approval.go new file mode 100644 index 0000000000..0e84b090ae --- /dev/null +++ b/identitydomains/my_pending_approval.go @@ -0,0 +1,281 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MyPendingApproval Schema for MyPendingApproval and MyCompletedApproval +type MyPendingApproval struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: string + // - uniqueness: global + Id *string `mandatory:"false" json:"id"` + + // Unique OCI identifier for the SCIM Resource. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: global + Ocid *string `mandatory:"false" json:"ocid"` + + Meta *Meta `mandatory:"false" json:"meta"` + + IdcsCreatedBy *IdcsCreatedBy `mandatory:"false" json:"idcsCreatedBy"` + + IdcsLastModifiedBy *IdcsLastModifiedBy `mandatory:"false" json:"idcsLastModifiedBy"` + + // Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsPreventedOperations []IdcsPreventedOperationsEnum `mandatory:"false" json:"idcsPreventedOperations,omitempty"` + + // A list of tags on this resource. + // **SCIM++ Properties:** + // - idcsCompositeKey: [key, value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Tags []Tags `mandatory:"false" json:"tags"` + + // A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DeleteInProgress *bool `mandatory:"false" json:"deleteInProgress"` + + // The release number when the resource was upgraded. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsLastUpgradedInRelease *string `mandatory:"false" json:"idcsLastUpgradedInRelease"` + + // OCI Domain Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DomainOcid *string `mandatory:"false" json:"domainOcid"` + + // OCI Compartment Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CompartmentOcid *string `mandatory:"false" json:"compartmentOcid"` + + // OCI Tenant Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TenancyOcid *string `mandatory:"false" json:"tenancyOcid"` + + // The Unique Identifier of the request. + // **SCIM++ Properties:** + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + RequestId *string `mandatory:"false" json:"requestId"` + + // The OCI Unique Identifier of the request. + // **SCIM++ Properties:** + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + RequestOcid *string `mandatory:"false" json:"requestOcid"` + + // Requested Resource display name + // **SCIM++ Properties:** + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ResourceDisplayName *string `mandatory:"false" json:"resourceDisplayName"` + + // Requested Resource type + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ResourceType *string `mandatory:"false" json:"resourceType"` + + // Time by when ApprovalWorkflowInstance expires + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: dateTime + // - uniqueness: none + Expires *string `mandatory:"false" json:"expires"` + + // Request Details + // **SCIM++ Properties:** + // - idcsSearchable: false + // - idcsScimCompliant: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + RequestDetails *string `mandatory:"false" json:"requestDetails"` + + // Status of the approver's response on the approval + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + Status *string `mandatory:"false" json:"status"` + + // The time that the user responded to the Approval + // **SCIM++ Properties:** + // - multiValued: false + // - idcsSearchable: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: dateTime + // - uniqueness: none + ResponseTime *string `mandatory:"false" json:"responseTime"` + + // Justification for approval + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: writeOnly + // - required: false + // - returned: never + // - type: string + // - uniqueness: none + Justification *string `mandatory:"false" json:"justification"` + + // The time that the Request was created + // **SCIM++ Properties:** + // - multiValued: false + // - idcsSearchable: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: dateTime + // - uniqueness: none + RequestCreatedTime *string `mandatory:"false" json:"requestCreatedTime"` +} + +func (m MyPendingApproval) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MyPendingApproval) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.IdcsPreventedOperations { + if _, ok := GetMappingIdcsPreventedOperationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsPreventedOperations: %s. Supported values are: %s.", val, strings.Join(GetIdcsPreventedOperationsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/my_pending_approvals.go b/identitydomains/my_pending_approvals.go new file mode 100644 index 0000000000..074dc58ac0 --- /dev/null +++ b/identitydomains/my_pending_approvals.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MyPendingApprovals The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type MyPendingApprovals struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []MyPendingApproval `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m MyPendingApprovals) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MyPendingApprovals) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/my_request.go b/identitydomains/my_request.go index d69a70e1b8..180761394b 100644 --- a/identitydomains/my_request.go +++ b/identitydomains/my_request.go @@ -163,12 +163,48 @@ type MyRequest struct { // - caseExact: true // - idcsSearchable: true // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Status MyRequestStatusEnum `mandatory:"false" json:"status,omitempty"` + + // Requestor can set action to CANCEL to cancel the request or to ESCALATE to escalate the request while the request status is IN_PROGRESS. Requestor can't escalate the request if canceling or escalation is in progress. + // **Added In:** 2307071836 + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false // - mutability: readWrite // - required: false // - returned: default // - type: string // - uniqueness: none - Status *string `mandatory:"false" json:"status"` + Action MyRequestActionEnum `mandatory:"false" json:"action,omitempty"` + + // Time by when Request expires + // **Added In:** 2307071836 + // **SCIM++ Properties:** + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: dateTime + // - uniqueness: none + Expires *string `mandatory:"false" json:"expires"` + + // Approvals created for this request. + // **Added In:** 2307071836 + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - returned: request + // - type: complex + // - uniqueness: none + ApprovalDetails []MyRequestApprovalDetails `mandatory:"false" json:"approvalDetails"` Requestor *MyRequestRequestor `mandatory:"false" json:"requestor"` } @@ -189,8 +225,122 @@ func (m MyRequest) ValidateEnumValue() (bool, error) { } } + if _, ok := GetMappingMyRequestStatusEnum(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(GetMyRequestStatusEnumStringValues(), ","))) + } + if _, ok := GetMappingMyRequestActionEnum(string(m.Action)); !ok && m.Action != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Action: %s. Supported values are: %s.", m.Action, strings.Join(GetMyRequestActionEnumStringValues(), ","))) + } if len(errMessage) > 0 { return true, fmt.Errorf(strings.Join(errMessage, "\n")) } return false, nil } + +// MyRequestStatusEnum Enum with underlying type: string +type MyRequestStatusEnum string + +// Set of constants representing the allowable values for MyRequestStatusEnum +const ( + MyRequestStatusCreated MyRequestStatusEnum = "CREATED" + MyRequestStatusComplete MyRequestStatusEnum = "COMPLETE" + MyRequestStatusInProgress MyRequestStatusEnum = "IN_PROGRESS" + MyRequestStatusApproved MyRequestStatusEnum = "APPROVED" + MyRequestStatusRejected MyRequestStatusEnum = "REJECTED" + MyRequestStatusCanceled MyRequestStatusEnum = "CANCELED" + MyRequestStatusExpired MyRequestStatusEnum = "EXPIRED" + MyRequestStatusFailed MyRequestStatusEnum = "FAILED" +) + +var mappingMyRequestStatusEnum = map[string]MyRequestStatusEnum{ + "CREATED": MyRequestStatusCreated, + "COMPLETE": MyRequestStatusComplete, + "IN_PROGRESS": MyRequestStatusInProgress, + "APPROVED": MyRequestStatusApproved, + "REJECTED": MyRequestStatusRejected, + "CANCELED": MyRequestStatusCanceled, + "EXPIRED": MyRequestStatusExpired, + "FAILED": MyRequestStatusFailed, +} + +var mappingMyRequestStatusEnumLowerCase = map[string]MyRequestStatusEnum{ + "created": MyRequestStatusCreated, + "complete": MyRequestStatusComplete, + "in_progress": MyRequestStatusInProgress, + "approved": MyRequestStatusApproved, + "rejected": MyRequestStatusRejected, + "canceled": MyRequestStatusCanceled, + "expired": MyRequestStatusExpired, + "failed": MyRequestStatusFailed, +} + +// GetMyRequestStatusEnumValues Enumerates the set of values for MyRequestStatusEnum +func GetMyRequestStatusEnumValues() []MyRequestStatusEnum { + values := make([]MyRequestStatusEnum, 0) + for _, v := range mappingMyRequestStatusEnum { + values = append(values, v) + } + return values +} + +// GetMyRequestStatusEnumStringValues Enumerates the set of values in String for MyRequestStatusEnum +func GetMyRequestStatusEnumStringValues() []string { + return []string{ + "CREATED", + "COMPLETE", + "IN_PROGRESS", + "APPROVED", + "REJECTED", + "CANCELED", + "EXPIRED", + "FAILED", + } +} + +// GetMappingMyRequestStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMyRequestStatusEnum(val string) (MyRequestStatusEnum, bool) { + enum, ok := mappingMyRequestStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// MyRequestActionEnum Enum with underlying type: string +type MyRequestActionEnum string + +// Set of constants representing the allowable values for MyRequestActionEnum +const ( + MyRequestActionCancel MyRequestActionEnum = "CANCEL" + MyRequestActionEscalate MyRequestActionEnum = "ESCALATE" +) + +var mappingMyRequestActionEnum = map[string]MyRequestActionEnum{ + "CANCEL": MyRequestActionCancel, + "ESCALATE": MyRequestActionEscalate, +} + +var mappingMyRequestActionEnumLowerCase = map[string]MyRequestActionEnum{ + "cancel": MyRequestActionCancel, + "escalate": MyRequestActionEscalate, +} + +// GetMyRequestActionEnumValues Enumerates the set of values for MyRequestActionEnum +func GetMyRequestActionEnumValues() []MyRequestActionEnum { + values := make([]MyRequestActionEnum, 0) + for _, v := range mappingMyRequestActionEnum { + values = append(values, v) + } + return values +} + +// GetMyRequestActionEnumStringValues Enumerates the set of values in String for MyRequestActionEnum +func GetMyRequestActionEnumStringValues() []string { + return []string{ + "CANCEL", + "ESCALATE", + } +} + +// GetMappingMyRequestActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingMyRequestActionEnum(val string) (MyRequestActionEnum, bool) { + enum, ok := mappingMyRequestActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/my_request_approval_details.go b/identitydomains/my_request_approval_details.go new file mode 100644 index 0000000000..b5fc997460 --- /dev/null +++ b/identitydomains/my_request_approval_details.go @@ -0,0 +1,114 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MyRequestApprovalDetails Approvals created for this request. +type MyRequestApprovalDetails struct { + + // Approver Id + // **Added In:** 2307071836 + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - returned: default + // - type: string + // - uniqueness: none + // - mutability: readOnly + ApproverId *string `mandatory:"false" json:"approverId"` + + // Approver display name + // **Added In:** 2307071836 + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - returned: default + // - type: string + // - uniqueness: none + // - mutability: readOnly + ApproverDisplayName *string `mandatory:"false" json:"approverDisplayName"` + + // Approval Justification + // **Added In:** 2307071836 + // **SCIM++ Properties:** + // - multiValued: false + // - idcsSearchable: false + // - returned: default + // - type: string + // - uniqueness: none + // - mutability: readOnly + Justification *string `mandatory:"false" json:"justification"` + + // Approval Status + // **Added In:** 2307071836 + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - returned: default + // - type: string + // - uniqueness: none + // - mutability: readOnly + Status *string `mandatory:"false" json:"status"` + + // Approval Order + // **Added In:** 2307071836 + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - returned: default + // - type: integer + // - uniqueness: none + // - mutability: readOnly + Order *int `mandatory:"false" json:"order"` + + // Approval Type (Escalation or Regular) + // **Added In:** 2307071836 + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - returned: default + // - type: string + // - uniqueness: none + // - mutability: readOnly + ApprovalType *string `mandatory:"false" json:"approvalType"` + + // Approval Update Time + // **Added In:** 2307071836 + // **SCIM++ Properties:** + // - multiValued: false + // - idcsSearchable: false + // - returned: default + // - type: dateTime + // - uniqueness: none + // - mutability: readOnly + TimeUpdated *string `mandatory:"false" json:"timeUpdated"` +} + +func (m MyRequestApprovalDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MyRequestApprovalDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/my_request_requesting.go b/identitydomains/my_request_requesting.go index 51ea486223..df295796eb 100644 --- a/identitydomains/my_request_requesting.go +++ b/identitydomains/my_request_requesting.go @@ -75,6 +75,18 @@ type MyRequestRequesting struct { // - type: string // - uniqueness: none Display *string `mandatory:"false" json:"display"` + + // Resource description + // **Added In:** 2307071836 + // **SCIM++ Properties:** + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Description *string `mandatory:"false" json:"description"` } func (m MyRequestRequesting) String() string { diff --git a/identitydomains/network_perimeter.go b/identitydomains/network_perimeter.go new file mode 100644 index 0000000000..5ccc6c0ba4 --- /dev/null +++ b/identitydomains/network_perimeter.go @@ -0,0 +1,215 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NetworkPerimeter NetworkPerimeter resource. A unit that captures a NetworkPerimeter as a collection of IP Addresses. +type NetworkPerimeter struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // NetworkPerimeter name + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: always + // - type: string + // - uniqueness: server + Name *string `mandatory:"true" json:"name"` + + // IPAddresses or Ranges assigned to the NetworkPerimeter + // **SCIM++ Properties:** + // - idcsCompositeKey: [value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: complex + // - uniqueness: none + IpAddresses []NetworkPerimeterIpAddresses `mandatory:"true" json:"ipAddresses"` + + // Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: string + // - uniqueness: global + Id *string `mandatory:"false" json:"id"` + + // Unique OCI identifier for the SCIM Resource. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: global + Ocid *string `mandatory:"false" json:"ocid"` + + Meta *Meta `mandatory:"false" json:"meta"` + + IdcsCreatedBy *IdcsCreatedBy `mandatory:"false" json:"idcsCreatedBy"` + + IdcsLastModifiedBy *IdcsLastModifiedBy `mandatory:"false" json:"idcsLastModifiedBy"` + + // Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsPreventedOperations []IdcsPreventedOperationsEnum `mandatory:"false" json:"idcsPreventedOperations,omitempty"` + + // A list of tags on this resource. + // **SCIM++ Properties:** + // - idcsCompositeKey: [key, value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Tags []Tags `mandatory:"false" json:"tags"` + + // A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DeleteInProgress *bool `mandatory:"false" json:"deleteInProgress"` + + // The release number when the resource was upgraded. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsLastUpgradedInRelease *string `mandatory:"false" json:"idcsLastUpgradedInRelease"` + + // OCI Domain Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DomainOcid *string `mandatory:"false" json:"domainOcid"` + + // OCI Compartment Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CompartmentOcid *string `mandatory:"false" json:"compartmentOcid"` + + // OCI Tenant Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TenancyOcid *string `mandatory:"false" json:"tenancyOcid"` + + // An identifier for the Resource as defined by the Service Consumer. The externalId may simplify identification of the Resource between Service Consumer and Service provider by allowing the Consumer to refer to the Resource with its own identifier, obviating the need to store a local mapping between the local identifier of the Resource and the identifier used by the Service Provider. Each Resource MAY include a non-empty externalId value. The value of the externalId attribute is always issued be the Service Consumer and can never be specified by the Service Provider. The Service Provider MUST always interpret the externalId as scoped to the Service Consumer's tenant. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ExternalId *string `mandatory:"false" json:"externalId"` + + // NetworkPerimeter Description + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Description *string `mandatory:"false" json:"description"` +} + +func (m NetworkPerimeter) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NetworkPerimeter) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.IdcsPreventedOperations { + if _, ok := GetMappingIdcsPreventedOperationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsPreventedOperations: %s. Supported values are: %s.", val, strings.Join(GetIdcsPreventedOperationsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/network_perimeter_ip_addresses.go b/identitydomains/network_perimeter_ip_addresses.go new file mode 100644 index 0000000000..e4d29055ec --- /dev/null +++ b/identitydomains/network_perimeter_ip_addresses.go @@ -0,0 +1,166 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NetworkPerimeterIpAddresses IPAddresses or Ranges assigned to the NetworkPerimeter +type NetworkPerimeterIpAddresses struct { + + // Value of exact ipaddress or the range in CIDR or the range with start and end ip addresses + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // type of the ip address value + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Type NetworkPerimeterIpAddressesTypeEnum `mandatory:"false" json:"type,omitempty"` + + // Indicates the type of Ip Address example, IPV4 or IPV6 + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Version NetworkPerimeterIpAddressesVersionEnum `mandatory:"false" json:"version,omitempty"` +} + +func (m NetworkPerimeterIpAddresses) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NetworkPerimeterIpAddresses) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingNetworkPerimeterIpAddressesTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetNetworkPerimeterIpAddressesTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingNetworkPerimeterIpAddressesVersionEnum(string(m.Version)); !ok && m.Version != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Version: %s. Supported values are: %s.", m.Version, strings.Join(GetNetworkPerimeterIpAddressesVersionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// NetworkPerimeterIpAddressesTypeEnum Enum with underlying type: string +type NetworkPerimeterIpAddressesTypeEnum string + +// Set of constants representing the allowable values for NetworkPerimeterIpAddressesTypeEnum +const ( + NetworkPerimeterIpAddressesTypeCidr NetworkPerimeterIpAddressesTypeEnum = "CIDR" + NetworkPerimeterIpAddressesTypeRange NetworkPerimeterIpAddressesTypeEnum = "RANGE" + NetworkPerimeterIpAddressesTypeExact NetworkPerimeterIpAddressesTypeEnum = "EXACT" +) + +var mappingNetworkPerimeterIpAddressesTypeEnum = map[string]NetworkPerimeterIpAddressesTypeEnum{ + "CIDR": NetworkPerimeterIpAddressesTypeCidr, + "RANGE": NetworkPerimeterIpAddressesTypeRange, + "EXACT": NetworkPerimeterIpAddressesTypeExact, +} + +var mappingNetworkPerimeterIpAddressesTypeEnumLowerCase = map[string]NetworkPerimeterIpAddressesTypeEnum{ + "cidr": NetworkPerimeterIpAddressesTypeCidr, + "range": NetworkPerimeterIpAddressesTypeRange, + "exact": NetworkPerimeterIpAddressesTypeExact, +} + +// GetNetworkPerimeterIpAddressesTypeEnumValues Enumerates the set of values for NetworkPerimeterIpAddressesTypeEnum +func GetNetworkPerimeterIpAddressesTypeEnumValues() []NetworkPerimeterIpAddressesTypeEnum { + values := make([]NetworkPerimeterIpAddressesTypeEnum, 0) + for _, v := range mappingNetworkPerimeterIpAddressesTypeEnum { + values = append(values, v) + } + return values +} + +// GetNetworkPerimeterIpAddressesTypeEnumStringValues Enumerates the set of values in String for NetworkPerimeterIpAddressesTypeEnum +func GetNetworkPerimeterIpAddressesTypeEnumStringValues() []string { + return []string{ + "CIDR", + "RANGE", + "EXACT", + } +} + +// GetMappingNetworkPerimeterIpAddressesTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingNetworkPerimeterIpAddressesTypeEnum(val string) (NetworkPerimeterIpAddressesTypeEnum, bool) { + enum, ok := mappingNetworkPerimeterIpAddressesTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// NetworkPerimeterIpAddressesVersionEnum Enum with underlying type: string +type NetworkPerimeterIpAddressesVersionEnum string + +// Set of constants representing the allowable values for NetworkPerimeterIpAddressesVersionEnum +const ( + NetworkPerimeterIpAddressesVersionIpv4 NetworkPerimeterIpAddressesVersionEnum = "IPV4" + NetworkPerimeterIpAddressesVersionIpv6 NetworkPerimeterIpAddressesVersionEnum = "IPV6" +) + +var mappingNetworkPerimeterIpAddressesVersionEnum = map[string]NetworkPerimeterIpAddressesVersionEnum{ + "IPV4": NetworkPerimeterIpAddressesVersionIpv4, + "IPV6": NetworkPerimeterIpAddressesVersionIpv6, +} + +var mappingNetworkPerimeterIpAddressesVersionEnumLowerCase = map[string]NetworkPerimeterIpAddressesVersionEnum{ + "ipv4": NetworkPerimeterIpAddressesVersionIpv4, + "ipv6": NetworkPerimeterIpAddressesVersionIpv6, +} + +// GetNetworkPerimeterIpAddressesVersionEnumValues Enumerates the set of values for NetworkPerimeterIpAddressesVersionEnum +func GetNetworkPerimeterIpAddressesVersionEnumValues() []NetworkPerimeterIpAddressesVersionEnum { + values := make([]NetworkPerimeterIpAddressesVersionEnum, 0) + for _, v := range mappingNetworkPerimeterIpAddressesVersionEnum { + values = append(values, v) + } + return values +} + +// GetNetworkPerimeterIpAddressesVersionEnumStringValues Enumerates the set of values in String for NetworkPerimeterIpAddressesVersionEnum +func GetNetworkPerimeterIpAddressesVersionEnumStringValues() []string { + return []string{ + "IPV4", + "IPV6", + } +} + +// GetMappingNetworkPerimeterIpAddressesVersionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingNetworkPerimeterIpAddressesVersionEnum(val string) (NetworkPerimeterIpAddressesVersionEnum, bool) { + enum, ok := mappingNetworkPerimeterIpAddressesVersionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/network_perimeter_search_request.go b/identitydomains/network_perimeter_search_request.go new file mode 100644 index 0000000000..bd6e0d75a8 --- /dev/null +++ b/identitydomains/network_perimeter_search_request.go @@ -0,0 +1,70 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NetworkPerimeterSearchRequest Clients MAY execute queries without passing parameters on the URL by using the HTTP POST verb combined with the **.search** path extension. The inclusion of **.search** on the end of a valid SCIM endpoint SHALL be used to indicate the HTTP POST verb is intended to be a query operation. To create a new query result set, a SCIM client sends an HTTP POST request to the desired SCIM resource endpoint (ending in **.search**). The body of the POST request MAY include any of the parameters. +type NetworkPerimeterSearchRequest struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See (additional retrieval query parameters (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + Attributes []string `mandatory:"false" json:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + AttributeSets []AttributeSetsEnum `mandatory:"false" json:"attributeSets,omitempty"` + + // The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See Section 3.4.2.2 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2). OPTIONAL. + Filter *string `mandatory:"false" json:"filter"` + + // A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See Sorting section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + SortBy *string `mandatory:"false" json:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder SortOrderEnum `mandatory:"false" json:"sortOrder,omitempty"` + + // An integer that indicates the 1-based index of the first query result. See Pagination Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + StartIndex *int `mandatory:"false" json:"startIndex"` + + // An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + Count *int `mandatory:"false" json:"count"` +} + +func (m NetworkPerimeterSearchRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NetworkPerimeterSearchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingSortOrderEnum(string(m.SortOrder)); !ok && m.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", m.SortOrder, strings.Join(GetSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/network_perimeters.go b/identitydomains/network_perimeters.go new file mode 100644 index 0000000000..61a8958a44 --- /dev/null +++ b/identitydomains/network_perimeters.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NetworkPerimeters The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type NetworkPerimeters struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []NetworkPerimeter `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m NetworkPerimeters) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NetworkPerimeters) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/notification_setting.go b/identitydomains/notification_setting.go new file mode 100644 index 0000000000..b7ce3910e0 --- /dev/null +++ b/identitydomains/notification_setting.go @@ -0,0 +1,254 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NotificationSetting Notification resource. +type NotificationSetting struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // Tenant level settings for the notification service + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: boolean + // - uniqueness: none + NotificationEnabled *bool `mandatory:"true" json:"notificationEnabled"` + + FromEmailAddress *NotificationSettingsFromEmailAddress `mandatory:"true" json:"fromEmailAddress"` + + // Event settings + // **SCIM++ Properties:** + // - caseExact: false + // - idcsCompositeKey: [eventId] + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: complex + // - uniqueness: none + EventSettings []NotificationSettingsEventSettings `mandatory:"true" json:"eventSettings"` + + // Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: string + // - uniqueness: global + Id *string `mandatory:"false" json:"id"` + + // Unique OCI identifier for the SCIM Resource. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: global + Ocid *string `mandatory:"false" json:"ocid"` + + Meta *Meta `mandatory:"false" json:"meta"` + + IdcsCreatedBy *IdcsCreatedBy `mandatory:"false" json:"idcsCreatedBy"` + + IdcsLastModifiedBy *IdcsLastModifiedBy `mandatory:"false" json:"idcsLastModifiedBy"` + + // Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsPreventedOperations []IdcsPreventedOperationsEnum `mandatory:"false" json:"idcsPreventedOperations,omitempty"` + + // A list of tags on this resource. + // **SCIM++ Properties:** + // - idcsCompositeKey: [key, value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Tags []Tags `mandatory:"false" json:"tags"` + + // A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DeleteInProgress *bool `mandatory:"false" json:"deleteInProgress"` + + // The release number when the resource was upgraded. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsLastUpgradedInRelease *string `mandatory:"false" json:"idcsLastUpgradedInRelease"` + + // OCI Domain Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DomainOcid *string `mandatory:"false" json:"domainOcid"` + + // OCI Compartment Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CompartmentOcid *string `mandatory:"false" json:"compartmentOcid"` + + // OCI Tenant Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TenancyOcid *string `mandatory:"false" json:"tenancyOcid"` + + // An identifier for the Resource as defined by the Service Consumer. The externalId may simplify identification of the Resource between Service Consumer and Service Provider by allowing the Consumer to refer to the Resource with its own identifier, obviating the need to store a local mapping between the local identifier of the Resource and the identifier used by the Service Provider. Each Resource MAY include a non-empty externalId value. The value of the externalId attribute is always issued by the Service Consumer and can never be specified by the Service Provider. The Service Provider MUST always interpret the externalId as scoped to the Service Consumer's tenant. + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ExternalId *string `mandatory:"false" json:"externalId"` + + // Specify if the notification service is in test mode + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + TestModeEnabled *bool `mandatory:"false" json:"testModeEnabled"` + + // List of the test recipient email addresses + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TestRecipients []string `mandatory:"false" json:"testRecipients"` + + // Indicates whether to allow notifications on a secondary email. + // **Deprecated Since: 19.2.1** + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + SendNotificationsToSecondaryEmail *bool `mandatory:"false" json:"sendNotificationsToSecondaryEmail"` + + // If true and admin changed user's primary email, send user's profile changed email to old and new primary email address. + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + SendNotificationToOldAndNewPrimaryEmailsWhenAdminChangesPrimaryEmail *bool `mandatory:"false" json:"sendNotificationToOldAndNewPrimaryEmailsWhenAdminChangesPrimaryEmail"` +} + +func (m NotificationSetting) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NotificationSetting) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.IdcsPreventedOperations { + if _, ok := GetMappingIdcsPreventedOperationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsPreventedOperations: %s. Supported values are: %s.", val, strings.Join(GetIdcsPreventedOperationsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/notification_settings.go b/identitydomains/notification_settings.go new file mode 100644 index 0000000000..d9d9683fa2 --- /dev/null +++ b/identitydomains/notification_settings.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NotificationSettings The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type NotificationSettings struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []NotificationSetting `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m NotificationSettings) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NotificationSettings) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/notification_settings_event_settings.go b/identitydomains/notification_settings_event_settings.go new file mode 100644 index 0000000000..3b2aa93177 --- /dev/null +++ b/identitydomains/notification_settings_event_settings.go @@ -0,0 +1,61 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NotificationSettingsEventSettings Event settings +type NotificationSettingsEventSettings struct { + + // IDCS-generated event + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + EventId *string `mandatory:"true" json:"eventId"` + + // Specify if notifications are enabled for the event + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + Enabled *bool `mandatory:"false" json:"enabled"` +} + +func (m NotificationSettingsEventSettings) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NotificationSettingsEventSettings) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/notification_settings_from_email_address.go b/identitydomains/notification_settings_from_email_address.go new file mode 100644 index 0000000000..77d861d3cd --- /dev/null +++ b/identitydomains/notification_settings_from_email_address.go @@ -0,0 +1,177 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NotificationSettingsFromEmailAddress From email address to be used in the notification emails +// **SCIM++ Properties:** +// - caseExact: false +// - multiValued: false +// - mutability: readWrite +// - required: true +// - returned: always +// - type: complex +// - uniqueness: none +type NotificationSettingsFromEmailAddress struct { + + // Value of the From email address + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + Value *string `mandatory:"true" json:"value"` + + // From address verification mode. If postmaster account is available then 'domain' mode is used or entire valid email can be verified using 'email' mode + // **Added In:** 18.2.6 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Validate NotificationSettingsFromEmailAddressValidateEnum `mandatory:"true" json:"validate"` + + // Validation status for the From email address + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + ValidationStatus NotificationSettingsFromEmailAddressValidationStatusEnum `mandatory:"false" json:"validationStatus,omitempty"` + + // Display name for the From email address + // **Added In:** 19.2.1 + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m NotificationSettingsFromEmailAddress) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NotificationSettingsFromEmailAddress) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingNotificationSettingsFromEmailAddressValidateEnum(string(m.Validate)); !ok && m.Validate != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Validate: %s. Supported values are: %s.", m.Validate, strings.Join(GetNotificationSettingsFromEmailAddressValidateEnumStringValues(), ","))) + } + + if _, ok := GetMappingNotificationSettingsFromEmailAddressValidationStatusEnum(string(m.ValidationStatus)); !ok && m.ValidationStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ValidationStatus: %s. Supported values are: %s.", m.ValidationStatus, strings.Join(GetNotificationSettingsFromEmailAddressValidationStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// NotificationSettingsFromEmailAddressValidationStatusEnum Enum with underlying type: string +type NotificationSettingsFromEmailAddressValidationStatusEnum string + +// Set of constants representing the allowable values for NotificationSettingsFromEmailAddressValidationStatusEnum +const ( + NotificationSettingsFromEmailAddressValidationStatusVerified NotificationSettingsFromEmailAddressValidationStatusEnum = "VERIFIED" + NotificationSettingsFromEmailAddressValidationStatusPending NotificationSettingsFromEmailAddressValidationStatusEnum = "PENDING" +) + +var mappingNotificationSettingsFromEmailAddressValidationStatusEnum = map[string]NotificationSettingsFromEmailAddressValidationStatusEnum{ + "VERIFIED": NotificationSettingsFromEmailAddressValidationStatusVerified, + "PENDING": NotificationSettingsFromEmailAddressValidationStatusPending, +} + +var mappingNotificationSettingsFromEmailAddressValidationStatusEnumLowerCase = map[string]NotificationSettingsFromEmailAddressValidationStatusEnum{ + "verified": NotificationSettingsFromEmailAddressValidationStatusVerified, + "pending": NotificationSettingsFromEmailAddressValidationStatusPending, +} + +// GetNotificationSettingsFromEmailAddressValidationStatusEnumValues Enumerates the set of values for NotificationSettingsFromEmailAddressValidationStatusEnum +func GetNotificationSettingsFromEmailAddressValidationStatusEnumValues() []NotificationSettingsFromEmailAddressValidationStatusEnum { + values := make([]NotificationSettingsFromEmailAddressValidationStatusEnum, 0) + for _, v := range mappingNotificationSettingsFromEmailAddressValidationStatusEnum { + values = append(values, v) + } + return values +} + +// GetNotificationSettingsFromEmailAddressValidationStatusEnumStringValues Enumerates the set of values in String for NotificationSettingsFromEmailAddressValidationStatusEnum +func GetNotificationSettingsFromEmailAddressValidationStatusEnumStringValues() []string { + return []string{ + "VERIFIED", + "PENDING", + } +} + +// GetMappingNotificationSettingsFromEmailAddressValidationStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingNotificationSettingsFromEmailAddressValidationStatusEnum(val string) (NotificationSettingsFromEmailAddressValidationStatusEnum, bool) { + enum, ok := mappingNotificationSettingsFromEmailAddressValidationStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// NotificationSettingsFromEmailAddressValidateEnum Enum with underlying type: string +type NotificationSettingsFromEmailAddressValidateEnum string + +// Set of constants representing the allowable values for NotificationSettingsFromEmailAddressValidateEnum +const ( + NotificationSettingsFromEmailAddressValidateEmail NotificationSettingsFromEmailAddressValidateEnum = "email" + NotificationSettingsFromEmailAddressValidateDomain NotificationSettingsFromEmailAddressValidateEnum = "domain" +) + +var mappingNotificationSettingsFromEmailAddressValidateEnum = map[string]NotificationSettingsFromEmailAddressValidateEnum{ + "email": NotificationSettingsFromEmailAddressValidateEmail, + "domain": NotificationSettingsFromEmailAddressValidateDomain, +} + +var mappingNotificationSettingsFromEmailAddressValidateEnumLowerCase = map[string]NotificationSettingsFromEmailAddressValidateEnum{ + "email": NotificationSettingsFromEmailAddressValidateEmail, + "domain": NotificationSettingsFromEmailAddressValidateDomain, +} + +// GetNotificationSettingsFromEmailAddressValidateEnumValues Enumerates the set of values for NotificationSettingsFromEmailAddressValidateEnum +func GetNotificationSettingsFromEmailAddressValidateEnumValues() []NotificationSettingsFromEmailAddressValidateEnum { + values := make([]NotificationSettingsFromEmailAddressValidateEnum, 0) + for _, v := range mappingNotificationSettingsFromEmailAddressValidateEnum { + values = append(values, v) + } + return values +} + +// GetNotificationSettingsFromEmailAddressValidateEnumStringValues Enumerates the set of values in String for NotificationSettingsFromEmailAddressValidateEnum +func GetNotificationSettingsFromEmailAddressValidateEnumStringValues() []string { + return []string{ + "email", + "domain", + } +} + +// GetMappingNotificationSettingsFromEmailAddressValidateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingNotificationSettingsFromEmailAddressValidateEnum(val string) (NotificationSettingsFromEmailAddressValidateEnum, bool) { + enum, ok := mappingNotificationSettingsFromEmailAddressValidateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/notification_settings_search_request.go b/identitydomains/notification_settings_search_request.go new file mode 100644 index 0000000000..90fbf048f7 --- /dev/null +++ b/identitydomains/notification_settings_search_request.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NotificationSettingsSearchRequest Clients MAY execute queries without passing parameters on the URL by using the HTTP POST verb combined with the **.search** path extension. The inclusion of **.search** on the end of a valid SCIM endpoint SHALL be used to indicate the HTTP POST verb is intended to be a query operation. To create a new query result set, a SCIM client sends an HTTP POST request to the desired SCIM resource endpoint (ending in **.search**). The body of the POST request MAY include any of the parameters. +type NotificationSettingsSearchRequest struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See (additional retrieval query parameters (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + Attributes []string `mandatory:"false" json:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + AttributeSets []AttributeSetsEnum `mandatory:"false" json:"attributeSets,omitempty"` +} + +func (m NotificationSettingsSearchRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NotificationSettingsSearchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/o_auth_client_certificate.go b/identitydomains/o_auth_client_certificate.go new file mode 100644 index 0000000000..65cd7b9d4f --- /dev/null +++ b/identitydomains/o_auth_client_certificate.go @@ -0,0 +1,288 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OAuthClientCertificate OAuth Client Certificate schema +type OAuthClientCertificate struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // Certificate alias + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - required: true + // - caseExact: false + // - mutability: readWrite + // - returned: always + // - uniqueness: none + // - idcsSearchable: true + CertificateAlias *string `mandatory:"true" json:"certificateAlias"` + + // Base 64Key data attribute + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + X509Base64Certificate *string `mandatory:"true" json:"x509Base64Certificate"` + + // Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: string + // - uniqueness: global + Id *string `mandatory:"false" json:"id"` + + // Unique OCI identifier for the SCIM Resource. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: global + Ocid *string `mandatory:"false" json:"ocid"` + + Meta *Meta `mandatory:"false" json:"meta"` + + IdcsCreatedBy *IdcsCreatedBy `mandatory:"false" json:"idcsCreatedBy"` + + IdcsLastModifiedBy *IdcsLastModifiedBy `mandatory:"false" json:"idcsLastModifiedBy"` + + // Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsPreventedOperations []IdcsPreventedOperationsEnum `mandatory:"false" json:"idcsPreventedOperations,omitempty"` + + // A list of tags on this resource. + // **SCIM++ Properties:** + // - idcsCompositeKey: [key, value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Tags []Tags `mandatory:"false" json:"tags"` + + // A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DeleteInProgress *bool `mandatory:"false" json:"deleteInProgress"` + + // The release number when the resource was upgraded. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsLastUpgradedInRelease *string `mandatory:"false" json:"idcsLastUpgradedInRelease"` + + // OCI Domain Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DomainOcid *string `mandatory:"false" json:"domainOcid"` + + // OCI Compartment Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CompartmentOcid *string `mandatory:"false" json:"compartmentOcid"` + + // OCI Tenant Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TenancyOcid *string `mandatory:"false" json:"tenancyOcid"` + + // An identifier for the Resource as defined by the Service Consumer. The externalId may simplify identification of the Resource between Service Consumer and Service Provider by allowing the Consumer to refer to the Resource with its own identifier, obviating the need to store a local mapping between the local identifier of the Resource and the identifier used by the Service Provider. Each Resource MAY include a non-empty externalId value. The value of the externalId attribute is always issued by the Service Consumer and can never be specified by the Service Provider. The Service Provider MUST always interpret the externalId as scoped to the Service Consumer's tenant. + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - required: false + // - caseExact: false + // - mutability: readWrite + // - returned: default + // - uniqueness: none + ExternalId *string `mandatory:"false" json:"externalId"` + + // Key store name + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - required: false + // - caseExact: false + // - returned: always + // - uniqueness: none + KeyStoreName *string `mandatory:"false" json:"keyStoreName"` + + // Map + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - required: false + // - caseExact: false + // - returned: always + // - uniqueness: none + Map *string `mandatory:"false" json:"map"` + + // Key store password + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - idcsSensitive: none + // - required: false + // - caseExact: true + // - returned: never + // - uniqueness: none + KeyStorePassword *string `mandatory:"false" json:"keyStorePassword"` + + // Key store ID + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - required: false + // - caseExact: true + // - returned: never + // - uniqueness: none + // - idcsSearchable: true + KeyStoreId *string `mandatory:"false" json:"keyStoreId"` + + // SHA-1 Thumbprint + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - idcsSearchable: true + // - required: false + // - caseExact: true + // - returned: default + // - uniqueness: none + Sha1Thumbprint *string `mandatory:"false" json:"sha1Thumbprint"` + + // SHA-256 Thumbprint + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - idcsSearchable: true + // - required: false + // - caseExact: true + // - returned: default + // - uniqueness: none + Sha256Thumbprint *string `mandatory:"false" json:"sha256Thumbprint"` + + // Certificate start date + // **SCIM++ Properties:** + // - type: dateTime + // - multiValued: false + // - required: false + // - caseExact: true + // - mutability: readWrite + // - returned: default + // - uniqueness: none + CertStartDate *string `mandatory:"false" json:"certStartDate"` + + // Certificate end date + // **SCIM++ Properties:** + // - type: dateTime + // - multiValued: false + // - required: false + // - caseExact: true + // - mutability: readWrite + // - returned: default + // - uniqueness: none + CertEndDate *string `mandatory:"false" json:"certEndDate"` +} + +func (m OAuthClientCertificate) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m OAuthClientCertificate) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.IdcsPreventedOperations { + if _, ok := GetMappingIdcsPreventedOperationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsPreventedOperations: %s. Supported values are: %s.", val, strings.Join(GetIdcsPreventedOperationsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/o_auth_client_certificate_search_request.go b/identitydomains/o_auth_client_certificate_search_request.go new file mode 100644 index 0000000000..2d454a1d10 --- /dev/null +++ b/identitydomains/o_auth_client_certificate_search_request.go @@ -0,0 +1,70 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OAuthClientCertificateSearchRequest Clients MAY execute queries without passing parameters on the URL by using the HTTP POST verb combined with the **.search** path extension. The inclusion of **.search** on the end of a valid SCIM endpoint SHALL be used to indicate the HTTP POST verb is intended to be a query operation. To create a new query result set, a SCIM client sends an HTTP POST request to the desired SCIM resource endpoint (ending in **.search**). The body of the POST request MAY include any of the parameters. +type OAuthClientCertificateSearchRequest struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See (additional retrieval query parameters (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + Attributes []string `mandatory:"false" json:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + AttributeSets []AttributeSetsEnum `mandatory:"false" json:"attributeSets,omitempty"` + + // The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See Section 3.4.2.2 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2). OPTIONAL. + Filter *string `mandatory:"false" json:"filter"` + + // A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See Sorting section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + SortBy *string `mandatory:"false" json:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder SortOrderEnum `mandatory:"false" json:"sortOrder,omitempty"` + + // An integer that indicates the 1-based index of the first query result. See Pagination Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + StartIndex *int `mandatory:"false" json:"startIndex"` + + // An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + Count *int `mandatory:"false" json:"count"` +} + +func (m OAuthClientCertificateSearchRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m OAuthClientCertificateSearchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingSortOrderEnum(string(m.SortOrder)); !ok && m.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", m.SortOrder, strings.Join(GetSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/o_auth_client_certificates.go b/identitydomains/o_auth_client_certificates.go new file mode 100644 index 0000000000..df943c41a2 --- /dev/null +++ b/identitydomains/o_auth_client_certificates.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OAuthClientCertificates The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type OAuthClientCertificates struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []OAuthClientCertificate `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m OAuthClientCertificates) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m OAuthClientCertificates) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/o_auth_partner_certificate.go b/identitydomains/o_auth_partner_certificate.go new file mode 100644 index 0000000000..a338821f0f --- /dev/null +++ b/identitydomains/o_auth_partner_certificate.go @@ -0,0 +1,288 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OAuthPartnerCertificate OAuth Partner Certificate schema +type OAuthPartnerCertificate struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // Certificate alias + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - required: true + // - caseExact: false + // - mutability: readWrite + // - returned: always + // - uniqueness: none + // - idcsSearchable: true + CertificateAlias *string `mandatory:"true" json:"certificateAlias"` + + // Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: string + // - uniqueness: global + Id *string `mandatory:"false" json:"id"` + + // Unique OCI identifier for the SCIM Resource. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: global + Ocid *string `mandatory:"false" json:"ocid"` + + Meta *Meta `mandatory:"false" json:"meta"` + + IdcsCreatedBy *IdcsCreatedBy `mandatory:"false" json:"idcsCreatedBy"` + + IdcsLastModifiedBy *IdcsLastModifiedBy `mandatory:"false" json:"idcsLastModifiedBy"` + + // Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsPreventedOperations []IdcsPreventedOperationsEnum `mandatory:"false" json:"idcsPreventedOperations,omitempty"` + + // A list of tags on this resource. + // **SCIM++ Properties:** + // - idcsCompositeKey: [key, value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Tags []Tags `mandatory:"false" json:"tags"` + + // A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DeleteInProgress *bool `mandatory:"false" json:"deleteInProgress"` + + // The release number when the resource was upgraded. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsLastUpgradedInRelease *string `mandatory:"false" json:"idcsLastUpgradedInRelease"` + + // OCI Domain Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DomainOcid *string `mandatory:"false" json:"domainOcid"` + + // OCI Compartment Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CompartmentOcid *string `mandatory:"false" json:"compartmentOcid"` + + // OCI Tenant Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TenancyOcid *string `mandatory:"false" json:"tenancyOcid"` + + // An identifier for the Resource as defined by the Service Consumer. The externalId may simplify identification of the Resource between Service Consumer and Service Provider by allowing the Consumer to refer to the Resource with its own identifier, obviating the need to store a local mapping between the local identifier of the Resource and the identifier used by the Service Provider. Each Resource MAY include a non-empty externalId value. The value of the externalId attribute is always issued by the Service Consumer and can never be specified by the Service Provider. The Service Provider MUST always interpret the externalId as scoped to the Service Consumer's tenant. + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - required: false + // - caseExact: false + // - mutability: readWrite + // - returned: default + // - uniqueness: none + ExternalId *string `mandatory:"false" json:"externalId"` + + // Key store name + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - required: false + // - caseExact: false + // - returned: always + // - uniqueness: none + KeyStoreName *string `mandatory:"false" json:"keyStoreName"` + + // Map + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - required: false + // - caseExact: false + // - returned: always + // - uniqueness: none + Map *string `mandatory:"false" json:"map"` + + // Key store password + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - idcsSensitive: none + // - required: false + // - caseExact: true + // - returned: never + // - uniqueness: none + KeyStorePassword *string `mandatory:"false" json:"keyStorePassword"` + + // Key store ID + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - required: false + // - caseExact: true + // - returned: never + // - uniqueness: none + // - idcsSearchable: true + KeyStoreId *string `mandatory:"false" json:"keyStoreId"` + + // SHA-1 Thumbprint + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - required: false + // - caseExact: true + // - returned: default + // - idcsSearchable: true + // - uniqueness: none + Sha1Thumbprint *string `mandatory:"false" json:"sha1Thumbprint"` + + // SHA-256 Thumbprint + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - required: false + // - caseExact: true + // - returned: default + // - idcsSearchable: true + // - uniqueness: none + Sha256Thumbprint *string `mandatory:"false" json:"sha256Thumbprint"` + + // Certificate start date + // **SCIM++ Properties:** + // - type: dateTime + // - multiValued: false + // - required: false + // - caseExact: true + // - mutability: readWrite + // - returned: default + // - uniqueness: none + CertStartDate *string `mandatory:"false" json:"certStartDate"` + + // Base 64Key data attribute + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + X509Base64Certificate *string `mandatory:"false" json:"x509Base64Certificate"` + + // Certificate end date + // **SCIM++ Properties:** + // - type: dateTime + // - multiValued: false + // - required: false + // - caseExact: true + // - mutability: readWrite + // - returned: default + // - uniqueness: none + CertEndDate *string `mandatory:"false" json:"certEndDate"` +} + +func (m OAuthPartnerCertificate) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m OAuthPartnerCertificate) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.IdcsPreventedOperations { + if _, ok := GetMappingIdcsPreventedOperationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsPreventedOperations: %s. Supported values are: %s.", val, strings.Join(GetIdcsPreventedOperationsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/o_auth_partner_certificate_search_request.go b/identitydomains/o_auth_partner_certificate_search_request.go new file mode 100644 index 0000000000..e7e4979087 --- /dev/null +++ b/identitydomains/o_auth_partner_certificate_search_request.go @@ -0,0 +1,70 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OAuthPartnerCertificateSearchRequest Clients MAY execute queries without passing parameters on the URL by using the HTTP POST verb combined with the **.search** path extension. The inclusion of **.search** on the end of a valid SCIM endpoint SHALL be used to indicate the HTTP POST verb is intended to be a query operation. To create a new query result set, a SCIM client sends an HTTP POST request to the desired SCIM resource endpoint (ending in **.search**). The body of the POST request MAY include any of the parameters. +type OAuthPartnerCertificateSearchRequest struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See (additional retrieval query parameters (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + Attributes []string `mandatory:"false" json:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + AttributeSets []AttributeSetsEnum `mandatory:"false" json:"attributeSets,omitempty"` + + // The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See Section 3.4.2.2 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2). OPTIONAL. + Filter *string `mandatory:"false" json:"filter"` + + // A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See Sorting section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + SortBy *string `mandatory:"false" json:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder SortOrderEnum `mandatory:"false" json:"sortOrder,omitempty"` + + // An integer that indicates the 1-based index of the first query result. See Pagination Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + StartIndex *int `mandatory:"false" json:"startIndex"` + + // An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + Count *int `mandatory:"false" json:"count"` +} + +func (m OAuthPartnerCertificateSearchRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m OAuthPartnerCertificateSearchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingSortOrderEnum(string(m.SortOrder)); !ok && m.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", m.SortOrder, strings.Join(GetSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/o_auth_partner_certificates.go b/identitydomains/o_auth_partner_certificates.go new file mode 100644 index 0000000000..1288ad364d --- /dev/null +++ b/identitydomains/o_auth_partner_certificates.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OAuthPartnerCertificates The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type OAuthPartnerCertificates struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []OAuthPartnerCertificate `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m OAuthPartnerCertificates) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m OAuthPartnerCertificates) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/patch_account_recovery_setting_request_response.go b/identitydomains/patch_account_recovery_setting_request_response.go index 41527ec155..8022a15db6 100644 --- a/identitydomains/patch_account_recovery_setting_request_response.go +++ b/identitydomains/patch_account_recovery_setting_request_response.go @@ -35,15 +35,15 @@ type PatchAccountRecoverySettingRequest struct { // Update the AccountRecoverySettings with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_api_key_request_response.go b/identitydomains/patch_api_key_request_response.go index b510de13da..b091a2033b 100644 --- a/identitydomains/patch_api_key_request_response.go +++ b/identitydomains/patch_api_key_request_response.go @@ -35,15 +35,15 @@ type PatchApiKeyRequest struct { // Update the ApiKey with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_app_request_response.go b/identitydomains/patch_app_request_response.go index 579e4c1350..2922c6bc5a 100644 --- a/identitydomains/patch_app_request_response.go +++ b/identitydomains/patch_app_request_response.go @@ -35,15 +35,15 @@ type PatchAppRequest struct { // Update the App with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_app_role_request_response.go b/identitydomains/patch_app_role_request_response.go index 270f676f4e..4eb5ee3e27 100644 --- a/identitydomains/patch_app_role_request_response.go +++ b/identitydomains/patch_app_role_request_response.go @@ -35,15 +35,15 @@ type PatchAppRoleRequest struct { // Update the AppRole with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_approval_workflow_request_response.go b/identitydomains/patch_approval_workflow_request_response.go new file mode 100644 index 0000000000..4dca342120 --- /dev/null +++ b/identitydomains/patch_approval_workflow_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchApprovalWorkflowRequest wrapper for the PatchApprovalWorkflow operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchApprovalWorkflow.go.html to see an example of how to use PatchApprovalWorkflowRequest. +type PatchApprovalWorkflowRequest struct { + + // ID of the resource + ApprovalWorkflowId *string `mandatory:"true" contributesTo:"path" name:"approvalWorkflowId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Update the ApprovalWorkflow with SCIM Patch schema. + // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + PatchOp `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchApprovalWorkflowRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchApprovalWorkflowRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PatchApprovalWorkflowRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchApprovalWorkflowRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PatchApprovalWorkflowRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchApprovalWorkflowResponse wrapper for the PatchApprovalWorkflow operation +type PatchApprovalWorkflowResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ApprovalWorkflow instance + ApprovalWorkflow `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PatchApprovalWorkflowResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchApprovalWorkflowResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/patch_approval_workflow_step_request_response.go b/identitydomains/patch_approval_workflow_step_request_response.go new file mode 100644 index 0000000000..6aa1e57a85 --- /dev/null +++ b/identitydomains/patch_approval_workflow_step_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchApprovalWorkflowStepRequest wrapper for the PatchApprovalWorkflowStep operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchApprovalWorkflowStep.go.html to see an example of how to use PatchApprovalWorkflowStepRequest. +type PatchApprovalWorkflowStepRequest struct { + + // ID of the resource + ApprovalWorkflowStepId *string `mandatory:"true" contributesTo:"path" name:"approvalWorkflowStepId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Update the ApprovalWorkflowStep with SCIM Patch schema. + // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + PatchOp `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchApprovalWorkflowStepRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchApprovalWorkflowStepRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PatchApprovalWorkflowStepRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchApprovalWorkflowStepRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PatchApprovalWorkflowStepRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchApprovalWorkflowStepResponse wrapper for the PatchApprovalWorkflowStep operation +type PatchApprovalWorkflowStepResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ApprovalWorkflowStep instance + ApprovalWorkflowStep `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PatchApprovalWorkflowStepResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchApprovalWorkflowStepResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/patch_auth_token_request_response.go b/identitydomains/patch_auth_token_request_response.go index 5de61a0106..fa28d8d7d1 100644 --- a/identitydomains/patch_auth_token_request_response.go +++ b/identitydomains/patch_auth_token_request_response.go @@ -35,15 +35,15 @@ type PatchAuthTokenRequest struct { // Update the AuthToken with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_cloud_gate_mapping_request_response.go b/identitydomains/patch_cloud_gate_mapping_request_response.go new file mode 100644 index 0000000000..da6a30525a --- /dev/null +++ b/identitydomains/patch_cloud_gate_mapping_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchCloudGateMappingRequest wrapper for the PatchCloudGateMapping operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchCloudGateMapping.go.html to see an example of how to use PatchCloudGateMappingRequest. +type PatchCloudGateMappingRequest struct { + + // ID of the resource + CloudGateMappingId *string `mandatory:"true" contributesTo:"path" name:"cloudGateMappingId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Update the CloudGateMapping with SCIM Patch schema. + // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + PatchOp `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchCloudGateMappingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchCloudGateMappingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PatchCloudGateMappingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchCloudGateMappingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PatchCloudGateMappingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchCloudGateMappingResponse wrapper for the PatchCloudGateMapping operation +type PatchCloudGateMappingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CloudGateMapping instance + CloudGateMapping `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PatchCloudGateMappingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchCloudGateMappingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/patch_cloud_gate_request_response.go b/identitydomains/patch_cloud_gate_request_response.go new file mode 100644 index 0000000000..f71a794727 --- /dev/null +++ b/identitydomains/patch_cloud_gate_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchCloudGateRequest wrapper for the PatchCloudGate operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchCloudGate.go.html to see an example of how to use PatchCloudGateRequest. +type PatchCloudGateRequest struct { + + // ID of the resource + CloudGateId *string `mandatory:"true" contributesTo:"path" name:"cloudGateId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Update the CloudGate with SCIM Patch schema. + // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + PatchOp `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchCloudGateRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchCloudGateRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PatchCloudGateRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchCloudGateRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PatchCloudGateRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchCloudGateResponse wrapper for the PatchCloudGate operation +type PatchCloudGateResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CloudGate instance + CloudGate `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PatchCloudGateResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchCloudGateResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/patch_cloud_gate_server_request_response.go b/identitydomains/patch_cloud_gate_server_request_response.go new file mode 100644 index 0000000000..2542e3a27f --- /dev/null +++ b/identitydomains/patch_cloud_gate_server_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchCloudGateServerRequest wrapper for the PatchCloudGateServer operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchCloudGateServer.go.html to see an example of how to use PatchCloudGateServerRequest. +type PatchCloudGateServerRequest struct { + + // ID of the resource + CloudGateServerId *string `mandatory:"true" contributesTo:"path" name:"cloudGateServerId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Update the CloudGateServer with SCIM Patch schema. + // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + PatchOp `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchCloudGateServerRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchCloudGateServerRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PatchCloudGateServerRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchCloudGateServerRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PatchCloudGateServerRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchCloudGateServerResponse wrapper for the PatchCloudGateServer operation +type PatchCloudGateServerResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CloudGateServer instance + CloudGateServer `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PatchCloudGateServerResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchCloudGateServerResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/patch_condition_request_response.go b/identitydomains/patch_condition_request_response.go new file mode 100644 index 0000000000..e8807f0231 --- /dev/null +++ b/identitydomains/patch_condition_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchConditionRequest wrapper for the PatchCondition operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchCondition.go.html to see an example of how to use PatchConditionRequest. +type PatchConditionRequest struct { + + // ID of the resource + ConditionId *string `mandatory:"true" contributesTo:"path" name:"conditionId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Update the Condition with SCIM Patch schema. + // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + PatchOp `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchConditionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchConditionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PatchConditionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchConditionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PatchConditionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchConditionResponse wrapper for the PatchCondition operation +type PatchConditionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Condition instance + Condition `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PatchConditionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchConditionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/patch_customer_secret_key_request_response.go b/identitydomains/patch_customer_secret_key_request_response.go index 2f39ca927c..ae652651be 100644 --- a/identitydomains/patch_customer_secret_key_request_response.go +++ b/identitydomains/patch_customer_secret_key_request_response.go @@ -35,15 +35,15 @@ type PatchCustomerSecretKeyRequest struct { // Update the CustomerSecretKey with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_dynamic_resource_group_request_response.go b/identitydomains/patch_dynamic_resource_group_request_response.go index 511140fc5d..7c177cfbba 100644 --- a/identitydomains/patch_dynamic_resource_group_request_response.go +++ b/identitydomains/patch_dynamic_resource_group_request_response.go @@ -35,15 +35,15 @@ type PatchDynamicResourceGroupRequest struct { // Update the DynamicResourceGroup with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_grant_request_response.go b/identitydomains/patch_grant_request_response.go index b1aeba8fdc..a5851cc915 100644 --- a/identitydomains/patch_grant_request_response.go +++ b/identitydomains/patch_grant_request_response.go @@ -35,15 +35,15 @@ type PatchGrantRequest struct { // Update the Grant with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_group_request_response.go b/identitydomains/patch_group_request_response.go index a07c20862c..7b18e3cbc4 100644 --- a/identitydomains/patch_group_request_response.go +++ b/identitydomains/patch_group_request_response.go @@ -35,15 +35,15 @@ type PatchGroupRequest struct { // Update the Group with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_identity_provider_request_response.go b/identitydomains/patch_identity_provider_request_response.go index 477bd15d04..7ff40ef7c8 100644 --- a/identitydomains/patch_identity_provider_request_response.go +++ b/identitydomains/patch_identity_provider_request_response.go @@ -35,15 +35,15 @@ type PatchIdentityProviderRequest struct { // Update the IdentityProvider with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_identity_setting_request_response.go b/identitydomains/patch_identity_setting_request_response.go index f8b9be2798..acfa327bf5 100644 --- a/identitydomains/patch_identity_setting_request_response.go +++ b/identitydomains/patch_identity_setting_request_response.go @@ -35,15 +35,15 @@ type PatchIdentitySettingRequest struct { // Update the IdentitySettings with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_kmsi_setting_request_response.go b/identitydomains/patch_kmsi_setting_request_response.go index 3606b84f14..ffd9e8ce14 100644 --- a/identitydomains/patch_kmsi_setting_request_response.go +++ b/identitydomains/patch_kmsi_setting_request_response.go @@ -35,15 +35,15 @@ type PatchKmsiSettingRequest struct { // Update the KmsiSettings with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_me_request_response.go b/identitydomains/patch_me_request_response.go index c41858a4a9..c20647b761 100644 --- a/identitydomains/patch_me_request_response.go +++ b/identitydomains/patch_me_request_response.go @@ -32,15 +32,15 @@ type PatchMeRequest struct { // Update the Me with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_my_api_key_request_response.go b/identitydomains/patch_my_api_key_request_response.go index 5396bafcfb..b3950b642d 100644 --- a/identitydomains/patch_my_api_key_request_response.go +++ b/identitydomains/patch_my_api_key_request_response.go @@ -29,15 +29,15 @@ type PatchMyApiKeyRequest struct { // Update the MyApiKey with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_my_auth_token_request_response.go b/identitydomains/patch_my_auth_token_request_response.go index 1fddae6162..be925ab7ca 100644 --- a/identitydomains/patch_my_auth_token_request_response.go +++ b/identitydomains/patch_my_auth_token_request_response.go @@ -29,15 +29,15 @@ type PatchMyAuthTokenRequest struct { // Update the MyAuthToken with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_my_customer_secret_key_request_response.go b/identitydomains/patch_my_customer_secret_key_request_response.go index 96bd7ba037..1dbf3929d4 100644 --- a/identitydomains/patch_my_customer_secret_key_request_response.go +++ b/identitydomains/patch_my_customer_secret_key_request_response.go @@ -29,15 +29,15 @@ type PatchMyCustomerSecretKeyRequest struct { // Update the MyCustomerSecretKey with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_my_device_request_response.go b/identitydomains/patch_my_device_request_response.go index 65a773dedf..415116e17a 100644 --- a/identitydomains/patch_my_device_request_response.go +++ b/identitydomains/patch_my_device_request_response.go @@ -35,15 +35,15 @@ type PatchMyDeviceRequest struct { // Update the MyDevice with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_my_o_auth2_client_credential_request_response.go b/identitydomains/patch_my_o_auth2_client_credential_request_response.go index 32acc7bf22..482bcb99cc 100644 --- a/identitydomains/patch_my_o_auth2_client_credential_request_response.go +++ b/identitydomains/patch_my_o_auth2_client_credential_request_response.go @@ -29,15 +29,15 @@ type PatchMyOAuth2ClientCredentialRequest struct { // Update the MyOAuth2ClientCredential with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_my_pending_approval_request_response.go b/identitydomains/patch_my_pending_approval_request_response.go new file mode 100644 index 0000000000..10081e0779 --- /dev/null +++ b/identitydomains/patch_my_pending_approval_request_response.go @@ -0,0 +1,118 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchMyPendingApprovalRequest wrapper for the PatchMyPendingApproval operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchMyPendingApproval.go.html to see an example of how to use PatchMyPendingApprovalRequest. +type PatchMyPendingApprovalRequest struct { + + // ID of the resource + MyPendingApprovalId *string `mandatory:"true" contributesTo:"path" name:"myPendingApprovalId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // Update the MyPendingApproval with SCIM Patch schema. + // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + PatchOp `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchMyPendingApprovalRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchMyPendingApprovalRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PatchMyPendingApprovalRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchMyPendingApprovalRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PatchMyPendingApprovalRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchMyPendingApprovalResponse wrapper for the PatchMyPendingApproval operation +type PatchMyPendingApprovalResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The MyPendingApproval instance + MyPendingApproval `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PatchMyPendingApprovalResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchMyPendingApprovalResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/patch_my_request_request_response.go b/identitydomains/patch_my_request_request_response.go new file mode 100644 index 0000000000..0e155b3384 --- /dev/null +++ b/identitydomains/patch_my_request_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchMyRequestRequest wrapper for the PatchMyRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchMyRequest.go.html to see an example of how to use PatchMyRequestRequest. +type PatchMyRequestRequest struct { + + // ID of the resource + MyRequestId *string `mandatory:"true" contributesTo:"path" name:"myRequestId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Update the MyRequest with SCIM Patch schema. + // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + PatchOp `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchMyRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchMyRequestRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PatchMyRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchMyRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PatchMyRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchMyRequestResponse wrapper for the PatchMyRequest operation +type PatchMyRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The MyRequest instance + MyRequest `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PatchMyRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchMyRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/patch_my_smtp_credential_request_response.go b/identitydomains/patch_my_smtp_credential_request_response.go index 1c74576d23..882dd38a49 100644 --- a/identitydomains/patch_my_smtp_credential_request_response.go +++ b/identitydomains/patch_my_smtp_credential_request_response.go @@ -29,15 +29,15 @@ type PatchMySmtpCredentialRequest struct { // Update the MySmtpCredential with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_network_perimeter_request_response.go b/identitydomains/patch_network_perimeter_request_response.go new file mode 100644 index 0000000000..7052e6ecab --- /dev/null +++ b/identitydomains/patch_network_perimeter_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchNetworkPerimeterRequest wrapper for the PatchNetworkPerimeter operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchNetworkPerimeter.go.html to see an example of how to use PatchNetworkPerimeterRequest. +type PatchNetworkPerimeterRequest struct { + + // ID of the resource + NetworkPerimeterId *string `mandatory:"true" contributesTo:"path" name:"networkPerimeterId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Update the NetworkPerimeter with SCIM Patch schema. + // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + PatchOp `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchNetworkPerimeterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchNetworkPerimeterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PatchNetworkPerimeterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchNetworkPerimeterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PatchNetworkPerimeterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchNetworkPerimeterResponse wrapper for the PatchNetworkPerimeter operation +type PatchNetworkPerimeterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NetworkPerimeter instance + NetworkPerimeter `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PatchNetworkPerimeterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchNetworkPerimeterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/patch_o_auth2_client_credential_request_response.go b/identitydomains/patch_o_auth2_client_credential_request_response.go index 15aab53a44..15e3397379 100644 --- a/identitydomains/patch_o_auth2_client_credential_request_response.go +++ b/identitydomains/patch_o_auth2_client_credential_request_response.go @@ -35,15 +35,15 @@ type PatchOAuth2ClientCredentialRequest struct { // Update the OAuth2ClientCredential with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_password_policy_request_response.go b/identitydomains/patch_password_policy_request_response.go index 07ae0ec157..214757f9f0 100644 --- a/identitydomains/patch_password_policy_request_response.go +++ b/identitydomains/patch_password_policy_request_response.go @@ -35,15 +35,15 @@ type PatchPasswordPolicyRequest struct { // Update the PasswordPolicy with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_policy_request_response.go b/identitydomains/patch_policy_request_response.go new file mode 100644 index 0000000000..8b806b1620 --- /dev/null +++ b/identitydomains/patch_policy_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchPolicyRequest wrapper for the PatchPolicy operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchPolicy.go.html to see an example of how to use PatchPolicyRequest. +type PatchPolicyRequest struct { + + // ID of the resource + PolicyId *string `mandatory:"true" contributesTo:"path" name:"policyId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Update the Policy with SCIM Patch schema. + // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + PatchOp `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchPolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchPolicyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PatchPolicyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchPolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PatchPolicyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchPolicyResponse wrapper for the PatchPolicy operation +type PatchPolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Policy instance + Policy `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PatchPolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchPolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/patch_rule_request_response.go b/identitydomains/patch_rule_request_response.go new file mode 100644 index 0000000000..939959305e --- /dev/null +++ b/identitydomains/patch_rule_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchRuleRequest wrapper for the PatchRule operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchRule.go.html to see an example of how to use PatchRuleRequest. +type PatchRuleRequest struct { + + // ID of the resource + RuleId *string `mandatory:"true" contributesTo:"path" name:"ruleId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Update the Rule with SCIM Patch schema. + // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + PatchOp `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchRuleRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchRuleRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PatchRuleRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchRuleRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PatchRuleRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchRuleResponse wrapper for the PatchRule operation +type PatchRuleResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Rule instance + Rule `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PatchRuleResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchRuleResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/patch_schema_request_response.go b/identitydomains/patch_schema_request_response.go new file mode 100644 index 0000000000..ddc0b36dbf --- /dev/null +++ b/identitydomains/patch_schema_request_response.go @@ -0,0 +1,118 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchSchemaRequest wrapper for the PatchSchema operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchSchema.go.html to see an example of how to use PatchSchemaRequest. +type PatchSchemaRequest struct { + + // ID of the resource + SchemaId *string `mandatory:"true" contributesTo:"path" name:"schemaId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // Update the Schema with SCIM Patch schema. + // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + PatchOp `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchSchemaRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchSchemaRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PatchSchemaRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchSchemaRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PatchSchemaRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchSchemaResponse wrapper for the PatchSchema operation +type PatchSchemaResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Schema instance + Schema `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PatchSchemaResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchSchemaResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/patch_security_question_request_response.go b/identitydomains/patch_security_question_request_response.go index 35644acc73..6a98e6b47f 100644 --- a/identitydomains/patch_security_question_request_response.go +++ b/identitydomains/patch_security_question_request_response.go @@ -35,15 +35,15 @@ type PatchSecurityQuestionRequest struct { // Update the SecurityQuestion with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_security_question_setting_request_response.go b/identitydomains/patch_security_question_setting_request_response.go index a6d2d493c5..2b25dd6328 100644 --- a/identitydomains/patch_security_question_setting_request_response.go +++ b/identitydomains/patch_security_question_setting_request_response.go @@ -35,15 +35,15 @@ type PatchSecurityQuestionSettingRequest struct { // Update the SecurityQuestionSettings with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_self_registration_profile_request_response.go b/identitydomains/patch_self_registration_profile_request_response.go new file mode 100644 index 0000000000..759d9b1544 --- /dev/null +++ b/identitydomains/patch_self_registration_profile_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchSelfRegistrationProfileRequest wrapper for the PatchSelfRegistrationProfile operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchSelfRegistrationProfile.go.html to see an example of how to use PatchSelfRegistrationProfileRequest. +type PatchSelfRegistrationProfileRequest struct { + + // ID of the resource + SelfRegistrationProfileId *string `mandatory:"true" contributesTo:"path" name:"selfRegistrationProfileId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Update the SelfRegistrationProfile with SCIM Patch schema. + // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + PatchOp `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchSelfRegistrationProfileRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchSelfRegistrationProfileRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PatchSelfRegistrationProfileRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchSelfRegistrationProfileRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PatchSelfRegistrationProfileRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchSelfRegistrationProfileResponse wrapper for the PatchSelfRegistrationProfile operation +type PatchSelfRegistrationProfileResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SelfRegistrationProfile instance + SelfRegistrationProfile `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PatchSelfRegistrationProfileResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchSelfRegistrationProfileResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/patch_setting_request_response.go b/identitydomains/patch_setting_request_response.go new file mode 100644 index 0000000000..2128639280 --- /dev/null +++ b/identitydomains/patch_setting_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchSettingRequest wrapper for the PatchSetting operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PatchSetting.go.html to see an example of how to use PatchSettingRequest. +type PatchSettingRequest struct { + + // ID of the resource + SettingId *string `mandatory:"true" contributesTo:"path" name:"settingId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Update the Settings with SCIM Patch schema. + // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + PatchOp `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchSettingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchSettingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PatchSettingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchSettingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PatchSettingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchSettingResponse wrapper for the PatchSetting operation +type PatchSettingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Setting instance + Setting `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PatchSettingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchSettingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/patch_smtp_credential_request_response.go b/identitydomains/patch_smtp_credential_request_response.go index d5394bf40f..3bfd05f09c 100644 --- a/identitydomains/patch_smtp_credential_request_response.go +++ b/identitydomains/patch_smtp_credential_request_response.go @@ -35,15 +35,15 @@ type PatchSmtpCredentialRequest struct { // Update the SmtpCredential with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_user_attributes_setting_request_response.go b/identitydomains/patch_user_attributes_setting_request_response.go index 3cc62f0e9a..b5f603bed2 100644 --- a/identitydomains/patch_user_attributes_setting_request_response.go +++ b/identitydomains/patch_user_attributes_setting_request_response.go @@ -35,15 +35,15 @@ type PatchUserAttributesSettingRequest struct { // Update the UserAttributesSettings with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/patch_user_request_response.go b/identitydomains/patch_user_request_response.go index 6126d943ea..d006501016 100644 --- a/identitydomains/patch_user_request_response.go +++ b/identitydomains/patch_user_request_response.go @@ -35,15 +35,15 @@ type PatchUserRequest struct { // Update the User with SCIM Patch schema. // Before you specify an attribute-value in a request to update a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PatchOp `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/policies.go b/identitydomains/policies.go new file mode 100644 index 0000000000..cceabdaf8d --- /dev/null +++ b/identitydomains/policies.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Policies The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type Policies struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []Policy `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m Policies) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Policies) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/policy.go b/identitydomains/policy.go new file mode 100644 index 0000000000..bc19f368a2 --- /dev/null +++ b/identitydomains/policy.go @@ -0,0 +1,240 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Policy Policy resource. A named list of rules. +type Policy struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // Policy name + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: always + // - type: string + // - uniqueness: none + Name *string `mandatory:"true" json:"name"` + + PolicyType *PolicyPolicyType `mandatory:"true" json:"policyType"` + + // Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: string + // - uniqueness: global + Id *string `mandatory:"false" json:"id"` + + // Unique OCI identifier for the SCIM Resource. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: global + Ocid *string `mandatory:"false" json:"ocid"` + + Meta *Meta `mandatory:"false" json:"meta"` + + IdcsCreatedBy *IdcsCreatedBy `mandatory:"false" json:"idcsCreatedBy"` + + IdcsLastModifiedBy *IdcsLastModifiedBy `mandatory:"false" json:"idcsLastModifiedBy"` + + // Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsPreventedOperations []IdcsPreventedOperationsEnum `mandatory:"false" json:"idcsPreventedOperations,omitempty"` + + // A list of tags on this resource. + // **SCIM++ Properties:** + // - idcsCompositeKey: [key, value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Tags []Tags `mandatory:"false" json:"tags"` + + // A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DeleteInProgress *bool `mandatory:"false" json:"deleteInProgress"` + + // The release number when the resource was upgraded. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsLastUpgradedInRelease *string `mandatory:"false" json:"idcsLastUpgradedInRelease"` + + // OCI Domain Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DomainOcid *string `mandatory:"false" json:"domainOcid"` + + // OCI Compartment Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CompartmentOcid *string `mandatory:"false" json:"compartmentOcid"` + + // OCI Tenant Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TenancyOcid *string `mandatory:"false" json:"tenancyOcid"` + + // An identifier for the Resource as defined by the Service Consumer. The externalId may simplify identification of the Resource between Service Consumer and Service provider by allowing the Consumer to refer to the Resource with its own identifier, obviating the need to store a local mapping between the local identifier of the Resource and the identifier used by the Service Provider. Each Resource MAY include a non-empty externalId value. The value of the externalId attribute is always issued be the Service Consumer and can never be specified by the Service Provider. The Service Provider MUST always interpret the externalId as scoped to the Service Consumer's tenant. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ExternalId *string `mandatory:"false" json:"externalId"` + + // Policy Description + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Description *string `mandatory:"false" json:"description"` + + // If true, Policy is active. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + Active *bool `mandatory:"false" json:"active"` + + // The Groovy script that is run instead of the policy, if the policy type allows the policy to be a Groovy script. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + PolicyGroovy *string `mandatory:"false" json:"policyGroovy"` + + // Rules assigned to this policy + // **SCIM++ Properties:** + // - idcsCompositeKey: [value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Rules []PolicyRules `mandatory:"false" json:"rules"` +} + +func (m Policy) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Policy) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.IdcsPreventedOperations { + if _, ok := GetMappingIdcsPreventedOperationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsPreventedOperations: %s. Supported values are: %s.", val, strings.Join(GetIdcsPreventedOperationsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/policy_policy_type.go b/identitydomains/policy_policy_type.go new file mode 100644 index 0000000000..a93161b8f2 --- /dev/null +++ b/identitydomains/policy_policy_type.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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PolicyPolicyType PolicyType on which the policy is based +// **SCIM++ Properties:** +// - idcsSearchable: true +// - multiValued: false +// - mutability: immutable +// - required: true +// - returned: default +// - type: complex +// - uniqueness: none +type PolicyPolicyType struct { + + // PolicyType identifier + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // PolicyType URI + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: reference + // - uniqueness: none + Ref *string `mandatory:"false" json:"$ref"` +} + +func (m PolicyPolicyType) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PolicyPolicyType) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/policy_rules.go b/identitydomains/policy_rules.go new file mode 100644 index 0000000000..d67371979e --- /dev/null +++ b/identitydomains/policy_rules.go @@ -0,0 +1,85 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PolicyRules Rules assigned to this policy +type PolicyRules struct { + + // Rule identifier + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // Position of the rule in evaluation order. No duplicates allowed. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: integer + // - uniqueness: none + Sequence *int `mandatory:"true" json:"sequence"` + + // Rule URI + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: reference + // - uniqueness: none + Ref *string `mandatory:"false" json:"$ref"` + + // Rule name + // **Added In:** 17.4.2 + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + Name *string `mandatory:"false" json:"name"` +} + +func (m PolicyRules) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PolicyRules) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/policy_search_request.go b/identitydomains/policy_search_request.go new file mode 100644 index 0000000000..843dab6dc9 --- /dev/null +++ b/identitydomains/policy_search_request.go @@ -0,0 +1,70 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PolicySearchRequest Clients MAY execute queries without passing parameters on the URL by using the HTTP POST verb combined with the **.search** path extension. The inclusion of **.search** on the end of a valid SCIM endpoint SHALL be used to indicate the HTTP POST verb is intended to be a query operation. To create a new query result set, a SCIM client sends an HTTP POST request to the desired SCIM resource endpoint (ending in **.search**). The body of the POST request MAY include any of the parameters. +type PolicySearchRequest struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See (additional retrieval query parameters (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + Attributes []string `mandatory:"false" json:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + AttributeSets []AttributeSetsEnum `mandatory:"false" json:"attributeSets,omitempty"` + + // The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See Section 3.4.2.2 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2). OPTIONAL. + Filter *string `mandatory:"false" json:"filter"` + + // A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See Sorting section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + SortBy *string `mandatory:"false" json:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder SortOrderEnum `mandatory:"false" json:"sortOrder,omitempty"` + + // An integer that indicates the 1-based index of the first query result. See Pagination Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + StartIndex *int `mandatory:"false" json:"startIndex"` + + // An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + Count *int `mandatory:"false" json:"count"` +} + +func (m PolicySearchRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PolicySearchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingSortOrderEnum(string(m.SortOrder)); !ok && m.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", m.SortOrder, strings.Join(GetSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/put_account_recovery_setting_request_response.go b/identitydomains/put_account_recovery_setting_request_response.go index 015a5950f3..a4a7be81a2 100644 --- a/identitydomains/put_account_recovery_setting_request_response.go +++ b/identitydomains/put_account_recovery_setting_request_response.go @@ -35,15 +35,15 @@ type PutAccountRecoverySettingRequest struct { // Replace the current instance of AccountRecoverySettings with provided payload. // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. AccountRecoverySetting `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/put_app_request_response.go b/identitydomains/put_app_request_response.go index c99f498142..9d9522256c 100644 --- a/identitydomains/put_app_request_response.go +++ b/identitydomains/put_app_request_response.go @@ -35,15 +35,15 @@ type PutAppRequest struct { // Replace the current instance of App with provided payload. // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. App `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/put_app_status_changer_request_response.go b/identitydomains/put_app_status_changer_request_response.go index b12e304aea..f50d1926c4 100644 --- a/identitydomains/put_app_status_changer_request_response.go +++ b/identitydomains/put_app_status_changer_request_response.go @@ -35,15 +35,15 @@ type PutAppStatusChangerRequest struct { // Replace the current instance of AppStatusChanger with provided payload. // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. AppStatusChanger `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/put_approval_workflow_request_response.go b/identitydomains/put_approval_workflow_request_response.go new file mode 100644 index 0000000000..93a4dd0419 --- /dev/null +++ b/identitydomains/put_approval_workflow_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PutApprovalWorkflowRequest wrapper for the PutApprovalWorkflow operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutApprovalWorkflow.go.html to see an example of how to use PutApprovalWorkflowRequest. +type PutApprovalWorkflowRequest struct { + + // ID of the resource + ApprovalWorkflowId *string `mandatory:"true" contributesTo:"path" name:"approvalWorkflowId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Replace the current instance of ApprovalWorkflow with provided payload. + // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + ApprovalWorkflow `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PutApprovalWorkflowRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PutApprovalWorkflowRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PutApprovalWorkflowRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PutApprovalWorkflowRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PutApprovalWorkflowRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PutApprovalWorkflowResponse wrapper for the PutApprovalWorkflow operation +type PutApprovalWorkflowResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ApprovalWorkflow instance + ApprovalWorkflow `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PutApprovalWorkflowResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PutApprovalWorkflowResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/put_authentication_factor_setting_request_response.go b/identitydomains/put_authentication_factor_setting_request_response.go index 1795769ea4..9b294436c7 100644 --- a/identitydomains/put_authentication_factor_setting_request_response.go +++ b/identitydomains/put_authentication_factor_setting_request_response.go @@ -35,15 +35,15 @@ type PutAuthenticationFactorSettingRequest struct { // Replace the current instance of AuthenticationFactorSettings with provided payload. // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. AuthenticationFactorSetting `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/put_cloud_gate_mapping_request_response.go b/identitydomains/put_cloud_gate_mapping_request_response.go new file mode 100644 index 0000000000..1e68cb13fa --- /dev/null +++ b/identitydomains/put_cloud_gate_mapping_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PutCloudGateMappingRequest wrapper for the PutCloudGateMapping operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutCloudGateMapping.go.html to see an example of how to use PutCloudGateMappingRequest. +type PutCloudGateMappingRequest struct { + + // ID of the resource + CloudGateMappingId *string `mandatory:"true" contributesTo:"path" name:"cloudGateMappingId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Replace the current instance of CloudGateMapping with provided payload. + // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + CloudGateMapping `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PutCloudGateMappingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PutCloudGateMappingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PutCloudGateMappingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PutCloudGateMappingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PutCloudGateMappingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PutCloudGateMappingResponse wrapper for the PutCloudGateMapping operation +type PutCloudGateMappingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CloudGateMapping instance + CloudGateMapping `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PutCloudGateMappingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PutCloudGateMappingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/put_cloud_gate_request_response.go b/identitydomains/put_cloud_gate_request_response.go new file mode 100644 index 0000000000..4dd4f43326 --- /dev/null +++ b/identitydomains/put_cloud_gate_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PutCloudGateRequest wrapper for the PutCloudGate operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutCloudGate.go.html to see an example of how to use PutCloudGateRequest. +type PutCloudGateRequest struct { + + // ID of the resource + CloudGateId *string `mandatory:"true" contributesTo:"path" name:"cloudGateId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Replace the current instance of CloudGate with provided payload. + // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + CloudGate `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PutCloudGateRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PutCloudGateRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PutCloudGateRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PutCloudGateRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PutCloudGateRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PutCloudGateResponse wrapper for the PutCloudGate operation +type PutCloudGateResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CloudGate instance + CloudGate `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PutCloudGateResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PutCloudGateResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/put_cloud_gate_server_request_response.go b/identitydomains/put_cloud_gate_server_request_response.go new file mode 100644 index 0000000000..d15636e90a --- /dev/null +++ b/identitydomains/put_cloud_gate_server_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PutCloudGateServerRequest wrapper for the PutCloudGateServer operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutCloudGateServer.go.html to see an example of how to use PutCloudGateServerRequest. +type PutCloudGateServerRequest struct { + + // ID of the resource + CloudGateServerId *string `mandatory:"true" contributesTo:"path" name:"cloudGateServerId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Replace the current instance of CloudGateServer with provided payload. + // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + CloudGateServer `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PutCloudGateServerRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PutCloudGateServerRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PutCloudGateServerRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PutCloudGateServerRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PutCloudGateServerRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PutCloudGateServerResponse wrapper for the PutCloudGateServer operation +type PutCloudGateServerResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CloudGateServer instance + CloudGateServer `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PutCloudGateServerResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PutCloudGateServerResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/put_condition_request_response.go b/identitydomains/put_condition_request_response.go new file mode 100644 index 0000000000..afdccceb3a --- /dev/null +++ b/identitydomains/put_condition_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PutConditionRequest wrapper for the PutCondition operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutCondition.go.html to see an example of how to use PutConditionRequest. +type PutConditionRequest struct { + + // ID of the resource + ConditionId *string `mandatory:"true" contributesTo:"path" name:"conditionId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Replace the current instance of Condition with provided payload. + // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + Condition `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PutConditionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PutConditionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PutConditionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PutConditionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PutConditionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PutConditionResponse wrapper for the PutCondition operation +type PutConditionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Condition instance + Condition `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PutConditionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PutConditionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/put_dynamic_resource_group_request_response.go b/identitydomains/put_dynamic_resource_group_request_response.go index 91d7d9a130..d0534c0075 100644 --- a/identitydomains/put_dynamic_resource_group_request_response.go +++ b/identitydomains/put_dynamic_resource_group_request_response.go @@ -35,15 +35,15 @@ type PutDynamicResourceGroupRequest struct { // Replace the current instance of DynamicResourceGroup with provided payload. // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. DynamicResourceGroup `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/put_group_request_response.go b/identitydomains/put_group_request_response.go index 4182ae9210..c215966f93 100644 --- a/identitydomains/put_group_request_response.go +++ b/identitydomains/put_group_request_response.go @@ -35,15 +35,15 @@ type PutGroupRequest struct { // Replace the current instance of Group with provided payload. // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. Group `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/put_identity_provider_request_response.go b/identitydomains/put_identity_provider_request_response.go index 352f28f391..52314c0670 100644 --- a/identitydomains/put_identity_provider_request_response.go +++ b/identitydomains/put_identity_provider_request_response.go @@ -35,15 +35,15 @@ type PutIdentityProviderRequest struct { // Replace the current instance of IdentityProvider with provided payload. // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. IdentityProvider `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/put_identity_setting_request_response.go b/identitydomains/put_identity_setting_request_response.go index 891bb6c9d0..515e79a3d2 100644 --- a/identitydomains/put_identity_setting_request_response.go +++ b/identitydomains/put_identity_setting_request_response.go @@ -35,15 +35,15 @@ type PutIdentitySettingRequest struct { // Replace the current instance of IdentitySettings with provided payload. // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. IdentitySetting `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/put_kmsi_setting_request_response.go b/identitydomains/put_kmsi_setting_request_response.go index 1ea227ad4f..1f3ab5e8fb 100644 --- a/identitydomains/put_kmsi_setting_request_response.go +++ b/identitydomains/put_kmsi_setting_request_response.go @@ -35,15 +35,15 @@ type PutKmsiSettingRequest struct { // Replace the current instance of KmsiSettings with provided payload. // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. KmsiSetting `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/put_me_password_changer_request_response.go b/identitydomains/put_me_password_changer_request_response.go index 1796b888f9..ce1978b535 100644 --- a/identitydomains/put_me_password_changer_request_response.go +++ b/identitydomains/put_me_password_changer_request_response.go @@ -26,15 +26,15 @@ type PutMePasswordChangerRequest struct { // Replace the current instance of MePasswordChanger with provided payload. // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. MePasswordChanger `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/put_me_request_response.go b/identitydomains/put_me_request_response.go index e78d168926..4ddf5d48d3 100644 --- a/identitydomains/put_me_request_response.go +++ b/identitydomains/put_me_request_response.go @@ -32,15 +32,15 @@ type PutMeRequest struct { // Replace the current instance of Me with provided payload. // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. Me `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/put_network_perimeter_request_response.go b/identitydomains/put_network_perimeter_request_response.go new file mode 100644 index 0000000000..e9a0f01dbf --- /dev/null +++ b/identitydomains/put_network_perimeter_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PutNetworkPerimeterRequest wrapper for the PutNetworkPerimeter operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutNetworkPerimeter.go.html to see an example of how to use PutNetworkPerimeterRequest. +type PutNetworkPerimeterRequest struct { + + // ID of the resource + NetworkPerimeterId *string `mandatory:"true" contributesTo:"path" name:"networkPerimeterId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Replace the current instance of NetworkPerimeter with provided payload. + // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + NetworkPerimeter `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PutNetworkPerimeterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PutNetworkPerimeterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PutNetworkPerimeterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PutNetworkPerimeterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PutNetworkPerimeterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PutNetworkPerimeterResponse wrapper for the PutNetworkPerimeter operation +type PutNetworkPerimeterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NetworkPerimeter instance + NetworkPerimeter `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PutNetworkPerimeterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PutNetworkPerimeterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/put_notification_setting_request_response.go b/identitydomains/put_notification_setting_request_response.go new file mode 100644 index 0000000000..6eef0d8037 --- /dev/null +++ b/identitydomains/put_notification_setting_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PutNotificationSettingRequest wrapper for the PutNotificationSetting operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutNotificationSetting.go.html to see an example of how to use PutNotificationSettingRequest. +type PutNotificationSettingRequest struct { + + // ID of the resource + NotificationSettingId *string `mandatory:"true" contributesTo:"path" name:"notificationSettingId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Replace the current instance of NotificationSettings with provided payload. + // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + NotificationSetting `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PutNotificationSettingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PutNotificationSettingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PutNotificationSettingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PutNotificationSettingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PutNotificationSettingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PutNotificationSettingResponse wrapper for the PutNotificationSetting operation +type PutNotificationSettingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NotificationSetting instance + NotificationSetting `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PutNotificationSettingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PutNotificationSettingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/put_password_policy_request_response.go b/identitydomains/put_password_policy_request_response.go index 7ab7841fdc..fd613fb0e6 100644 --- a/identitydomains/put_password_policy_request_response.go +++ b/identitydomains/put_password_policy_request_response.go @@ -35,15 +35,15 @@ type PutPasswordPolicyRequest struct { // Replace the current instance of PasswordPolicy with provided payload. // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. PasswordPolicy `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/put_policy_request_response.go b/identitydomains/put_policy_request_response.go new file mode 100644 index 0000000000..a094ecc022 --- /dev/null +++ b/identitydomains/put_policy_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PutPolicyRequest wrapper for the PutPolicy operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutPolicy.go.html to see an example of how to use PutPolicyRequest. +type PutPolicyRequest struct { + + // ID of the resource + PolicyId *string `mandatory:"true" contributesTo:"path" name:"policyId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Replace the current instance of Policy with provided payload. + // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + Policy `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PutPolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PutPolicyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PutPolicyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PutPolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PutPolicyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PutPolicyResponse wrapper for the PutPolicy operation +type PutPolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Policy instance + Policy `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PutPolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PutPolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/put_rule_request_response.go b/identitydomains/put_rule_request_response.go new file mode 100644 index 0000000000..ca8a3c94d5 --- /dev/null +++ b/identitydomains/put_rule_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PutRuleRequest wrapper for the PutRule operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutRule.go.html to see an example of how to use PutRuleRequest. +type PutRuleRequest struct { + + // ID of the resource + RuleId *string `mandatory:"true" contributesTo:"path" name:"ruleId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Replace the current instance of Rule with provided payload. + // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + Rule `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PutRuleRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PutRuleRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PutRuleRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PutRuleRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PutRuleRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PutRuleResponse wrapper for the PutRule operation +type PutRuleResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Rule instance + Rule `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PutRuleResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PutRuleResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/put_schema_request_response.go b/identitydomains/put_schema_request_response.go new file mode 100644 index 0000000000..94631ebff9 --- /dev/null +++ b/identitydomains/put_schema_request_response.go @@ -0,0 +1,118 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PutSchemaRequest wrapper for the PutSchema operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutSchema.go.html to see an example of how to use PutSchemaRequest. +type PutSchemaRequest struct { + + // ID of the resource + SchemaId *string `mandatory:"true" contributesTo:"path" name:"schemaId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // Replace the current instance of Schema with provided payload. + // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + Schema `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PutSchemaRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PutSchemaRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PutSchemaRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PutSchemaRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PutSchemaRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PutSchemaResponse wrapper for the PutSchema operation +type PutSchemaResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Schema instance + Schema `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PutSchemaResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PutSchemaResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/put_security_question_setting_request_response.go b/identitydomains/put_security_question_setting_request_response.go index d1d6a8e0d6..de13fb92c0 100644 --- a/identitydomains/put_security_question_setting_request_response.go +++ b/identitydomains/put_security_question_setting_request_response.go @@ -35,15 +35,15 @@ type PutSecurityQuestionSettingRequest struct { // Replace the current instance of SecurityQuestionSettings with provided payload. // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. SecurityQuestionSetting `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/put_self_registration_profile_request_response.go b/identitydomains/put_self_registration_profile_request_response.go new file mode 100644 index 0000000000..0c6dcf9200 --- /dev/null +++ b/identitydomains/put_self_registration_profile_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PutSelfRegistrationProfileRequest wrapper for the PutSelfRegistrationProfile operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutSelfRegistrationProfile.go.html to see an example of how to use PutSelfRegistrationProfileRequest. +type PutSelfRegistrationProfileRequest struct { + + // ID of the resource + SelfRegistrationProfileId *string `mandatory:"true" contributesTo:"path" name:"selfRegistrationProfileId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Replace the current instance of SelfRegistrationProfile with provided payload. + // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + SelfRegistrationProfile `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PutSelfRegistrationProfileRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PutSelfRegistrationProfileRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PutSelfRegistrationProfileRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PutSelfRegistrationProfileRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PutSelfRegistrationProfileRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PutSelfRegistrationProfileResponse wrapper for the PutSelfRegistrationProfile operation +type PutSelfRegistrationProfileResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The SelfRegistrationProfile instance + SelfRegistrationProfile `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PutSelfRegistrationProfileResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PutSelfRegistrationProfileResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/put_setting_request_response.go b/identitydomains/put_setting_request_response.go new file mode 100644 index 0000000000..3637745d8f --- /dev/null +++ b/identitydomains/put_setting_request_response.go @@ -0,0 +1,130 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PutSettingRequest wrapper for the PutSetting operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/PutSetting.go.html to see an example of how to use PutSettingRequest. +type PutSettingRequest struct { + + // ID of the resource + SettingId *string `mandatory:"true" contributesTo:"path" name:"settingId"` + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // A comma-delimited string that specifies the names of resource attributes that should be returned in the response. By default, a response that contains resource attributes contains only attributes that are defined in the schema for that resource type as returned=always or returned=default. An attribute that is defined as returned=request is returned in a response only if the request specifies its name in the value of this query parameter. If a request specifies this query parameter, the response contains the attributes that this query parameter specifies, as well as any attribute that is defined as returned=always. + Attributes *string `mandatory:"false" contributesTo:"query" name:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If 'attributes' query parameter is also available, union of the two is fetched. Valid values - all, always, never, request, default. Values are case-insensitive. + AttributeSets []AttributeSetsEnum `contributesTo:"query" name:"attributeSets" omitEmpty:"true" collectionFormat:"multi"` + + // Replace the current instance of Settings with provided payload. + // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + Setting `contributesTo:"body"` + + // Used to make the request conditional on an ETag + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PutSettingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PutSettingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PutSettingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PutSettingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PutSettingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PutSettingResponse wrapper for the PutSetting operation +type PutSettingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Setting instance + Setting `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response PutSettingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PutSettingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/put_user_capabilities_changer_request_response.go b/identitydomains/put_user_capabilities_changer_request_response.go index 76b3aa9298..81f77688a4 100644 --- a/identitydomains/put_user_capabilities_changer_request_response.go +++ b/identitydomains/put_user_capabilities_changer_request_response.go @@ -29,15 +29,15 @@ type PutUserCapabilitiesChangerRequest struct { // Replace the current instance of UserCapabilitiesChanger with provided payload. // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. UserCapabilitiesChanger `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/put_user_password_changer_request_response.go b/identitydomains/put_user_password_changer_request_response.go index dda66149cb..ae5638d04d 100644 --- a/identitydomains/put_user_password_changer_request_response.go +++ b/identitydomains/put_user_password_changer_request_response.go @@ -29,15 +29,15 @@ type PutUserPasswordChangerRequest struct { // Replace the current instance of UserPasswordChanger with provided payload. // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. UserPasswordChanger `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/put_user_password_resetter_request_response.go b/identitydomains/put_user_password_resetter_request_response.go index cc6d8fc911..294eb0c646 100644 --- a/identitydomains/put_user_password_resetter_request_response.go +++ b/identitydomains/put_user_password_resetter_request_response.go @@ -29,15 +29,15 @@ type PutUserPasswordResetterRequest struct { // Replace the current instance of UserPasswordResetter with provided payload. // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. UserPasswordResetter `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/put_user_request_response.go b/identitydomains/put_user_request_response.go index b150ccf201..f6915e2753 100644 --- a/identitydomains/put_user_request_response.go +++ b/identitydomains/put_user_request_response.go @@ -35,15 +35,15 @@ type PutUserRequest struct { // Replace the current instance of User with provided payload. // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. User `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/put_user_status_changer_request_response.go b/identitydomains/put_user_status_changer_request_response.go index 683916e9ff..108acdb591 100644 --- a/identitydomains/put_user_status_changer_request_response.go +++ b/identitydomains/put_user_status_changer_request_response.go @@ -35,15 +35,15 @@ type PutUserStatusChangerRequest struct { // Replace the current instance of UserStatusChanger with provided payload. // Before you specify an attribute-value in a request to replace a resource, please check the **'mutability'** property of that attribute in the resource-type schema below. Clicking on an attribute-row will expand that row to show the **SCIM++ Properties** of that attribute. - // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: - // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. - // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. - // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. + // - Your request to create, update or replace a resource may specify in its payload a value for any attribute that is defined as *mutability:readWrite* or *mutability:writeOnly* or *mutability:immutable*: + // - The SCIM APIs to create a resource will ignore silently any value that you specify for an attribute that is defined as *mutability:readOnly*. + // - The SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify a value for an attribute that is defined as *mutability:readOnly*. + // - Similarly, the SCIM APIs to update or replace a resource will fail with an error 400 Bad Request if you specify any value for an attribute that is defined as *mutability:immutable* and that already has a value in the specified resource. // Also, before you use the query-parameter attributes to request specific attributes, please check the **'returned'** property of that attribute in the resource-type schema below: - // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: - // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. - // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. - // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. + // - Your request to read a resource (or to search a resource-type) can specify as the value of attributes any attributes that are defined as *returned:default* or *returned:request* or *returned:always*: + // - If you request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the set of attributes that you requested, as well as any attribute that is defined as *returned:always*. + // - If you do not request a specific set of attributes, the SCIM APIs to read a resource (or to search a resource-type) will return in each resource the the set of attributes defined as *returned:default*, as well as any attribute that is defined as *returned:always*. + // - The SCIM APIs to read a resource (or to search a resource-type) will ignore silently any request to return an attribute that is defined as *returned:never*. UserStatusChanger `contributesTo:"body"` // Used to make the request conditional on an ETag diff --git a/identitydomains/rule.go b/identitydomains/rule.go new file mode 100644 index 0000000000..cde20e9df7 --- /dev/null +++ b/identitydomains/rule.go @@ -0,0 +1,266 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Rule Rule resource. A unit that has a condition which on evaluation with input returns defined values. +type Rule struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // Rule name + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: always + // - type: string + // - uniqueness: none + Name *string `mandatory:"true" json:"name"` + + // SCIM filters + // **Deprecated Since: 17.3.4** + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Condition *string `mandatory:"true" json:"condition"` + + PolicyType *RulePolicyType `mandatory:"true" json:"policyType"` + + // The return values are the then portion of a Rule + // **SCIM++ Properties:** + // - idcsCompositeKey: [name] + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: complex + // - uniqueness: none + Return []RuleReturn `mandatory:"true" json:"return"` + + // Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: string + // - uniqueness: global + Id *string `mandatory:"false" json:"id"` + + // Unique OCI identifier for the SCIM Resource. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: global + Ocid *string `mandatory:"false" json:"ocid"` + + Meta *Meta `mandatory:"false" json:"meta"` + + IdcsCreatedBy *IdcsCreatedBy `mandatory:"false" json:"idcsCreatedBy"` + + IdcsLastModifiedBy *IdcsLastModifiedBy `mandatory:"false" json:"idcsLastModifiedBy"` + + // Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsPreventedOperations []IdcsPreventedOperationsEnum `mandatory:"false" json:"idcsPreventedOperations,omitempty"` + + // A list of tags on this resource. + // **SCIM++ Properties:** + // - idcsCompositeKey: [key, value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Tags []Tags `mandatory:"false" json:"tags"` + + // A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DeleteInProgress *bool `mandatory:"false" json:"deleteInProgress"` + + // The release number when the resource was upgraded. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsLastUpgradedInRelease *string `mandatory:"false" json:"idcsLastUpgradedInRelease"` + + // OCI Domain Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DomainOcid *string `mandatory:"false" json:"domainOcid"` + + // OCI Compartment Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CompartmentOcid *string `mandatory:"false" json:"compartmentOcid"` + + // OCI Tenant Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TenancyOcid *string `mandatory:"false" json:"tenancyOcid"` + + // An identifier for the Resource as defined by the Service Consumer. The externalId may simplify identification of the Resource between Service Consumer and Service provider by allowing the Consumer to refer to the Resource with its own identifier, obviating the need to store a local mapping between the local identifier of the Resource and the identifier used by the Service Provider. Each Resource MAY include a non-empty externalId value. The value of the externalId attribute is always issued be the Service Consumer and can never be specified by the Service Provider. The Service Provider MUST always interpret the externalId as scoped to the Service Consumer's tenant. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ExternalId *string `mandatory:"false" json:"externalId"` + + // Rule Description + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Description *string `mandatory:"false" json:"description"` + + // If true, rule is active + // **SCIM++ Properties:** + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + Active *bool `mandatory:"false" json:"active"` + + // Shows if the rule is locked + // **SCIM++ Properties:** + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + Locked *bool `mandatory:"false" json:"locked"` + + // The Groovy script that is run instead of the rule, if policy type allows the rule to be a Groovy script. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + RuleGroovy *string `mandatory:"false" json:"ruleGroovy"` + + ConditionGroup *RuleConditionGroup `mandatory:"false" json:"conditionGroup"` +} + +func (m Rule) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Rule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.IdcsPreventedOperations { + if _, ok := GetMappingIdcsPreventedOperationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsPreventedOperations: %s. Supported values are: %s.", val, strings.Join(GetIdcsPreventedOperationsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/rule_condition_group.go b/identitydomains/rule_condition_group.go new file mode 100644 index 0000000000..01791a281c --- /dev/null +++ b/identitydomains/rule_condition_group.go @@ -0,0 +1,137 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RuleConditionGroup Condition or ConditionGroup assigned to the rule +// **SCIM++ Properties:** +// - idcsSearchable: true +// - multiValued: false +// - mutability: readWrite +// - required: false +// - returned: default +// - type: complex +// - uniqueness: none +type RuleConditionGroup struct { + + // A label that indicates whether this is Condition or ConditionGroup. + // **SCIM++ Properties:** + // - idcsDefaultValue: Condition + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Type RuleConditionGroupTypeEnum `mandatory:"true" json:"type"` + + // Condition or ConditionGroup identifier + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"false" json:"value"` + + // ConditionGroup URI + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: reference + // - uniqueness: none + Ref *string `mandatory:"false" json:"$ref"` + + // Condition or ConditionGroup name + // **Added In:** 17.4.2 + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Name *string `mandatory:"false" json:"name"` +} + +func (m RuleConditionGroup) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RuleConditionGroup) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingRuleConditionGroupTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetRuleConditionGroupTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RuleConditionGroupTypeEnum Enum with underlying type: string +type RuleConditionGroupTypeEnum string + +// Set of constants representing the allowable values for RuleConditionGroupTypeEnum +const ( + RuleConditionGroupTypeCondition RuleConditionGroupTypeEnum = "Condition" + RuleConditionGroupTypeConditiongroup RuleConditionGroupTypeEnum = "ConditionGroup" +) + +var mappingRuleConditionGroupTypeEnum = map[string]RuleConditionGroupTypeEnum{ + "Condition": RuleConditionGroupTypeCondition, + "ConditionGroup": RuleConditionGroupTypeConditiongroup, +} + +var mappingRuleConditionGroupTypeEnumLowerCase = map[string]RuleConditionGroupTypeEnum{ + "condition": RuleConditionGroupTypeCondition, + "conditiongroup": RuleConditionGroupTypeConditiongroup, +} + +// GetRuleConditionGroupTypeEnumValues Enumerates the set of values for RuleConditionGroupTypeEnum +func GetRuleConditionGroupTypeEnumValues() []RuleConditionGroupTypeEnum { + values := make([]RuleConditionGroupTypeEnum, 0) + for _, v := range mappingRuleConditionGroupTypeEnum { + values = append(values, v) + } + return values +} + +// GetRuleConditionGroupTypeEnumStringValues Enumerates the set of values in String for RuleConditionGroupTypeEnum +func GetRuleConditionGroupTypeEnumStringValues() []string { + return []string{ + "Condition", + "ConditionGroup", + } +} + +// GetMappingRuleConditionGroupTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRuleConditionGroupTypeEnum(val string) (RuleConditionGroupTypeEnum, bool) { + enum, ok := mappingRuleConditionGroupTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/rule_policy_type.go b/identitydomains/rule_policy_type.go new file mode 100644 index 0000000000..9240de3ff2 --- /dev/null +++ b/identitydomains/rule_policy_type.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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RulePolicyType PolicyType on which the policy is based +// **SCIM++ Properties:** +// - idcsSearchable: true +// - multiValued: false +// - mutability: immutable +// - required: true +// - returned: default +// - type: complex +// - uniqueness: none +type RulePolicyType struct { + + // PolicyType identifier + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // PolicyType URI + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: reference + // - uniqueness: none + Ref *string `mandatory:"false" json:"$ref"` +} + +func (m RulePolicyType) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RulePolicyType) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/rule_return.go b/identitydomains/rule_return.go new file mode 100644 index 0000000000..5159d2bb2c --- /dev/null +++ b/identitydomains/rule_return.go @@ -0,0 +1,70 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RuleReturn The return values are the then portion of a Rule +type RuleReturn struct { + + // Attribute name of an individual value to be returned. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Name *string `mandatory:"true" json:"name"` + + // Attribute value of some attribute to be returned. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // The Groovy script that is run to generate output for the rule, if the policy type allows the return value to be a Groovy script. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ReturnGroovy *string `mandatory:"false" json:"returnGroovy"` +} + +func (m RuleReturn) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RuleReturn) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/rule_search_request.go b/identitydomains/rule_search_request.go new file mode 100644 index 0000000000..5444d8e38d --- /dev/null +++ b/identitydomains/rule_search_request.go @@ -0,0 +1,70 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RuleSearchRequest Clients MAY execute queries without passing parameters on the URL by using the HTTP POST verb combined with the **.search** path extension. The inclusion of **.search** on the end of a valid SCIM endpoint SHALL be used to indicate the HTTP POST verb is intended to be a query operation. To create a new query result set, a SCIM client sends an HTTP POST request to the desired SCIM resource endpoint (ending in **.search**). The body of the POST request MAY include any of the parameters. +type RuleSearchRequest struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See (additional retrieval query parameters (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + Attributes []string `mandatory:"false" json:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + AttributeSets []AttributeSetsEnum `mandatory:"false" json:"attributeSets,omitempty"` + + // The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See Section 3.4.2.2 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2). OPTIONAL. + Filter *string `mandatory:"false" json:"filter"` + + // A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See Sorting section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + SortBy *string `mandatory:"false" json:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder SortOrderEnum `mandatory:"false" json:"sortOrder,omitempty"` + + // An integer that indicates the 1-based index of the first query result. See Pagination Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + StartIndex *int `mandatory:"false" json:"startIndex"` + + // An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + Count *int `mandatory:"false" json:"count"` +} + +func (m RuleSearchRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RuleSearchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingSortOrderEnum(string(m.SortOrder)); !ok && m.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", m.SortOrder, strings.Join(GetSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/rules.go b/identitydomains/rules.go new file mode 100644 index 0000000000..32842c0352 --- /dev/null +++ b/identitydomains/rules.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Rules The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type Rules struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []Rule `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m Rules) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Rules) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/schema.go b/identitydomains/schema.go new file mode 100644 index 0000000000..557e787211 --- /dev/null +++ b/identitydomains/schema.go @@ -0,0 +1,147 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Schema SCIM schema +type Schema struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // Specifies if the attributes in this schema can be used for mapping with external identity sources such as AD or LDAP + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: boolean + // - uniqueness: none + IdcsMappable *bool `mandatory:"true" json:"idcsMappable"` + + // Contains the canonical name of the other attribute sharing the same idcsTargetAttributeName + // **Added In:** 2209122038 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: always + // - type: string + // - uniqueness: none + IdcsMapsToSameTargetAttributeNameAs *string `mandatory:"false" json:"idcsMapsToSameTargetAttributeNameAs"` + + // An identifier for the Resource as defined by the Service Consumer. The externalId may simplify identification of the Resource between Service Consumer and Service Provider by allowing the Consumer to refer to the Resource with its own identifier, obviating the need to store a local mapping between the local identifier of the Resource and the identifier used by the Service Provider. Each Resource MAY include a non-empty externalId value. The value of the externalId attribute is always issued by the Service Consumer and can never be specified by the Service Provider. The Service Provider MUST always interpret the externalId as scoped to the Service Consumer's tenant. + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ExternalId *string `mandatory:"false" json:"externalId"` + + // Schema's human-readable name + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Name *string `mandatory:"false" json:"name"` + + // Resource types defs this resource refers to + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsResourceTypes []string `mandatory:"false" json:"idcsResourceTypes"` + + // Schema's human-readable description + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Description *string `mandatory:"false" json:"description"` + + // Specifies whether the attribute is cacheable. True by default for all attributes. If attribute with idcsAttributeCachable = false, is present \"attributesToGet\" while executing GET/SEARCH on cacheable resource, Cache is missed and data is fetched from Data Provider. + // **Added In:** 17.3.4 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsAttributeCacheable *bool `mandatory:"false" json:"idcsAttributeCacheable"` + + // Specifies whether the dataprovider mapping from resource schema should override from common schema with the same name. + // **Added In:** 2102181953 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsOverrideCommonAttribute *bool `mandatory:"false" json:"idcsOverrideCommonAttribute"` + + // A complex type that specifies the set of Resource attributes + // **SCIM++ Properties:** + // - idcsCompositeKey: [] + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + Attributes []SchemaAttributes `mandatory:"false" json:"attributes"` +} + +func (m Schema) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Schema) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/schema_attributes.go b/identitydomains/schema_attributes.go new file mode 100644 index 0000000000..25dbe19505 --- /dev/null +++ b/identitydomains/schema_attributes.go @@ -0,0 +1,1382 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchemaAttributes A complex type that specifies the set of Resource attributes +type SchemaAttributes struct { + + // Attribute's name + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Name *string `mandatory:"false" json:"name"` + + // Localized schema attribute display name for use by UI client for displaying attribute labels + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsDisplayNameMessageId *string `mandatory:"false" json:"idcsDisplayNameMessageId"` + + // Specifies if the attributes in this schema should be hidden externally + // **Added In:** 19.1.4 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IdcsRtsaHideAttribute *bool `mandatory:"false" json:"idcsRtsaHideAttribute"` + + LocalizedDisplayName *SchemaLocalizedDisplayName `mandatory:"false" json:"localizedDisplayName"` + + // The attribute's data type--for example, String + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Type SchemaAttributesTypeEnum `mandatory:"false" json:"type,omitempty"` + + // Indicates the attribute's plurality + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + MultiValued *bool `mandatory:"false" json:"multiValued"` + + // The attribute's human-readable description + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Description *string `mandatory:"false" json:"description"` + + // Specifies if the attribute is required + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + Required *bool `mandatory:"false" json:"required"` + + // Specifies if the attribute is required + // **Added In:** 2305190132 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsReturnEmptyWhenNull *bool `mandatory:"false" json:"idcsReturnEmptyWhenNull"` + + // A collection of canonical values. Applicable Service Providers MUST specify the canonical types specified in the core schema specification--for example, \"work\", \"home\". + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CanonicalValues []string `mandatory:"false" json:"canonicalValues"` + + // Specifies the default value for an attribute. The value must be one from canonicalValues if defined. + // **Added In:** 18.1.6 + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsDefaultValue *string `mandatory:"false" json:"idcsDefaultValue"` + + // A collection of Localized canonical values. + // **SCIM++ Properties:** + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + LocalizedCanonicalValues []SchemaLocalizedCanonicalValues `mandatory:"false" json:"localizedCanonicalValues"` + + // Specifies if the String attribute is case-sensitive + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + CaseExact *bool `mandatory:"false" json:"caseExact"` + + // Specifies if the attribute is mutable + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Mutability SchemaAttributesMutabilityEnum `mandatory:"false" json:"mutability,omitempty"` + + // A single keyword that indicates when an attribute and associated values are returned in response to a GET request or in response to a PUT, POST, or PATCH request + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Returned SchemaAttributesReturnedEnum `mandatory:"false" json:"returned,omitempty"` + + // A single keyword value that specifies how the Service Provider enforces uniqueness of attribute values. A server MAY reject an invalid value based on uniqueness by returning an HTTP response code of 400 (Bad Request). A client MAY enforce uniqueness on the client side to a greater degree than the Service Provider enforces. For example, a client could make a value unique while the server has the uniqueness of \"none\". + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Uniqueness SchemaAttributesUniquenessEnum `mandatory:"false" json:"uniqueness,omitempty"` + + // The attribute defining the CSV header name for import/export + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsCsvAttributeName *string `mandatory:"false" json:"idcsCsvAttributeName"` + + // Specifies the mapping between external identity source attributes and Oracle Identity Cloud Service complex attributes (e.g. email => emails[work].value) + // **SCIM++ Properties:** + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: default + // - type: complex + IdcsComplexAttributeNameMappings []SchemaIdcsComplexAttributeNameMappings `mandatory:"false" json:"idcsComplexAttributeNameMappings"` + + // Maps to ICF target attribute name + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsICFBundleAttributeName *string `mandatory:"false" json:"idcsICFBundleAttributeName"` + + // Metadata to identify the ICF required attribute + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IdcsICFRequired *bool `mandatory:"false" json:"idcsICFRequired"` + + // Maps to ICF data type + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsICFAttributeType SchemaAttributesIdcsICFAttributeTypeEnum `mandatory:"false" json:"idcsICFAttributeType,omitempty"` + + // Csv meta data for those resource type attributes which can be imported / exported from / to csv. + // **SCIM++ Properties:** + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + IdcsCsvAttributeNameMappings []SchemaIdcsCsvAttributeNameMappings `mandatory:"false" json:"idcsCsvAttributeNameMappings"` + + // The names of the Resource types that may be referenced--for example, User. This is only applicable for attributes that are of the \"reference\" data type. + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ReferenceTypes []string `mandatory:"false" json:"referenceTypes"` + + // Indicates that the schema has been deprecated since version + // **Deprecated Since: 19.3.3** + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: integer + IdcsDeprecatedSinceVersion *int `mandatory:"false" json:"idcsDeprecatedSinceVersion"` + + // Indicates that the schema has been added since version + // **Deprecated Since: 19.3.3** + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: integer + IdcsAddedSinceVersion *int `mandatory:"false" json:"idcsAddedSinceVersion"` + + // Indicates that the schema has been deprecated since this release number + // **Added In:** 17.3.4 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + IdcsDeprecatedSinceReleaseNumber *string `mandatory:"false" json:"idcsDeprecatedSinceReleaseNumber"` + + // Indicates that the schema has been added since this release number + // **Added In:** 17.3.4 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + IdcsAddedSinceReleaseNumber *string `mandatory:"false" json:"idcsAddedSinceReleaseNumber"` + + // Specifies the minimum length of the attribute + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: integer + IdcsMinLength *int `mandatory:"false" json:"idcsMinLength"` + + // Specifies the maximum length of the attribute + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: integer + IdcsMaxLength *int `mandatory:"false" json:"idcsMaxLength"` + + // Specifies the minimum value of the integer attribute + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: integer + IdcsMinValue *int `mandatory:"false" json:"idcsMinValue"` + + // Specifies the maximum value of the integer attribute + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: integer + IdcsMaxValue *int `mandatory:"false" json:"idcsMaxValue"` + + // If true, specifies that the attribute can have multiple language values set for the attribute on which this is set. + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IdcsMultiLanguage *bool `mandatory:"false" json:"idcsMultiLanguage"` + + // Specifies the directly referenced Resources + // **SCIM++ Properties:** + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + IdcsRefResourceAttributes []string `mandatory:"false" json:"idcsRefResourceAttributes"` + + // Specifies the indirectly referenced Resources + // **SCIM++ Properties:** + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + IdcsIndirectRefResourceAttributes []string `mandatory:"false" json:"idcsIndirectRefResourceAttributes"` + + // Sequence tracking ID name for the attribute + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + IdcsAutoIncrementSeqName *string `mandatory:"false" json:"idcsAutoIncrementSeqName"` + + // Specifies whether the value of the Resource attribute is persisted + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsValuePersisted *bool `mandatory:"false" json:"idcsValuePersisted"` + + // Flag to specify if the attribute should be encrypted or hashed + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsSensitive SchemaAttributesIdcsSensitiveEnum `mandatory:"false" json:"idcsSensitive,omitempty"` + + // Specifies whether the schema attribute is for internal use only. Internal attributes are not exposed via REST. This attribute overrides mutability for create/update if the request is internal and the attribute internalflag is set to True. This attribute overrides the return attribute while building SCIM response attributes when both the request is internal and the schema attribute is internal. + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsInternal *bool `mandatory:"false" json:"idcsInternal"` + + // Trims any leading and trailing blanks from String values. Default is True. + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsTrimStringValue *bool `mandatory:"false" json:"idcsTrimStringValue"` + + // Specifies whether this attribute can be included in a search filter + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsSearchable *bool `mandatory:"false" json:"idcsSearchable"` + + // Specifies whether this attribute value was generated + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsGenerated *bool `mandatory:"false" json:"idcsGenerated"` + + // Specifies whether changes to this attribute value are audited + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsAuditable *bool `mandatory:"false" json:"idcsAuditable"` + + // Target attribute name that this attribute gets mapped to for persistence + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsTargetAttributeName *string `mandatory:"false" json:"idcsTargetAttributeName"` + + // Contains the canonical name of the other attribute sharing the same idcsTargetAttributeName + // **Added In:** 2209122038 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: always + // - type: string + // - uniqueness: none + IdcsMapsToSameTargetAttributeNameAs *string `mandatory:"false" json:"idcsMapsToSameTargetAttributeNameAs"` + + // Target normalized attribute name that this normalized value of attribute gets mapped to for persistence. Only set for caseExact=false & searchable attributes. Do not use by default. + // **Added In:** 19.2.1 + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsTargetNormAttributeName *string `mandatory:"false" json:"idcsTargetNormAttributeName"` + + // Old Target attribute name from child table for CSVA attribute prior to migration. This maintains this attribute used to get mapped to for persistence + // **Added In:** 19.2.1 + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsTargetAttributeNameToMigrateFrom *string `mandatory:"false" json:"idcsTargetAttributeNameToMigrateFrom"` + + // Target index name created for this attribute for performance + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsTargetUniqueConstraintName *string `mandatory:"false" json:"idcsTargetUniqueConstraintName"` + + // Specifies the mapper to use when mapping this attribute value to DataProvider-specific semantics + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsToTargetMapper *string `mandatory:"false" json:"idcsToTargetMapper"` + + // Specifies the mapper to use when mapping this attribute value from DataProvider-specific semantics + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsFromTargetMapper *string `mandatory:"false" json:"idcsFromTargetMapper"` + + // Specifies the user-friendly displayable attribute name or catalog key used for localization + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsDisplayName *string `mandatory:"false" json:"idcsDisplayName"` + + // Specifies the Resource type to read from for dynamic canonical values + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsCanonicalValueSourceResourceType *string `mandatory:"false" json:"idcsCanonicalValueSourceResourceType"` + + // Filter to use when getting canonical values for this schema attribute + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsCanonicalValueSourceFilter *string `mandatory:"false" json:"idcsCanonicalValueSourceFilter"` + + // Specifies the Resource type ID to read from for dynamic canonical values + // **Added In:** 17.4.6 + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsCanonicalValueSourceResourceTypeID *string `mandatory:"false" json:"idcsCanonicalValueSourceResourceTypeID"` + + // Display name for the canonical value attribute name. + // **Added In:** 17.4.6 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsCanonicalValueSourceDisplayAttrName *string `mandatory:"false" json:"idcsCanonicalValueSourceDisplayAttrName"` + + // Source key attribute for the canonical value. + // **Added In:** 17.4.6 + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsCanonicalValueSourceKeyAttrName *string `mandatory:"false" json:"idcsCanonicalValueSourceKeyAttrName"` + + // Type of the canonical value. + // **Added In:** 17.4.6 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsCanonicalValueType SchemaAttributesIdcsCanonicalValueTypeEnum `mandatory:"false" json:"idcsCanonicalValueType,omitempty"` + + // Validate payload reference value during create, replace, and update. Default is True. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IdcsValidateReference *bool `mandatory:"false" json:"idcsValidateReference"` + + // The set of one or more sub attributes' names of a CMVA, whose values uniquely identify an instance of a CMVA + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsCompositeKey []string `mandatory:"false" json:"idcsCompositeKey"` + + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + // Whether the CMVA attribute will be fetched or not for current resource in AbstractResourceManager update operation before calling data provider update. Default is true. + IdcsFetchComplexAttributeValues *bool `mandatory:"false" json:"idcsFetchComplexAttributeValues"` + + // Indicates if the attribute is scim compliant, default is true + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + IdcsScimCompliant *bool `mandatory:"false" json:"idcsScimCompliant"` + + // Specifies if the attribute can be used for mapping with external identity sources such as AD or LDAP. If isSchemaMappable: false for the schema in which this attribute is defined, then this flag is ignored + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + IdcsAttributeMappable *bool `mandatory:"false" json:"idcsAttributeMappable"` + + // If true, ARM should not validate the value of the attribute since it will be converted/migrated to another attribute internally by the manager which will build valid post, put, or patch payload, depending on the client requested operation + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsValuePersistedInOtherAttribute *bool `mandatory:"false" json:"idcsValuePersistedInOtherAttribute"` + + // Specifies whether the attribute is PII (personal information). False by default for all attributes. If attribute with idcsPii = true, it's value must be obfuscated before it's written to the Oracle Identity Cloud Service system logs. + // **Added In:** 18.4.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + IdcsPii *bool `mandatory:"false" json:"idcsPii"` + + // Specifies whether the attribute should be excluded from the BulkApi patch generated by gradle task for upgrading OOTB resources. + // **Added In:** 2104150946 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: never + // - type: boolean + IdcsExcludeFromUpgradePatch *bool `mandatory:"false" json:"idcsExcludeFromUpgradePatch"` + + // A list specifying the contained attributes + // **SCIM++ Properties:** + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + SubAttributes []SchemaSubAttributes `mandatory:"false" json:"subAttributes"` + + // Specifies the referenced Resource attribute + // **Deprecated Since: 17.3.4** + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + IdcsRefResourceAttribute *string `mandatory:"false" json:"idcsRefResourceAttribute"` + + // Specifies whether the attribute is cacheable. True by default for all attributes. If attribute with idcsAttributeCachable = false, is present \"attributesToGet\" while executing GET/SEARCH on cacheable resource, Cache is missed and data is fetched from Data Provider. + // **Added In:** 17.3.4 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsAttributeCacheable *bool `mandatory:"false" json:"idcsAttributeCacheable"` + + // Metadata used by Oracle Identity Cloud Service UI to sequence the attributes displayed on the Account Form. + // **Added In:** 17.4.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: integer + IdcsuiOrder *int `mandatory:"false" json:"idcsuiOrder"` + + // Metadata used by Oracle Identity Cloud Service UI to validate the attribute values using regular expressions. + // **Added In:** 17.4.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + IdcsuiRegexp *string `mandatory:"false" json:"idcsuiRegexp"` + + // Metadata used by Oracle Identity Cloud Service UI to decide whether the attribute must be displayed on the Account Form. + // **Added In:** 17.4.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsuiVisible *bool `mandatory:"false" json:"idcsuiVisible"` + + // Metadata used by Oracle Identity Cloud Service UI to render a widget for this attribute on the Account Form. + // **Added In:** 17.4.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + IdcsuiWidget SchemaAttributesIdcsuiWidgetEnum `mandatory:"false" json:"idcsuiWidget,omitempty"` + + // The list of features that require this attribute + // **Deprecated Since: 19.1.6** + // **SCIM++ Properties:** + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + IdcsFeatures []SchemaAttributesIdcsFeaturesEnum `mandatory:"false" json:"idcsFeatures,omitempty"` + + // A subset of \"canonicalValues\" that are not supported when the \"optionalPii\" feature is disabled in GlobalConfig. + // **Deprecated Since: 19.1.6** + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsOptionalPiiCanonicalValues []string `mandatory:"false" json:"idcsOptionalPiiCanonicalValues"` + + // Specifies if the value of the attribute should be sanitized using OWASP library for HTML content + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IdcsSanitize *bool `mandatory:"false" json:"idcsSanitize"` + + // Specifies whether the attribute from resource schema should override from common schema with the same name. + // **Added In:** 2102181953 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + IdcsOverrideCommonAttribute *bool `mandatory:"false" json:"idcsOverrideCommonAttribute"` + + // Specifies whether the readOnly and immutable reference attributes should be ignored when forceDelete=true. + // **Added In:** 2104220644 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IdcsIgnoreReadOnlyAndImmutableRefAttrsDuringForceDelete *bool `mandatory:"false" json:"idcsIgnoreReadOnlyAndImmutableRefAttrsDuringForceDelete"` + + // Set this attribute to True if the resource is eligibal for update while system is in readonly mode. + // **Added In:** 2106170416 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IdcsAllowUpdatesInReadOnlyMode *bool `mandatory:"false" json:"idcsAllowUpdatesInReadOnlyMode"` + + // Set this attribute to True if the pagination is required on an attribute. + // **Added In:** 2202230830 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IdcsPaginateResponse *bool `mandatory:"false" json:"idcsPaginateResponse"` + + // If true, indicates that the attribute value must be written to the home region for access flows initiated from a replica region. + // **Added In:** 2209220956 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IdcsRequiresWriteForAccessFlows *bool `mandatory:"false" json:"idcsRequiresWriteForAccessFlows"` + + // If true, indicates that the attribute value must be written to the home region and requires immediate read-after-write consistency for access flows initiated from a replica region. + // **Added In:** 2209220956 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: never + // - type: boolean + IdcsRequiresImmediateReadAfterWriteForAccessFlows *bool `mandatory:"false" json:"idcsRequiresImmediateReadAfterWriteForAccessFlows"` +} + +func (m SchemaAttributes) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SchemaAttributes) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingSchemaAttributesTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetSchemaAttributesTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingSchemaAttributesMutabilityEnum(string(m.Mutability)); !ok && m.Mutability != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Mutability: %s. Supported values are: %s.", m.Mutability, strings.Join(GetSchemaAttributesMutabilityEnumStringValues(), ","))) + } + if _, ok := GetMappingSchemaAttributesReturnedEnum(string(m.Returned)); !ok && m.Returned != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Returned: %s. Supported values are: %s.", m.Returned, strings.Join(GetSchemaAttributesReturnedEnumStringValues(), ","))) + } + if _, ok := GetMappingSchemaAttributesUniquenessEnum(string(m.Uniqueness)); !ok && m.Uniqueness != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Uniqueness: %s. Supported values are: %s.", m.Uniqueness, strings.Join(GetSchemaAttributesUniquenessEnumStringValues(), ","))) + } + if _, ok := GetMappingSchemaAttributesIdcsICFAttributeTypeEnum(string(m.IdcsICFAttributeType)); !ok && m.IdcsICFAttributeType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsICFAttributeType: %s. Supported values are: %s.", m.IdcsICFAttributeType, strings.Join(GetSchemaAttributesIdcsICFAttributeTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingSchemaAttributesIdcsSensitiveEnum(string(m.IdcsSensitive)); !ok && m.IdcsSensitive != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsSensitive: %s. Supported values are: %s.", m.IdcsSensitive, strings.Join(GetSchemaAttributesIdcsSensitiveEnumStringValues(), ","))) + } + if _, ok := GetMappingSchemaAttributesIdcsCanonicalValueTypeEnum(string(m.IdcsCanonicalValueType)); !ok && m.IdcsCanonicalValueType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsCanonicalValueType: %s. Supported values are: %s.", m.IdcsCanonicalValueType, strings.Join(GetSchemaAttributesIdcsCanonicalValueTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingSchemaAttributesIdcsuiWidgetEnum(string(m.IdcsuiWidget)); !ok && m.IdcsuiWidget != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsuiWidget: %s. Supported values are: %s.", m.IdcsuiWidget, strings.Join(GetSchemaAttributesIdcsuiWidgetEnumStringValues(), ","))) + } + for _, val := range m.IdcsFeatures { + if _, ok := GetMappingSchemaAttributesIdcsFeaturesEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsFeatures: %s. Supported values are: %s.", val, strings.Join(GetSchemaAttributesIdcsFeaturesEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SchemaAttributesTypeEnum Enum with underlying type: string +type SchemaAttributesTypeEnum string + +// Set of constants representing the allowable values for SchemaAttributesTypeEnum +const ( + SchemaAttributesTypeString SchemaAttributesTypeEnum = "string" + SchemaAttributesTypeComplex SchemaAttributesTypeEnum = "complex" + SchemaAttributesTypeBoolean SchemaAttributesTypeEnum = "boolean" + SchemaAttributesTypeDecimal SchemaAttributesTypeEnum = "decimal" + SchemaAttributesTypeInteger SchemaAttributesTypeEnum = "integer" + SchemaAttributesTypeDatetime SchemaAttributesTypeEnum = "dateTime" + SchemaAttributesTypeReference SchemaAttributesTypeEnum = "reference" + SchemaAttributesTypeBinary SchemaAttributesTypeEnum = "binary" +) + +var mappingSchemaAttributesTypeEnum = map[string]SchemaAttributesTypeEnum{ + "string": SchemaAttributesTypeString, + "complex": SchemaAttributesTypeComplex, + "boolean": SchemaAttributesTypeBoolean, + "decimal": SchemaAttributesTypeDecimal, + "integer": SchemaAttributesTypeInteger, + "dateTime": SchemaAttributesTypeDatetime, + "reference": SchemaAttributesTypeReference, + "binary": SchemaAttributesTypeBinary, +} + +var mappingSchemaAttributesTypeEnumLowerCase = map[string]SchemaAttributesTypeEnum{ + "string": SchemaAttributesTypeString, + "complex": SchemaAttributesTypeComplex, + "boolean": SchemaAttributesTypeBoolean, + "decimal": SchemaAttributesTypeDecimal, + "integer": SchemaAttributesTypeInteger, + "datetime": SchemaAttributesTypeDatetime, + "reference": SchemaAttributesTypeReference, + "binary": SchemaAttributesTypeBinary, +} + +// GetSchemaAttributesTypeEnumValues Enumerates the set of values for SchemaAttributesTypeEnum +func GetSchemaAttributesTypeEnumValues() []SchemaAttributesTypeEnum { + values := make([]SchemaAttributesTypeEnum, 0) + for _, v := range mappingSchemaAttributesTypeEnum { + values = append(values, v) + } + return values +} + +// GetSchemaAttributesTypeEnumStringValues Enumerates the set of values in String for SchemaAttributesTypeEnum +func GetSchemaAttributesTypeEnumStringValues() []string { + return []string{ + "string", + "complex", + "boolean", + "decimal", + "integer", + "dateTime", + "reference", + "binary", + } +} + +// GetMappingSchemaAttributesTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSchemaAttributesTypeEnum(val string) (SchemaAttributesTypeEnum, bool) { + enum, ok := mappingSchemaAttributesTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SchemaAttributesMutabilityEnum Enum with underlying type: string +type SchemaAttributesMutabilityEnum string + +// Set of constants representing the allowable values for SchemaAttributesMutabilityEnum +const ( + SchemaAttributesMutabilityReadonly SchemaAttributesMutabilityEnum = "readOnly" + SchemaAttributesMutabilityReadwrite SchemaAttributesMutabilityEnum = "readWrite" + SchemaAttributesMutabilityImmutable SchemaAttributesMutabilityEnum = "immutable" + SchemaAttributesMutabilityWriteonly SchemaAttributesMutabilityEnum = "writeOnly" +) + +var mappingSchemaAttributesMutabilityEnum = map[string]SchemaAttributesMutabilityEnum{ + "readOnly": SchemaAttributesMutabilityReadonly, + "readWrite": SchemaAttributesMutabilityReadwrite, + "immutable": SchemaAttributesMutabilityImmutable, + "writeOnly": SchemaAttributesMutabilityWriteonly, +} + +var mappingSchemaAttributesMutabilityEnumLowerCase = map[string]SchemaAttributesMutabilityEnum{ + "readonly": SchemaAttributesMutabilityReadonly, + "readwrite": SchemaAttributesMutabilityReadwrite, + "immutable": SchemaAttributesMutabilityImmutable, + "writeonly": SchemaAttributesMutabilityWriteonly, +} + +// GetSchemaAttributesMutabilityEnumValues Enumerates the set of values for SchemaAttributesMutabilityEnum +func GetSchemaAttributesMutabilityEnumValues() []SchemaAttributesMutabilityEnum { + values := make([]SchemaAttributesMutabilityEnum, 0) + for _, v := range mappingSchemaAttributesMutabilityEnum { + values = append(values, v) + } + return values +} + +// GetSchemaAttributesMutabilityEnumStringValues Enumerates the set of values in String for SchemaAttributesMutabilityEnum +func GetSchemaAttributesMutabilityEnumStringValues() []string { + return []string{ + "readOnly", + "readWrite", + "immutable", + "writeOnly", + } +} + +// GetMappingSchemaAttributesMutabilityEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSchemaAttributesMutabilityEnum(val string) (SchemaAttributesMutabilityEnum, bool) { + enum, ok := mappingSchemaAttributesMutabilityEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SchemaAttributesReturnedEnum Enum with underlying type: string +type SchemaAttributesReturnedEnum string + +// Set of constants representing the allowable values for SchemaAttributesReturnedEnum +const ( + SchemaAttributesReturnedAlways SchemaAttributesReturnedEnum = "always" + SchemaAttributesReturnedNever SchemaAttributesReturnedEnum = "never" + SchemaAttributesReturnedDefault SchemaAttributesReturnedEnum = "default" + SchemaAttributesReturnedRequest SchemaAttributesReturnedEnum = "request" +) + +var mappingSchemaAttributesReturnedEnum = map[string]SchemaAttributesReturnedEnum{ + "always": SchemaAttributesReturnedAlways, + "never": SchemaAttributesReturnedNever, + "default": SchemaAttributesReturnedDefault, + "request": SchemaAttributesReturnedRequest, +} + +var mappingSchemaAttributesReturnedEnumLowerCase = map[string]SchemaAttributesReturnedEnum{ + "always": SchemaAttributesReturnedAlways, + "never": SchemaAttributesReturnedNever, + "default": SchemaAttributesReturnedDefault, + "request": SchemaAttributesReturnedRequest, +} + +// GetSchemaAttributesReturnedEnumValues Enumerates the set of values for SchemaAttributesReturnedEnum +func GetSchemaAttributesReturnedEnumValues() []SchemaAttributesReturnedEnum { + values := make([]SchemaAttributesReturnedEnum, 0) + for _, v := range mappingSchemaAttributesReturnedEnum { + values = append(values, v) + } + return values +} + +// GetSchemaAttributesReturnedEnumStringValues Enumerates the set of values in String for SchemaAttributesReturnedEnum +func GetSchemaAttributesReturnedEnumStringValues() []string { + return []string{ + "always", + "never", + "default", + "request", + } +} + +// GetMappingSchemaAttributesReturnedEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSchemaAttributesReturnedEnum(val string) (SchemaAttributesReturnedEnum, bool) { + enum, ok := mappingSchemaAttributesReturnedEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SchemaAttributesUniquenessEnum Enum with underlying type: string +type SchemaAttributesUniquenessEnum string + +// Set of constants representing the allowable values for SchemaAttributesUniquenessEnum +const ( + SchemaAttributesUniquenessNone SchemaAttributesUniquenessEnum = "none" + SchemaAttributesUniquenessServer SchemaAttributesUniquenessEnum = "server" + SchemaAttributesUniquenessGlobal SchemaAttributesUniquenessEnum = "global" +) + +var mappingSchemaAttributesUniquenessEnum = map[string]SchemaAttributesUniquenessEnum{ + "none": SchemaAttributesUniquenessNone, + "server": SchemaAttributesUniquenessServer, + "global": SchemaAttributesUniquenessGlobal, +} + +var mappingSchemaAttributesUniquenessEnumLowerCase = map[string]SchemaAttributesUniquenessEnum{ + "none": SchemaAttributesUniquenessNone, + "server": SchemaAttributesUniquenessServer, + "global": SchemaAttributesUniquenessGlobal, +} + +// GetSchemaAttributesUniquenessEnumValues Enumerates the set of values for SchemaAttributesUniquenessEnum +func GetSchemaAttributesUniquenessEnumValues() []SchemaAttributesUniquenessEnum { + values := make([]SchemaAttributesUniquenessEnum, 0) + for _, v := range mappingSchemaAttributesUniquenessEnum { + values = append(values, v) + } + return values +} + +// GetSchemaAttributesUniquenessEnumStringValues Enumerates the set of values in String for SchemaAttributesUniquenessEnum +func GetSchemaAttributesUniquenessEnumStringValues() []string { + return []string{ + "none", + "server", + "global", + } +} + +// GetMappingSchemaAttributesUniquenessEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSchemaAttributesUniquenessEnum(val string) (SchemaAttributesUniquenessEnum, bool) { + enum, ok := mappingSchemaAttributesUniquenessEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SchemaAttributesIdcsICFAttributeTypeEnum Enum with underlying type: string +type SchemaAttributesIdcsICFAttributeTypeEnum string + +// Set of constants representing the allowable values for SchemaAttributesIdcsICFAttributeTypeEnum +const ( + SchemaAttributesIdcsICFAttributeTypeString SchemaAttributesIdcsICFAttributeTypeEnum = "string" + SchemaAttributesIdcsICFAttributeTypeLong SchemaAttributesIdcsICFAttributeTypeEnum = "long" + SchemaAttributesIdcsICFAttributeTypeChar SchemaAttributesIdcsICFAttributeTypeEnum = "char" + SchemaAttributesIdcsICFAttributeTypeDouble SchemaAttributesIdcsICFAttributeTypeEnum = "double" + SchemaAttributesIdcsICFAttributeTypeFloat SchemaAttributesIdcsICFAttributeTypeEnum = "float" + SchemaAttributesIdcsICFAttributeTypeInteger SchemaAttributesIdcsICFAttributeTypeEnum = "integer" + SchemaAttributesIdcsICFAttributeTypeBoolean SchemaAttributesIdcsICFAttributeTypeEnum = "boolean" + SchemaAttributesIdcsICFAttributeTypeBytes SchemaAttributesIdcsICFAttributeTypeEnum = "bytes" + SchemaAttributesIdcsICFAttributeTypeBigdecimal SchemaAttributesIdcsICFAttributeTypeEnum = "bigdecimal" + SchemaAttributesIdcsICFAttributeTypeBiginteger SchemaAttributesIdcsICFAttributeTypeEnum = "biginteger" + SchemaAttributesIdcsICFAttributeTypeGuardedbytes SchemaAttributesIdcsICFAttributeTypeEnum = "guardedbytes" + SchemaAttributesIdcsICFAttributeTypeGuardedstring SchemaAttributesIdcsICFAttributeTypeEnum = "guardedstring" +) + +var mappingSchemaAttributesIdcsICFAttributeTypeEnum = map[string]SchemaAttributesIdcsICFAttributeTypeEnum{ + "string": SchemaAttributesIdcsICFAttributeTypeString, + "long": SchemaAttributesIdcsICFAttributeTypeLong, + "char": SchemaAttributesIdcsICFAttributeTypeChar, + "double": SchemaAttributesIdcsICFAttributeTypeDouble, + "float": SchemaAttributesIdcsICFAttributeTypeFloat, + "integer": SchemaAttributesIdcsICFAttributeTypeInteger, + "boolean": SchemaAttributesIdcsICFAttributeTypeBoolean, + "bytes": SchemaAttributesIdcsICFAttributeTypeBytes, + "bigdecimal": SchemaAttributesIdcsICFAttributeTypeBigdecimal, + "biginteger": SchemaAttributesIdcsICFAttributeTypeBiginteger, + "guardedbytes": SchemaAttributesIdcsICFAttributeTypeGuardedbytes, + "guardedstring": SchemaAttributesIdcsICFAttributeTypeGuardedstring, +} + +var mappingSchemaAttributesIdcsICFAttributeTypeEnumLowerCase = map[string]SchemaAttributesIdcsICFAttributeTypeEnum{ + "string": SchemaAttributesIdcsICFAttributeTypeString, + "long": SchemaAttributesIdcsICFAttributeTypeLong, + "char": SchemaAttributesIdcsICFAttributeTypeChar, + "double": SchemaAttributesIdcsICFAttributeTypeDouble, + "float": SchemaAttributesIdcsICFAttributeTypeFloat, + "integer": SchemaAttributesIdcsICFAttributeTypeInteger, + "boolean": SchemaAttributesIdcsICFAttributeTypeBoolean, + "bytes": SchemaAttributesIdcsICFAttributeTypeBytes, + "bigdecimal": SchemaAttributesIdcsICFAttributeTypeBigdecimal, + "biginteger": SchemaAttributesIdcsICFAttributeTypeBiginteger, + "guardedbytes": SchemaAttributesIdcsICFAttributeTypeGuardedbytes, + "guardedstring": SchemaAttributesIdcsICFAttributeTypeGuardedstring, +} + +// GetSchemaAttributesIdcsICFAttributeTypeEnumValues Enumerates the set of values for SchemaAttributesIdcsICFAttributeTypeEnum +func GetSchemaAttributesIdcsICFAttributeTypeEnumValues() []SchemaAttributesIdcsICFAttributeTypeEnum { + values := make([]SchemaAttributesIdcsICFAttributeTypeEnum, 0) + for _, v := range mappingSchemaAttributesIdcsICFAttributeTypeEnum { + values = append(values, v) + } + return values +} + +// GetSchemaAttributesIdcsICFAttributeTypeEnumStringValues Enumerates the set of values in String for SchemaAttributesIdcsICFAttributeTypeEnum +func GetSchemaAttributesIdcsICFAttributeTypeEnumStringValues() []string { + return []string{ + "string", + "long", + "char", + "double", + "float", + "integer", + "boolean", + "bytes", + "bigdecimal", + "biginteger", + "guardedbytes", + "guardedstring", + } +} + +// GetMappingSchemaAttributesIdcsICFAttributeTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSchemaAttributesIdcsICFAttributeTypeEnum(val string) (SchemaAttributesIdcsICFAttributeTypeEnum, bool) { + enum, ok := mappingSchemaAttributesIdcsICFAttributeTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SchemaAttributesIdcsSensitiveEnum Enum with underlying type: string +type SchemaAttributesIdcsSensitiveEnum string + +// Set of constants representing the allowable values for SchemaAttributesIdcsSensitiveEnum +const ( + SchemaAttributesIdcsSensitiveEncrypt SchemaAttributesIdcsSensitiveEnum = "encrypt" + SchemaAttributesIdcsSensitiveHash SchemaAttributesIdcsSensitiveEnum = "hash" + SchemaAttributesIdcsSensitiveHashSc SchemaAttributesIdcsSensitiveEnum = "hash_sc" + SchemaAttributesIdcsSensitiveChecksum SchemaAttributesIdcsSensitiveEnum = "checksum" + SchemaAttributesIdcsSensitiveNone SchemaAttributesIdcsSensitiveEnum = "none" +) + +var mappingSchemaAttributesIdcsSensitiveEnum = map[string]SchemaAttributesIdcsSensitiveEnum{ + "encrypt": SchemaAttributesIdcsSensitiveEncrypt, + "hash": SchemaAttributesIdcsSensitiveHash, + "hash_sc": SchemaAttributesIdcsSensitiveHashSc, + "checksum": SchemaAttributesIdcsSensitiveChecksum, + "none": SchemaAttributesIdcsSensitiveNone, +} + +var mappingSchemaAttributesIdcsSensitiveEnumLowerCase = map[string]SchemaAttributesIdcsSensitiveEnum{ + "encrypt": SchemaAttributesIdcsSensitiveEncrypt, + "hash": SchemaAttributesIdcsSensitiveHash, + "hash_sc": SchemaAttributesIdcsSensitiveHashSc, + "checksum": SchemaAttributesIdcsSensitiveChecksum, + "none": SchemaAttributesIdcsSensitiveNone, +} + +// GetSchemaAttributesIdcsSensitiveEnumValues Enumerates the set of values for SchemaAttributesIdcsSensitiveEnum +func GetSchemaAttributesIdcsSensitiveEnumValues() []SchemaAttributesIdcsSensitiveEnum { + values := make([]SchemaAttributesIdcsSensitiveEnum, 0) + for _, v := range mappingSchemaAttributesIdcsSensitiveEnum { + values = append(values, v) + } + return values +} + +// GetSchemaAttributesIdcsSensitiveEnumStringValues Enumerates the set of values in String for SchemaAttributesIdcsSensitiveEnum +func GetSchemaAttributesIdcsSensitiveEnumStringValues() []string { + return []string{ + "encrypt", + "hash", + "hash_sc", + "checksum", + "none", + } +} + +// GetMappingSchemaAttributesIdcsSensitiveEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSchemaAttributesIdcsSensitiveEnum(val string) (SchemaAttributesIdcsSensitiveEnum, bool) { + enum, ok := mappingSchemaAttributesIdcsSensitiveEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SchemaAttributesIdcsCanonicalValueTypeEnum Enum with underlying type: string +type SchemaAttributesIdcsCanonicalValueTypeEnum string + +// Set of constants representing the allowable values for SchemaAttributesIdcsCanonicalValueTypeEnum +const ( + SchemaAttributesIdcsCanonicalValueTypeDynamic SchemaAttributesIdcsCanonicalValueTypeEnum = "dynamic" + SchemaAttributesIdcsCanonicalValueTypeStatic SchemaAttributesIdcsCanonicalValueTypeEnum = "static" +) + +var mappingSchemaAttributesIdcsCanonicalValueTypeEnum = map[string]SchemaAttributesIdcsCanonicalValueTypeEnum{ + "dynamic": SchemaAttributesIdcsCanonicalValueTypeDynamic, + "static": SchemaAttributesIdcsCanonicalValueTypeStatic, +} + +var mappingSchemaAttributesIdcsCanonicalValueTypeEnumLowerCase = map[string]SchemaAttributesIdcsCanonicalValueTypeEnum{ + "dynamic": SchemaAttributesIdcsCanonicalValueTypeDynamic, + "static": SchemaAttributesIdcsCanonicalValueTypeStatic, +} + +// GetSchemaAttributesIdcsCanonicalValueTypeEnumValues Enumerates the set of values for SchemaAttributesIdcsCanonicalValueTypeEnum +func GetSchemaAttributesIdcsCanonicalValueTypeEnumValues() []SchemaAttributesIdcsCanonicalValueTypeEnum { + values := make([]SchemaAttributesIdcsCanonicalValueTypeEnum, 0) + for _, v := range mappingSchemaAttributesIdcsCanonicalValueTypeEnum { + values = append(values, v) + } + return values +} + +// GetSchemaAttributesIdcsCanonicalValueTypeEnumStringValues Enumerates the set of values in String for SchemaAttributesIdcsCanonicalValueTypeEnum +func GetSchemaAttributesIdcsCanonicalValueTypeEnumStringValues() []string { + return []string{ + "dynamic", + "static", + } +} + +// GetMappingSchemaAttributesIdcsCanonicalValueTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSchemaAttributesIdcsCanonicalValueTypeEnum(val string) (SchemaAttributesIdcsCanonicalValueTypeEnum, bool) { + enum, ok := mappingSchemaAttributesIdcsCanonicalValueTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SchemaAttributesIdcsuiWidgetEnum Enum with underlying type: string +type SchemaAttributesIdcsuiWidgetEnum string + +// Set of constants representing the allowable values for SchemaAttributesIdcsuiWidgetEnum +const ( + SchemaAttributesIdcsuiWidgetInputtext SchemaAttributesIdcsuiWidgetEnum = "inputtext" + SchemaAttributesIdcsuiWidgetCheckbox SchemaAttributesIdcsuiWidgetEnum = "checkbox" + SchemaAttributesIdcsuiWidgetTextarea SchemaAttributesIdcsuiWidgetEnum = "textarea" + SchemaAttributesIdcsuiWidgetCombobox SchemaAttributesIdcsuiWidgetEnum = "combobox" +) + +var mappingSchemaAttributesIdcsuiWidgetEnum = map[string]SchemaAttributesIdcsuiWidgetEnum{ + "inputtext": SchemaAttributesIdcsuiWidgetInputtext, + "checkbox": SchemaAttributesIdcsuiWidgetCheckbox, + "textarea": SchemaAttributesIdcsuiWidgetTextarea, + "combobox": SchemaAttributesIdcsuiWidgetCombobox, +} + +var mappingSchemaAttributesIdcsuiWidgetEnumLowerCase = map[string]SchemaAttributesIdcsuiWidgetEnum{ + "inputtext": SchemaAttributesIdcsuiWidgetInputtext, + "checkbox": SchemaAttributesIdcsuiWidgetCheckbox, + "textarea": SchemaAttributesIdcsuiWidgetTextarea, + "combobox": SchemaAttributesIdcsuiWidgetCombobox, +} + +// GetSchemaAttributesIdcsuiWidgetEnumValues Enumerates the set of values for SchemaAttributesIdcsuiWidgetEnum +func GetSchemaAttributesIdcsuiWidgetEnumValues() []SchemaAttributesIdcsuiWidgetEnum { + values := make([]SchemaAttributesIdcsuiWidgetEnum, 0) + for _, v := range mappingSchemaAttributesIdcsuiWidgetEnum { + values = append(values, v) + } + return values +} + +// GetSchemaAttributesIdcsuiWidgetEnumStringValues Enumerates the set of values in String for SchemaAttributesIdcsuiWidgetEnum +func GetSchemaAttributesIdcsuiWidgetEnumStringValues() []string { + return []string{ + "inputtext", + "checkbox", + "textarea", + "combobox", + } +} + +// GetMappingSchemaAttributesIdcsuiWidgetEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSchemaAttributesIdcsuiWidgetEnum(val string) (SchemaAttributesIdcsuiWidgetEnum, bool) { + enum, ok := mappingSchemaAttributesIdcsuiWidgetEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SchemaAttributesIdcsFeaturesEnum Enum with underlying type: string +type SchemaAttributesIdcsFeaturesEnum string + +// Set of constants representing the allowable values for SchemaAttributesIdcsFeaturesEnum +const ( + SchemaAttributesIdcsFeaturesOptionalpii SchemaAttributesIdcsFeaturesEnum = "optionalPii" + SchemaAttributesIdcsFeaturesMfa SchemaAttributesIdcsFeaturesEnum = "mfa" + SchemaAttributesIdcsFeaturesSocial SchemaAttributesIdcsFeaturesEnum = "social" + SchemaAttributesIdcsFeaturesSchemacustomization SchemaAttributesIdcsFeaturesEnum = "schemaCustomization" +) + +var mappingSchemaAttributesIdcsFeaturesEnum = map[string]SchemaAttributesIdcsFeaturesEnum{ + "optionalPii": SchemaAttributesIdcsFeaturesOptionalpii, + "mfa": SchemaAttributesIdcsFeaturesMfa, + "social": SchemaAttributesIdcsFeaturesSocial, + "schemaCustomization": SchemaAttributesIdcsFeaturesSchemacustomization, +} + +var mappingSchemaAttributesIdcsFeaturesEnumLowerCase = map[string]SchemaAttributesIdcsFeaturesEnum{ + "optionalpii": SchemaAttributesIdcsFeaturesOptionalpii, + "mfa": SchemaAttributesIdcsFeaturesMfa, + "social": SchemaAttributesIdcsFeaturesSocial, + "schemacustomization": SchemaAttributesIdcsFeaturesSchemacustomization, +} + +// GetSchemaAttributesIdcsFeaturesEnumValues Enumerates the set of values for SchemaAttributesIdcsFeaturesEnum +func GetSchemaAttributesIdcsFeaturesEnumValues() []SchemaAttributesIdcsFeaturesEnum { + values := make([]SchemaAttributesIdcsFeaturesEnum, 0) + for _, v := range mappingSchemaAttributesIdcsFeaturesEnum { + values = append(values, v) + } + return values +} + +// GetSchemaAttributesIdcsFeaturesEnumStringValues Enumerates the set of values in String for SchemaAttributesIdcsFeaturesEnum +func GetSchemaAttributesIdcsFeaturesEnumStringValues() []string { + return []string{ + "optionalPii", + "mfa", + "social", + "schemaCustomization", + } +} + +// GetMappingSchemaAttributesIdcsFeaturesEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSchemaAttributesIdcsFeaturesEnum(val string) (SchemaAttributesIdcsFeaturesEnum, bool) { + enum, ok := mappingSchemaAttributesIdcsFeaturesEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/schema_idcs_complex_attribute_name_mappings.go b/identitydomains/schema_idcs_complex_attribute_name_mappings.go new file mode 100644 index 0000000000..dba94ffb26 --- /dev/null +++ b/identitydomains/schema_idcs_complex_attribute_name_mappings.go @@ -0,0 +1,70 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchemaIdcsComplexAttributeNameMappings Specifies the mapping between external identity source attributes and Oracle Identity Cloud Service complex attributes (e.g. email => emails[work].value) +type SchemaIdcsComplexAttributeNameMappings struct { + + // The attribute that represents the display name + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Name *string `mandatory:"true" json:"name"` + + // The attribute that is mapped to the attribute mapping + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + MapsTo *string `mandatory:"true" json:"mapsTo"` + + // Specifies if the attributes that is mapped should be hidden externally + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IdcsRtsaHideAttribute *bool `mandatory:"false" json:"idcsRtsaHideAttribute"` +} + +func (m SchemaIdcsComplexAttributeNameMappings) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SchemaIdcsComplexAttributeNameMappings) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/schema_idcs_csv_attribute_name_mappings.go b/identitydomains/schema_idcs_csv_attribute_name_mappings.go new file mode 100644 index 0000000000..dfeda6e9c2 --- /dev/null +++ b/identitydomains/schema_idcs_csv_attribute_name_mappings.go @@ -0,0 +1,125 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchemaIdcsCsvAttributeNameMappings Csv meta data for those resource type attributes which can be imported / exported from / to csv. +type SchemaIdcsCsvAttributeNameMappings struct { + + // The CSV column header name that maps to this attribute. + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ColumnHeaderName *string `mandatory:"false" json:"columnHeaderName"` + + // The deprecated CSV column header name that maps to this attribute. + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DeprecatedColumnHeaderName *string `mandatory:"false" json:"deprecatedColumnHeaderName"` + + // The attribute path that the CSV column header name maps to for complex multi-valued attributes. + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + MapsTo *string `mandatory:"false" json:"mapsTo"` + + // The default value to be used during import processing in case the CSV column header is not present or value is not given in the import CSV. + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DefaultValue *string `mandatory:"false" json:"defaultValue"` + + // If values of the CSV column header name can contain multiple values, this attribute specifies the delimiter to be used. For example, Group's \"User Members\" CSV column header is multi-valued and it's delimiter is a semi-colon (\";\"). + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + MultiValueDelimiter *string `mandatory:"false" json:"multiValueDelimiter"` + + // This specifies the Csv Header for resolving Resource Type for this Column Header + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CsvColumnForResolvingResourceType *string `mandatory:"false" json:"csvColumnForResolvingResourceType"` + + // This attribute gives a maps for resolving Resource Type after reading it's value from \"csvColumnForResolvingResourceType\" attribute + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + // - uniqueness: none + ResolveValueUsingResourceType []SchemaResolveValueUsingResourceType `mandatory:"false" json:"resolveValueUsingResourceType"` + + // This attribute specifies the mapping of \"uniqueAttributeNameForDisplay\" attributes(s) of the referenced resource with the columnHeaderName(s). This attribute should be given in the idcsCsvAttributeNameMappings when uniqueAttributeNameForDisplay contains more than one attribute. + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + // - uniqueness: none + ReferencedResourceTypeUniqueAttributeNameMappings []SchemaReferencedResourceTypeUniqueAttributeNameMappings `mandatory:"false" json:"referencedResourceTypeUniqueAttributeNameMappings"` +} + +func (m SchemaIdcsCsvAttributeNameMappings) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SchemaIdcsCsvAttributeNameMappings) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/schema_localized_canonical_values.go b/identitydomains/schema_localized_canonical_values.go new file mode 100644 index 0000000000..7c3938cd81 --- /dev/null +++ b/identitydomains/schema_localized_canonical_values.go @@ -0,0 +1,70 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchemaLocalizedCanonicalValues A collection of Localized canonical values. +type SchemaLocalizedCanonicalValues struct { + + // Localized display value + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"false" json:"value"` + + // Canonical values + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CanonicalValue []string `mandatory:"false" json:"canonicalValue"` + + // Locale used + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Locale *string `mandatory:"false" json:"locale"` +} + +func (m SchemaLocalizedCanonicalValues) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SchemaLocalizedCanonicalValues) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/schema_localized_display_name.go b/identitydomains/schema_localized_display_name.go new file mode 100644 index 0000000000..823f86abf6 --- /dev/null +++ b/identitydomains/schema_localized_display_name.go @@ -0,0 +1,66 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchemaLocalizedDisplayName Attribute's localized display name +// **SCIM++ Properties:** +// - multiValued: false +// - mutability: readWrite +// - required: false +// - returned: default +// - type: complex +// - uniqueness: none +type SchemaLocalizedDisplayName struct { + + // Localized display value + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"false" json:"value"` + + // Locale used + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Locale *string `mandatory:"false" json:"locale"` +} + +func (m SchemaLocalizedDisplayName) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SchemaLocalizedDisplayName) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/schema_referenced_resource_type_unique_attribute_name_mappings.go b/identitydomains/schema_referenced_resource_type_unique_attribute_name_mappings.go new file mode 100644 index 0000000000..3dfdf1a27e --- /dev/null +++ b/identitydomains/schema_referenced_resource_type_unique_attribute_name_mappings.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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchemaReferencedResourceTypeUniqueAttributeNameMappings This attribute specifies the mapping of "uniqueAttributeNameForDisplay" attributes(s) of the referenced resource with the columnHeaderName(s). This attribute should be given in the idcsCsvAttributeNameMappings when uniqueAttributeNameForDisplay contains more than one attribute. +type SchemaReferencedResourceTypeUniqueAttributeNameMappings struct { + + // Specifies the name of the attribute given in \"uniqueAttributeNameForDisplay\" in the Resource type definition. + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ResourceTypeAttributeName *string `mandatory:"false" json:"resourceTypeAttributeName"` + + // Specifies the CSV column header name that maps to the corresponding \"uniqueAttributeNameForDisplay\" attribute of the resource. + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + MapsFromColumnName *string `mandatory:"false" json:"mapsFromColumnName"` +} + +func (m SchemaReferencedResourceTypeUniqueAttributeNameMappings) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SchemaReferencedResourceTypeUniqueAttributeNameMappings) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/schema_resolve_value_using_resource_type.go b/identitydomains/schema_resolve_value_using_resource_type.go new file mode 100644 index 0000000000..7427535a1d --- /dev/null +++ b/identitydomains/schema_resolve_value_using_resource_type.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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchemaResolveValueUsingResourceType This attribute gives a maps for resolving Resource Type after reading it's value from "csvColumnForResolvingResourceType" attribute +type SchemaResolveValueUsingResourceType struct { + + // Specifies the value which should be resolved by a Resource type. + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ValueToBeResolved *string `mandatory:"false" json:"valueToBeResolved"` + + // Specifies the Resource type with which the value given in \"valueToBeResolved\" attribute should be resolved + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ResolveBy *string `mandatory:"false" json:"resolveBy"` +} + +func (m SchemaResolveValueUsingResourceType) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SchemaResolveValueUsingResourceType) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/schema_search_request.go b/identitydomains/schema_search_request.go new file mode 100644 index 0000000000..8e3ffd0860 --- /dev/null +++ b/identitydomains/schema_search_request.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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchemaSearchRequest Clients MAY execute queries without passing parameters on the URL by using the HTTP POST verb combined with the **.search** path extension. The inclusion of **.search** on the end of a valid SCIM endpoint SHALL be used to indicate the HTTP POST verb is intended to be a query operation. To create a new query result set, a SCIM client sends an HTTP POST request to the desired SCIM resource endpoint (ending in **.search**). The body of the POST request MAY include any of the parameters. +type SchemaSearchRequest struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See (additional retrieval query parameters (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + Attributes []string `mandatory:"false" json:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + AttributeSets []AttributeSetsEnum `mandatory:"false" json:"attributeSets,omitempty"` + + // A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See Sorting section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + SortBy *string `mandatory:"false" json:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder SortOrderEnum `mandatory:"false" json:"sortOrder,omitempty"` + + // An integer that indicates the 1-based index of the first query result. See Pagination Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + StartIndex *int `mandatory:"false" json:"startIndex"` + + // An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + Count *int `mandatory:"false" json:"count"` +} + +func (m SchemaSearchRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SchemaSearchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingSortOrderEnum(string(m.SortOrder)); !ok && m.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", m.SortOrder, strings.Join(GetSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/schema_sub_attributes.go b/identitydomains/schema_sub_attributes.go new file mode 100644 index 0000000000..003dcb3ed5 --- /dev/null +++ b/identitydomains/schema_sub_attributes.go @@ -0,0 +1,1016 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchemaSubAttributes A list specifying the contained attributes +type SchemaSubAttributes struct { + + // Attribute's name + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Name *string `mandatory:"false" json:"name"` + + // If true, indicates that the attribute value must be written to the home region and requires immediate read-after-write consistency for access flows initiated from a replica region. + // **Added In:** 2209220956 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: never + // - type: boolean + IdcsRequiresImmediateReadAfterWriteForAccessFlows *bool `mandatory:"false" json:"idcsRequiresImmediateReadAfterWriteForAccessFlows"` + + // If true, indicates that the attribute value must be written to the home region for access flows initiated from a replica region. + // **Added In:** 2205120021 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IdcsRequiresWriteForAccessFlows *bool `mandatory:"false" json:"idcsRequiresWriteForAccessFlows"` + + // Localized schema attribute display name for use by UI client for displaying attribute labels + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsDisplayNameMessageId *string `mandatory:"false" json:"idcsDisplayNameMessageId"` + + // Specifies if the attributes in this schema can be displayed externally + // **Added In:** 19.1.4 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IdcsRtsaHideAttribute *bool `mandatory:"false" json:"idcsRtsaHideAttribute"` + + // Specifies whether the schema attribute is for internal use only. Internal attributes are not exposed via REST. This attribute overrides mutability for create/update if the request is internal and the attribute internal flag is set to True. This attribute overrides the return attribute while building SCIM response attributes when both the request is internal and the schema attribute is internal. + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsInternal *bool `mandatory:"false" json:"idcsInternal"` + + // Attribute's data type--for example, String + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Type SchemaSubAttributesTypeEnum `mandatory:"false" json:"type,omitempty"` + + // Indicates the attribute's plurality + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + MultiValued *bool `mandatory:"false" json:"multiValued"` + + // Attribute's human-readable description + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Description *string `mandatory:"false" json:"description"` + + // Specifies if the attribute is required + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + Required *bool `mandatory:"false" json:"required"` + + // Specifies if the attribute is required + // **Added In:** 2305190132 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsReturnEmptyWhenNull *bool `mandatory:"false" json:"idcsReturnEmptyWhenNull"` + + // A collection of canonical values. Applicable Service Providers MUST specify the canonical types specified in the core schema specification--for example, \"work\", \"home\". + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CanonicalValues []string `mandatory:"false" json:"canonicalValues"` + + // Specifies the default value for an attribute. The value must be one from canonicalValues if defined. + // **Added In:** 18.1.6 + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsDefaultValue *string `mandatory:"false" json:"idcsDefaultValue"` + + // Specifies if the String attribute is case-sensitive + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + CaseExact *bool `mandatory:"false" json:"caseExact"` + + // Specifies if the attribute is mutable + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Mutability SchemaSubAttributesMutabilityEnum `mandatory:"false" json:"mutability,omitempty"` + + // A single keyword that indicates when an attribute and associated values are returned in response to a GET request or in response to a PUT, POST, or PATCH request + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Returned SchemaSubAttributesReturnedEnum `mandatory:"false" json:"returned,omitempty"` + + // The attribute that defines the CSV header name for import/export + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsCsvAttributeName *string `mandatory:"false" json:"idcsCsvAttributeName"` + + // A single keyword value that specifies how the Service Provider enforces uniqueness of attribute values. A server MAY reject an invalid value based on uniqueness by returning an HTTP response code of 400 (Bad Request). A client MAY enforce uniqueness on the client side to a greater degree than the Service Provider enforces. For example, a client could make a value unique while the server has a uniqueness of \"none\". + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Uniqueness SchemaSubAttributesUniquenessEnum `mandatory:"false" json:"uniqueness,omitempty"` + + // The names of the Resource types that may be referenced--for example, User. This is only applicable for attributes that are of the \"reference\" data type. + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ReferenceTypes []string `mandatory:"false" json:"referenceTypes"` + + // Indicates that the schema has been deprecated since version + // **Deprecated Since: 19.3.3** + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: integer + IdcsDeprecatedSinceVersion *int `mandatory:"false" json:"idcsDeprecatedSinceVersion"` + + // Indicates that the schema has been added since version + // **Deprecated Since: 19.3.3** + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: integer + IdcsAddedSinceVersion *int `mandatory:"false" json:"idcsAddedSinceVersion"` + + // Indicates that the schema has been deprecated since this release number + // **Added In:** 17.3.4 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + IdcsDeprecatedSinceReleaseNumber *string `mandatory:"false" json:"idcsDeprecatedSinceReleaseNumber"` + + // Indicates that the schema has been added since this release number + // **Added In:** 17.3.4 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + IdcsAddedSinceReleaseNumber *string `mandatory:"false" json:"idcsAddedSinceReleaseNumber"` + + // Specifies the minimum length of this attribute + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: integer + IdcsMinLength *int `mandatory:"false" json:"idcsMinLength"` + + // Specifies the maximum length of this attribute + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: integer + IdcsMaxLength *int `mandatory:"false" json:"idcsMaxLength"` + + // Specifies the minimum value of the integer attribute + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: integer + IdcsMinValue *int `mandatory:"false" json:"idcsMinValue"` + + // Specifies the maximum value of the integer attribute + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: integer + IdcsMaxValue *int `mandatory:"false" json:"idcsMaxValue"` + + // If true, specifies that the sub attribute value can be set to true on one and only one instance of the CMVA. + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IdcsOnlyOneValueCanBeTrue *bool `mandatory:"false" json:"idcsOnlyOneValueCanBeTrue"` + + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: integer + // - uniqueness: none + // Specify a limit on the number of attribute-values that any caller will receive when requesting a CMVA attribute. If the no of CMVA instances exceeds the limit then Oracle Identity Cloud Service will throw exception. Users can choose to refine the filter on CMVA attribute. + IdcsMaxValuesReturned *int `mandatory:"false" json:"idcsMaxValuesReturned"` + + // If true, ARM will ensure atleast one of the instances of CMVA has the attribute value set to true. + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IdcsOneValueMustBeTrue *bool `mandatory:"false" json:"idcsOneValueMustBeTrue"` + + // Specifies the directly referenced Resources + // **SCIM++ Properties:** + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + IdcsRefResourceAttributes []string `mandatory:"false" json:"idcsRefResourceAttributes"` + + // Specifies the indirectly referenced Resources + // **SCIM++ Properties:** + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + IdcsIndirectRefResourceAttributes []string `mandatory:"false" json:"idcsIndirectRefResourceAttributes"` + + // Specifies whether the sub-attribute of the Resource attribute is persisted + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsValuePersisted *bool `mandatory:"false" json:"idcsValuePersisted"` + + // Specifiees if the attribute should be encrypted or hashed + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsSensitive SchemaSubAttributesIdcsSensitiveEnum `mandatory:"false" json:"idcsSensitive,omitempty"` + + // Trims any leading and trailing blanks from String values. Default is True. + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + IdcsTrimStringValue *bool `mandatory:"false" json:"idcsTrimStringValue"` + + // Specifies whether this attribute can be included in a search filter + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsSearchable *bool `mandatory:"false" json:"idcsSearchable"` + + // Specifies whether this attribute value was generated + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsGenerated *bool `mandatory:"false" json:"idcsGenerated"` + + // Specifies whether changes to this attribute value will be audited + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsAuditable *bool `mandatory:"false" json:"idcsAuditable"` + + // Target attribute name that this attribute gets mapped to for persistence + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsTargetAttributeName *string `mandatory:"false" json:"idcsTargetAttributeName"` + + // Target normalized attribute name that this normalized value of attribute gets mapped to for persistence. Only set for caseExact=false & searchable attributes. Do not use by default. + // **Added In:** 19.1.4 + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsTargetNormAttributeName *string `mandatory:"false" json:"idcsTargetNormAttributeName"` + + // Old Target attribute name from child table for CSVA attribute prior to migration. This maintains this attribute used to get mapped to for persistence + // **Added In:** 19.2.1 + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsTargetAttributeNameToMigrateFrom *string `mandatory:"false" json:"idcsTargetAttributeNameToMigrateFrom"` + + // Target index name created for this attribute for performance + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsTargetUniqueConstraintName *string `mandatory:"false" json:"idcsTargetUniqueConstraintName"` + + // Specifies the mapper to use when mapping this attribute value to DataProvider-specific semantics + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsToTargetMapper *string `mandatory:"false" json:"idcsToTargetMapper"` + + // Specifies the mapper to use when mapping this attribute value from DataProvider-specific semantics + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsFromTargetMapper *string `mandatory:"false" json:"idcsFromTargetMapper"` + + // Specifies the user-friendly displayable attribute name or catalog key used for localization + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsDisplayName *string `mandatory:"false" json:"idcsDisplayName"` + + // Specifies the Resource type to read from for dynamic canonical values + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsCanonicalValueSourceResourceType *string `mandatory:"false" json:"idcsCanonicalValueSourceResourceType"` + + // Filter to use when getting canonical values for this schema attribute + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsCanonicalValueSourceFilter *string `mandatory:"false" json:"idcsCanonicalValueSourceFilter"` + + // Specifies the Resource type ID to read from for dynamic canonical values + // **Added In:** 17.4.4 + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsCanonicalValueSourceResourceTypeID *string `mandatory:"false" json:"idcsCanonicalValueSourceResourceTypeID"` + + // Display name for the canonical value attribute name. + // **Added In:** 17.4.4 + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsCanonicalValueSourceDisplayAttrName *string `mandatory:"false" json:"idcsCanonicalValueSourceDisplayAttrName"` + + // Source key attribute for the canonical value. + // **Added In:** 17.4.4 + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + IdcsCanonicalValueSourceKeyAttrName *string `mandatory:"false" json:"idcsCanonicalValueSourceKeyAttrName"` + + // Validate payload reference value during create, replace, and update. Default is True. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IdcsValidateReference *bool `mandatory:"false" json:"idcsValidateReference"` + + // Indicates if the attribute is scim compliant, default is true + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + IdcsScimCompliant *bool `mandatory:"false" json:"idcsScimCompliant"` + + // Specifies if the attribute can be used for mapping with external identity sources such as AD or LDAP. If isSchemaMappable: false for the schema in which this attribute is defined, then this flag is ignored. + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + IdcsAttributeMappable *bool `mandatory:"false" json:"idcsAttributeMappable"` + + // Specifies whether the attribute is cacheable. True by default for all attributes. If attribute with idcsAttributeCachable = false, is present \"attributesToGet\" while executing GET/SEARCH on cacheable resource, Cache is missed and data is fetched from Data Provider. + // **Added In:** 17.3.4 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsAttributeCacheable *bool `mandatory:"false" json:"idcsAttributeCacheable"` + + // Metadata used by Oracle Identity Cloud Service UI to sequence the attributes displayed on the Account Form. + // **Added In:** 17.4.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: integer + IdcsuiOrder *int `mandatory:"false" json:"idcsuiOrder"` + + // Metadata used by Oracle Identity Cloud Service UI to validate the attribute values using regular expressions. + // **Added In:** 17.4.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + IdcsuiRegexp *string `mandatory:"false" json:"idcsuiRegexp"` + + // Metadata used by Oracle Identity Cloud Service UI to decide whether the attribute must be displayed on the Account Form. + // **Added In:** 17.4.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsuiVisible *bool `mandatory:"false" json:"idcsuiVisible"` + + // Metadata used by Oracle Identity Cloud Service UI to render a widget for this attribute on the Account Form. + // **Added In:** 17.4.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + IdcsuiWidget SchemaSubAttributesIdcsuiWidgetEnum `mandatory:"false" json:"idcsuiWidget,omitempty"` + + // If true, ARM should not validate the value of the attribute since it will be converted/migrated to another attribute internally by the manager which will build valid post, put, or patch payload, depending on the client requested operation + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + IdcsValuePersistedInOtherAttribute *bool `mandatory:"false" json:"idcsValuePersistedInOtherAttribute"` + + // Specifies whether the attribute is PII (personal information). False by default for all attributes. If attribute with idcsPii = true, it's value must be obfuscated before it's written to the Oracle Identity Cloud Service system logs. + // **Added In:** 18.3.6 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + IdcsPii *bool `mandatory:"false" json:"idcsPii"` + + // Specifies if the value of the attribute should be sanitized using OWASP library for HTML content + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IdcsSanitize *bool `mandatory:"false" json:"idcsSanitize"` + + // Specifies whether the attribute should be excluded from the BulkApi patch generated by gradle task for upgrading OOTB resources. + // **Added In:** 2104150946 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: never + // - type: boolean + IdcsExcludeFromUpgradePatch *bool `mandatory:"false" json:"idcsExcludeFromUpgradePatch"` +} + +func (m SchemaSubAttributes) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SchemaSubAttributes) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingSchemaSubAttributesTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetSchemaSubAttributesTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingSchemaSubAttributesMutabilityEnum(string(m.Mutability)); !ok && m.Mutability != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Mutability: %s. Supported values are: %s.", m.Mutability, strings.Join(GetSchemaSubAttributesMutabilityEnumStringValues(), ","))) + } + if _, ok := GetMappingSchemaSubAttributesReturnedEnum(string(m.Returned)); !ok && m.Returned != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Returned: %s. Supported values are: %s.", m.Returned, strings.Join(GetSchemaSubAttributesReturnedEnumStringValues(), ","))) + } + if _, ok := GetMappingSchemaSubAttributesUniquenessEnum(string(m.Uniqueness)); !ok && m.Uniqueness != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Uniqueness: %s. Supported values are: %s.", m.Uniqueness, strings.Join(GetSchemaSubAttributesUniquenessEnumStringValues(), ","))) + } + if _, ok := GetMappingSchemaSubAttributesIdcsSensitiveEnum(string(m.IdcsSensitive)); !ok && m.IdcsSensitive != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsSensitive: %s. Supported values are: %s.", m.IdcsSensitive, strings.Join(GetSchemaSubAttributesIdcsSensitiveEnumStringValues(), ","))) + } + if _, ok := GetMappingSchemaSubAttributesIdcsuiWidgetEnum(string(m.IdcsuiWidget)); !ok && m.IdcsuiWidget != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsuiWidget: %s. Supported values are: %s.", m.IdcsuiWidget, strings.Join(GetSchemaSubAttributesIdcsuiWidgetEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SchemaSubAttributesTypeEnum Enum with underlying type: string +type SchemaSubAttributesTypeEnum string + +// Set of constants representing the allowable values for SchemaSubAttributesTypeEnum +const ( + SchemaSubAttributesTypeString SchemaSubAttributesTypeEnum = "string" + SchemaSubAttributesTypeComplex SchemaSubAttributesTypeEnum = "complex" + SchemaSubAttributesTypeBoolean SchemaSubAttributesTypeEnum = "boolean" + SchemaSubAttributesTypeDecimal SchemaSubAttributesTypeEnum = "decimal" + SchemaSubAttributesTypeInteger SchemaSubAttributesTypeEnum = "integer" + SchemaSubAttributesTypeDatetime SchemaSubAttributesTypeEnum = "dateTime" + SchemaSubAttributesTypeReference SchemaSubAttributesTypeEnum = "reference" + SchemaSubAttributesTypeBinary SchemaSubAttributesTypeEnum = "binary" +) + +var mappingSchemaSubAttributesTypeEnum = map[string]SchemaSubAttributesTypeEnum{ + "string": SchemaSubAttributesTypeString, + "complex": SchemaSubAttributesTypeComplex, + "boolean": SchemaSubAttributesTypeBoolean, + "decimal": SchemaSubAttributesTypeDecimal, + "integer": SchemaSubAttributesTypeInteger, + "dateTime": SchemaSubAttributesTypeDatetime, + "reference": SchemaSubAttributesTypeReference, + "binary": SchemaSubAttributesTypeBinary, +} + +var mappingSchemaSubAttributesTypeEnumLowerCase = map[string]SchemaSubAttributesTypeEnum{ + "string": SchemaSubAttributesTypeString, + "complex": SchemaSubAttributesTypeComplex, + "boolean": SchemaSubAttributesTypeBoolean, + "decimal": SchemaSubAttributesTypeDecimal, + "integer": SchemaSubAttributesTypeInteger, + "datetime": SchemaSubAttributesTypeDatetime, + "reference": SchemaSubAttributesTypeReference, + "binary": SchemaSubAttributesTypeBinary, +} + +// GetSchemaSubAttributesTypeEnumValues Enumerates the set of values for SchemaSubAttributesTypeEnum +func GetSchemaSubAttributesTypeEnumValues() []SchemaSubAttributesTypeEnum { + values := make([]SchemaSubAttributesTypeEnum, 0) + for _, v := range mappingSchemaSubAttributesTypeEnum { + values = append(values, v) + } + return values +} + +// GetSchemaSubAttributesTypeEnumStringValues Enumerates the set of values in String for SchemaSubAttributesTypeEnum +func GetSchemaSubAttributesTypeEnumStringValues() []string { + return []string{ + "string", + "complex", + "boolean", + "decimal", + "integer", + "dateTime", + "reference", + "binary", + } +} + +// GetMappingSchemaSubAttributesTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSchemaSubAttributesTypeEnum(val string) (SchemaSubAttributesTypeEnum, bool) { + enum, ok := mappingSchemaSubAttributesTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SchemaSubAttributesMutabilityEnum Enum with underlying type: string +type SchemaSubAttributesMutabilityEnum string + +// Set of constants representing the allowable values for SchemaSubAttributesMutabilityEnum +const ( + SchemaSubAttributesMutabilityReadonly SchemaSubAttributesMutabilityEnum = "readOnly" + SchemaSubAttributesMutabilityReadwrite SchemaSubAttributesMutabilityEnum = "readWrite" + SchemaSubAttributesMutabilityImmutable SchemaSubAttributesMutabilityEnum = "immutable" + SchemaSubAttributesMutabilityWriteonly SchemaSubAttributesMutabilityEnum = "writeOnly" +) + +var mappingSchemaSubAttributesMutabilityEnum = map[string]SchemaSubAttributesMutabilityEnum{ + "readOnly": SchemaSubAttributesMutabilityReadonly, + "readWrite": SchemaSubAttributesMutabilityReadwrite, + "immutable": SchemaSubAttributesMutabilityImmutable, + "writeOnly": SchemaSubAttributesMutabilityWriteonly, +} + +var mappingSchemaSubAttributesMutabilityEnumLowerCase = map[string]SchemaSubAttributesMutabilityEnum{ + "readonly": SchemaSubAttributesMutabilityReadonly, + "readwrite": SchemaSubAttributesMutabilityReadwrite, + "immutable": SchemaSubAttributesMutabilityImmutable, + "writeonly": SchemaSubAttributesMutabilityWriteonly, +} + +// GetSchemaSubAttributesMutabilityEnumValues Enumerates the set of values for SchemaSubAttributesMutabilityEnum +func GetSchemaSubAttributesMutabilityEnumValues() []SchemaSubAttributesMutabilityEnum { + values := make([]SchemaSubAttributesMutabilityEnum, 0) + for _, v := range mappingSchemaSubAttributesMutabilityEnum { + values = append(values, v) + } + return values +} + +// GetSchemaSubAttributesMutabilityEnumStringValues Enumerates the set of values in String for SchemaSubAttributesMutabilityEnum +func GetSchemaSubAttributesMutabilityEnumStringValues() []string { + return []string{ + "readOnly", + "readWrite", + "immutable", + "writeOnly", + } +} + +// GetMappingSchemaSubAttributesMutabilityEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSchemaSubAttributesMutabilityEnum(val string) (SchemaSubAttributesMutabilityEnum, bool) { + enum, ok := mappingSchemaSubAttributesMutabilityEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SchemaSubAttributesReturnedEnum Enum with underlying type: string +type SchemaSubAttributesReturnedEnum string + +// Set of constants representing the allowable values for SchemaSubAttributesReturnedEnum +const ( + SchemaSubAttributesReturnedAlways SchemaSubAttributesReturnedEnum = "always" + SchemaSubAttributesReturnedNever SchemaSubAttributesReturnedEnum = "never" + SchemaSubAttributesReturnedDefault SchemaSubAttributesReturnedEnum = "default" + SchemaSubAttributesReturnedRequest SchemaSubAttributesReturnedEnum = "request" +) + +var mappingSchemaSubAttributesReturnedEnum = map[string]SchemaSubAttributesReturnedEnum{ + "always": SchemaSubAttributesReturnedAlways, + "never": SchemaSubAttributesReturnedNever, + "default": SchemaSubAttributesReturnedDefault, + "request": SchemaSubAttributesReturnedRequest, +} + +var mappingSchemaSubAttributesReturnedEnumLowerCase = map[string]SchemaSubAttributesReturnedEnum{ + "always": SchemaSubAttributesReturnedAlways, + "never": SchemaSubAttributesReturnedNever, + "default": SchemaSubAttributesReturnedDefault, + "request": SchemaSubAttributesReturnedRequest, +} + +// GetSchemaSubAttributesReturnedEnumValues Enumerates the set of values for SchemaSubAttributesReturnedEnum +func GetSchemaSubAttributesReturnedEnumValues() []SchemaSubAttributesReturnedEnum { + values := make([]SchemaSubAttributesReturnedEnum, 0) + for _, v := range mappingSchemaSubAttributesReturnedEnum { + values = append(values, v) + } + return values +} + +// GetSchemaSubAttributesReturnedEnumStringValues Enumerates the set of values in String for SchemaSubAttributesReturnedEnum +func GetSchemaSubAttributesReturnedEnumStringValues() []string { + return []string{ + "always", + "never", + "default", + "request", + } +} + +// GetMappingSchemaSubAttributesReturnedEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSchemaSubAttributesReturnedEnum(val string) (SchemaSubAttributesReturnedEnum, bool) { + enum, ok := mappingSchemaSubAttributesReturnedEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SchemaSubAttributesUniquenessEnum Enum with underlying type: string +type SchemaSubAttributesUniquenessEnum string + +// Set of constants representing the allowable values for SchemaSubAttributesUniquenessEnum +const ( + SchemaSubAttributesUniquenessNone SchemaSubAttributesUniquenessEnum = "none" + SchemaSubAttributesUniquenessServer SchemaSubAttributesUniquenessEnum = "server" + SchemaSubAttributesUniquenessGlobal SchemaSubAttributesUniquenessEnum = "global" +) + +var mappingSchemaSubAttributesUniquenessEnum = map[string]SchemaSubAttributesUniquenessEnum{ + "none": SchemaSubAttributesUniquenessNone, + "server": SchemaSubAttributesUniquenessServer, + "global": SchemaSubAttributesUniquenessGlobal, +} + +var mappingSchemaSubAttributesUniquenessEnumLowerCase = map[string]SchemaSubAttributesUniquenessEnum{ + "none": SchemaSubAttributesUniquenessNone, + "server": SchemaSubAttributesUniquenessServer, + "global": SchemaSubAttributesUniquenessGlobal, +} + +// GetSchemaSubAttributesUniquenessEnumValues Enumerates the set of values for SchemaSubAttributesUniquenessEnum +func GetSchemaSubAttributesUniquenessEnumValues() []SchemaSubAttributesUniquenessEnum { + values := make([]SchemaSubAttributesUniquenessEnum, 0) + for _, v := range mappingSchemaSubAttributesUniquenessEnum { + values = append(values, v) + } + return values +} + +// GetSchemaSubAttributesUniquenessEnumStringValues Enumerates the set of values in String for SchemaSubAttributesUniquenessEnum +func GetSchemaSubAttributesUniquenessEnumStringValues() []string { + return []string{ + "none", + "server", + "global", + } +} + +// GetMappingSchemaSubAttributesUniquenessEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSchemaSubAttributesUniquenessEnum(val string) (SchemaSubAttributesUniquenessEnum, bool) { + enum, ok := mappingSchemaSubAttributesUniquenessEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SchemaSubAttributesIdcsSensitiveEnum Enum with underlying type: string +type SchemaSubAttributesIdcsSensitiveEnum string + +// Set of constants representing the allowable values for SchemaSubAttributesIdcsSensitiveEnum +const ( + SchemaSubAttributesIdcsSensitiveEncrypt SchemaSubAttributesIdcsSensitiveEnum = "encrypt" + SchemaSubAttributesIdcsSensitiveHash SchemaSubAttributesIdcsSensitiveEnum = "hash" + SchemaSubAttributesIdcsSensitiveHashSc SchemaSubAttributesIdcsSensitiveEnum = "hash_sc" + SchemaSubAttributesIdcsSensitiveChecksum SchemaSubAttributesIdcsSensitiveEnum = "checksum" + SchemaSubAttributesIdcsSensitiveNone SchemaSubAttributesIdcsSensitiveEnum = "none" +) + +var mappingSchemaSubAttributesIdcsSensitiveEnum = map[string]SchemaSubAttributesIdcsSensitiveEnum{ + "encrypt": SchemaSubAttributesIdcsSensitiveEncrypt, + "hash": SchemaSubAttributesIdcsSensitiveHash, + "hash_sc": SchemaSubAttributesIdcsSensitiveHashSc, + "checksum": SchemaSubAttributesIdcsSensitiveChecksum, + "none": SchemaSubAttributesIdcsSensitiveNone, +} + +var mappingSchemaSubAttributesIdcsSensitiveEnumLowerCase = map[string]SchemaSubAttributesIdcsSensitiveEnum{ + "encrypt": SchemaSubAttributesIdcsSensitiveEncrypt, + "hash": SchemaSubAttributesIdcsSensitiveHash, + "hash_sc": SchemaSubAttributesIdcsSensitiveHashSc, + "checksum": SchemaSubAttributesIdcsSensitiveChecksum, + "none": SchemaSubAttributesIdcsSensitiveNone, +} + +// GetSchemaSubAttributesIdcsSensitiveEnumValues Enumerates the set of values for SchemaSubAttributesIdcsSensitiveEnum +func GetSchemaSubAttributesIdcsSensitiveEnumValues() []SchemaSubAttributesIdcsSensitiveEnum { + values := make([]SchemaSubAttributesIdcsSensitiveEnum, 0) + for _, v := range mappingSchemaSubAttributesIdcsSensitiveEnum { + values = append(values, v) + } + return values +} + +// GetSchemaSubAttributesIdcsSensitiveEnumStringValues Enumerates the set of values in String for SchemaSubAttributesIdcsSensitiveEnum +func GetSchemaSubAttributesIdcsSensitiveEnumStringValues() []string { + return []string{ + "encrypt", + "hash", + "hash_sc", + "checksum", + "none", + } +} + +// GetMappingSchemaSubAttributesIdcsSensitiveEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSchemaSubAttributesIdcsSensitiveEnum(val string) (SchemaSubAttributesIdcsSensitiveEnum, bool) { + enum, ok := mappingSchemaSubAttributesIdcsSensitiveEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SchemaSubAttributesIdcsuiWidgetEnum Enum with underlying type: string +type SchemaSubAttributesIdcsuiWidgetEnum string + +// Set of constants representing the allowable values for SchemaSubAttributesIdcsuiWidgetEnum +const ( + SchemaSubAttributesIdcsuiWidgetInputtext SchemaSubAttributesIdcsuiWidgetEnum = "inputtext" + SchemaSubAttributesIdcsuiWidgetCheckbox SchemaSubAttributesIdcsuiWidgetEnum = "checkbox" + SchemaSubAttributesIdcsuiWidgetTextarea SchemaSubAttributesIdcsuiWidgetEnum = "textarea" + SchemaSubAttributesIdcsuiWidgetCombobox SchemaSubAttributesIdcsuiWidgetEnum = "combobox" +) + +var mappingSchemaSubAttributesIdcsuiWidgetEnum = map[string]SchemaSubAttributesIdcsuiWidgetEnum{ + "inputtext": SchemaSubAttributesIdcsuiWidgetInputtext, + "checkbox": SchemaSubAttributesIdcsuiWidgetCheckbox, + "textarea": SchemaSubAttributesIdcsuiWidgetTextarea, + "combobox": SchemaSubAttributesIdcsuiWidgetCombobox, +} + +var mappingSchemaSubAttributesIdcsuiWidgetEnumLowerCase = map[string]SchemaSubAttributesIdcsuiWidgetEnum{ + "inputtext": SchemaSubAttributesIdcsuiWidgetInputtext, + "checkbox": SchemaSubAttributesIdcsuiWidgetCheckbox, + "textarea": SchemaSubAttributesIdcsuiWidgetTextarea, + "combobox": SchemaSubAttributesIdcsuiWidgetCombobox, +} + +// GetSchemaSubAttributesIdcsuiWidgetEnumValues Enumerates the set of values for SchemaSubAttributesIdcsuiWidgetEnum +func GetSchemaSubAttributesIdcsuiWidgetEnumValues() []SchemaSubAttributesIdcsuiWidgetEnum { + values := make([]SchemaSubAttributesIdcsuiWidgetEnum, 0) + for _, v := range mappingSchemaSubAttributesIdcsuiWidgetEnum { + values = append(values, v) + } + return values +} + +// GetSchemaSubAttributesIdcsuiWidgetEnumStringValues Enumerates the set of values in String for SchemaSubAttributesIdcsuiWidgetEnum +func GetSchemaSubAttributesIdcsuiWidgetEnumStringValues() []string { + return []string{ + "inputtext", + "checkbox", + "textarea", + "combobox", + } +} + +// GetMappingSchemaSubAttributesIdcsuiWidgetEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSchemaSubAttributesIdcsuiWidgetEnum(val string) (SchemaSubAttributesIdcsuiWidgetEnum, bool) { + enum, ok := mappingSchemaSubAttributesIdcsuiWidgetEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/schemas.go b/identitydomains/schemas.go new file mode 100644 index 0000000000..f9c055803a --- /dev/null +++ b/identitydomains/schemas.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Schemas The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type Schemas struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []Schema `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m Schemas) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Schemas) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/search_cloud_gate_mappings_request_response.go b/identitydomains/search_cloud_gate_mappings_request_response.go new file mode 100644 index 0000000000..14da45c4ee --- /dev/null +++ b/identitydomains/search_cloud_gate_mappings_request_response.go @@ -0,0 +1,108 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SearchCloudGateMappingsRequest wrapper for the SearchCloudGateMappings operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchCloudGateMappings.go.html to see an example of how to use SearchCloudGateMappingsRequest. +type SearchCloudGateMappingsRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // Parameters for searching CloudGateMappings + CloudGateMappingSearchRequest `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SearchCloudGateMappingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SearchCloudGateMappingsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SearchCloudGateMappingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SearchCloudGateMappingsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SearchCloudGateMappingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SearchCloudGateMappingsResponse wrapper for the SearchCloudGateMappings operation +type SearchCloudGateMappingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of CloudGateMappings instances + CloudGateMappings `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response SearchCloudGateMappingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SearchCloudGateMappingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/search_cloud_gate_servers_request_response.go b/identitydomains/search_cloud_gate_servers_request_response.go new file mode 100644 index 0000000000..fdcacc5111 --- /dev/null +++ b/identitydomains/search_cloud_gate_servers_request_response.go @@ -0,0 +1,108 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SearchCloudGateServersRequest wrapper for the SearchCloudGateServers operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchCloudGateServers.go.html to see an example of how to use SearchCloudGateServersRequest. +type SearchCloudGateServersRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // Parameters for searching CloudGateServers + CloudGateServerSearchRequest `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SearchCloudGateServersRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SearchCloudGateServersRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SearchCloudGateServersRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SearchCloudGateServersRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SearchCloudGateServersRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SearchCloudGateServersResponse wrapper for the SearchCloudGateServers operation +type SearchCloudGateServersResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of CloudGateServers instances + CloudGateServers `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response SearchCloudGateServersResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SearchCloudGateServersResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/search_cloud_gates_request_response.go b/identitydomains/search_cloud_gates_request_response.go new file mode 100644 index 0000000000..4d3ae4dbfe --- /dev/null +++ b/identitydomains/search_cloud_gates_request_response.go @@ -0,0 +1,108 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SearchCloudGatesRequest wrapper for the SearchCloudGates operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchCloudGates.go.html to see an example of how to use SearchCloudGatesRequest. +type SearchCloudGatesRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // Parameters for searching CloudGates + CloudGateSearchRequest `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SearchCloudGatesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SearchCloudGatesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SearchCloudGatesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SearchCloudGatesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SearchCloudGatesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SearchCloudGatesResponse wrapper for the SearchCloudGates operation +type SearchCloudGatesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of CloudGates instances + CloudGates `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response SearchCloudGatesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SearchCloudGatesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/search_conditions_request_response.go b/identitydomains/search_conditions_request_response.go new file mode 100644 index 0000000000..e101825b09 --- /dev/null +++ b/identitydomains/search_conditions_request_response.go @@ -0,0 +1,108 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SearchConditionsRequest wrapper for the SearchConditions operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchConditions.go.html to see an example of how to use SearchConditionsRequest. +type SearchConditionsRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // Parameters for searching Conditions + ConditionSearchRequest `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SearchConditionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SearchConditionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SearchConditionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SearchConditionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SearchConditionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SearchConditionsResponse wrapper for the SearchConditions operation +type SearchConditionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of Conditions instances + Conditions `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response SearchConditionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SearchConditionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/search_network_perimeters_request_response.go b/identitydomains/search_network_perimeters_request_response.go new file mode 100644 index 0000000000..582920df6a --- /dev/null +++ b/identitydomains/search_network_perimeters_request_response.go @@ -0,0 +1,108 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SearchNetworkPerimetersRequest wrapper for the SearchNetworkPerimeters operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchNetworkPerimeters.go.html to see an example of how to use SearchNetworkPerimetersRequest. +type SearchNetworkPerimetersRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // Parameters for searching NetworkPerimeters + NetworkPerimeterSearchRequest `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SearchNetworkPerimetersRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SearchNetworkPerimetersRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SearchNetworkPerimetersRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SearchNetworkPerimetersRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SearchNetworkPerimetersRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SearchNetworkPerimetersResponse wrapper for the SearchNetworkPerimeters operation +type SearchNetworkPerimetersResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of NetworkPerimeters instances + NetworkPerimeters `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response SearchNetworkPerimetersResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SearchNetworkPerimetersResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/search_notification_settings_request_response.go b/identitydomains/search_notification_settings_request_response.go new file mode 100644 index 0000000000..a712525738 --- /dev/null +++ b/identitydomains/search_notification_settings_request_response.go @@ -0,0 +1,108 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SearchNotificationSettingsRequest wrapper for the SearchNotificationSettings operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchNotificationSettings.go.html to see an example of how to use SearchNotificationSettingsRequest. +type SearchNotificationSettingsRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // Parameters for searching NotificationSettings + NotificationSettingsSearchRequest `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SearchNotificationSettingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SearchNotificationSettingsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SearchNotificationSettingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SearchNotificationSettingsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SearchNotificationSettingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SearchNotificationSettingsResponse wrapper for the SearchNotificationSettings operation +type SearchNotificationSettingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of NotificationSettings instances + NotificationSettings `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response SearchNotificationSettingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SearchNotificationSettingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/search_o_auth_client_certificates_request_response.go b/identitydomains/search_o_auth_client_certificates_request_response.go new file mode 100644 index 0000000000..ffbdc6ca38 --- /dev/null +++ b/identitydomains/search_o_auth_client_certificates_request_response.go @@ -0,0 +1,108 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SearchOAuthClientCertificatesRequest wrapper for the SearchOAuthClientCertificates operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchOAuthClientCertificates.go.html to see an example of how to use SearchOAuthClientCertificatesRequest. +type SearchOAuthClientCertificatesRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // Parameters for searching OAuthClientCertificates + OAuthClientCertificateSearchRequest `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SearchOAuthClientCertificatesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SearchOAuthClientCertificatesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SearchOAuthClientCertificatesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SearchOAuthClientCertificatesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SearchOAuthClientCertificatesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SearchOAuthClientCertificatesResponse wrapper for the SearchOAuthClientCertificates operation +type SearchOAuthClientCertificatesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of OAuthClientCertificates instances + OAuthClientCertificates `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response SearchOAuthClientCertificatesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SearchOAuthClientCertificatesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/search_o_auth_partner_certificates_request_response.go b/identitydomains/search_o_auth_partner_certificates_request_response.go new file mode 100644 index 0000000000..f5724e41d0 --- /dev/null +++ b/identitydomains/search_o_auth_partner_certificates_request_response.go @@ -0,0 +1,108 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SearchOAuthPartnerCertificatesRequest wrapper for the SearchOAuthPartnerCertificates operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchOAuthPartnerCertificates.go.html to see an example of how to use SearchOAuthPartnerCertificatesRequest. +type SearchOAuthPartnerCertificatesRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // Parameters for searching OAuthPartnerCertificates + OAuthPartnerCertificateSearchRequest `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SearchOAuthPartnerCertificatesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SearchOAuthPartnerCertificatesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SearchOAuthPartnerCertificatesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SearchOAuthPartnerCertificatesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SearchOAuthPartnerCertificatesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SearchOAuthPartnerCertificatesResponse wrapper for the SearchOAuthPartnerCertificates operation +type SearchOAuthPartnerCertificatesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of OAuthPartnerCertificates instances + OAuthPartnerCertificates `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response SearchOAuthPartnerCertificatesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SearchOAuthPartnerCertificatesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/search_policies_request_response.go b/identitydomains/search_policies_request_response.go new file mode 100644 index 0000000000..97be0f47db --- /dev/null +++ b/identitydomains/search_policies_request_response.go @@ -0,0 +1,108 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SearchPoliciesRequest wrapper for the SearchPolicies operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchPolicies.go.html to see an example of how to use SearchPoliciesRequest. +type SearchPoliciesRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // Parameters for searching Policies + PolicySearchRequest `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SearchPoliciesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SearchPoliciesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SearchPoliciesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SearchPoliciesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SearchPoliciesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SearchPoliciesResponse wrapper for the SearchPolicies operation +type SearchPoliciesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of Policies instances + Policies `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response SearchPoliciesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SearchPoliciesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/search_rules_request_response.go b/identitydomains/search_rules_request_response.go new file mode 100644 index 0000000000..968c25a6ed --- /dev/null +++ b/identitydomains/search_rules_request_response.go @@ -0,0 +1,108 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SearchRulesRequest wrapper for the SearchRules operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchRules.go.html to see an example of how to use SearchRulesRequest. +type SearchRulesRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // Parameters for searching Rules + RuleSearchRequest `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SearchRulesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SearchRulesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SearchRulesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SearchRulesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SearchRulesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SearchRulesResponse wrapper for the SearchRules operation +type SearchRulesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of Rules instances + Rules `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response SearchRulesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SearchRulesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/search_schemas_request_response.go b/identitydomains/search_schemas_request_response.go new file mode 100644 index 0000000000..cbfd7e06df --- /dev/null +++ b/identitydomains/search_schemas_request_response.go @@ -0,0 +1,108 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SearchSchemasRequest wrapper for the SearchSchemas operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchSchemas.go.html to see an example of how to use SearchSchemasRequest. +type SearchSchemasRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // Parameters for searching Schemas + SchemaSearchRequest `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SearchSchemasRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SearchSchemasRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SearchSchemasRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SearchSchemasRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SearchSchemasRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SearchSchemasResponse wrapper for the SearchSchemas operation +type SearchSchemasResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of Schemas instances + Schemas `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response SearchSchemasResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SearchSchemasResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/search_self_registration_profiles_request_response.go b/identitydomains/search_self_registration_profiles_request_response.go new file mode 100644 index 0000000000..08149803d8 --- /dev/null +++ b/identitydomains/search_self_registration_profiles_request_response.go @@ -0,0 +1,108 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SearchSelfRegistrationProfilesRequest wrapper for the SearchSelfRegistrationProfiles operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchSelfRegistrationProfiles.go.html to see an example of how to use SearchSelfRegistrationProfilesRequest. +type SearchSelfRegistrationProfilesRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // Parameters for searching SelfRegistrationProfiles + SelfRegistrationProfileSearchRequest `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SearchSelfRegistrationProfilesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SearchSelfRegistrationProfilesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SearchSelfRegistrationProfilesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SearchSelfRegistrationProfilesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SearchSelfRegistrationProfilesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SearchSelfRegistrationProfilesResponse wrapper for the SearchSelfRegistrationProfiles operation +type SearchSelfRegistrationProfilesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of SelfRegistrationProfiles instances + SelfRegistrationProfiles `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response SearchSelfRegistrationProfilesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SearchSelfRegistrationProfilesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/search_settings_request_response.go b/identitydomains/search_settings_request_response.go new file mode 100644 index 0000000000..24fb8daf22 --- /dev/null +++ b/identitydomains/search_settings_request_response.go @@ -0,0 +1,108 @@ +// 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 identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SearchSettingsRequest wrapper for the SearchSettings operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/identitydomains/SearchSettings.go.html to see an example of how to use SearchSettingsRequest. +type SearchSettingsRequest struct { + + // The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. + Authorization *string `mandatory:"false" contributesTo:"header" name:"authorization"` + + // An endpoint-specific schema version number to use in the Request. Allowed version values are Earliest Version or Latest Version as specified in each REST API endpoint description, or any sequential number inbetween. All schema attributes/body parameters are a part of version 1. After version 1, any attributes added or deprecated will be tagged with the version that they were added to or deprecated in. If no version is provided, the latest schema version is returned. + ResourceTypeSchemaVersion *string `mandatory:"false" contributesTo:"header" name:"resource_type_schema_version"` + + // Parameters for searching Settings + SettingsSearchRequest `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The value of the `opc-next-page` response header from the previous 'List' call. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return in a paginated 'List' call. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Unique Oracle-assigned identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SearchSettingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SearchSettingsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SearchSettingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SearchSettingsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SearchSettingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SearchSettingsResponse wrapper for the SearchSettings operation +type SearchSettingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of Settings instances + Settings `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response SearchSettingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SearchSettingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/identitydomains/self_registration_profile.go b/identitydomains/self_registration_profile.go new file mode 100644 index 0000000000..3a5b1f4997 --- /dev/null +++ b/identitydomains/self_registration_profile.go @@ -0,0 +1,395 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SelfRegistrationProfile Self Registration Profile +type SelfRegistrationProfile struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // Name of the profile + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: always + // - type: string + // - uniqueness: global + Name *string `mandatory:"true" json:"name"` + + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: boolean + // - uniqueness: none + // A Boolean value that indicates whether Account verification email is required to be sent before login or not + ActivationEmailRequired *bool `mandatory:"true" json:"activationEmailRequired"` + + // Number of days redirect URL is valid + // **SCIM++ Properties:** + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: integer + // - uniqueness: none + NumberOfDaysRedirectUrlIsValid *int `mandatory:"true" json:"numberOfDaysRedirectUrlIsValid"` + + // A Boolean value that indicates whether the profile should be displayed on login page + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: boolean + // - uniqueness: none + ShowOnLoginPage *bool `mandatory:"true" json:"showOnLoginPage"` + + // This URL will be replaced in email notification sent to user. When activation email required is set to true, user is created in \"pending verification\" state, upon clicking this link user will be able to activate himself. When activation email required is set to false, user is created in \"verified\" state, this link will be used to verify user's email. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + RedirectUrl *string `mandatory:"true" json:"redirectUrl"` + + // A boolean value that indicates whether the consent text is present. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: boolean + // - uniqueness: none + ConsentTextPresent *bool `mandatory:"true" json:"consentTextPresent"` + + // Registration page name + // **SCIM++ Properties:** + // - idcsCompositeKey: [locale] + // - idcsMultiLanguage: true + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: complex + // - uniqueness: none + DisplayName []SelfRegistrationProfileDisplayName `mandatory:"true" json:"displayName"` + + EmailTemplate *SelfRegistrationProfileEmailTemplate `mandatory:"true" json:"emailTemplate"` + + // Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: string + // - uniqueness: global + Id *string `mandatory:"false" json:"id"` + + // Unique OCI identifier for the SCIM Resource. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: global + Ocid *string `mandatory:"false" json:"ocid"` + + Meta *Meta `mandatory:"false" json:"meta"` + + IdcsCreatedBy *IdcsCreatedBy `mandatory:"false" json:"idcsCreatedBy"` + + IdcsLastModifiedBy *IdcsLastModifiedBy `mandatory:"false" json:"idcsLastModifiedBy"` + + // Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsPreventedOperations []IdcsPreventedOperationsEnum `mandatory:"false" json:"idcsPreventedOperations,omitempty"` + + // A list of tags on this resource. + // **SCIM++ Properties:** + // - idcsCompositeKey: [key, value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Tags []Tags `mandatory:"false" json:"tags"` + + // A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DeleteInProgress *bool `mandatory:"false" json:"deleteInProgress"` + + // The release number when the resource was upgraded. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsLastUpgradedInRelease *string `mandatory:"false" json:"idcsLastUpgradedInRelease"` + + // OCI Domain Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DomainOcid *string `mandatory:"false" json:"domainOcid"` + + // OCI Compartment Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CompartmentOcid *string `mandatory:"false" json:"compartmentOcid"` + + // OCI Tenant Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TenancyOcid *string `mandatory:"false" json:"tenancyOcid"` + + // An identifier for the Resource as defined by the Service Consumer. The externalId may simplify identification of the Resource between Service Consumer and Service Provider by allowing the Consumer to refer to the Resource with its own identifier, obviating the need to store a local mapping between the local identifier of the Resource and the identifier used by the Service Provider. Each Resource MAY include a non-empty externalId value. The value of the externalId attribute is always issued by the Service Consumer and can never be specified by the Service Provider. The Service Provider MUST always interpret the externalId as scoped to the Service Consumer's tenant. + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ExternalId *string `mandatory:"false" json:"externalId"` + + // A Boolean value that indicates whether the profile is enabled or not + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + Active *bool `mandatory:"false" json:"active"` + + // A Multivalue String value for Email domains which are valid for this profile + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + AllowedEmailDomains []string `mandatory:"false" json:"allowedEmailDomains"` + + // A Multivalue String Value for Email domains to be handled as exceptions + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DisallowedEmailDomains []string `mandatory:"false" json:"disallowedEmailDomains"` + + // Reference to header logo + // **SCIM++ Properties:** + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: reference + HeaderLogo *string `mandatory:"false" json:"headerLogo"` + + // References to footer logo + // **SCIM++ Properties:** + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: reference + FooterLogo *string `mandatory:"false" json:"footerLogo"` + + // Text to be displayed on UI after doing self registration + // **SCIM++ Properties:** + // - idcsCompositeKey: [locale] + // - idcsMultiLanguage: true + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + // - uniqueness: none + AfterSubmitText []SelfRegistrationProfileAfterSubmitText `mandatory:"false" json:"afterSubmitText"` + + // **SCIM++ Properties:** + // - idcsCompositeKey: [value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + // - uniqueness: none + // User Attributes + UserAttributes []SelfRegistrationProfileUserAttributes `mandatory:"false" json:"userAttributes"` + + // Default groups assigned to the user + // **SCIM++ Properties:** + // - idcsCompositeKey: [value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + DefaultGroups []SelfRegistrationProfileDefaultGroups `mandatory:"false" json:"defaultGroups"` + + // Header text + // **SCIM++ Properties:** + // - idcsCompositeKey: [locale] + // - idcsMultiLanguage: true + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + // - uniqueness: none + HeaderText []SelfRegistrationProfileHeaderText `mandatory:"false" json:"headerText"` + + // Footer text + // **SCIM++ Properties:** + // - idcsCompositeKey: [locale] + // - idcsMultiLanguage: true + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + // - uniqueness: none + FooterText []SelfRegistrationProfileFooterText `mandatory:"false" json:"footerText"` + + // Consent text + // **SCIM++ Properties:** + // - idcsCompositeKey: [locale] + // - idcsMultiLanguage: true + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + // - uniqueness: none + ConsentText []SelfRegistrationProfileConsentText `mandatory:"false" json:"consentText"` +} + +func (m SelfRegistrationProfile) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SelfRegistrationProfile) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.IdcsPreventedOperations { + if _, ok := GetMappingIdcsPreventedOperationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsPreventedOperations: %s. Supported values are: %s.", val, strings.Join(GetIdcsPreventedOperationsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/self_registration_profile_after_submit_text.go b/identitydomains/self_registration_profile_after_submit_text.go new file mode 100644 index 0000000000..06b35708ba --- /dev/null +++ b/identitydomains/self_registration_profile_after_submit_text.go @@ -0,0 +1,73 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SelfRegistrationProfileAfterSubmitText Text to be displayed on UI after doing self registration +type SelfRegistrationProfileAfterSubmitText struct { + + // Type of user's locale e.g. en-CA + // **SCIM++ Properties:** + // - caseExact: false + // - idcsCanonicalValueSourceFilter: attrName eq "locales" and attrValues.value eq "$(type)" + // - idcsCanonicalValueSourceResourceType: AllowedValue + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Locale *string `mandatory:"true" json:"locale"` + + // Localized value of after submit text in corresponding locale + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // If true, specifies that the localized attribute instance value is the default and will be returned if no localized value found for requesting user's preferred locale. One and only one instance should have this attribute set to true. + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IsDefault *bool `mandatory:"false" json:"default"` +} + +func (m SelfRegistrationProfileAfterSubmitText) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SelfRegistrationProfileAfterSubmitText) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/self_registration_profile_consent_text.go b/identitydomains/self_registration_profile_consent_text.go new file mode 100644 index 0000000000..745a075078 --- /dev/null +++ b/identitydomains/self_registration_profile_consent_text.go @@ -0,0 +1,73 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SelfRegistrationProfileConsentText Consent text +type SelfRegistrationProfileConsentText struct { + + // Type of user's locale e.g. en-CA + // **SCIM++ Properties:** + // - caseExact: false + // - idcsCanonicalValueSourceFilter: attrName eq "locales" and attrValues.value eq "$(type)" + // - idcsCanonicalValueSourceResourceType: AllowedValue + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Locale *string `mandatory:"true" json:"locale"` + + // Localized value of consent text in corresponding locale + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // If true, specifies that the localized attribute instance value is the default and will be returned if no localized value found for requesting user's preferred locale. One and only one instance should have this attribute set to true. + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IsDefault *bool `mandatory:"false" json:"default"` +} + +func (m SelfRegistrationProfileConsentText) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SelfRegistrationProfileConsentText) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/self_registration_profile_default_groups.go b/identitydomains/self_registration_profile_default_groups.go new file mode 100644 index 0000000000..1fc90296d3 --- /dev/null +++ b/identitydomains/self_registration_profile_default_groups.go @@ -0,0 +1,71 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SelfRegistrationProfileDefaultGroups Default groups assigned to the user +type SelfRegistrationProfileDefaultGroups struct { + + // Identifier of the Default Group. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // URI of the Default Group + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: reference + // - uniqueness: none + Ref *string `mandatory:"false" json:"$ref"` + + // A human readable name, primarily used for display purposes. READ-ONLY. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Display *string `mandatory:"false" json:"display"` +} + +func (m SelfRegistrationProfileDefaultGroups) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SelfRegistrationProfileDefaultGroups) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/self_registration_profile_display_name.go b/identitydomains/self_registration_profile_display_name.go new file mode 100644 index 0000000000..96b8607b7a --- /dev/null +++ b/identitydomains/self_registration_profile_display_name.go @@ -0,0 +1,73 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SelfRegistrationProfileDisplayName Registration page name +type SelfRegistrationProfileDisplayName struct { + + // Type of user's locale e.g. en-CA + // **SCIM++ Properties:** + // - caseExact: false + // - idcsCanonicalValueSourceFilter: attrName eq "locales" and attrValues.value eq "$(type)" + // - idcsCanonicalValueSourceResourceType: AllowedValue + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Locale *string `mandatory:"true" json:"locale"` + + // Localized value of displayName in corresponding locale + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // If true, specifies that the localized attribute instance value is the default and will be returned if no localized value found for requesting user's preferred locale. One and only one instance should have this attribute set to true. + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IsDefault *bool `mandatory:"false" json:"default"` +} + +func (m SelfRegistrationProfileDisplayName) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SelfRegistrationProfileDisplayName) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/self_registration_profile_email_template.go b/identitydomains/self_registration_profile_email_template.go new file mode 100644 index 0000000000..ae8229acbf --- /dev/null +++ b/identitydomains/self_registration_profile_email_template.go @@ -0,0 +1,79 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SelfRegistrationProfileEmailTemplate Email template +// **SCIM++ Properties:** +// - idcsSearchable: true +// - multiValued: false +// - mutability: readWrite +// - required: true +// - returned: request +// - type: complex +type SelfRegistrationProfileEmailTemplate struct { + + // Identifier of the Email Template. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // A human readable name, primarily used for display purposes. READ-ONLY. + // **Added In:** 19.2.1 + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Display *string `mandatory:"false" json:"display"` + + // URI of the Email Template + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: reference + // - uniqueness: none + Ref *string `mandatory:"false" json:"$ref"` +} + +func (m SelfRegistrationProfileEmailTemplate) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SelfRegistrationProfileEmailTemplate) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/self_registration_profile_footer_text.go b/identitydomains/self_registration_profile_footer_text.go new file mode 100644 index 0000000000..624c7f4b33 --- /dev/null +++ b/identitydomains/self_registration_profile_footer_text.go @@ -0,0 +1,73 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SelfRegistrationProfileFooterText Footer text +type SelfRegistrationProfileFooterText struct { + + // Type of user's locale e.g. en-CA + // **SCIM++ Properties:** + // - caseExact: false + // - idcsCanonicalValueSourceFilter: attrName eq "locales" and attrValues.value eq "$(type)" + // - idcsCanonicalValueSourceResourceType: AllowedValue + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Locale *string `mandatory:"true" json:"locale"` + + // Localized value of footer text in corresponding locale + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // If true, specifies that the localized attribute instance value is the default and will be returned if no localized value found for requesting user's preferred locale. One and only one instance should have this attribute set to true. + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IsDefault *bool `mandatory:"false" json:"default"` +} + +func (m SelfRegistrationProfileFooterText) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SelfRegistrationProfileFooterText) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/self_registration_profile_header_text.go b/identitydomains/self_registration_profile_header_text.go new file mode 100644 index 0000000000..6ee710feb5 --- /dev/null +++ b/identitydomains/self_registration_profile_header_text.go @@ -0,0 +1,73 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SelfRegistrationProfileHeaderText Header text +type SelfRegistrationProfileHeaderText struct { + + // Type of user's locale e.g. en-CA + // **SCIM++ Properties:** + // - caseExact: false + // - idcsCanonicalValueSourceFilter: attrName eq "locales" and attrValues.value eq "$(type)" + // - idcsCanonicalValueSourceResourceType: AllowedValue + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Locale *string `mandatory:"true" json:"locale"` + + // Localized value of header text in corresponding locale + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // If true, specifies that the localized attribute instance value is the default and will be returned if no localized value found for requesting user's preferred locale. One and only one instance should have this attribute set to true. + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IsDefault *bool `mandatory:"false" json:"default"` +} + +func (m SelfRegistrationProfileHeaderText) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SelfRegistrationProfileHeaderText) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/self_registration_profile_search_request.go b/identitydomains/self_registration_profile_search_request.go new file mode 100644 index 0000000000..aa7d02e7e1 --- /dev/null +++ b/identitydomains/self_registration_profile_search_request.go @@ -0,0 +1,70 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SelfRegistrationProfileSearchRequest Clients MAY execute queries without passing parameters on the URL by using the HTTP POST verb combined with the **.search** path extension. The inclusion of **.search** on the end of a valid SCIM endpoint SHALL be used to indicate the HTTP POST verb is intended to be a query operation. To create a new query result set, a SCIM client sends an HTTP POST request to the desired SCIM resource endpoint (ending in **.search**). The body of the POST request MAY include any of the parameters. +type SelfRegistrationProfileSearchRequest struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See (additional retrieval query parameters (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + Attributes []string `mandatory:"false" json:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + AttributeSets []AttributeSetsEnum `mandatory:"false" json:"attributeSets,omitempty"` + + // The filter string that is used to request a subset of resources. The filter string MUST be a valid filter expression. See Section 3.4.2.2 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.2). OPTIONAL. + Filter *string `mandatory:"false" json:"filter"` + + // A string that indicates the attribute whose value SHALL be used to order the returned responses. The sortBy attribute MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See Sorting section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3). OPTIONAL. + SortBy *string `mandatory:"false" json:"sortBy"` + + // A string that indicates the order in which the sortBy parameter is applied. Allowed values are "ascending" and "descending". See (Sorting Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.3)). OPTIONAL. + SortOrder SortOrderEnum `mandatory:"false" json:"sortOrder,omitempty"` + + // An integer that indicates the 1-based index of the first query result. See Pagination Section (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4). OPTIONAL. + StartIndex *int `mandatory:"false" json:"startIndex"` + + // An integer that indicates the desired maximum number of query results per page. 1000 is the largest value that you can use. See the Pagination section of the System for Cross-Domain Identity Management Protocol specification for more information. (Section 3.4.2.4 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.4.2.4)). OPTIONAL. + Count *int `mandatory:"false" json:"count"` +} + +func (m SelfRegistrationProfileSearchRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SelfRegistrationProfileSearchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingSortOrderEnum(string(m.SortOrder)); !ok && m.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", m.SortOrder, strings.Join(GetSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/self_registration_profile_user_attributes.go b/identitydomains/self_registration_profile_user_attributes.go new file mode 100644 index 0000000000..834b29db15 --- /dev/null +++ b/identitydomains/self_registration_profile_user_attributes.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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SelfRegistrationProfileUserAttributes User Attributes +type SelfRegistrationProfileUserAttributes struct { + + // name of the attribute + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // **SCIM++ Properties:** + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: integer + // - uniqueness: none + // Sequence Number for the attribute + SeqNumber *int `mandatory:"true" json:"seqNumber"` + + // **SCIM++ Properties:** + // - idcsSearchable: true + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + // Fully Qualified Attribute Name + FullyQualifiedAttributeName *string `mandatory:"false" json:"fullyQualifiedAttributeName"` + + // If this attribute can be deleted + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + Deletable *bool `mandatory:"false" json:"deletable"` + + // Metadata of the user attribute + // **Added In:** 18.1.6 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Metadata *string `mandatory:"false" json:"metadata"` +} + +func (m SelfRegistrationProfileUserAttributes) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SelfRegistrationProfileUserAttributes) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/self_registration_profiles.go b/identitydomains/self_registration_profiles.go new file mode 100644 index 0000000000..636fc8144d --- /dev/null +++ b/identitydomains/self_registration_profiles.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SelfRegistrationProfiles The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type SelfRegistrationProfiles struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []SelfRegistrationProfile `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m SelfRegistrationProfiles) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SelfRegistrationProfiles) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/setting.go b/identitydomains/setting.go new file mode 100644 index 0000000000..d2d236696e --- /dev/null +++ b/identitydomains/setting.go @@ -0,0 +1,839 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Setting Settings schema +type Setting struct { + + // REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. This specification defines URIs for User, Group, and a standard \"enterprise\" extension. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Schemas []string `mandatory:"true" json:"schemas"` + + // This value indicates whether Customer Service Representatives can login and have readOnly or readWrite access. A value of 'none' means CSR cannot login to the services. + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + CsrAccess SettingCsrAccessEnum `mandatory:"true" json:"csrAccess"` + + // Unique identifier for the SCIM Resource as defined by the Service Provider. Each representation of the Resource MUST include a non-empty id value. This identifier MUST be unique across the Service Provider's entire set of Resources. It MUST be a stable, non-reassignable identifier that does not change when the same Resource is returned in subsequent requests. The value of the id attribute is always issued by the Service Provider and MUST never be specified by the Service Consumer. bulkId: is a reserved keyword and MUST NOT be used in the unique identifier. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: always + // - type: string + // - uniqueness: global + Id *string `mandatory:"false" json:"id"` + + // Unique OCI identifier for the SCIM Resource. + // **SCIM++ Properties:** + // - caseExact: true + // - idcsSearchable: true + // - multiValued: false + // - mutability: immutable + // - required: false + // - returned: default + // - type: string + // - uniqueness: global + Ocid *string `mandatory:"false" json:"ocid"` + + Meta *Meta `mandatory:"false" json:"meta"` + + IdcsCreatedBy *IdcsCreatedBy `mandatory:"false" json:"idcsCreatedBy"` + + IdcsLastModifiedBy *IdcsLastModifiedBy `mandatory:"false" json:"idcsLastModifiedBy"` + + // Each value of this attribute specifies an operation that only an internal client may perform on this particular resource. + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsPreventedOperations []IdcsPreventedOperationsEnum `mandatory:"false" json:"idcsPreventedOperations,omitempty"` + + // A list of tags on this resource. + // **SCIM++ Properties:** + // - idcsCompositeKey: [key, value] + // - idcsSearchable: true + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: request + // - type: complex + // - uniqueness: none + Tags []Tags `mandatory:"false" json:"tags"` + + // A boolean flag indicating this resource in the process of being deleted. Usually set to true when synchronous deletion of the resource would take too long. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DeleteInProgress *bool `mandatory:"false" json:"deleteInProgress"` + + // The release number when the resource was upgraded. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + IdcsLastUpgradedInRelease *string `mandatory:"false" json:"idcsLastUpgradedInRelease"` + + // OCI Domain Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + DomainOcid *string `mandatory:"false" json:"domainOcid"` + + // OCI Compartment Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CompartmentOcid *string `mandatory:"false" json:"compartmentOcid"` + + // OCI Tenant Id (ocid) in which the resource lives. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TenancyOcid *string `mandatory:"false" json:"tenancyOcid"` + + // An identifier for the Resource as defined by the Service Consumer. The externalId may simplify identification of the Resource between Service Consumer and Service Provider by allowing the Consumer to refer to the Resource with its own identifier, obviating the need to store a local mapping between the local identifier of the Resource and the identifier used by the Service Provider. Each Resource MAY include a non-empty externalId value. The value of the externalId attribute is always issued by the Service Consumer and can never be specified by the Service Provider. The Service Provider MUST always interpret the externalId as scoped to the Service Consumer's tenant. + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ExternalId *string `mandatory:"false" json:"externalId"` + + // Contact emails used to notify tenants. Can be one or more user or group alias emails. + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + ContactEmails []string `mandatory:"false" json:"contactEmails"` + + // Indicates if the branding is default or custom + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + CustomBranding *bool `mandatory:"false" json:"customBranding"` + + // Preferred written or spoken language used for localized user interfaces + // **SCIM++ Properties:** + // - caseExact: false + // - idcsCanonicalValueSourceFilter: attrName eq "languages" and attrValues.value eq "$(preferredLanguage)" + // - idcsCanonicalValueSourceResourceType: AllowedValue + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + PreferredLanguage *string `mandatory:"false" json:"preferredLanguage"` + + // User's timezone + // **SCIM++ Properties:** + // - caseExact: false + // - idcsCanonicalValueSourceFilter: attrName eq "timezones" and attrValues.value eq "$(timezone)" + // - idcsCanonicalValueSourceResourceType: AllowedValue + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Timezone *string `mandatory:"false" json:"timezone"` + + // Controls whether DiagnosticRecords for external search-operations (against SCIM resource-types in the Admin service) identify returned resources. If true, indicates that for each successful external search-operation at least one DiagnosticRecord will include at least one identifier for each matching resource that is returned in that search-response. If false, no DiagnosticRecord should be expected to identify returned resources for a search-operation. The default value is false. + // **Added In:** 2011192329 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + DiagnosticRecordForSearchIdentifiesReturnedResources *bool `mandatory:"false" json:"diagnosticRecordForSearchIdentifiesReturnedResources"` + + // Specifies whether re-authentication is required or not when a user changes one of their security factors such as password or email. Default is true to ensure more secure behavior. + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + ReAuthWhenChangingMyAuthenticationFactors *bool `mandatory:"false" json:"reAuthWhenChangingMyAuthenticationFactors"` + + // If reAuthWhenChangingMyAuthenticationFactors is true (default), this attribute specifies which re-authentication factor to use. Allowed value is \"password\". + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + ReAuthFactor []SettingReAuthFactorEnum `mandatory:"false" json:"reAuthFactor,omitempty"` + + // Default location for purposes of localizing items such as currency, date and time format, numerical representations, and so on. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsCanonicalValueSourceFilter: attrName eq "locales" and attrValues.value eq "$(locale)" + // - idcsCanonicalValueSourceResourceType: AllowedValue + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Locale *string `mandatory:"false" json:"locale"` + + // Indicates if access on SigningCert is allowed to public or not + // **Added In:** 17.3.4 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + SigningCertPublicAccess *bool `mandatory:"false" json:"signingCertPublicAccess"` + + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + // Subject mapping user profile attribute. The input format should be SCIM compliant. This attribute should be of type String and multivalued to false. + SubMappingAttr *string `mandatory:"false" json:"subMappingAttr"` + + // Indicates whether all the Apps in this customer tenancy should trust each other. A value of true overrides the 'defaultTrustScope' attribute here in Settings, as well as any App-specific 'trustScope' attribute, to force in effect 'trustScope=Account' for every App in this customer tenancy. + // **Added In:** 18.1.6 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + AccountAlwaysTrustScope *bool `mandatory:"false" json:"accountAlwaysTrustScope"` + + // **Deprecated Since: 18.3.6** + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // Indicates the default trust scope for all apps + DefaultTrustScope SettingDefaultTrustScopeEnum `mandatory:"false" json:"defaultTrustScope,omitempty"` + + // Tenant issuer. + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Issuer *string `mandatory:"false" json:"issuer"` + + // Previous Tenant issuer. This is an Oracle Identity Cloud Service internal attribute which is not meant to be directly modified by ID Admin. Even if the request body (Settings) contains this attribute, the actual value will be set according to the Oracle Identity Cloud Service internal logic rather than solely based on the value provided in the request payload. + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: request + // - type: string + // - uniqueness: none + PrevIssuer *string `mandatory:"false" json:"prevIssuer"` + + // The level of diagnostic logging that is currently in effect. A level of 0 (zero) indicates that diagnostic logging is disabled. A level of 1 (one) indicates that diagnostic logging is enabled. + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: integer + // - uniqueness: none + DiagnosticLevel *int `mandatory:"false" json:"diagnosticLevel"` + + // The end time up to which diagnostic recording is switched on + // **SCIM++ Properties:** + // - caseExact: false + // - idcsSearchable: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: dateTime + // - uniqueness: none + DiagnosticTracingUpto *string `mandatory:"false" json:"diagnosticTracingUpto"` + + // One or more email domains allowed in a user's email field. If unassigned, any domain is allowed. + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + AllowedDomains []string `mandatory:"false" json:"allowedDomains"` + + // Indicates if Terms of Use is enabled in UI + // **Added In:** 18.2.4 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + EnableTermsOfUse *bool `mandatory:"false" json:"enableTermsOfUse"` + + // Terms of Use URL + // **Added In:** 18.2.4 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + TermsOfUseUrl *string `mandatory:"false" json:"termsOfUseUrl"` + + // Privacy Policy URL + // **Added In:** 18.2.4 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + PrivacyPolicyUrl *string `mandatory:"false" json:"privacyPolicyUrl"` + + // Database Migration Status + // **Added In:** 19.2.1 + // **SCIM++ Properties:** + // - caseExact: true + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + MigrationStatus *string `mandatory:"false" json:"migrationStatus"` + + // On-Premises provisioning feature toggle. + // **Added In:** 19.2.1 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + OnPremisesProvisioning *bool `mandatory:"false" json:"onPremisesProvisioning"` + + // If specified, indicates the set of Urls which can be returned to after successful forgot password flow + // **Added In:** 19.3.3 + // **SCIM++ Properties:** + // - type: string + // - multiValued: true + // - required: false + // - mutability: readWrite + // - returned: default + // - uniqueness: none + // - caseExact: false + AllowedForgotPasswordFlowReturnUrls []string `mandatory:"false" json:"allowedForgotPasswordFlowReturnUrls"` + + // If specified, indicates the set of allowed notification redirect Urls which can be specified as the value of \"notificationRedirectUrl\" in the POST .../admin/v1/MePasswordResetRequestor request payload, which will then be included in the reset password email notification sent to a user as part of the forgot password / password reset flow. + // **Added In:** 2009041201 + // **SCIM++ Properties:** + // - type: string + // - multiValued: true + // - required: false + // - mutability: readWrite + // - returned: default + // - uniqueness: none + // - caseExact: false + AllowedNotificationRedirectUrls []string `mandatory:"false" json:"allowedNotificationRedirectUrls"` + + // Audit Event retention period. If set, overrides default of 30 days after which Audit Events will be purged + // **Added In:** 19.2.1 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: integer + AuditEventRetentionPeriod *int `mandatory:"false" json:"auditEventRetentionPeriod"` + + // Indicates if 'hosted' option was selected + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + IsHostedPage *bool `mandatory:"false" json:"isHostedPage"` + + // Storage URL location where the sanitized custom html is located + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CustomHtmlLocation *string `mandatory:"false" json:"customHtmlLocation"` + + // Storage URL location where the sanitized custom css is located + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CustomCssLocation *string `mandatory:"false" json:"customCssLocation"` + + // Custom translations (JSON String) + // **Added In:** 20.1.3 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CustomTranslation *string `mandatory:"false" json:"customTranslation"` + + // The attribute to store the cloud account name + // **Deprecated Since: 2011192329** + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CloudAccountName *string `mandatory:"false" json:"cloudAccountName"` + + // CloudAccountMigration: Enable Custom SIM Migrator Url. + // **Added In:** 2012271618 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + CloudMigrationUrlEnabled *bool `mandatory:"false" json:"cloudMigrationUrlEnabled"` + + // If specified, indicates the custom SIM Migrator Url which can be used while SIM to Oracle Identity Cloud Service CloudAccount Migration. + // **Added In:** 2012271618 + // **SCIM++ Properties:** + // - type: string + // - multiValued: false + // - required: false + // - mutability: readWrite + // - returned: default + // - uniqueness: none + // - caseExact: false + CloudMigrationCustomUrl *string `mandatory:"false" json:"cloudMigrationCustomUrl"` + + // By default, a service admin can list all users in stripe. If true, a service admin cannot list other users. + // **Added In:** 2108190438 + // **SCIM++ Properties:** + // - caseExact: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + ServiceAdminCannotListOtherUsers *bool `mandatory:"false" json:"serviceAdminCannotListOtherUsers"` + + // Limit the maximum return of members for an AppRole + // **Added In:** 2111112015 + // **SCIM++ Properties:** + // - idcsMinValue: 0 + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: integer + // - uniqueness: none + MaxNoOfAppRoleMembersToReturn *int `mandatory:"false" json:"maxNoOfAppRoleMembersToReturn"` + + // Limit the maximum return of CMVA for an App + // **Added In:** 2111112015 + // **SCIM++ Properties:** + // - idcsMinValue: 0 + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: integer + // - uniqueness: none + MaxNoOfAppCMVAToReturn *int `mandatory:"false" json:"maxNoOfAppCMVAToReturn"` + + // Maximum duration for IAM User Principal Session Token expiry + // **Added In:** 2307071836 + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: integer + // - uniqueness: none + IamUpstSessionExpiry *int `mandatory:"false" json:"iamUpstSessionExpiry"` + + CloudGateCorsSettings *SettingsCloudGateCorsSettings `mandatory:"false" json:"cloudGateCorsSettings"` + + CertificateValidation *SettingsCertificateValidation `mandatory:"false" json:"certificateValidation"` + + // Custom claims associated with the specific tenant + // **Added In:** 18.4.2 + // **SCIM++ Properties:** + // - idcsCompositeKey: [name] + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + // - uniqueness: none + TenantCustomClaims []SettingsTenantCustomClaims `mandatory:"false" json:"tenantCustomClaims"` + + // Purge Configs for different Resource Types + // **Deprecated Since: 19.1.6** + // **SCIM++ Properties:** + // - idcsCompositeKey: [resourceName] + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + PurgeConfigs []SettingsPurgeConfigs `mandatory:"false" json:"purgeConfigs"` + + // Default name of the Company in different locales + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - idcsCompositeKey: [locale] + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: default + // - type: complex + DefaultCompanyNames []SettingsDefaultCompanyNames `mandatory:"false" json:"defaultCompanyNames"` + + // Default Login text in different locales + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - idcsCompositeKey: [locale] + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: default + // - type: complex + DefaultLoginTexts []SettingsDefaultLoginTexts `mandatory:"false" json:"defaultLoginTexts"` + + // References to various images + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - idcsCompositeKey: [type] + // - multiValued: true + // - mutability: readOnly + // - required: false + // - returned: default + // - type: complex + DefaultImages []SettingsDefaultImages `mandatory:"false" json:"defaultImages"` + + // Name of the company in different locales + // **SCIM++ Properties:** + // - idcsCompositeKey: [locale] + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + CompanyNames []SettingsCompanyNames `mandatory:"false" json:"companyNames"` + + // Login text in different locales + // **SCIM++ Properties:** + // - idcsCompositeKey: [locale] + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + LoginTexts []SettingsLoginTexts `mandatory:"false" json:"loginTexts"` + + // References to various images + // **SCIM++ Properties:** + // - idcsCompositeKey: [type] + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: complex + Images []SettingsImages `mandatory:"false" json:"images"` +} + +func (m Setting) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Setting) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSettingCsrAccessEnum(string(m.CsrAccess)); !ok && m.CsrAccess != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CsrAccess: %s. Supported values are: %s.", m.CsrAccess, strings.Join(GetSettingCsrAccessEnumStringValues(), ","))) + } + + for _, val := range m.IdcsPreventedOperations { + if _, ok := GetMappingIdcsPreventedOperationsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IdcsPreventedOperations: %s. Supported values are: %s.", val, strings.Join(GetIdcsPreventedOperationsEnumStringValues(), ","))) + } + } + + for _, val := range m.ReAuthFactor { + if _, ok := GetMappingSettingReAuthFactorEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ReAuthFactor: %s. Supported values are: %s.", val, strings.Join(GetSettingReAuthFactorEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingSettingDefaultTrustScopeEnum(string(m.DefaultTrustScope)); !ok && m.DefaultTrustScope != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DefaultTrustScope: %s. Supported values are: %s.", m.DefaultTrustScope, strings.Join(GetSettingDefaultTrustScopeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SettingReAuthFactorEnum Enum with underlying type: string +type SettingReAuthFactorEnum string + +// Set of constants representing the allowable values for SettingReAuthFactorEnum +const ( + SettingReAuthFactorPassword SettingReAuthFactorEnum = "password" +) + +var mappingSettingReAuthFactorEnum = map[string]SettingReAuthFactorEnum{ + "password": SettingReAuthFactorPassword, +} + +var mappingSettingReAuthFactorEnumLowerCase = map[string]SettingReAuthFactorEnum{ + "password": SettingReAuthFactorPassword, +} + +// GetSettingReAuthFactorEnumValues Enumerates the set of values for SettingReAuthFactorEnum +func GetSettingReAuthFactorEnumValues() []SettingReAuthFactorEnum { + values := make([]SettingReAuthFactorEnum, 0) + for _, v := range mappingSettingReAuthFactorEnum { + values = append(values, v) + } + return values +} + +// GetSettingReAuthFactorEnumStringValues Enumerates the set of values in String for SettingReAuthFactorEnum +func GetSettingReAuthFactorEnumStringValues() []string { + return []string{ + "password", + } +} + +// GetMappingSettingReAuthFactorEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSettingReAuthFactorEnum(val string) (SettingReAuthFactorEnum, bool) { + enum, ok := mappingSettingReAuthFactorEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SettingCsrAccessEnum Enum with underlying type: string +type SettingCsrAccessEnum string + +// Set of constants representing the allowable values for SettingCsrAccessEnum +const ( + SettingCsrAccessReadonly SettingCsrAccessEnum = "readOnly" + SettingCsrAccessReadwrite SettingCsrAccessEnum = "readWrite" + SettingCsrAccessNone SettingCsrAccessEnum = "none" +) + +var mappingSettingCsrAccessEnum = map[string]SettingCsrAccessEnum{ + "readOnly": SettingCsrAccessReadonly, + "readWrite": SettingCsrAccessReadwrite, + "none": SettingCsrAccessNone, +} + +var mappingSettingCsrAccessEnumLowerCase = map[string]SettingCsrAccessEnum{ + "readonly": SettingCsrAccessReadonly, + "readwrite": SettingCsrAccessReadwrite, + "none": SettingCsrAccessNone, +} + +// GetSettingCsrAccessEnumValues Enumerates the set of values for SettingCsrAccessEnum +func GetSettingCsrAccessEnumValues() []SettingCsrAccessEnum { + values := make([]SettingCsrAccessEnum, 0) + for _, v := range mappingSettingCsrAccessEnum { + values = append(values, v) + } + return values +} + +// GetSettingCsrAccessEnumStringValues Enumerates the set of values in String for SettingCsrAccessEnum +func GetSettingCsrAccessEnumStringValues() []string { + return []string{ + "readOnly", + "readWrite", + "none", + } +} + +// GetMappingSettingCsrAccessEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSettingCsrAccessEnum(val string) (SettingCsrAccessEnum, bool) { + enum, ok := mappingSettingCsrAccessEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SettingDefaultTrustScopeEnum Enum with underlying type: string +type SettingDefaultTrustScopeEnum string + +// Set of constants representing the allowable values for SettingDefaultTrustScopeEnum +const ( + SettingDefaultTrustScopeExplicit SettingDefaultTrustScopeEnum = "Explicit" + SettingDefaultTrustScopeAccount SettingDefaultTrustScopeEnum = "Account" + SettingDefaultTrustScopeTags SettingDefaultTrustScopeEnum = "Tags" +) + +var mappingSettingDefaultTrustScopeEnum = map[string]SettingDefaultTrustScopeEnum{ + "Explicit": SettingDefaultTrustScopeExplicit, + "Account": SettingDefaultTrustScopeAccount, + "Tags": SettingDefaultTrustScopeTags, +} + +var mappingSettingDefaultTrustScopeEnumLowerCase = map[string]SettingDefaultTrustScopeEnum{ + "explicit": SettingDefaultTrustScopeExplicit, + "account": SettingDefaultTrustScopeAccount, + "tags": SettingDefaultTrustScopeTags, +} + +// GetSettingDefaultTrustScopeEnumValues Enumerates the set of values for SettingDefaultTrustScopeEnum +func GetSettingDefaultTrustScopeEnumValues() []SettingDefaultTrustScopeEnum { + values := make([]SettingDefaultTrustScopeEnum, 0) + for _, v := range mappingSettingDefaultTrustScopeEnum { + values = append(values, v) + } + return values +} + +// GetSettingDefaultTrustScopeEnumStringValues Enumerates the set of values in String for SettingDefaultTrustScopeEnum +func GetSettingDefaultTrustScopeEnumStringValues() []string { + return []string{ + "Explicit", + "Account", + "Tags", + } +} + +// GetMappingSettingDefaultTrustScopeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSettingDefaultTrustScopeEnum(val string) (SettingDefaultTrustScopeEnum, bool) { + enum, ok := mappingSettingDefaultTrustScopeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/settings.go b/identitydomains/settings.go new file mode 100644 index 0000000000..2b83e49ec5 --- /dev/null +++ b/identitydomains/settings.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Settings The SCIM protocol defines a standard set of query parameters that can be used to filter, sort, and paginate to return zero or more resources in a query response. Queries MAY be made against a single resource or a resource type endpoint (e.g., /Users), or the service provider Base URI. +type Settings struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. All representations of SCIM schema MUST include a non-zero value array with value(s) of the URIs supported by that representation. Duplicate values MUST NOT be included. Value order is not specified and MUST not impact behavior. REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // The total number of results returned by the list or query operation. The value may be larger than the number of resources returned such as when returning a single page of results where multiple pages are available. REQUIRED. + TotalResults *int `mandatory:"true" json:"totalResults"` + + // A multi-valued list of complex objects containing the requested resources. This MAY be a subset of the full set of resources if pagination is requested. REQUIRED if "totalResults" is non-zero. + Resources []Setting `mandatory:"true" json:"Resources"` + + // The 1-based index of the first result in the current set of list results. REQUIRED when partial results returned due to pagination. + StartIndex *int `mandatory:"true" json:"startIndex"` + + // The number of resources returned in a list response page. REQUIRED when partial results returned due to pagination. + ItemsPerPage *int `mandatory:"true" json:"itemsPerPage"` +} + +func (m Settings) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Settings) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/settings_certificate_validation.go b/identitydomains/settings_certificate_validation.go new file mode 100644 index 0000000000..41dad096a6 --- /dev/null +++ b/identitydomains/settings_certificate_validation.go @@ -0,0 +1,158 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SettingsCertificateValidation Certificate Validation Config +// **Added In:** 2010242156 +// **SCIM++ Properties:** +// - caseExact: false +// - multiValued: false +// - mutability: readWrite +// - required: false +// - returned: default +// - type: complex +// - uniqueness: none +type SettingsCertificateValidation struct { + + // CRL is enabled Configuration + // **Added In:** 2010242156 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + CrlEnabled *bool `mandatory:"false" json:"crlEnabled"` + + // Use CRL as Fallback. + // **Added In:** 2010242156 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + CrlCheckOnOCSPFailureEnabled *bool `mandatory:"false" json:"crlCheckOnOCSPFailureEnabled"` + + // CRL Location. + // **Added In:** 2010242156 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CrlLocation *string `mandatory:"false" json:"crlLocation"` + + // The CRL refresh interval in minutes + // **Added In:** 2010242156 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: integer + // - uniqueness: none + CrlRefreshInterval *int `mandatory:"false" json:"crlRefreshInterval"` + + // OCSP is enabled Configuration + // **Added In:** 2010242156 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + OcspEnabled *bool `mandatory:"false" json:"ocspEnabled"` + + // OCSP Accept unknown response status from ocsp responder. + // **Added In:** 2010242156 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + OcspUnknownResponseStatusAllowed *bool `mandatory:"false" json:"ocspUnknownResponseStatusAllowed"` + + // OCSP Responder URL + // **Added In:** 2010242156 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + OcspResponderURL *string `mandatory:"false" json:"ocspResponderURL"` + + // This setting says, OCSP Responder URL present in the issued certificate must be used. Otherwise, OCSP Responder URL from IDP or Settings. + // **Added In:** 2010242156 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + OcspSettingsResponderURLPreferred *bool `mandatory:"false" json:"ocspSettingsResponderURLPreferred"` + + // The OCSP Timeout duration in minutes + // **Added In:** 2010242156 + // **SCIM++ Properties:** + // - idcsMaxValue: 10 + // - idcsMinValue: 1 + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: integer + // - uniqueness: none + OcspTimeoutDuration *int `mandatory:"false" json:"ocspTimeoutDuration"` + + // OCSP Signing Certificate Alias + // **Added In:** 2010242156 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + OcspSigningCertificateAlias *string `mandatory:"false" json:"ocspSigningCertificateAlias"` +} + +func (m SettingsCertificateValidation) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SettingsCertificateValidation) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/settings_cloud_gate_cors_settings.go b/identitydomains/settings_cloud_gate_cors_settings.go new file mode 100644 index 0000000000..c34908750c --- /dev/null +++ b/identitydomains/settings_cloud_gate_cors_settings.go @@ -0,0 +1,107 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SettingsCloudGateCorsSettings A complex attribute that specifies the Cloud Gate cross origin resource sharing settings. +// **Added In:** 2011192329 +// **SCIM++ Properties:** +// - caseExact: false +// - idcsSearchable: false +// - multiValued: false +// - mutability: readWrite +// - required: false +// - returned: default +// - type: complex +// - uniqueness: none +type SettingsCloudGateCorsSettings struct { + + // Allow Null Origin (CORS) for this tenant. + // **Added In:** 2011192329 + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + CloudGateCorsAllowNullOrigin *bool `mandatory:"false" json:"cloudGateCorsAllowNullOrigin"` + + // Enable Cloud Gate Cross-Origin Resource Sharing (CORS) for this tenant. + // **Added In:** 2011192329 + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: boolean + // - uniqueness: none + CloudGateCorsEnabled *bool `mandatory:"false" json:"cloudGateCorsEnabled"` + + // Cloud Gate Allowed Cross-Origin Resource Sharing (CORS) Origins for this tenant. + // **Added In:** 2011192329 + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CloudGateCorsAllowedOrigins []string `mandatory:"false" json:"cloudGateCorsAllowedOrigins"` + + // Maximum number of seconds a CORS Pre-flight Response may be cached by client. + // **Added In:** 2205182039 + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: integer + // - uniqueness: none + CloudGateCorsMaxAge *int `mandatory:"false" json:"cloudGateCorsMaxAge"` + + // List of Response Headers Cloud Gate is allowed to expose in the CORS Response Header: Access-Control-Expose-Headers. + // **Added In:** 2205182039 + // **SCIM++ Properties:** + // - idcsSearchable: false + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + CloudGateCorsExposedHeaders []string `mandatory:"false" json:"cloudGateCorsExposedHeaders"` +} + +func (m SettingsCloudGateCorsSettings) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SettingsCloudGateCorsSettings) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/settings_company_names.go b/identitydomains/settings_company_names.go new file mode 100644 index 0000000000..e7b4f31eb0 --- /dev/null +++ b/identitydomains/settings_company_names.go @@ -0,0 +1,57 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SettingsCompanyNames Name of the company in different locales +type SettingsCompanyNames struct { + + // Company name + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + Value *string `mandatory:"true" json:"value"` + + // Locale + // **SCIM++ Properties:** + // - idcsCanonicalValueSourceFilter: attrName eq "locales" and attrValues.value eq "$(companyNames.locale)" + // - idcsCanonicalValueSourceResourceType: AllowedValue + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + Locale *string `mandatory:"true" json:"locale"` +} + +func (m SettingsCompanyNames) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SettingsCompanyNames) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/settings_default_company_names.go b/identitydomains/settings_default_company_names.go new file mode 100644 index 0000000000..ee04e84cb9 --- /dev/null +++ b/identitydomains/settings_default_company_names.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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SettingsDefaultCompanyNames Default name of the Company in different locales +type SettingsDefaultCompanyNames struct { + + // Company name + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + Value *string `mandatory:"true" json:"value"` + + // Locale + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - idcsCanonicalValueSourceFilter: attrName eq "locales" and attrValues.value eq "$(companyNames.locale)" + // - idcsCanonicalValueSourceResourceType: AllowedValue + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + Locale *string `mandatory:"true" json:"locale"` +} + +func (m SettingsDefaultCompanyNames) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SettingsDefaultCompanyNames) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/settings_default_images.go b/identitydomains/settings_default_images.go new file mode 100644 index 0000000000..d49ce6d95d --- /dev/null +++ b/identitydomains/settings_default_images.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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SettingsDefaultImages References to various images +type SettingsDefaultImages struct { + + // Image URI + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: reference + Value *string `mandatory:"true" json:"value"` + + // Indicates the image type + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + Type *string `mandatory:"true" json:"type"` + + // A human-readable name, primarily used for display purposes + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: false + // - returned: default + // - type: string + Display *string `mandatory:"false" json:"display"` +} + +func (m SettingsDefaultImages) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SettingsDefaultImages) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/settings_default_login_texts.go b/identitydomains/settings_default_login_texts.go new file mode 100644 index 0000000000..4e4e1836cc --- /dev/null +++ b/identitydomains/settings_default_login_texts.go @@ -0,0 +1,60 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SettingsDefaultLoginTexts Default Login text in different locales +type SettingsDefaultLoginTexts struct { + + // Login text + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + // - idcsSanitize: true + Value *string `mandatory:"true" json:"value"` + + // Locale + // **Added In:** 18.2.2 + // **SCIM++ Properties:** + // - idcsCanonicalValueSourceFilter: attrName eq "locales" and attrValues.value eq "$(loginTexts.locale)" + // - idcsCanonicalValueSourceResourceType: AllowedValue + // - multiValued: false + // - mutability: readOnly + // - required: true + // - returned: default + // - type: string + Locale *string `mandatory:"true" json:"locale"` +} + +func (m SettingsDefaultLoginTexts) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SettingsDefaultLoginTexts) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/settings_images.go b/identitydomains/settings_images.go new file mode 100644 index 0000000000..da69fdaf49 --- /dev/null +++ b/identitydomains/settings_images.go @@ -0,0 +1,64 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SettingsImages References to various images +type SettingsImages struct { + + // Image URI + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: reference + Value *string `mandatory:"true" json:"value"` + + // Indicates the image type + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + Type *string `mandatory:"true" json:"type"` + + // A human-readable name, primarily used for display purposes + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + Display *string `mandatory:"false" json:"display"` +} + +func (m SettingsImages) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SettingsImages) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/settings_login_texts.go b/identitydomains/settings_login_texts.go new file mode 100644 index 0000000000..d80cf7ea76 --- /dev/null +++ b/identitydomains/settings_login_texts.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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SettingsLoginTexts Login text in different locales +type SettingsLoginTexts struct { + + // Login text + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - idcsSanitize: true + // - type: string + Value *string `mandatory:"true" json:"value"` + + // Locale + // **SCIM++ Properties:** + // - idcsCanonicalValueSourceFilter: attrName eq "locales" and attrValues.value eq "$(loginTexts.locale)" + // - idcsCanonicalValueSourceResourceType: AllowedValue + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + Locale *string `mandatory:"true" json:"locale"` +} + +func (m SettingsLoginTexts) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SettingsLoginTexts) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/settings_purge_configs.go b/identitydomains/settings_purge_configs.go new file mode 100644 index 0000000000..00f5385746 --- /dev/null +++ b/identitydomains/settings_purge_configs.go @@ -0,0 +1,57 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SettingsPurgeConfigs Purge Configs for different Resource Types +type SettingsPurgeConfigs struct { + + // Resource Name + // **Deprecated Since: 19.1.6** + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + ResourceName *string `mandatory:"true" json:"resourceName"` + + // Retention Period + // **Deprecated Since: 19.1.6** + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: integer + RetentionPeriod *int `mandatory:"true" json:"retentionPeriod"` +} + +func (m SettingsPurgeConfigs) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SettingsPurgeConfigs) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/settings_search_request.go b/identitydomains/settings_search_request.go new file mode 100644 index 0000000000..1951a091a8 --- /dev/null +++ b/identitydomains/settings_search_request.go @@ -0,0 +1,52 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SettingsSearchRequest Clients MAY execute queries without passing parameters on the URL by using the HTTP POST verb combined with the **.search** path extension. The inclusion of **.search** on the end of a valid SCIM endpoint SHALL be used to indicate the HTTP POST verb is intended to be a query operation. To create a new query result set, a SCIM client sends an HTTP POST request to the desired SCIM resource endpoint (ending in **.search**). The body of the POST request MAY include any of the parameters. +type SettingsSearchRequest struct { + + // The schemas attribute is an array of Strings which allows introspection of the supported schema version for a SCIM representation as well any schema extensions supported by that representation. Each String value must be a unique URI. Query requests MUST be identified using the following URI: "urn:ietf:params:scim:api:messages:2.0:SearchRequest" REQUIRED. + Schemas []string `mandatory:"true" json:"schemas"` + + // A multi-valued list of strings indicating the names of resource attributes to return in the response overriding the set of attributes that would be returned by default. Attribute names MUST be in standard attribute notation (Section 3.10 (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.10)) form. See (additional retrieval query parameters (https://tools.ietf.org/html/draft-ietf-scim-api-19#section-3.9)). OPTIONAL. + Attributes []string `mandatory:"false" json:"attributes"` + + // A multi-valued list of strings indicating the return type of attribute definition. The specified set of attributes can be fetched by the return type of the attribute. One or more values can be given together to fetch more than one group of attributes. If "attributes" query parameter is also available, union of the two is fetched. Valid values : all, always, never, request, default. Values are case-insensitive. OPTIONAL. + AttributeSets []AttributeSetsEnum `mandatory:"false" json:"attributeSets,omitempty"` +} + +func (m SettingsSearchRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SettingsSearchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.AttributeSets { + if _, ok := GetMappingAttributeSetsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AttributeSets: %s. Supported values are: %s.", val, strings.Join(GetAttributeSetsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/identitydomains/settings_tenant_custom_claims.go b/identitydomains/settings_tenant_custom_claims.go new file mode 100644 index 0000000000..a55d63903d --- /dev/null +++ b/identitydomains/settings_tenant_custom_claims.go @@ -0,0 +1,212 @@ +// 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. + +// Identity Domains API +// +// Use the Identity Domains API to manage resources within an identity domain, for example, users, dynamic resource groups, groups, and identity providers. For information about managing resources within identity domains, see Identity and Access Management (with identity domains) (https://docs.oracle.com/iaas/Content/Identity/home.htm). This REST API is SCIM compliant. +// Use the table of contents and search tool to explore the Identity Domains API. +// + +package identitydomains + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SettingsTenantCustomClaims Custom claims associated with the specific tenant +type SettingsTenantCustomClaims struct { + + // Custom claim name + // **Added In:** 18.4.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: server + Name *string `mandatory:"true" json:"name"` + + // Custom claim value + // **Added In:** 18.4.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Value *string `mandatory:"true" json:"value"` + + // Indicates under what scenario the custom claim will be return + // **Added In:** 18.4.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + Mode SettingsTenantCustomClaimsModeEnum `mandatory:"true" json:"mode"` + + // Indicates if the custom claim is an expression + // **Added In:** 18.4.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: boolean + // - uniqueness: none + Expression *bool `mandatory:"true" json:"expression"` + + // Indicates if the custom claim is associated with all scopes + // **Added In:** 18.4.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: boolean + // - uniqueness: none + AllScopes *bool `mandatory:"true" json:"allScopes"` + + // Indicates what type of token the custom claim will be embedded + // **Added In:** 18.4.2 + // **SCIM++ Properties:** + // - multiValued: false + // - mutability: readWrite + // - required: true + // - returned: default + // - type: string + // - uniqueness: none + TokenType SettingsTenantCustomClaimsTokenTypeEnum `mandatory:"true" json:"tokenType"` + + // Scopes associated with a specific custom claim + // **Added In:** 18.4.2 + // **SCIM++ Properties:** + // - multiValued: true + // - mutability: readWrite + // - required: false + // - returned: default + // - type: string + // - uniqueness: none + Scopes []string `mandatory:"false" json:"scopes"` +} + +func (m SettingsTenantCustomClaims) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SettingsTenantCustomClaims) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSettingsTenantCustomClaimsModeEnum(string(m.Mode)); !ok && m.Mode != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Mode: %s. Supported values are: %s.", m.Mode, strings.Join(GetSettingsTenantCustomClaimsModeEnumStringValues(), ","))) + } + if _, ok := GetMappingSettingsTenantCustomClaimsTokenTypeEnum(string(m.TokenType)); !ok && m.TokenType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TokenType: %s. Supported values are: %s.", m.TokenType, strings.Join(GetSettingsTenantCustomClaimsTokenTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SettingsTenantCustomClaimsModeEnum Enum with underlying type: string +type SettingsTenantCustomClaimsModeEnum string + +// Set of constants representing the allowable values for SettingsTenantCustomClaimsModeEnum +const ( + SettingsTenantCustomClaimsModeAlways SettingsTenantCustomClaimsModeEnum = "always" + SettingsTenantCustomClaimsModeRequest SettingsTenantCustomClaimsModeEnum = "request" + SettingsTenantCustomClaimsModeNever SettingsTenantCustomClaimsModeEnum = "never" +) + +var mappingSettingsTenantCustomClaimsModeEnum = map[string]SettingsTenantCustomClaimsModeEnum{ + "always": SettingsTenantCustomClaimsModeAlways, + "request": SettingsTenantCustomClaimsModeRequest, + "never": SettingsTenantCustomClaimsModeNever, +} + +var mappingSettingsTenantCustomClaimsModeEnumLowerCase = map[string]SettingsTenantCustomClaimsModeEnum{ + "always": SettingsTenantCustomClaimsModeAlways, + "request": SettingsTenantCustomClaimsModeRequest, + "never": SettingsTenantCustomClaimsModeNever, +} + +// GetSettingsTenantCustomClaimsModeEnumValues Enumerates the set of values for SettingsTenantCustomClaimsModeEnum +func GetSettingsTenantCustomClaimsModeEnumValues() []SettingsTenantCustomClaimsModeEnum { + values := make([]SettingsTenantCustomClaimsModeEnum, 0) + for _, v := range mappingSettingsTenantCustomClaimsModeEnum { + values = append(values, v) + } + return values +} + +// GetSettingsTenantCustomClaimsModeEnumStringValues Enumerates the set of values in String for SettingsTenantCustomClaimsModeEnum +func GetSettingsTenantCustomClaimsModeEnumStringValues() []string { + return []string{ + "always", + "request", + "never", + } +} + +// GetMappingSettingsTenantCustomClaimsModeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSettingsTenantCustomClaimsModeEnum(val string) (SettingsTenantCustomClaimsModeEnum, bool) { + enum, ok := mappingSettingsTenantCustomClaimsModeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// SettingsTenantCustomClaimsTokenTypeEnum Enum with underlying type: string +type SettingsTenantCustomClaimsTokenTypeEnum string + +// Set of constants representing the allowable values for SettingsTenantCustomClaimsTokenTypeEnum +const ( + SettingsTenantCustomClaimsTokenTypeAt SettingsTenantCustomClaimsTokenTypeEnum = "AT" + SettingsTenantCustomClaimsTokenTypeIt SettingsTenantCustomClaimsTokenTypeEnum = "IT" + SettingsTenantCustomClaimsTokenTypeBoth SettingsTenantCustomClaimsTokenTypeEnum = "BOTH" +) + +var mappingSettingsTenantCustomClaimsTokenTypeEnum = map[string]SettingsTenantCustomClaimsTokenTypeEnum{ + "AT": SettingsTenantCustomClaimsTokenTypeAt, + "IT": SettingsTenantCustomClaimsTokenTypeIt, + "BOTH": SettingsTenantCustomClaimsTokenTypeBoth, +} + +var mappingSettingsTenantCustomClaimsTokenTypeEnumLowerCase = map[string]SettingsTenantCustomClaimsTokenTypeEnum{ + "at": SettingsTenantCustomClaimsTokenTypeAt, + "it": SettingsTenantCustomClaimsTokenTypeIt, + "both": SettingsTenantCustomClaimsTokenTypeBoth, +} + +// GetSettingsTenantCustomClaimsTokenTypeEnumValues Enumerates the set of values for SettingsTenantCustomClaimsTokenTypeEnum +func GetSettingsTenantCustomClaimsTokenTypeEnumValues() []SettingsTenantCustomClaimsTokenTypeEnum { + values := make([]SettingsTenantCustomClaimsTokenTypeEnum, 0) + for _, v := range mappingSettingsTenantCustomClaimsTokenTypeEnum { + values = append(values, v) + } + return values +} + +// GetSettingsTenantCustomClaimsTokenTypeEnumStringValues Enumerates the set of values in String for SettingsTenantCustomClaimsTokenTypeEnum +func GetSettingsTenantCustomClaimsTokenTypeEnumStringValues() []string { + return []string{ + "AT", + "IT", + "BOTH", + } +} + +// GetMappingSettingsTenantCustomClaimsTokenTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSettingsTenantCustomClaimsTokenTypeEnum(val string) (SettingsTenantCustomClaimsTokenTypeEnum, bool) { + enum, ok := mappingSettingsTenantCustomClaimsTokenTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/identitydomains/user_ext_risk_scores.go b/identitydomains/user_ext_risk_scores.go index 5f533f32a6..1e7eab6daa 100644 --- a/identitydomains/user_ext_risk_scores.go +++ b/identitydomains/user_ext_risk_scores.go @@ -53,6 +53,8 @@ type UserExtRiskScores struct { // - returned: always // - type: integer // - uniqueness: none + // - idcsMaxValue: 100 + // - idcsMinValue: 0 Score *int `mandatory:"true" json:"score"` // Risk Level diff --git a/psql/action_type.go b/psql/action_type.go new file mode 100644 index 0000000000..8925b43d00 --- /dev/null +++ b/psql/action_type.go @@ -0,0 +1,72 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "strings" +) + +// ActionTypeEnum Enum with underlying type: string +type ActionTypeEnum string + +// Set of constants representing the allowable values for ActionTypeEnum +const ( + ActionTypeCreated ActionTypeEnum = "CREATED" + ActionTypeUpdated ActionTypeEnum = "UPDATED" + ActionTypeDeleted ActionTypeEnum = "DELETED" + ActionTypeInProgress ActionTypeEnum = "IN_PROGRESS" + ActionTypeRelated ActionTypeEnum = "RELATED" + ActionTypeFailed ActionTypeEnum = "FAILED" +) + +var mappingActionTypeEnum = map[string]ActionTypeEnum{ + "CREATED": ActionTypeCreated, + "UPDATED": ActionTypeUpdated, + "DELETED": ActionTypeDeleted, + "IN_PROGRESS": ActionTypeInProgress, + "RELATED": ActionTypeRelated, + "FAILED": ActionTypeFailed, +} + +var mappingActionTypeEnumLowerCase = map[string]ActionTypeEnum{ + "created": ActionTypeCreated, + "updated": ActionTypeUpdated, + "deleted": ActionTypeDeleted, + "in_progress": ActionTypeInProgress, + "related": ActionTypeRelated, + "failed": ActionTypeFailed, +} + +// GetActionTypeEnumValues Enumerates the set of values for ActionTypeEnum +func GetActionTypeEnumValues() []ActionTypeEnum { + values := make([]ActionTypeEnum, 0) + for _, v := range mappingActionTypeEnum { + values = append(values, v) + } + return values +} + +// GetActionTypeEnumStringValues Enumerates the set of values in String for ActionTypeEnum +func GetActionTypeEnumStringValues() []string { + return []string{ + "CREATED", + "UPDATED", + "DELETED", + "IN_PROGRESS", + "RELATED", + "FAILED", + } +} + +// GetMappingActionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingActionTypeEnum(val string) (ActionTypeEnum, bool) { + enum, ok := mappingActionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/backup.go b/psql/backup.go new file mode 100644 index 0000000000..ad121f1dd1 --- /dev/null +++ b/psql/backup.go @@ -0,0 +1,194 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Backup Db system backup information +type Backup struct { + + // Unique identifier that is immutable on creation + Id *string `mandatory:"true" json:"id"` + + // Backup display name + DisplayName *string `mandatory:"true" json:"displayName"` + + // Backup compartment identifier + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time the the Backup was created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the Backup. + LifecycleState BackupLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Backup size in GB. + BackupSize *int `mandatory:"true" json:"backupSize"` + + DbSystemDetails *DbSystemDetails `mandatory:"true" json:"dbSystemDetails"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` + + // Backup description + Description *string `mandatory:"false" json:"description"` + + // Specifies whether the backup was created manually, or via scheduled backup policy + SourceType BackupSourceTypeEnum `mandatory:"false" json:"sourceType,omitempty"` + + // The time the Backup was updated. An RFC3339 formatted datetime string + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Backup retention period in days. + RetentionPeriod *int `mandatory:"false" json:"retentionPeriod"` + + // The source DbSystem OCID. + DbSystemId *string `mandatory:"false" json:"dbSystemId"` + + // lastAcceptedRequestToken from MP. + LastAcceptedRequestToken *string `mandatory:"false" json:"lastAcceptedRequestToken"` + + // lastCompletedRequestToken from MP. + LastCompletedRequestToken *string `mandatory:"false" json:"lastCompletedRequestToken"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m Backup) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Backup) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingBackupLifecycleStateEnum(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(GetBackupLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingBackupSourceTypeEnum(string(m.SourceType)); !ok && m.SourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SourceType: %s. Supported values are: %s.", m.SourceType, strings.Join(GetBackupSourceTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BackupSourceTypeEnum Enum with underlying type: string +type BackupSourceTypeEnum string + +// Set of constants representing the allowable values for BackupSourceTypeEnum +const ( + BackupSourceTypeScheduled BackupSourceTypeEnum = "SCHEDULED" + BackupSourceTypeManual BackupSourceTypeEnum = "MANUAL" +) + +var mappingBackupSourceTypeEnum = map[string]BackupSourceTypeEnum{ + "SCHEDULED": BackupSourceTypeScheduled, + "MANUAL": BackupSourceTypeManual, +} + +var mappingBackupSourceTypeEnumLowerCase = map[string]BackupSourceTypeEnum{ + "scheduled": BackupSourceTypeScheduled, + "manual": BackupSourceTypeManual, +} + +// GetBackupSourceTypeEnumValues Enumerates the set of values for BackupSourceTypeEnum +func GetBackupSourceTypeEnumValues() []BackupSourceTypeEnum { + values := make([]BackupSourceTypeEnum, 0) + for _, v := range mappingBackupSourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetBackupSourceTypeEnumStringValues Enumerates the set of values in String for BackupSourceTypeEnum +func GetBackupSourceTypeEnumStringValues() []string { + return []string{ + "SCHEDULED", + "MANUAL", + } +} + +// GetMappingBackupSourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBackupSourceTypeEnum(val string) (BackupSourceTypeEnum, bool) { + enum, ok := mappingBackupSourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// BackupLifecycleStateEnum Enum with underlying type: string +type BackupLifecycleStateEnum string + +// Set of constants representing the allowable values for BackupLifecycleStateEnum +const ( + BackupLifecycleStateCreating BackupLifecycleStateEnum = "CREATING" + BackupLifecycleStateActive BackupLifecycleStateEnum = "ACTIVE" + BackupLifecycleStateDeleting BackupLifecycleStateEnum = "DELETING" + BackupLifecycleStateDeleted BackupLifecycleStateEnum = "DELETED" + BackupLifecycleStateFailed BackupLifecycleStateEnum = "FAILED" +) + +var mappingBackupLifecycleStateEnum = map[string]BackupLifecycleStateEnum{ + "CREATING": BackupLifecycleStateCreating, + "ACTIVE": BackupLifecycleStateActive, + "DELETING": BackupLifecycleStateDeleting, + "DELETED": BackupLifecycleStateDeleted, + "FAILED": BackupLifecycleStateFailed, +} + +var mappingBackupLifecycleStateEnumLowerCase = map[string]BackupLifecycleStateEnum{ + "creating": BackupLifecycleStateCreating, + "active": BackupLifecycleStateActive, + "deleting": BackupLifecycleStateDeleting, + "deleted": BackupLifecycleStateDeleted, + "failed": BackupLifecycleStateFailed, +} + +// GetBackupLifecycleStateEnumValues Enumerates the set of values for BackupLifecycleStateEnum +func GetBackupLifecycleStateEnumValues() []BackupLifecycleStateEnum { + values := make([]BackupLifecycleStateEnum, 0) + for _, v := range mappingBackupLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetBackupLifecycleStateEnumStringValues Enumerates the set of values in String for BackupLifecycleStateEnum +func GetBackupLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "DELETING", + "DELETED", + "FAILED", + } +} + +// GetMappingBackupLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBackupLifecycleStateEnum(val string) (BackupLifecycleStateEnum, bool) { + enum, ok := mappingBackupLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/backup_collection.go b/psql/backup_collection.go new file mode 100644 index 0000000000..79bd8d1e71 --- /dev/null +++ b/psql/backup_collection.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BackupCollection Results of a backup search. Contains the BackupSummary items and other information, such as metadata. +type BackupCollection struct { + + // List of backups. + Items []BackupSummary `mandatory:"true" json:"items"` +} + +func (m BackupCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BackupCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/backup_policy.go b/psql/backup_policy.go new file mode 100644 index 0000000000..7ec889454a --- /dev/null +++ b/psql/backup_policy.go @@ -0,0 +1,149 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BackupPolicy Posgresql DB system backup policy +type BackupPolicy interface { + + // How many days the customers data should be stored after the db system deletion. + GetRetentionDays() *int +} + +type backuppolicy struct { + JsonData []byte + RetentionDays *int `mandatory:"false" json:"retentionDays"` + Kind string `json:"kind"` +} + +// UnmarshalJSON unmarshals json +func (m *backuppolicy) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerbackuppolicy backuppolicy + s := struct { + Model Unmarshalerbackuppolicy + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.RetentionDays = s.Model.RetentionDays + m.Kind = s.Model.Kind + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *backuppolicy) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Kind { + case "DAILY": + mm := DailyBackupPolicy{} + err = json.Unmarshal(data, &mm) + return mm, err + case "WEEKLY": + mm := WeeklyBackupPolicy{} + err = json.Unmarshal(data, &mm) + return mm, err + case "NONE": + mm := NoneBackupPolicy{} + err = json.Unmarshal(data, &mm) + return mm, err + case "MONTHLY": + mm := MonthlyBackupPolicy{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for BackupPolicy: %s.", m.Kind) + return *m, nil + } +} + +// GetRetentionDays returns RetentionDays +func (m backuppolicy) GetRetentionDays() *int { + return m.RetentionDays +} + +func (m backuppolicy) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m backuppolicy) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// BackupPolicyKindEnum Enum with underlying type: string +type BackupPolicyKindEnum string + +// Set of constants representing the allowable values for BackupPolicyKindEnum +const ( + BackupPolicyKindDaily BackupPolicyKindEnum = "DAILY" + BackupPolicyKindWeekly BackupPolicyKindEnum = "WEEKLY" + BackupPolicyKindMonthly BackupPolicyKindEnum = "MONTHLY" + BackupPolicyKindNone BackupPolicyKindEnum = "NONE" +) + +var mappingBackupPolicyKindEnum = map[string]BackupPolicyKindEnum{ + "DAILY": BackupPolicyKindDaily, + "WEEKLY": BackupPolicyKindWeekly, + "MONTHLY": BackupPolicyKindMonthly, + "NONE": BackupPolicyKindNone, +} + +var mappingBackupPolicyKindEnumLowerCase = map[string]BackupPolicyKindEnum{ + "daily": BackupPolicyKindDaily, + "weekly": BackupPolicyKindWeekly, + "monthly": BackupPolicyKindMonthly, + "none": BackupPolicyKindNone, +} + +// GetBackupPolicyKindEnumValues Enumerates the set of values for BackupPolicyKindEnum +func GetBackupPolicyKindEnumValues() []BackupPolicyKindEnum { + values := make([]BackupPolicyKindEnum, 0) + for _, v := range mappingBackupPolicyKindEnum { + values = append(values, v) + } + return values +} + +// GetBackupPolicyKindEnumStringValues Enumerates the set of values in String for BackupPolicyKindEnum +func GetBackupPolicyKindEnumStringValues() []string { + return []string{ + "DAILY", + "WEEKLY", + "MONTHLY", + "NONE", + } +} + +// GetMappingBackupPolicyKindEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingBackupPolicyKindEnum(val string) (BackupPolicyKindEnum, bool) { + enum, ok := mappingBackupPolicyKindEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/backup_source_details.go b/psql/backup_source_details.go new file mode 100644 index 0000000000..c24681de49 --- /dev/null +++ b/psql/backup_source_details.go @@ -0,0 +1,57 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BackupSourceDetails Restoring to a new DbSystem from the backup. The DbSystem details that are part of the CreateDbSystem request are not required, but if present will override the backup's DbSystem details snapshot. +type BackupSourceDetails struct { + + // DbSystem backup identifier. + BackupId *string `mandatory:"true" json:"backupId"` + + // Restore the DB config overrides from backup. Default is false + IsHavingRestoreConfigOverrides *bool `mandatory:"false" json:"isHavingRestoreConfigOverrides"` +} + +func (m BackupSourceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BackupSourceDetails) 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 BackupSourceDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeBackupSourceDetails BackupSourceDetails + s := struct { + DiscriminatorParam string `json:"sourceType"` + MarshalTypeBackupSourceDetails + }{ + "BACKUP", + (MarshalTypeBackupSourceDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/psql/backup_summary.go b/psql/backup_summary.go new file mode 100644 index 0000000000..cfaaee738d --- /dev/null +++ b/psql/backup_summary.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BackupSummary Summary of the Backup. +type BackupSummary struct { + + // Unique identifier that is immutable on creation + Id *string `mandatory:"true" json:"id"` + + // Backup identifier, can be renamed + DisplayName *string `mandatory:"true" json:"displayName"` + + // Compartment identifier + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time the the Backup was created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the Backup. + LifecycleState BackupLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` + + // The time the Backup was updated. An RFC3339 formatted datetime string + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Specifies whether the backup was created manually, or via scheduled backup policy + SourceType BackupSourceTypeEnum `mandatory:"false" json:"sourceType,omitempty"` + + // Backup size in GB. + BackupSize *int `mandatory:"false" json:"backupSize"` + + // The source DbSystem OCID. + DbSystemId *string `mandatory:"false" json:"dbSystemId"` + + // Backup retention period in days. + RetentionPeriod *int `mandatory:"false" json:"retentionPeriod"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m BackupSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BackupSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingBackupLifecycleStateEnum(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(GetBackupLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingBackupSourceTypeEnum(string(m.SourceType)); !ok && m.SourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SourceType: %s. Supported values are: %s.", m.SourceType, strings.Join(GetBackupSourceTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/change_backup_compartment_details.go b/psql/change_backup_compartment_details.go new file mode 100644 index 0000000000..32b9dfdc4c --- /dev/null +++ b/psql/change_backup_compartment_details.go @@ -0,0 +1,40 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeBackupCompartmentDetails The backup information to move it a different compartment. +type ChangeBackupCompartmentDetails struct { + + // The identifier of the compartment + // into which the resource should be moved. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeBackupCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeBackupCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/change_backup_compartment_request_response.go b/psql/change_backup_compartment_request_response.go new file mode 100644 index 0000000000..044aa0c602 --- /dev/null +++ b/psql/change_backup_compartment_request_response.go @@ -0,0 +1,99 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeBackupCompartmentRequest wrapper for the ChangeBackupCompartment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ChangeBackupCompartment.go.html to see an example of how to use ChangeBackupCompartmentRequest. +type ChangeBackupCompartmentRequest struct { + + // unique Backup identifier + BackupId *string `mandatory:"true" contributesTo:"path" name:"backupId"` + + // The information to be updated. + ChangeBackupCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + 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 ChangeBackupCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeBackupCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeBackupCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeBackupCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeBackupCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeBackupCompartmentResponse wrapper for the ChangeBackupCompartment operation +type ChangeBackupCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeBackupCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeBackupCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/change_configuration_compartment_details.go b/psql/change_configuration_compartment_details.go new file mode 100644 index 0000000000..bb3cb4c4dc --- /dev/null +++ b/psql/change_configuration_compartment_details.go @@ -0,0 +1,40 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeConfigurationCompartmentDetails The Configuration information to move it a different compartment. +type ChangeConfigurationCompartmentDetails struct { + + // The identifier of the compartment + // into which the resource should be moved. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeConfigurationCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeConfigurationCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/change_configuration_compartment_request_response.go b/psql/change_configuration_compartment_request_response.go new file mode 100644 index 0000000000..c12160a864 --- /dev/null +++ b/psql/change_configuration_compartment_request_response.go @@ -0,0 +1,102 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeConfigurationCompartmentRequest wrapper for the ChangeConfigurationCompartment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ChangeConfigurationCompartment.go.html to see an example of how to use ChangeConfigurationCompartmentRequest. +type ChangeConfigurationCompartmentRequest struct { + + // unique Configuration identifier + ConfigurationId *string `mandatory:"true" contributesTo:"path" name:"configurationId"` + + // The information to be updated. + ChangeConfigurationCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + 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 ChangeConfigurationCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeConfigurationCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeConfigurationCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeConfigurationCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeConfigurationCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeConfigurationCompartmentResponse wrapper for the ChangeConfigurationCompartment operation +type ChangeConfigurationCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Configuration instance + Configuration `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeConfigurationCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeConfigurationCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/change_db_system_compartment_details.go b/psql/change_db_system_compartment_details.go new file mode 100644 index 0000000000..4a2c2f8b13 --- /dev/null +++ b/psql/change_db_system_compartment_details.go @@ -0,0 +1,40 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ChangeDbSystemCompartmentDetails Change db system compartment operation details. +type ChangeDbSystemCompartmentDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment + // into which the resource should be moved. + CompartmentId *string `mandatory:"true" json:"compartmentId"` +} + +func (m ChangeDbSystemCompartmentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ChangeDbSystemCompartmentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/change_db_system_compartment_request_response.go b/psql/change_db_system_compartment_request_response.go new file mode 100644 index 0000000000..880df0c9bb --- /dev/null +++ b/psql/change_db_system_compartment_request_response.go @@ -0,0 +1,99 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ChangeDbSystemCompartmentRequest wrapper for the ChangeDbSystemCompartment operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ChangeDbSystemCompartment.go.html to see an example of how to use ChangeDbSystemCompartmentRequest. +type ChangeDbSystemCompartmentRequest struct { + + // unique DbSystem identifier + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // The information to be updated. + ChangeDbSystemCompartmentDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + 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 ChangeDbSystemCompartmentRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ChangeDbSystemCompartmentRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ChangeDbSystemCompartmentRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ChangeDbSystemCompartmentRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ChangeDbSystemCompartmentRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ChangeDbSystemCompartmentResponse wrapper for the ChangeDbSystemCompartment operation +type ChangeDbSystemCompartmentResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ChangeDbSystemCompartmentResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ChangeDbSystemCompartmentResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/config_overrides.go b/psql/config_overrides.go new file mode 100644 index 0000000000..7271c88345 --- /dev/null +++ b/psql/config_overrides.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConfigOverrides Configuration Overrides for PGSQL instance. +type ConfigOverrides struct { + + // Key is the configuration key. + ConfigKey *string `mandatory:"true" json:"configKey"` + + // User selected configuration value + OverridenConfigValue *string `mandatory:"true" json:"overridenConfigValue"` +} + +func (m ConfigOverrides) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConfigOverrides) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/config_params.go b/psql/config_params.go new file mode 100644 index 0000000000..cb4c1f06e8 --- /dev/null +++ b/psql/config_params.go @@ -0,0 +1,60 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConfigParams DB Configuration +type ConfigParams struct { + + // Key is the configuration key. + ConfigKey *string `mandatory:"true" json:"configKey"` + + // Default value + DefaultConfigValue *string `mandatory:"true" json:"defaultConfigValue"` + + // Range or list of allowed values + AllowedValues *string `mandatory:"true" json:"allowedValues"` + + // If true, modfying this configuration value will requires restart. + IsRestartRequired *bool `mandatory:"true" json:"isRestartRequired"` + + // Describes about the Datatype value. + DataType *string `mandatory:"true" json:"dataType"` + + // This flags tells whether the value is overridable or not. + IsOverridable *bool `mandatory:"true" json:"isOverridable"` + + // Details about the Postgresql params. + Description *string `mandatory:"true" json:"description"` + + // User selected configuration value + OverridenConfigValue *string `mandatory:"false" json:"overridenConfigValue"` +} + +func (m ConfigParams) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConfigParams) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/configuration.go b/psql/configuration.go new file mode 100644 index 0000000000..92e87a7804 --- /dev/null +++ b/psql/configuration.go @@ -0,0 +1,136 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Configuration Db system Postgresql Configuration +type Configuration struct { + + // Unique identifier that is immutable on creation + Id *string `mandatory:"true" json:"id"` + + // Config display name + DisplayName *string `mandatory:"true" json:"displayName"` + + // Config compartment identifier + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time Configuration was created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the Configuration. + LifecycleState ConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Compute Shape Name like VM.Standard3.Flex. + Shape *string `mandatory:"true" json:"shape"` + + // CPU cpuCoreCount. Min value is 1. Max value depends on the shape. + InstanceOcpuCount *int `mandatory:"true" json:"instanceOcpuCount"` + + // Memory Size in GB with 1GB increment. Min value matches the cpuCoreCount. Max value depends on the shape. + InstanceMemorySizeInGBs *int `mandatory:"true" json:"instanceMemorySizeInGBs"` + + // Version of the Postgresql DB + DbVersion *string `mandatory:"true" json:"dbVersion"` + + ConfigurationDetails *ConfigurationDetails `mandatory:"true" json:"configurationDetails"` + + // Config description + Description *string `mandatory:"false" json:"description"` + + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m Configuration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Configuration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingConfigurationLifecycleStateEnum(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(GetConfigurationLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ConfigurationLifecycleStateEnum Enum with underlying type: string +type ConfigurationLifecycleStateEnum string + +// Set of constants representing the allowable values for ConfigurationLifecycleStateEnum +const ( + ConfigurationLifecycleStateActive ConfigurationLifecycleStateEnum = "ACTIVE" + ConfigurationLifecycleStateDeleting ConfigurationLifecycleStateEnum = "DELETING" + ConfigurationLifecycleStateDeleted ConfigurationLifecycleStateEnum = "DELETED" + ConfigurationLifecycleStateFailed ConfigurationLifecycleStateEnum = "FAILED" +) + +var mappingConfigurationLifecycleStateEnum = map[string]ConfigurationLifecycleStateEnum{ + "ACTIVE": ConfigurationLifecycleStateActive, + "DELETING": ConfigurationLifecycleStateDeleting, + "DELETED": ConfigurationLifecycleStateDeleted, + "FAILED": ConfigurationLifecycleStateFailed, +} + +var mappingConfigurationLifecycleStateEnumLowerCase = map[string]ConfigurationLifecycleStateEnum{ + "active": ConfigurationLifecycleStateActive, + "deleting": ConfigurationLifecycleStateDeleting, + "deleted": ConfigurationLifecycleStateDeleted, + "failed": ConfigurationLifecycleStateFailed, +} + +// GetConfigurationLifecycleStateEnumValues Enumerates the set of values for ConfigurationLifecycleStateEnum +func GetConfigurationLifecycleStateEnumValues() []ConfigurationLifecycleStateEnum { + values := make([]ConfigurationLifecycleStateEnum, 0) + for _, v := range mappingConfigurationLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetConfigurationLifecycleStateEnumStringValues Enumerates the set of values in String for ConfigurationLifecycleStateEnum +func GetConfigurationLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "DELETING", + "DELETED", + "FAILED", + } +} + +// GetMappingConfigurationLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingConfigurationLifecycleStateEnum(val string) (ConfigurationLifecycleStateEnum, bool) { + enum, ok := mappingConfigurationLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/configuration_collection.go b/psql/configuration_collection.go new file mode 100644 index 0000000000..fa54ee259e --- /dev/null +++ b/psql/configuration_collection.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConfigurationCollection Results of a configuration search. Contains the ConfigurationSummary items and other information, such as metadata. +type ConfigurationCollection struct { + + // List of Configurations. + Items []ConfigurationSummary `mandatory:"true" json:"items"` +} + +func (m ConfigurationCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConfigurationCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/configuration_details.go b/psql/configuration_details.go new file mode 100644 index 0000000000..03aca16efc --- /dev/null +++ b/psql/configuration_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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConfigurationDetails List of DB Configuration Values. +type ConfigurationDetails struct { + + // List of ConfigParms object. + Items []ConfigParams `mandatory:"true" json:"items"` +} + +func (m ConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/configuration_summary.go b/psql/configuration_summary.go new file mode 100644 index 0000000000..7cf0ad571f --- /dev/null +++ b/psql/configuration_summary.go @@ -0,0 +1,81 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConfigurationSummary Summary of the Configuration. +type ConfigurationSummary struct { + + // Unique identifier that is immutable on creation + Id *string `mandatory:"true" json:"id"` + + // Configuration identifier name + DisplayName *string `mandatory:"true" json:"displayName"` + + // Compartment identifier + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time the the Configuration was created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the Configuration. + LifecycleState ConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Compute Shape Name like VM.Standard3.Flex. + Shape *string `mandatory:"true" json:"shape"` + + // Version of the Postgresql DB + DbVersion *string `mandatory:"true" json:"dbVersion"` + + // CPU cpuCoreCount. Min value is 1. Max value depends on the shape. + InstanceOcpuCount *int `mandatory:"true" json:"instanceOcpuCount"` + + // Memory Size in GB with 1GB increment. Min value matches the cpuCoreCount. Max value depends on the shape. + InstanceMemorySizeInGBs *int `mandatory:"true" json:"instanceMemorySizeInGBs"` + + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m ConfigurationSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConfigurationSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingConfigurationLifecycleStateEnum(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(GetConfigurationLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/connection_details.go b/psql/connection_details.go new file mode 100644 index 0000000000..1288c2240c --- /dev/null +++ b/psql/connection_details.go @@ -0,0 +1,46 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConnectionDetails The real-time DbSystem configuration that customers can use for getting access to the PostgreSQL instance. +type ConnectionDetails struct { + + // The CA certificate to be used by the Posgresql client to connect to the database. + // The CA certificate is used to authenticate the server identity. + // It is issued by PostgreSQL Service Private CA. + CaCertificate *string `mandatory:"true" json:"caCertificate"` + + PrimaryDbEndpoint *Endpoint `mandatory:"true" json:"primaryDbEndpoint"` + + // The list of DbInstance endpoints in the DbSystem. + InstanceEndpoints []DbInstanceEndpoint `mandatory:"true" json:"instanceEndpoints"` +} + +func (m ConnectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConnectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/create_backup_details.go b/psql/create_backup_details.go new file mode 100644 index 0000000000..65bee288b9 --- /dev/null +++ b/psql/create_backup_details.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateBackupDetails The information to create a new Backup. +type CreateBackupDetails struct { + + // Backup display name. + DisplayName *string `mandatory:"true" json:"displayName"` + + // Compartment identifier + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Posgresql DbSystem identifier + DbSystemId *string `mandatory:"true" json:"dbSystemId"` + + // Backup description + Description *string `mandatory:"false" json:"description"` + + // Backup retention period in days. + RetentionPeriod *int `mandatory:"false" json:"retentionPeriod"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreateBackupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateBackupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/create_backup_request_response.go b/psql/create_backup_request_response.go new file mode 100644 index 0000000000..9f0db585d2 --- /dev/null +++ b/psql/create_backup_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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateBackupRequest wrapper for the CreateBackup operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/CreateBackup.go.html to see an example of how to use CreateBackupRequest. +type CreateBackupRequest struct { + + // Details for the new Backup. + CreateBackupDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateBackupResponse wrapper for the CreateBackup operation +type CreateBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/create_configuration_details.go b/psql/create_configuration_details.go new file mode 100644 index 0000000000..1a5bc8dd16 --- /dev/null +++ b/psql/create_configuration_details.go @@ -0,0 +1,71 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateConfigurationDetails The information to create a new Configuration. +type CreateConfigurationDetails struct { + + // configuration display name + DisplayName *string `mandatory:"true" json:"displayName"` + + // Compartment identifier + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Compute Shape Name like VM.Standard3.Flex. + Shape *string `mandatory:"true" json:"shape"` + + // Version of the Postgresql DB + DbVersion *string `mandatory:"true" json:"dbVersion"` + + // CPU cpuCoreCount. Min value is 1. Max value depends on the shape. + InstanceOcpuCount *int `mandatory:"true" json:"instanceOcpuCount"` + + // Memory Size in GB with 1GB increment. Min value matches the cpuCoreCount. Max value depends on the shape. + InstanceMemorySizeInGBs *int `mandatory:"true" json:"instanceMemorySizeInGBs"` + + DbConfigurationOverrides *DbConfigurationOverrideCollection `mandatory:"true" json:"dbConfigurationOverrides"` + + // Details about the Configuration Set. + Description *string `mandatory:"false" json:"description"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m CreateConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/create_configuration_request_response.go b/psql/create_configuration_request_response.go new file mode 100644 index 0000000000..fe2d1b6f5e --- /dev/null +++ b/psql/create_configuration_request_response.go @@ -0,0 +1,96 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateConfigurationRequest wrapper for the CreateConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/CreateConfiguration.go.html to see an example of how to use CreateConfigurationRequest. +type CreateConfigurationRequest struct { + + // Details for the new Configuration. + CreateConfigurationDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateConfigurationResponse wrapper for the CreateConfiguration operation +type CreateConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Configuration instance + Configuration `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response CreateConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/create_db_instance_details.go b/psql/create_db_instance_details.go new file mode 100644 index 0000000000..51e4498978 --- /dev/null +++ b/psql/create_db_instance_details.go @@ -0,0 +1,46 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDbInstanceDetails The information about new DbInstance. +type CreateDbInstanceDetails struct { + + // Display name of the DbInstance. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Description of the DbInstance. This field should be input by the user. + Description *string `mandatory:"false" json:"description"` + + // Private IP in customer subnet that will be assigned to the DbInstance. The value is optional. + // If the IP is not provided the IP will be chosen among the available IP addresses from the specified subnet. + PrivateIp *string `mandatory:"false" json:"privateIp"` +} + +func (m CreateDbInstanceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDbInstanceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/create_db_system_details.go b/psql/create_db_system_details.go new file mode 100644 index 0000000000..807ec2cdb6 --- /dev/null +++ b/psql/create_db_system_details.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateDbSystemDetails The information about new DbSystem. +type CreateDbSystemDetails struct { + + // DbSystem display name + DisplayName *string `mandatory:"true" json:"displayName"` + + // Compartment identifier + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Version of DbSystem software. + DbVersion *string `mandatory:"true" json:"dbVersion"` + + StorageDetails StorageDetails `mandatory:"true" json:"storageDetails"` + + // Shape of DbInstance. This name should match from with one of the available shapes from /shapes API. + Shape *string `mandatory:"true" json:"shape"` + + NetworkDetails *NetworkDetails `mandatory:"true" json:"networkDetails"` + + // Description of a DbSystem. This field should be input by the user. + Description *string `mandatory:"false" json:"description"` + + // Type of the DbSystem. + SystemType DbSystemSystemTypeEnum `mandatory:"false" json:"systemType,omitempty"` + + // Configuration identifier + ConfigId *string `mandatory:"false" json:"configId"` + + // The total number of OCPUs available to each DbInstance. + InstanceOcpuCount *int `mandatory:"false" json:"instanceOcpuCount"` + + // The total amount of memory available to each DbInstance, in gigabytes. + InstanceMemorySizeInGBs *int `mandatory:"false" json:"instanceMemorySizeInGBs"` + + // Count of DbInstances to be created in the DbSystem. + InstanceCount *int `mandatory:"false" json:"instanceCount"` + + // Details of DbInstances to be created. Optional parameter. + // If specified, its size must match instanceCount. + InstancesDetails []CreateDbInstanceDetails `mandatory:"false" json:"instancesDetails"` + + Credentials *Credentials `mandatory:"false" json:"credentials"` + + ManagementPolicy *ManagementPolicyDetails `mandatory:"false" json:"managementPolicy"` + + Source SourceDetails `mandatory:"false" json:"source"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreateDbSystemDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateDbSystemDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingDbSystemSystemTypeEnum(string(m.SystemType)); !ok && m.SystemType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SystemType: %s. Supported values are: %s.", m.SystemType, strings.Join(GetDbSystemSystemTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreateDbSystemDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + Description *string `json:"description"` + SystemType DbSystemSystemTypeEnum `json:"systemType"` + ConfigId *string `json:"configId"` + InstanceOcpuCount *int `json:"instanceOcpuCount"` + InstanceMemorySizeInGBs *int `json:"instanceMemorySizeInGBs"` + InstanceCount *int `json:"instanceCount"` + InstancesDetails []CreateDbInstanceDetails `json:"instancesDetails"` + Credentials *Credentials `json:"credentials"` + ManagementPolicy *ManagementPolicyDetails `json:"managementPolicy"` + Source sourcedetails `json:"source"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + CompartmentId *string `json:"compartmentId"` + DbVersion *string `json:"dbVersion"` + StorageDetails storagedetails `json:"storageDetails"` + Shape *string `json:"shape"` + NetworkDetails *NetworkDetails `json:"networkDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Description = model.Description + + m.SystemType = model.SystemType + + m.ConfigId = model.ConfigId + + m.InstanceOcpuCount = model.InstanceOcpuCount + + m.InstanceMemorySizeInGBs = model.InstanceMemorySizeInGBs + + m.InstanceCount = model.InstanceCount + + m.InstancesDetails = make([]CreateDbInstanceDetails, len(model.InstancesDetails)) + copy(m.InstancesDetails, model.InstancesDetails) + m.Credentials = model.Credentials + + m.ManagementPolicy = model.ManagementPolicy + + nn, e = model.Source.UnmarshalPolymorphicJSON(model.Source.JsonData) + if e != nil { + return + } + if nn != nil { + m.Source = nn.(SourceDetails) + } else { + m.Source = nil + } + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.CompartmentId = model.CompartmentId + + m.DbVersion = model.DbVersion + + nn, e = model.StorageDetails.UnmarshalPolymorphicJSON(model.StorageDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.StorageDetails = nn.(StorageDetails) + } else { + m.StorageDetails = nil + } + + m.Shape = model.Shape + + m.NetworkDetails = model.NetworkDetails + + return +} diff --git a/psql/create_db_system_request_response.go b/psql/create_db_system_request_response.go new file mode 100644 index 0000000000..165ca79e8b --- /dev/null +++ b/psql/create_db_system_request_response.go @@ -0,0 +1,99 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateDbSystemRequest wrapper for the CreateDbSystem operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/CreateDbSystem.go.html to see an example of how to use CreateDbSystemRequest. +type CreateDbSystemRequest struct { + + // Details for the new DbSystem. + CreateDbSystemDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateDbSystemRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateDbSystemRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateDbSystemRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateDbSystemRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateDbSystemRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateDbSystemResponse wrapper for the CreateDbSystem operation +type CreateDbSystemResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DbSystem instance + DbSystem `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateDbSystemResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateDbSystemResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/credentials.go b/psql/credentials.go new file mode 100644 index 0000000000..0d628fee9b --- /dev/null +++ b/psql/credentials.go @@ -0,0 +1,70 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Credentials Initial DbSystem credentials that the DbSystem will be provisioned with. +// The password details are not visible on any subsequent operation, such as GET /dbSystems/{dbSystemId}. +type Credentials struct { + + // The DB system username. + Username *string `mandatory:"true" json:"username"` + + PasswordDetails PasswordDetails `mandatory:"true" json:"passwordDetails"` +} + +func (m Credentials) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Credentials) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *Credentials) UnmarshalJSON(data []byte) (e error) { + model := struct { + Username *string `json:"username"` + PasswordDetails passworddetails `json:"passwordDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Username = model.Username + + nn, e = model.PasswordDetails.UnmarshalPolymorphicJSON(model.PasswordDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.PasswordDetails = nn.(PasswordDetails) + } else { + m.PasswordDetails = nil + } + + return +} diff --git a/psql/daily_backup_policy.go b/psql/daily_backup_policy.go new file mode 100644 index 0000000000..d8e7ef59a7 --- /dev/null +++ b/psql/daily_backup_policy.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DailyBackupPolicy Daily backup policy +type DailyBackupPolicy struct { + + // Hour of the day when backup starts. + BackupStart *string `mandatory:"true" json:"backupStart"` + + // How many days the customers data should be stored after the db system deletion. + RetentionDays *int `mandatory:"false" json:"retentionDays"` +} + +// GetRetentionDays returns RetentionDays +func (m DailyBackupPolicy) GetRetentionDays() *int { + return m.RetentionDays +} + +func (m DailyBackupPolicy) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DailyBackupPolicy) 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 DailyBackupPolicy) MarshalJSON() (buff []byte, e error) { + type MarshalTypeDailyBackupPolicy DailyBackupPolicy + s := struct { + DiscriminatorParam string `json:"kind"` + MarshalTypeDailyBackupPolicy + }{ + "DAILY", + (MarshalTypeDailyBackupPolicy)(m), + } + + return json.Marshal(&s) +} diff --git a/psql/db_configuration_override_collection.go b/psql/db_configuration_override_collection.go new file mode 100644 index 0000000000..ed43a7488e --- /dev/null +++ b/psql/db_configuration_override_collection.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DbConfigurationOverrideCollection Configuration Overrides for PGSQL instance. +type DbConfigurationOverrideCollection struct { + + // List of configuration overriden values + Items []ConfigOverrides `mandatory:"true" json:"items"` +} + +func (m DbConfigurationOverrideCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DbConfigurationOverrideCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/db_instance.go b/psql/db_instance.go new file mode 100644 index 0000000000..ff5920bf7a --- /dev/null +++ b/psql/db_instance.go @@ -0,0 +1,125 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DbInstance DbInstance information. +type DbInstance struct { + + // Unique identifier that is immutable on creation. + Id *string `mandatory:"true" json:"id"` + + // The availability domain in which the DbInstance is placed. + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The current state of the DbInstance. + LifecycleState DbInstanceLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The time the the DbInstance was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Display name of the DbInstance. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Description of the DbInstance. + Description *string `mandatory:"false" json:"description"` + + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The time the DbInstance was updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` +} + +func (m DbInstance) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DbInstance) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDbInstanceLifecycleStateEnum(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(GetDbInstanceLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DbInstanceLifecycleStateEnum Enum with underlying type: string +type DbInstanceLifecycleStateEnum string + +// Set of constants representing the allowable values for DbInstanceLifecycleStateEnum +const ( + DbInstanceLifecycleStateCreating DbInstanceLifecycleStateEnum = "CREATING" + DbInstanceLifecycleStateUpdating DbInstanceLifecycleStateEnum = "UPDATING" + DbInstanceLifecycleStateActive DbInstanceLifecycleStateEnum = "ACTIVE" + DbInstanceLifecycleStateInactive DbInstanceLifecycleStateEnum = "INACTIVE" + DbInstanceLifecycleStateDeleting DbInstanceLifecycleStateEnum = "DELETING" + DbInstanceLifecycleStateDeleted DbInstanceLifecycleStateEnum = "DELETED" + DbInstanceLifecycleStateFailed DbInstanceLifecycleStateEnum = "FAILED" +) + +var mappingDbInstanceLifecycleStateEnum = map[string]DbInstanceLifecycleStateEnum{ + "CREATING": DbInstanceLifecycleStateCreating, + "UPDATING": DbInstanceLifecycleStateUpdating, + "ACTIVE": DbInstanceLifecycleStateActive, + "INACTIVE": DbInstanceLifecycleStateInactive, + "DELETING": DbInstanceLifecycleStateDeleting, + "DELETED": DbInstanceLifecycleStateDeleted, + "FAILED": DbInstanceLifecycleStateFailed, +} + +var mappingDbInstanceLifecycleStateEnumLowerCase = map[string]DbInstanceLifecycleStateEnum{ + "creating": DbInstanceLifecycleStateCreating, + "updating": DbInstanceLifecycleStateUpdating, + "active": DbInstanceLifecycleStateActive, + "inactive": DbInstanceLifecycleStateInactive, + "deleting": DbInstanceLifecycleStateDeleting, + "deleted": DbInstanceLifecycleStateDeleted, + "failed": DbInstanceLifecycleStateFailed, +} + +// GetDbInstanceLifecycleStateEnumValues Enumerates the set of values for DbInstanceLifecycleStateEnum +func GetDbInstanceLifecycleStateEnumValues() []DbInstanceLifecycleStateEnum { + values := make([]DbInstanceLifecycleStateEnum, 0) + for _, v := range mappingDbInstanceLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetDbInstanceLifecycleStateEnumStringValues Enumerates the set of values in String for DbInstanceLifecycleStateEnum +func GetDbInstanceLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "UPDATING", + "ACTIVE", + "INACTIVE", + "DELETING", + "DELETED", + "FAILED", + } +} + +// GetMappingDbInstanceLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDbInstanceLifecycleStateEnum(val string) (DbInstanceLifecycleStateEnum, bool) { + enum, ok := mappingDbInstanceLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/db_instance_endpoint.go b/psql/db_instance_endpoint.go new file mode 100644 index 0000000000..353ffdd7ef --- /dev/null +++ b/psql/db_instance_endpoint.go @@ -0,0 +1,41 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DbInstanceEndpoint The DbInstance endpoint information. +type DbInstanceEndpoint struct { + + // Unique identifier of the DbInstance. + DbInstanceId *string `mandatory:"true" json:"dbInstanceId"` + + Endpoint *Endpoint `mandatory:"true" json:"endpoint"` +} + +func (m DbInstanceEndpoint) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DbInstanceEndpoint) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/db_system.go b/psql/db_system.go new file mode 100644 index 0000000000..bcd5c239df --- /dev/null +++ b/psql/db_system.go @@ -0,0 +1,319 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DbSystem Description of DbSystem resource. +type DbSystem struct { + + // Unique identifier that is immutable on creation + Id *string `mandatory:"true" json:"id"` + + // DbSystem display name + DisplayName *string `mandatory:"true" json:"displayName"` + + // Compartment identifier + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time the the DbSystem was created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the DbSystem. + LifecycleState DbSystemLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Type of the DbSystem. + SystemType DbSystemSystemTypeEnum `mandatory:"true" json:"systemType"` + + // The major and minor versions of the DbSystem software. + DbVersion *string `mandatory:"true" json:"dbVersion"` + + // Shape of dbInstance. + Shape *string `mandatory:"true" json:"shape"` + + // The total number of OCPUs available to each DbInstance. + InstanceOcpuCount *int `mandatory:"true" json:"instanceOcpuCount"` + + // The total amount of memory available to each DbInstance, in gigabytes. + InstanceMemorySizeInGBs *int `mandatory:"true" json:"instanceMemorySizeInGBs"` + + StorageDetails StorageDetails `mandatory:"true" json:"storageDetails"` + + NetworkDetails *NetworkDetails `mandatory:"true" json:"networkDetails"` + + ManagementPolicy *ManagementPolicy `mandatory:"true" json:"managementPolicy"` + + // Description of the DbSystem. + Description *string `mandatory:"false" json:"description"` + + // The time the DbSystem was updated. An RFC3339 formatted datetime string + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The DB system username. + AdminUsername *string `mandatory:"false" json:"adminUsername"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // Configuration identifier + ConfigId *string `mandatory:"false" json:"configId"` + + // Count of DbInstances in the DbSystem. + InstanceCount *int `mandatory:"false" json:"instanceCount"` + + // The list of DbInstances in the DbSystem. + Instances []DbInstance `mandatory:"false" json:"instances"` + + Source SourceDetails `mandatory:"false" json:"source"` +} + +func (m DbSystem) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DbSystem) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDbSystemLifecycleStateEnum(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(GetDbSystemLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingDbSystemSystemTypeEnum(string(m.SystemType)); !ok && m.SystemType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SystemType: %s. Supported values are: %s.", m.SystemType, strings.Join(GetDbSystemSystemTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *DbSystem) UnmarshalJSON(data []byte) (e error) { + model := struct { + Description *string `json:"description"` + TimeUpdated *common.SDKTime `json:"timeUpdated"` + LifecycleDetails *string `json:"lifecycleDetails"` + AdminUsername *string `json:"adminUsername"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + ConfigId *string `json:"configId"` + InstanceCount *int `json:"instanceCount"` + Instances []DbInstance `json:"instances"` + Source sourcedetails `json:"source"` + Id *string `json:"id"` + DisplayName *string `json:"displayName"` + CompartmentId *string `json:"compartmentId"` + TimeCreated *common.SDKTime `json:"timeCreated"` + LifecycleState DbSystemLifecycleStateEnum `json:"lifecycleState"` + SystemType DbSystemSystemTypeEnum `json:"systemType"` + DbVersion *string `json:"dbVersion"` + Shape *string `json:"shape"` + InstanceOcpuCount *int `json:"instanceOcpuCount"` + InstanceMemorySizeInGBs *int `json:"instanceMemorySizeInGBs"` + StorageDetails storagedetails `json:"storageDetails"` + NetworkDetails *NetworkDetails `json:"networkDetails"` + ManagementPolicy *ManagementPolicy `json:"managementPolicy"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Description = model.Description + + m.TimeUpdated = model.TimeUpdated + + m.LifecycleDetails = model.LifecycleDetails + + m.AdminUsername = model.AdminUsername + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SystemTags = model.SystemTags + + m.ConfigId = model.ConfigId + + m.InstanceCount = model.InstanceCount + + m.Instances = make([]DbInstance, len(model.Instances)) + copy(m.Instances, model.Instances) + nn, e = model.Source.UnmarshalPolymorphicJSON(model.Source.JsonData) + if e != nil { + return + } + if nn != nil { + m.Source = nn.(SourceDetails) + } else { + m.Source = nil + } + + m.Id = model.Id + + m.DisplayName = model.DisplayName + + m.CompartmentId = model.CompartmentId + + m.TimeCreated = model.TimeCreated + + m.LifecycleState = model.LifecycleState + + m.SystemType = model.SystemType + + m.DbVersion = model.DbVersion + + m.Shape = model.Shape + + m.InstanceOcpuCount = model.InstanceOcpuCount + + m.InstanceMemorySizeInGBs = model.InstanceMemorySizeInGBs + + nn, e = model.StorageDetails.UnmarshalPolymorphicJSON(model.StorageDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.StorageDetails = nn.(StorageDetails) + } else { + m.StorageDetails = nil + } + + m.NetworkDetails = model.NetworkDetails + + m.ManagementPolicy = model.ManagementPolicy + + return +} + +// DbSystemLifecycleStateEnum Enum with underlying type: string +type DbSystemLifecycleStateEnum string + +// Set of constants representing the allowable values for DbSystemLifecycleStateEnum +const ( + DbSystemLifecycleStateCreating DbSystemLifecycleStateEnum = "CREATING" + DbSystemLifecycleStateUpdating DbSystemLifecycleStateEnum = "UPDATING" + DbSystemLifecycleStateActive DbSystemLifecycleStateEnum = "ACTIVE" + DbSystemLifecycleStateInactive DbSystemLifecycleStateEnum = "INACTIVE" + DbSystemLifecycleStateDeleting DbSystemLifecycleStateEnum = "DELETING" + DbSystemLifecycleStateDeleted DbSystemLifecycleStateEnum = "DELETED" + DbSystemLifecycleStateFailed DbSystemLifecycleStateEnum = "FAILED" + DbSystemLifecycleStateNeedsAttention DbSystemLifecycleStateEnum = "NEEDS_ATTENTION" +) + +var mappingDbSystemLifecycleStateEnum = map[string]DbSystemLifecycleStateEnum{ + "CREATING": DbSystemLifecycleStateCreating, + "UPDATING": DbSystemLifecycleStateUpdating, + "ACTIVE": DbSystemLifecycleStateActive, + "INACTIVE": DbSystemLifecycleStateInactive, + "DELETING": DbSystemLifecycleStateDeleting, + "DELETED": DbSystemLifecycleStateDeleted, + "FAILED": DbSystemLifecycleStateFailed, + "NEEDS_ATTENTION": DbSystemLifecycleStateNeedsAttention, +} + +var mappingDbSystemLifecycleStateEnumLowerCase = map[string]DbSystemLifecycleStateEnum{ + "creating": DbSystemLifecycleStateCreating, + "updating": DbSystemLifecycleStateUpdating, + "active": DbSystemLifecycleStateActive, + "inactive": DbSystemLifecycleStateInactive, + "deleting": DbSystemLifecycleStateDeleting, + "deleted": DbSystemLifecycleStateDeleted, + "failed": DbSystemLifecycleStateFailed, + "needs_attention": DbSystemLifecycleStateNeedsAttention, +} + +// GetDbSystemLifecycleStateEnumValues Enumerates the set of values for DbSystemLifecycleStateEnum +func GetDbSystemLifecycleStateEnumValues() []DbSystemLifecycleStateEnum { + values := make([]DbSystemLifecycleStateEnum, 0) + for _, v := range mappingDbSystemLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetDbSystemLifecycleStateEnumStringValues Enumerates the set of values in String for DbSystemLifecycleStateEnum +func GetDbSystemLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "UPDATING", + "ACTIVE", + "INACTIVE", + "DELETING", + "DELETED", + "FAILED", + "NEEDS_ATTENTION", + } +} + +// GetMappingDbSystemLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDbSystemLifecycleStateEnum(val string) (DbSystemLifecycleStateEnum, bool) { + enum, ok := mappingDbSystemLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// DbSystemSystemTypeEnum Enum with underlying type: string +type DbSystemSystemTypeEnum string + +// Set of constants representing the allowable values for DbSystemSystemTypeEnum +const ( + DbSystemSystemTypeOciOptimizedStorage DbSystemSystemTypeEnum = "OCI_OPTIMIZED_STORAGE" +) + +var mappingDbSystemSystemTypeEnum = map[string]DbSystemSystemTypeEnum{ + "OCI_OPTIMIZED_STORAGE": DbSystemSystemTypeOciOptimizedStorage, +} + +var mappingDbSystemSystemTypeEnumLowerCase = map[string]DbSystemSystemTypeEnum{ + "oci_optimized_storage": DbSystemSystemTypeOciOptimizedStorage, +} + +// GetDbSystemSystemTypeEnumValues Enumerates the set of values for DbSystemSystemTypeEnum +func GetDbSystemSystemTypeEnumValues() []DbSystemSystemTypeEnum { + values := make([]DbSystemSystemTypeEnum, 0) + for _, v := range mappingDbSystemSystemTypeEnum { + values = append(values, v) + } + return values +} + +// GetDbSystemSystemTypeEnumStringValues Enumerates the set of values in String for DbSystemSystemTypeEnum +func GetDbSystemSystemTypeEnumStringValues() []string { + return []string{ + "OCI_OPTIMIZED_STORAGE", + } +} + +// GetMappingDbSystemSystemTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDbSystemSystemTypeEnum(val string) (DbSystemSystemTypeEnum, bool) { + enum, ok := mappingDbSystemSystemTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/db_system_collection.go b/psql/db_system_collection.go new file mode 100644 index 0000000000..dc5474d146 --- /dev/null +++ b/psql/db_system_collection.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DbSystemCollection Results of a DB system search. Contains boh DbSystemSummary items and other information, such as metadata. +type DbSystemCollection struct { + + // List of DB systems. + Items []DbSystemSummary `mandatory:"true" json:"items"` +} + +func (m DbSystemCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DbSystemCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/db_system_details.go b/psql/db_system_details.go new file mode 100644 index 0000000000..f84e7806b4 --- /dev/null +++ b/psql/db_system_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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DbSystemDetails Information about the DbSystem associated to a backup. +type DbSystemDetails struct { + + // Type of the DbSystem. + SystemType DbSystemSystemTypeEnum `mandatory:"true" json:"systemType"` + + // The major and minor versions of the DbSystem software. + DbVersion *string `mandatory:"true" json:"dbVersion"` +} + +func (m DbSystemDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DbSystemDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDbSystemSystemTypeEnum(string(m.SystemType)); !ok && m.SystemType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SystemType: %s. Supported values are: %s.", m.SystemType, strings.Join(GetDbSystemSystemTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/db_system_summary.go b/psql/db_system_summary.go new file mode 100644 index 0000000000..e60a2fa0bb --- /dev/null +++ b/psql/db_system_summary.go @@ -0,0 +1,96 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DbSystemSummary Summary of the DbSystem. +type DbSystemSummary struct { + + // Unique identifier that is immutable on creation + Id *string `mandatory:"true" json:"id"` + + // DbSystem display name + DisplayName *string `mandatory:"true" json:"displayName"` + + // Compartment identifier + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The time the the DbSystem was created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the DbSystem. + LifecycleState DbSystemLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Type of the DbSystem. + SystemType DbSystemSystemTypeEnum `mandatory:"true" json:"systemType"` + + // Count of DbInstances in the DbSystem. + InstanceCount *int `mandatory:"true" json:"instanceCount"` + + // The total number of OCPUs available to each DbInstance. + InstanceOcpuCount *int `mandatory:"true" json:"instanceOcpuCount"` + + // The total amount of memory available to each DbInstance, in gigabytes. + InstanceMemorySizeInGBs *int `mandatory:"true" json:"instanceMemorySizeInGBs"` + + // Version of DbSystem software. + DbVersion *string `mandatory:"true" json:"dbVersion"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` + + // The time the DbSystem was updated. An RFC3339 formatted datetime string + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Shape of dbInstance. + Shape *string `mandatory:"false" json:"shape"` + + // Configuration identifier + ConfigId *string `mandatory:"false" json:"configId"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m DbSystemSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DbSystemSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDbSystemLifecycleStateEnum(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(GetDbSystemLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingDbSystemSystemTypeEnum(string(m.SystemType)); !ok && m.SystemType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SystemType: %s. Supported values are: %s.", m.SystemType, strings.Join(GetDbSystemSystemTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/default_config_params.go b/psql/default_config_params.go new file mode 100644 index 0000000000..21a68a838f --- /dev/null +++ b/psql/default_config_params.go @@ -0,0 +1,57 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DefaultConfigParams Default DB Configuration +type DefaultConfigParams struct { + + // Key is the configuration key. + ConfigKey *string `mandatory:"true" json:"configKey"` + + // Default value + DefaultConfigValue *string `mandatory:"true" json:"defaultConfigValue"` + + // Range or list of allowed values + AllowedValues *string `mandatory:"true" json:"allowedValues"` + + // If true, modfying this configuration value will requires restart. + IsRestartRequired *bool `mandatory:"true" json:"isRestartRequired"` + + // Describes about the Datatype value. + DataType *string `mandatory:"true" json:"dataType"` + + // This flags tells whether the value is overridable or not. + IsOverridable *bool `mandatory:"true" json:"isOverridable"` + + // Details about the Postgresql params. + Description *string `mandatory:"true" json:"description"` +} + +func (m DefaultConfigParams) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DefaultConfigParams) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/default_configuration.go b/psql/default_configuration.go new file mode 100644 index 0000000000..552c90ca19 --- /dev/null +++ b/psql/default_configuration.go @@ -0,0 +1,125 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DefaultConfiguration Db system Postgresql Default Configuration +type DefaultConfiguration struct { + + // Unique identifier that is immutable on creation + Id *string `mandatory:"true" json:"id"` + + // Config display name + DisplayName *string `mandatory:"true" json:"displayName"` + + // The time Configuration was created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the Configuration. + LifecycleState DefaultConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Compute Shape Name like VM.Standard3.Flex. + Shape *string `mandatory:"true" json:"shape"` + + // CPU cpuCoreCount. Min value is 1. Max value depends on the shape. + InstanceOcpuCount *int `mandatory:"true" json:"instanceOcpuCount"` + + // Memory Size in GB with 1GB increment. Min value matches the cpuCoreCount. Max value depends on the shape. + InstanceMemorySizeInGBs *int `mandatory:"true" json:"instanceMemorySizeInGBs"` + + // Version of the Postgresql DB + DbVersion *string `mandatory:"true" json:"dbVersion"` + + ConfigurationDetails *DefaultConfigurationDetails `mandatory:"true" json:"configurationDetails"` + + // Config description + Description *string `mandatory:"false" json:"description"` + + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` +} + +func (m DefaultConfiguration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DefaultConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDefaultConfigurationLifecycleStateEnum(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(GetDefaultConfigurationLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DefaultConfigurationLifecycleStateEnum Enum with underlying type: string +type DefaultConfigurationLifecycleStateEnum string + +// Set of constants representing the allowable values for DefaultConfigurationLifecycleStateEnum +const ( + DefaultConfigurationLifecycleStateActive DefaultConfigurationLifecycleStateEnum = "ACTIVE" + DefaultConfigurationLifecycleStateInactive DefaultConfigurationLifecycleStateEnum = "INACTIVE" + DefaultConfigurationLifecycleStateDeleting DefaultConfigurationLifecycleStateEnum = "DELETING" + DefaultConfigurationLifecycleStateDeleted DefaultConfigurationLifecycleStateEnum = "DELETED" + DefaultConfigurationLifecycleStateFailed DefaultConfigurationLifecycleStateEnum = "FAILED" +) + +var mappingDefaultConfigurationLifecycleStateEnum = map[string]DefaultConfigurationLifecycleStateEnum{ + "ACTIVE": DefaultConfigurationLifecycleStateActive, + "INACTIVE": DefaultConfigurationLifecycleStateInactive, + "DELETING": DefaultConfigurationLifecycleStateDeleting, + "DELETED": DefaultConfigurationLifecycleStateDeleted, + "FAILED": DefaultConfigurationLifecycleStateFailed, +} + +var mappingDefaultConfigurationLifecycleStateEnumLowerCase = map[string]DefaultConfigurationLifecycleStateEnum{ + "active": DefaultConfigurationLifecycleStateActive, + "inactive": DefaultConfigurationLifecycleStateInactive, + "deleting": DefaultConfigurationLifecycleStateDeleting, + "deleted": DefaultConfigurationLifecycleStateDeleted, + "failed": DefaultConfigurationLifecycleStateFailed, +} + +// GetDefaultConfigurationLifecycleStateEnumValues Enumerates the set of values for DefaultConfigurationLifecycleStateEnum +func GetDefaultConfigurationLifecycleStateEnumValues() []DefaultConfigurationLifecycleStateEnum { + values := make([]DefaultConfigurationLifecycleStateEnum, 0) + for _, v := range mappingDefaultConfigurationLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetDefaultConfigurationLifecycleStateEnumStringValues Enumerates the set of values in String for DefaultConfigurationLifecycleStateEnum +func GetDefaultConfigurationLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + "DELETING", + "DELETED", + "FAILED", + } +} + +// GetMappingDefaultConfigurationLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDefaultConfigurationLifecycleStateEnum(val string) (DefaultConfigurationLifecycleStateEnum, bool) { + enum, ok := mappingDefaultConfigurationLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/default_configuration_collection.go b/psql/default_configuration_collection.go new file mode 100644 index 0000000000..8109238b12 --- /dev/null +++ b/psql/default_configuration_collection.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DefaultConfigurationCollection Results of a configuration search. Contains the ConfigurationSummary items and other information, such as metadata. +type DefaultConfigurationCollection struct { + + // List of Configurations. + Items []DefaultConfigurationSummary `mandatory:"true" json:"items"` +} + +func (m DefaultConfigurationCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DefaultConfigurationCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/default_configuration_details.go b/psql/default_configuration_details.go new file mode 100644 index 0000000000..a2325bf508 --- /dev/null +++ b/psql/default_configuration_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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DefaultConfigurationDetails List of DB default Configuration Values. +type DefaultConfigurationDetails struct { + + // List of ConfigParms object. + Items []DefaultConfigParams `mandatory:"true" json:"items"` +} + +func (m DefaultConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DefaultConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/default_configuration_summary.go b/psql/default_configuration_summary.go new file mode 100644 index 0000000000..1656fed9a4 --- /dev/null +++ b/psql/default_configuration_summary.go @@ -0,0 +1,66 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DefaultConfigurationSummary Summary of the Configuration. +type DefaultConfigurationSummary struct { + + // Unique identifier that is immutable on creation + Id *string `mandatory:"true" json:"id"` + + // Configuration identifier name + DisplayName *string `mandatory:"true" json:"displayName"` + + // The time the the Configuration was created. An RFC3339 formatted datetime string + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the Configuration. + LifecycleState DefaultConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Compute Shape Name like VM.Standard3.Flex. + Shape *string `mandatory:"true" json:"shape"` + + // Version of the Postgresql DB + DbVersion *string `mandatory:"true" json:"dbVersion"` + + // CPU cpuCoreCount. Min value is 1. Max value depends on the shape. + InstanceOcpuCount *int `mandatory:"true" json:"instanceOcpuCount"` + + // Memory Size in GB with 1GB increment. Min value matches the cpuCoreCount. Max value depends on the shape. + InstanceMemorySizeInGBs *int `mandatory:"true" json:"instanceMemorySizeInGBs"` + + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` +} + +func (m DefaultConfigurationSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DefaultConfigurationSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDefaultConfigurationLifecycleStateEnum(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(GetDefaultConfigurationLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/delete_backup_request_response.go b/psql/delete_backup_request_response.go new file mode 100644 index 0000000000..c4ad45db37 --- /dev/null +++ b/psql/delete_backup_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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteBackupRequest wrapper for the DeleteBackup operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/DeleteBackup.go.html to see an example of how to use DeleteBackupRequest. +type DeleteBackupRequest struct { + + // unique Backup identifier + BackupId *string `mandatory:"true" contributesTo:"path" name:"backupId"` + + // For optimistic concurrency control. In the PUT or DELETE call + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteBackupResponse wrapper for the DeleteBackup operation +type DeleteBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/delete_configuration_request_response.go b/psql/delete_configuration_request_response.go new file mode 100644 index 0000000000..e6137d3028 --- /dev/null +++ b/psql/delete_configuration_request_response.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. +// Code generated. DO NOT EDIT. + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteConfigurationRequest wrapper for the DeleteConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/DeleteConfiguration.go.html to see an example of how to use DeleteConfigurationRequest. +type DeleteConfigurationRequest struct { + + // unique Configuration identifier + ConfigurationId *string `mandatory:"true" contributesTo:"path" name:"configurationId"` + + // For optimistic concurrency control. In the PUT or DELETE call + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteConfigurationResponse wrapper for the DeleteConfiguration operation +type DeleteConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/delete_db_system_request_response.go b/psql/delete_db_system_request_response.go new file mode 100644 index 0000000000..c354e8694a --- /dev/null +++ b/psql/delete_db_system_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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteDbSystemRequest wrapper for the DeleteDbSystem operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/DeleteDbSystem.go.html to see an example of how to use DeleteDbSystemRequest. +type DeleteDbSystemRequest struct { + + // unique DbSystem identifier + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // For optimistic concurrency control. In the PUT or DELETE call + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteDbSystemRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteDbSystemRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteDbSystemRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteDbSystemRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteDbSystemRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteDbSystemResponse wrapper for the DeleteDbSystem operation +type DeleteDbSystemResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteDbSystemResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteDbSystemResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/endpoint.go b/psql/endpoint.go new file mode 100644 index 0000000000..7ee4f91b23 --- /dev/null +++ b/psql/endpoint.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Endpoint The node endpoint information. +type Endpoint struct { + + // The FQDN of the endpoint + Fqdn *string `mandatory:"true" json:"fqdn"` + + // The IP Address of the endpoint + IpAddress *string `mandatory:"true" json:"ipAddress"` + + // The port Address of the endpoint + Port *int `mandatory:"true" json:"port"` +} + +func (m Endpoint) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Endpoint) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/failover_db_system_details.go b/psql/failover_db_system_details.go new file mode 100644 index 0000000000..2c5de5f313 --- /dev/null +++ b/psql/failover_db_system_details.go @@ -0,0 +1,44 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FailoverDbSystemDetails DB system failover information. +type FailoverDbSystemDetails struct { + + // The desired AD for 3AD regions. Optional parameter. + // If not set the AD will be chosen based on the availability. + Ad *string `mandatory:"false" json:"ad"` + + // Unique identifier of the DbInstance. Optional parameter. + // If not set an existing DbInstance will be chosen based on the availability. + DbInstanceId *string `mandatory:"false" json:"dbInstanceId"` +} + +func (m FailoverDbSystemDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m FailoverDbSystemDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/failover_db_system_request_response.go b/psql/failover_db_system_request_response.go new file mode 100644 index 0000000000..6a9a31f3b5 --- /dev/null +++ b/psql/failover_db_system_request_response.go @@ -0,0 +1,99 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// FailoverDbSystemRequest wrapper for the FailoverDbSystem operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/FailoverDbSystem.go.html to see an example of how to use FailoverDbSystemRequest. +type FailoverDbSystemRequest struct { + + // unique DbSystem identifier + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // The information to be updated. + FailoverDbSystemDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + 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 FailoverDbSystemRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request FailoverDbSystemRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request FailoverDbSystemRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request FailoverDbSystemRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request FailoverDbSystemRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// FailoverDbSystemResponse wrapper for the FailoverDbSystem operation +type FailoverDbSystemResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response FailoverDbSystemResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response FailoverDbSystemResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/get_backup_request_response.go b/psql/get_backup_request_response.go new file mode 100644 index 0000000000..a79771876c --- /dev/null +++ b/psql/get_backup_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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetBackupRequest wrapper for the GetBackup operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/GetBackup.go.html to see an example of how to use GetBackupRequest. +type GetBackupRequest struct { + + // unique Backup identifier + BackupId *string `mandatory:"true" contributesTo:"path" name:"backupId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetBackupResponse wrapper for the GetBackup operation +type GetBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Backup instance + Backup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/get_configuration_request_response.go b/psql/get_configuration_request_response.go new file mode 100644 index 0000000000..ed8fc5f892 --- /dev/null +++ b/psql/get_configuration_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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetConfigurationRequest wrapper for the GetConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/GetConfiguration.go.html to see an example of how to use GetConfigurationRequest. +type GetConfigurationRequest struct { + + // unique Configuration identifier + ConfigurationId *string `mandatory:"true" contributesTo:"path" name:"configurationId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetConfigurationResponse wrapper for the GetConfiguration operation +type GetConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Configuration instance + Configuration `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/get_connection_details_request_response.go b/psql/get_connection_details_request_response.go new file mode 100644 index 0000000000..8ab6e0633e --- /dev/null +++ b/psql/get_connection_details_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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetConnectionDetailsRequest wrapper for the GetConnectionDetails operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/GetConnectionDetails.go.html to see an example of how to use GetConnectionDetailsRequest. +type GetConnectionDetailsRequest struct { + + // unique DbSystem identifier + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetConnectionDetailsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetConnectionDetailsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetConnectionDetailsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetConnectionDetailsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetConnectionDetailsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetConnectionDetailsResponse wrapper for the GetConnectionDetails operation +type GetConnectionDetailsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ConnectionDetails instance + ConnectionDetails `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetConnectionDetailsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetConnectionDetailsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/get_db_system_request_response.go b/psql/get_db_system_request_response.go new file mode 100644 index 0000000000..932e28b654 --- /dev/null +++ b/psql/get_db_system_request_response.go @@ -0,0 +1,140 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetDbSystemRequest wrapper for the GetDbSystem operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/GetDbSystem.go.html to see an example of how to use GetDbSystemRequest. +type GetDbSystemRequest struct { + + // unique DbSystem identifier + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A filter to exclude DB config when this query param is set to OverrideDbConfig + ExcludedFields []GetDbSystemExcludedFieldsEnum `contributesTo:"query" name:"excludedFields" omitEmpty:"true" collectionFormat:"multi"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetDbSystemRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetDbSystemRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetDbSystemRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDbSystemRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetDbSystemRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.ExcludedFields { + if _, ok := GetMappingGetDbSystemExcludedFieldsEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ExcludedFields: %s. Supported values are: %s.", val, strings.Join(GetGetDbSystemExcludedFieldsEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetDbSystemResponse wrapper for the GetDbSystem operation +type GetDbSystemResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DbSystem instance + DbSystem `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetDbSystemResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetDbSystemResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// GetDbSystemExcludedFieldsEnum Enum with underlying type: string +type GetDbSystemExcludedFieldsEnum string + +// Set of constants representing the allowable values for GetDbSystemExcludedFieldsEnum +const ( + GetDbSystemExcludedFieldsDbconfigurationparams GetDbSystemExcludedFieldsEnum = "dbConfigurationParams" +) + +var mappingGetDbSystemExcludedFieldsEnum = map[string]GetDbSystemExcludedFieldsEnum{ + "dbConfigurationParams": GetDbSystemExcludedFieldsDbconfigurationparams, +} + +var mappingGetDbSystemExcludedFieldsEnumLowerCase = map[string]GetDbSystemExcludedFieldsEnum{ + "dbconfigurationparams": GetDbSystemExcludedFieldsDbconfigurationparams, +} + +// GetGetDbSystemExcludedFieldsEnumValues Enumerates the set of values for GetDbSystemExcludedFieldsEnum +func GetGetDbSystemExcludedFieldsEnumValues() []GetDbSystemExcludedFieldsEnum { + values := make([]GetDbSystemExcludedFieldsEnum, 0) + for _, v := range mappingGetDbSystemExcludedFieldsEnum { + values = append(values, v) + } + return values +} + +// GetGetDbSystemExcludedFieldsEnumStringValues Enumerates the set of values in String for GetDbSystemExcludedFieldsEnum +func GetGetDbSystemExcludedFieldsEnumStringValues() []string { + return []string{ + "dbConfigurationParams", + } +} + +// GetMappingGetDbSystemExcludedFieldsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetDbSystemExcludedFieldsEnum(val string) (GetDbSystemExcludedFieldsEnum, bool) { + enum, ok := mappingGetDbSystemExcludedFieldsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/get_default_configuration_request_response.go b/psql/get_default_configuration_request_response.go new file mode 100644 index 0000000000..3e2e23f53d --- /dev/null +++ b/psql/get_default_configuration_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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetDefaultConfigurationRequest wrapper for the GetDefaultConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/GetDefaultConfiguration.go.html to see an example of how to use GetDefaultConfigurationRequest. +type GetDefaultConfigurationRequest struct { + + // unique Configuration identifier + DefaultConfigurationId *string `mandatory:"true" contributesTo:"path" name:"defaultConfigurationId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetDefaultConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetDefaultConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetDefaultConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetDefaultConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetDefaultConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetDefaultConfigurationResponse wrapper for the GetDefaultConfiguration operation +type GetDefaultConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The DefaultConfiguration instance + DefaultConfiguration `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetDefaultConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetDefaultConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/get_primary_db_instance_request_response.go b/psql/get_primary_db_instance_request_response.go new file mode 100644 index 0000000000..6c8417c2c5 --- /dev/null +++ b/psql/get_primary_db_instance_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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPrimaryDbInstanceRequest wrapper for the GetPrimaryDbInstance operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/GetPrimaryDbInstance.go.html to see an example of how to use GetPrimaryDbInstanceRequest. +type GetPrimaryDbInstanceRequest struct { + + // unique DbSystem identifier + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPrimaryDbInstanceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPrimaryDbInstanceRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetPrimaryDbInstanceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPrimaryDbInstanceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetPrimaryDbInstanceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPrimaryDbInstanceResponse wrapper for the GetPrimaryDbInstance operation +type GetPrimaryDbInstanceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PrimaryDbInstanceDetails instance + PrimaryDbInstanceDetails `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPrimaryDbInstanceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPrimaryDbInstanceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/get_work_request_request_response.go b/psql/get_work_request_request_response.go new file mode 100644 index 0000000000..f4e0978b6b --- /dev/null +++ b/psql/get_work_request_request_response.go @@ -0,0 +1,96 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetWorkRequestRequest wrapper for the GetWorkRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/GetWorkRequest.go.html to see an example of how to use GetWorkRequestRequest. +type GetWorkRequestRequest struct { + + // The ID of the asynchronous request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetWorkRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetWorkRequestRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetWorkRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetWorkRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetWorkRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetWorkRequestResponse wrapper for the GetWorkRequest operation +type GetWorkRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The WorkRequest instance + WorkRequest `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // A decimal number representing the number of seconds the client should wait before polling this endpoint again. + RetryAfter *int `presentIn:"header" name:"retry-after"` +} + +func (response GetWorkRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetWorkRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/list_backups_request_response.go b/psql/list_backups_request_response.go new file mode 100644 index 0000000000..b58d265271 --- /dev/null +++ b/psql/list_backups_request_response.go @@ -0,0 +1,216 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListBackupsRequest wrapper for the ListBackups operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ListBackups.go.html to see an example of how to use ListBackupsRequest. +type ListBackupsRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The start date for getting backups. An RFC3339 formatted datetime string + TimeStarted *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeStarted"` + + // The End date for getting backups. An RFC3339 formatted datetime string. + TimeEnded *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeEnded"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState BackupLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // unique Backup identifier + BackupId *string `mandatory:"false" contributesTo:"query" name:"backupId"` + + // unique DbSystem identifier + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListBackupsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListBackupsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListBackupsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListBackupsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListBackupsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListBackupsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListBackupsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingBackupLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetBackupLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListBackupsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListBackupsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListBackupsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListBackupsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListBackupsResponse wrapper for the ListBackups operation +type ListBackupsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of BackupCollection instances + BackupCollection `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. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListBackupsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListBackupsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListBackupsSortOrderEnum Enum with underlying type: string +type ListBackupsSortOrderEnum string + +// Set of constants representing the allowable values for ListBackupsSortOrderEnum +const ( + ListBackupsSortOrderAsc ListBackupsSortOrderEnum = "ASC" + ListBackupsSortOrderDesc ListBackupsSortOrderEnum = "DESC" +) + +var mappingListBackupsSortOrderEnum = map[string]ListBackupsSortOrderEnum{ + "ASC": ListBackupsSortOrderAsc, + "DESC": ListBackupsSortOrderDesc, +} + +var mappingListBackupsSortOrderEnumLowerCase = map[string]ListBackupsSortOrderEnum{ + "asc": ListBackupsSortOrderAsc, + "desc": ListBackupsSortOrderDesc, +} + +// GetListBackupsSortOrderEnumValues Enumerates the set of values for ListBackupsSortOrderEnum +func GetListBackupsSortOrderEnumValues() []ListBackupsSortOrderEnum { + values := make([]ListBackupsSortOrderEnum, 0) + for _, v := range mappingListBackupsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListBackupsSortOrderEnumStringValues Enumerates the set of values in String for ListBackupsSortOrderEnum +func GetListBackupsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListBackupsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListBackupsSortOrderEnum(val string) (ListBackupsSortOrderEnum, bool) { + enum, ok := mappingListBackupsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListBackupsSortByEnum Enum with underlying type: string +type ListBackupsSortByEnum string + +// Set of constants representing the allowable values for ListBackupsSortByEnum +const ( + ListBackupsSortByTimecreated ListBackupsSortByEnum = "timeCreated" + ListBackupsSortByDisplayname ListBackupsSortByEnum = "displayName" +) + +var mappingListBackupsSortByEnum = map[string]ListBackupsSortByEnum{ + "timeCreated": ListBackupsSortByTimecreated, + "displayName": ListBackupsSortByDisplayname, +} + +var mappingListBackupsSortByEnumLowerCase = map[string]ListBackupsSortByEnum{ + "timecreated": ListBackupsSortByTimecreated, + "displayname": ListBackupsSortByDisplayname, +} + +// GetListBackupsSortByEnumValues Enumerates the set of values for ListBackupsSortByEnum +func GetListBackupsSortByEnumValues() []ListBackupsSortByEnum { + values := make([]ListBackupsSortByEnum, 0) + for _, v := range mappingListBackupsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListBackupsSortByEnumStringValues Enumerates the set of values in String for ListBackupsSortByEnum +func GetListBackupsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListBackupsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListBackupsSortByEnum(val string) (ListBackupsSortByEnum, bool) { + enum, ok := mappingListBackupsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/list_configurations_request_response.go b/psql/list_configurations_request_response.go new file mode 100644 index 0000000000..3c89f0705b --- /dev/null +++ b/psql/list_configurations_request_response.go @@ -0,0 +1,213 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListConfigurationsRequest wrapper for the ListConfigurations operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ListConfigurations.go.html to see an example of how to use ListConfigurationsRequest. +type ListConfigurationsRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState ConfigurationLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // Verison of the Postgresql DB like 14.5 + DbVersion *string `mandatory:"false" contributesTo:"query" name:"dbVersion"` + + // Shape name of the compute like VM.Standard.E4.Flex or VM.Standard3.Flex + Shape *string `mandatory:"false" contributesTo:"query" name:"shape"` + + // unique Configuration identifier + ConfigurationId *string `mandatory:"false" contributesTo:"query" name:"configurationId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListConfigurationsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListConfigurationsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListConfigurationsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListConfigurationsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListConfigurationsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListConfigurationsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListConfigurationsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingConfigurationLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetConfigurationLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListConfigurationsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListConfigurationsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListConfigurationsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListConfigurationsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListConfigurationsResponse wrapper for the ListConfigurations operation +type ListConfigurationsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ConfigurationCollection instances + ConfigurationCollection `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. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListConfigurationsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListConfigurationsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListConfigurationsSortOrderEnum Enum with underlying type: string +type ListConfigurationsSortOrderEnum string + +// Set of constants representing the allowable values for ListConfigurationsSortOrderEnum +const ( + ListConfigurationsSortOrderAsc ListConfigurationsSortOrderEnum = "ASC" + ListConfigurationsSortOrderDesc ListConfigurationsSortOrderEnum = "DESC" +) + +var mappingListConfigurationsSortOrderEnum = map[string]ListConfigurationsSortOrderEnum{ + "ASC": ListConfigurationsSortOrderAsc, + "DESC": ListConfigurationsSortOrderDesc, +} + +var mappingListConfigurationsSortOrderEnumLowerCase = map[string]ListConfigurationsSortOrderEnum{ + "asc": ListConfigurationsSortOrderAsc, + "desc": ListConfigurationsSortOrderDesc, +} + +// GetListConfigurationsSortOrderEnumValues Enumerates the set of values for ListConfigurationsSortOrderEnum +func GetListConfigurationsSortOrderEnumValues() []ListConfigurationsSortOrderEnum { + values := make([]ListConfigurationsSortOrderEnum, 0) + for _, v := range mappingListConfigurationsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListConfigurationsSortOrderEnumStringValues Enumerates the set of values in String for ListConfigurationsSortOrderEnum +func GetListConfigurationsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListConfigurationsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListConfigurationsSortOrderEnum(val string) (ListConfigurationsSortOrderEnum, bool) { + enum, ok := mappingListConfigurationsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListConfigurationsSortByEnum Enum with underlying type: string +type ListConfigurationsSortByEnum string + +// Set of constants representing the allowable values for ListConfigurationsSortByEnum +const ( + ListConfigurationsSortByTimecreated ListConfigurationsSortByEnum = "timeCreated" + ListConfigurationsSortByDisplayname ListConfigurationsSortByEnum = "displayName" +) + +var mappingListConfigurationsSortByEnum = map[string]ListConfigurationsSortByEnum{ + "timeCreated": ListConfigurationsSortByTimecreated, + "displayName": ListConfigurationsSortByDisplayname, +} + +var mappingListConfigurationsSortByEnumLowerCase = map[string]ListConfigurationsSortByEnum{ + "timecreated": ListConfigurationsSortByTimecreated, + "displayname": ListConfigurationsSortByDisplayname, +} + +// GetListConfigurationsSortByEnumValues Enumerates the set of values for ListConfigurationsSortByEnum +func GetListConfigurationsSortByEnumValues() []ListConfigurationsSortByEnum { + values := make([]ListConfigurationsSortByEnum, 0) + for _, v := range mappingListConfigurationsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListConfigurationsSortByEnumStringValues Enumerates the set of values in String for ListConfigurationsSortByEnum +func GetListConfigurationsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListConfigurationsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListConfigurationsSortByEnum(val string) (ListConfigurationsSortByEnum, bool) { + enum, ok := mappingListConfigurationsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/list_db_systems_request_response.go b/psql/list_db_systems_request_response.go new file mode 100644 index 0000000000..2c5c42b7e6 --- /dev/null +++ b/psql/list_db_systems_request_response.go @@ -0,0 +1,207 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListDbSystemsRequest wrapper for the ListDbSystems operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ListDbSystems.go.html to see an example of how to use ListDbSystemsRequest. +type ListDbSystemsRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState DbSystemLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // unique DbSystem identifier + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListDbSystemsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListDbSystemsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListDbSystemsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListDbSystemsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListDbSystemsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDbSystemsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListDbSystemsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingDbSystemLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetDbSystemLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListDbSystemsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListDbSystemsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListDbSystemsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListDbSystemsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListDbSystemsResponse wrapper for the ListDbSystems operation +type ListDbSystemsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of DbSystemCollection instances + DbSystemCollection `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. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListDbSystemsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListDbSystemsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListDbSystemsSortOrderEnum Enum with underlying type: string +type ListDbSystemsSortOrderEnum string + +// Set of constants representing the allowable values for ListDbSystemsSortOrderEnum +const ( + ListDbSystemsSortOrderAsc ListDbSystemsSortOrderEnum = "ASC" + ListDbSystemsSortOrderDesc ListDbSystemsSortOrderEnum = "DESC" +) + +var mappingListDbSystemsSortOrderEnum = map[string]ListDbSystemsSortOrderEnum{ + "ASC": ListDbSystemsSortOrderAsc, + "DESC": ListDbSystemsSortOrderDesc, +} + +var mappingListDbSystemsSortOrderEnumLowerCase = map[string]ListDbSystemsSortOrderEnum{ + "asc": ListDbSystemsSortOrderAsc, + "desc": ListDbSystemsSortOrderDesc, +} + +// GetListDbSystemsSortOrderEnumValues Enumerates the set of values for ListDbSystemsSortOrderEnum +func GetListDbSystemsSortOrderEnumValues() []ListDbSystemsSortOrderEnum { + values := make([]ListDbSystemsSortOrderEnum, 0) + for _, v := range mappingListDbSystemsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListDbSystemsSortOrderEnumStringValues Enumerates the set of values in String for ListDbSystemsSortOrderEnum +func GetListDbSystemsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListDbSystemsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDbSystemsSortOrderEnum(val string) (ListDbSystemsSortOrderEnum, bool) { + enum, ok := mappingListDbSystemsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListDbSystemsSortByEnum Enum with underlying type: string +type ListDbSystemsSortByEnum string + +// Set of constants representing the allowable values for ListDbSystemsSortByEnum +const ( + ListDbSystemsSortByTimecreated ListDbSystemsSortByEnum = "timeCreated" + ListDbSystemsSortByDisplayname ListDbSystemsSortByEnum = "displayName" +) + +var mappingListDbSystemsSortByEnum = map[string]ListDbSystemsSortByEnum{ + "timeCreated": ListDbSystemsSortByTimecreated, + "displayName": ListDbSystemsSortByDisplayname, +} + +var mappingListDbSystemsSortByEnumLowerCase = map[string]ListDbSystemsSortByEnum{ + "timecreated": ListDbSystemsSortByTimecreated, + "displayname": ListDbSystemsSortByDisplayname, +} + +// GetListDbSystemsSortByEnumValues Enumerates the set of values for ListDbSystemsSortByEnum +func GetListDbSystemsSortByEnumValues() []ListDbSystemsSortByEnum { + values := make([]ListDbSystemsSortByEnum, 0) + for _, v := range mappingListDbSystemsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListDbSystemsSortByEnumStringValues Enumerates the set of values in String for ListDbSystemsSortByEnum +func GetListDbSystemsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListDbSystemsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDbSystemsSortByEnum(val string) (ListDbSystemsSortByEnum, bool) { + enum, ok := mappingListDbSystemsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/list_default_configurations_request_response.go b/psql/list_default_configurations_request_response.go new file mode 100644 index 0000000000..5432841e8a --- /dev/null +++ b/psql/list_default_configurations_request_response.go @@ -0,0 +1,210 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListDefaultConfigurationsRequest wrapper for the ListDefaultConfigurations operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ListDefaultConfigurations.go.html to see an example of how to use ListDefaultConfigurationsRequest. +type ListDefaultConfigurationsRequest struct { + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState ConfigurationLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // Verison of the Postgresql DB like 14.5 + DbVersion *string `mandatory:"false" contributesTo:"query" name:"dbVersion"` + + // Shape name of the compute like VM.Standard.E4.Flex or VM.Standard3.Flex + Shape *string `mandatory:"false" contributesTo:"query" name:"shape"` + + // unique Configuration identifier + ConfigurationId *string `mandatory:"false" contributesTo:"query" name:"configurationId"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListDefaultConfigurationsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListDefaultConfigurationsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListDefaultConfigurationsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListDefaultConfigurationsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListDefaultConfigurationsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListDefaultConfigurationsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListDefaultConfigurationsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingConfigurationLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetConfigurationLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListDefaultConfigurationsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListDefaultConfigurationsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListDefaultConfigurationsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListDefaultConfigurationsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListDefaultConfigurationsResponse wrapper for the ListDefaultConfigurations operation +type ListDefaultConfigurationsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of DefaultConfigurationCollection instances + DefaultConfigurationCollection `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. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListDefaultConfigurationsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListDefaultConfigurationsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListDefaultConfigurationsSortOrderEnum Enum with underlying type: string +type ListDefaultConfigurationsSortOrderEnum string + +// Set of constants representing the allowable values for ListDefaultConfigurationsSortOrderEnum +const ( + ListDefaultConfigurationsSortOrderAsc ListDefaultConfigurationsSortOrderEnum = "ASC" + ListDefaultConfigurationsSortOrderDesc ListDefaultConfigurationsSortOrderEnum = "DESC" +) + +var mappingListDefaultConfigurationsSortOrderEnum = map[string]ListDefaultConfigurationsSortOrderEnum{ + "ASC": ListDefaultConfigurationsSortOrderAsc, + "DESC": ListDefaultConfigurationsSortOrderDesc, +} + +var mappingListDefaultConfigurationsSortOrderEnumLowerCase = map[string]ListDefaultConfigurationsSortOrderEnum{ + "asc": ListDefaultConfigurationsSortOrderAsc, + "desc": ListDefaultConfigurationsSortOrderDesc, +} + +// GetListDefaultConfigurationsSortOrderEnumValues Enumerates the set of values for ListDefaultConfigurationsSortOrderEnum +func GetListDefaultConfigurationsSortOrderEnumValues() []ListDefaultConfigurationsSortOrderEnum { + values := make([]ListDefaultConfigurationsSortOrderEnum, 0) + for _, v := range mappingListDefaultConfigurationsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListDefaultConfigurationsSortOrderEnumStringValues Enumerates the set of values in String for ListDefaultConfigurationsSortOrderEnum +func GetListDefaultConfigurationsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListDefaultConfigurationsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDefaultConfigurationsSortOrderEnum(val string) (ListDefaultConfigurationsSortOrderEnum, bool) { + enum, ok := mappingListDefaultConfigurationsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListDefaultConfigurationsSortByEnum Enum with underlying type: string +type ListDefaultConfigurationsSortByEnum string + +// Set of constants representing the allowable values for ListDefaultConfigurationsSortByEnum +const ( + ListDefaultConfigurationsSortByTimecreated ListDefaultConfigurationsSortByEnum = "timeCreated" + ListDefaultConfigurationsSortByDisplayname ListDefaultConfigurationsSortByEnum = "displayName" +) + +var mappingListDefaultConfigurationsSortByEnum = map[string]ListDefaultConfigurationsSortByEnum{ + "timeCreated": ListDefaultConfigurationsSortByTimecreated, + "displayName": ListDefaultConfigurationsSortByDisplayname, +} + +var mappingListDefaultConfigurationsSortByEnumLowerCase = map[string]ListDefaultConfigurationsSortByEnum{ + "timecreated": ListDefaultConfigurationsSortByTimecreated, + "displayname": ListDefaultConfigurationsSortByDisplayname, +} + +// GetListDefaultConfigurationsSortByEnumValues Enumerates the set of values for ListDefaultConfigurationsSortByEnum +func GetListDefaultConfigurationsSortByEnumValues() []ListDefaultConfigurationsSortByEnum { + values := make([]ListDefaultConfigurationsSortByEnum, 0) + for _, v := range mappingListDefaultConfigurationsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListDefaultConfigurationsSortByEnumStringValues Enumerates the set of values in String for ListDefaultConfigurationsSortByEnum +func GetListDefaultConfigurationsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListDefaultConfigurationsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListDefaultConfigurationsSortByEnum(val string) (ListDefaultConfigurationsSortByEnum, bool) { + enum, ok := mappingListDefaultConfigurationsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/list_shapes_request_response.go b/psql/list_shapes_request_response.go new file mode 100644 index 0000000000..b328a7bcd5 --- /dev/null +++ b/psql/list_shapes_request_response.go @@ -0,0 +1,198 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListShapesRequest wrapper for the ListShapes operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ListShapes.go.html to see an example of how to use ListShapesRequest. +type ListShapesRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return the feature by the shape name. + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListShapesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListShapesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListShapesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListShapesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListShapesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListShapesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListShapesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListShapesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListShapesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListShapesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListShapesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListShapesResponse wrapper for the ListShapes operation +type ListShapesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ShapeCollection instances + ShapeCollection `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. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListShapesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListShapesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListShapesSortOrderEnum Enum with underlying type: string +type ListShapesSortOrderEnum string + +// Set of constants representing the allowable values for ListShapesSortOrderEnum +const ( + ListShapesSortOrderAsc ListShapesSortOrderEnum = "ASC" + ListShapesSortOrderDesc ListShapesSortOrderEnum = "DESC" +) + +var mappingListShapesSortOrderEnum = map[string]ListShapesSortOrderEnum{ + "ASC": ListShapesSortOrderAsc, + "DESC": ListShapesSortOrderDesc, +} + +var mappingListShapesSortOrderEnumLowerCase = map[string]ListShapesSortOrderEnum{ + "asc": ListShapesSortOrderAsc, + "desc": ListShapesSortOrderDesc, +} + +// GetListShapesSortOrderEnumValues Enumerates the set of values for ListShapesSortOrderEnum +func GetListShapesSortOrderEnumValues() []ListShapesSortOrderEnum { + values := make([]ListShapesSortOrderEnum, 0) + for _, v := range mappingListShapesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListShapesSortOrderEnumStringValues Enumerates the set of values in String for ListShapesSortOrderEnum +func GetListShapesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListShapesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListShapesSortOrderEnum(val string) (ListShapesSortOrderEnum, bool) { + enum, ok := mappingListShapesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListShapesSortByEnum Enum with underlying type: string +type ListShapesSortByEnum string + +// Set of constants representing the allowable values for ListShapesSortByEnum +const ( + ListShapesSortByTimecreated ListShapesSortByEnum = "timeCreated" + ListShapesSortByDisplayname ListShapesSortByEnum = "displayName" +) + +var mappingListShapesSortByEnum = map[string]ListShapesSortByEnum{ + "timeCreated": ListShapesSortByTimecreated, + "displayName": ListShapesSortByDisplayname, +} + +var mappingListShapesSortByEnumLowerCase = map[string]ListShapesSortByEnum{ + "timecreated": ListShapesSortByTimecreated, + "displayname": ListShapesSortByDisplayname, +} + +// GetListShapesSortByEnumValues Enumerates the set of values for ListShapesSortByEnum +func GetListShapesSortByEnumValues() []ListShapesSortByEnum { + values := make([]ListShapesSortByEnum, 0) + for _, v := range mappingListShapesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListShapesSortByEnumStringValues Enumerates the set of values in String for ListShapesSortByEnum +func GetListShapesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListShapesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListShapesSortByEnum(val string) (ListShapesSortByEnum, bool) { + enum, ok := mappingListShapesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/list_work_request_errors_request_response.go b/psql/list_work_request_errors_request_response.go new file mode 100644 index 0000000000..ad73d905e2 --- /dev/null +++ b/psql/list_work_request_errors_request_response.go @@ -0,0 +1,191 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkRequestErrorsRequest wrapper for the ListWorkRequestErrors operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrorsRequest. +type ListWorkRequestErrorsRequest struct { + + // The ID of the asynchronous request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + SortBy ListWorkRequestErrorsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListWorkRequestErrorsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkRequestErrorsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestErrorsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListWorkRequestErrorsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestErrorsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListWorkRequestErrorsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListWorkRequestErrorsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListWorkRequestErrorsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkRequestErrorsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListWorkRequestErrorsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkRequestErrorsResponse wrapper for the ListWorkRequestErrors operation +type ListWorkRequestErrorsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of WorkRequestErrorCollection instances + WorkRequestErrorCollection `presentIn:"body"` + + // For pagination of a list of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListWorkRequestErrorsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestErrorsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListWorkRequestErrorsSortByEnum Enum with underlying type: string +type ListWorkRequestErrorsSortByEnum string + +// Set of constants representing the allowable values for ListWorkRequestErrorsSortByEnum +const ( + ListWorkRequestErrorsSortByTimestamp ListWorkRequestErrorsSortByEnum = "timestamp" +) + +var mappingListWorkRequestErrorsSortByEnum = map[string]ListWorkRequestErrorsSortByEnum{ + "timestamp": ListWorkRequestErrorsSortByTimestamp, +} + +var mappingListWorkRequestErrorsSortByEnumLowerCase = map[string]ListWorkRequestErrorsSortByEnum{ + "timestamp": ListWorkRequestErrorsSortByTimestamp, +} + +// GetListWorkRequestErrorsSortByEnumValues Enumerates the set of values for ListWorkRequestErrorsSortByEnum +func GetListWorkRequestErrorsSortByEnumValues() []ListWorkRequestErrorsSortByEnum { + values := make([]ListWorkRequestErrorsSortByEnum, 0) + for _, v := range mappingListWorkRequestErrorsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestErrorsSortByEnumStringValues Enumerates the set of values in String for ListWorkRequestErrorsSortByEnum +func GetListWorkRequestErrorsSortByEnumStringValues() []string { + return []string{ + "timestamp", + } +} + +// GetMappingListWorkRequestErrorsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestErrorsSortByEnum(val string) (ListWorkRequestErrorsSortByEnum, bool) { + enum, ok := mappingListWorkRequestErrorsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkRequestErrorsSortOrderEnum Enum with underlying type: string +type ListWorkRequestErrorsSortOrderEnum string + +// Set of constants representing the allowable values for ListWorkRequestErrorsSortOrderEnum +const ( + ListWorkRequestErrorsSortOrderAsc ListWorkRequestErrorsSortOrderEnum = "ASC" + ListWorkRequestErrorsSortOrderDesc ListWorkRequestErrorsSortOrderEnum = "DESC" +) + +var mappingListWorkRequestErrorsSortOrderEnum = map[string]ListWorkRequestErrorsSortOrderEnum{ + "ASC": ListWorkRequestErrorsSortOrderAsc, + "DESC": ListWorkRequestErrorsSortOrderDesc, +} + +var mappingListWorkRequestErrorsSortOrderEnumLowerCase = map[string]ListWorkRequestErrorsSortOrderEnum{ + "asc": ListWorkRequestErrorsSortOrderAsc, + "desc": ListWorkRequestErrorsSortOrderDesc, +} + +// GetListWorkRequestErrorsSortOrderEnumValues Enumerates the set of values for ListWorkRequestErrorsSortOrderEnum +func GetListWorkRequestErrorsSortOrderEnumValues() []ListWorkRequestErrorsSortOrderEnum { + values := make([]ListWorkRequestErrorsSortOrderEnum, 0) + for _, v := range mappingListWorkRequestErrorsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestErrorsSortOrderEnumStringValues Enumerates the set of values in String for ListWorkRequestErrorsSortOrderEnum +func GetListWorkRequestErrorsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListWorkRequestErrorsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestErrorsSortOrderEnum(val string) (ListWorkRequestErrorsSortOrderEnum, bool) { + enum, ok := mappingListWorkRequestErrorsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/list_work_request_logs_request_response.go b/psql/list_work_request_logs_request_response.go new file mode 100644 index 0000000000..1af04cf323 --- /dev/null +++ b/psql/list_work_request_logs_request_response.go @@ -0,0 +1,191 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkRequestLogsRequest wrapper for the ListWorkRequestLogs operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogsRequest. +type ListWorkRequestLogsRequest struct { + + // The ID of the asynchronous request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The field to sort by. Only one sort order may be provided. Default order for timestamp is descending. + SortBy ListWorkRequestLogsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListWorkRequestLogsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkRequestLogsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestLogsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListWorkRequestLogsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestLogsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListWorkRequestLogsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListWorkRequestLogsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListWorkRequestLogsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkRequestLogsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListWorkRequestLogsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkRequestLogsResponse wrapper for the ListWorkRequestLogs operation +type ListWorkRequestLogsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of WorkRequestLogEntryCollection instances + WorkRequestLogEntryCollection `presentIn:"body"` + + // For pagination of a list of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListWorkRequestLogsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestLogsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListWorkRequestLogsSortByEnum Enum with underlying type: string +type ListWorkRequestLogsSortByEnum string + +// Set of constants representing the allowable values for ListWorkRequestLogsSortByEnum +const ( + ListWorkRequestLogsSortByTimestamp ListWorkRequestLogsSortByEnum = "timestamp" +) + +var mappingListWorkRequestLogsSortByEnum = map[string]ListWorkRequestLogsSortByEnum{ + "timestamp": ListWorkRequestLogsSortByTimestamp, +} + +var mappingListWorkRequestLogsSortByEnumLowerCase = map[string]ListWorkRequestLogsSortByEnum{ + "timestamp": ListWorkRequestLogsSortByTimestamp, +} + +// GetListWorkRequestLogsSortByEnumValues Enumerates the set of values for ListWorkRequestLogsSortByEnum +func GetListWorkRequestLogsSortByEnumValues() []ListWorkRequestLogsSortByEnum { + values := make([]ListWorkRequestLogsSortByEnum, 0) + for _, v := range mappingListWorkRequestLogsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestLogsSortByEnumStringValues Enumerates the set of values in String for ListWorkRequestLogsSortByEnum +func GetListWorkRequestLogsSortByEnumStringValues() []string { + return []string{ + "timestamp", + } +} + +// GetMappingListWorkRequestLogsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestLogsSortByEnum(val string) (ListWorkRequestLogsSortByEnum, bool) { + enum, ok := mappingListWorkRequestLogsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkRequestLogsSortOrderEnum Enum with underlying type: string +type ListWorkRequestLogsSortOrderEnum string + +// Set of constants representing the allowable values for ListWorkRequestLogsSortOrderEnum +const ( + ListWorkRequestLogsSortOrderAsc ListWorkRequestLogsSortOrderEnum = "ASC" + ListWorkRequestLogsSortOrderDesc ListWorkRequestLogsSortOrderEnum = "DESC" +) + +var mappingListWorkRequestLogsSortOrderEnum = map[string]ListWorkRequestLogsSortOrderEnum{ + "ASC": ListWorkRequestLogsSortOrderAsc, + "DESC": ListWorkRequestLogsSortOrderDesc, +} + +var mappingListWorkRequestLogsSortOrderEnumLowerCase = map[string]ListWorkRequestLogsSortOrderEnum{ + "asc": ListWorkRequestLogsSortOrderAsc, + "desc": ListWorkRequestLogsSortOrderDesc, +} + +// GetListWorkRequestLogsSortOrderEnumValues Enumerates the set of values for ListWorkRequestLogsSortOrderEnum +func GetListWorkRequestLogsSortOrderEnumValues() []ListWorkRequestLogsSortOrderEnum { + values := make([]ListWorkRequestLogsSortOrderEnum, 0) + for _, v := range mappingListWorkRequestLogsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestLogsSortOrderEnumStringValues Enumerates the set of values in String for ListWorkRequestLogsSortOrderEnum +func GetListWorkRequestLogsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListWorkRequestLogsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestLogsSortOrderEnum(val string) (ListWorkRequestLogsSortOrderEnum, bool) { + enum, ok := mappingListWorkRequestLogsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/list_work_requests_request_response.go b/psql/list_work_requests_request_response.go new file mode 100644 index 0000000000..b87b54bb9e --- /dev/null +++ b/psql/list_work_requests_request_response.go @@ -0,0 +1,265 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkRequestsRequest wrapper for the ListWorkRequests operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ListWorkRequests.go.html to see an example of how to use ListWorkRequestsRequest. +type ListWorkRequestsRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The ID of the asynchronous work request. + WorkRequestId *string `mandatory:"false" contributesTo:"query" name:"workRequestId"` + + // A filter to return only resources their lifecycleState matches the given OperationStatus. + Status ListWorkRequestsStatusEnum `mandatory:"false" contributesTo:"query" name:"status" omitEmpty:"true"` + + // The ID of the resource affected by the request. + ResourceId *string `mandatory:"false" contributesTo:"query" name:"resourceId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListWorkRequestsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + SortBy ListWorkRequestsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkRequestsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListWorkRequestsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListWorkRequestsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListWorkRequestsStatusEnum(string(request.Status)); !ok && request.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", request.Status, strings.Join(GetListWorkRequestsStatusEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkRequestsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListWorkRequestsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkRequestsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListWorkRequestsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkRequestsResponse wrapper for the ListWorkRequests operation +type ListWorkRequestsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of WorkRequestSummaryCollection instances + WorkRequestSummaryCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListWorkRequestsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListWorkRequestsStatusEnum Enum with underlying type: string +type ListWorkRequestsStatusEnum string + +// Set of constants representing the allowable values for ListWorkRequestsStatusEnum +const ( + ListWorkRequestsStatusAccepted ListWorkRequestsStatusEnum = "ACCEPTED" + ListWorkRequestsStatusInProgress ListWorkRequestsStatusEnum = "IN_PROGRESS" + ListWorkRequestsStatusWaiting ListWorkRequestsStatusEnum = "WAITING" + ListWorkRequestsStatusFailed ListWorkRequestsStatusEnum = "FAILED" + ListWorkRequestsStatusSucceeded ListWorkRequestsStatusEnum = "SUCCEEDED" + ListWorkRequestsStatusCanceling ListWorkRequestsStatusEnum = "CANCELING" + ListWorkRequestsStatusCanceled ListWorkRequestsStatusEnum = "CANCELED" +) + +var mappingListWorkRequestsStatusEnum = map[string]ListWorkRequestsStatusEnum{ + "ACCEPTED": ListWorkRequestsStatusAccepted, + "IN_PROGRESS": ListWorkRequestsStatusInProgress, + "WAITING": ListWorkRequestsStatusWaiting, + "FAILED": ListWorkRequestsStatusFailed, + "SUCCEEDED": ListWorkRequestsStatusSucceeded, + "CANCELING": ListWorkRequestsStatusCanceling, + "CANCELED": ListWorkRequestsStatusCanceled, +} + +var mappingListWorkRequestsStatusEnumLowerCase = map[string]ListWorkRequestsStatusEnum{ + "accepted": ListWorkRequestsStatusAccepted, + "in_progress": ListWorkRequestsStatusInProgress, + "waiting": ListWorkRequestsStatusWaiting, + "failed": ListWorkRequestsStatusFailed, + "succeeded": ListWorkRequestsStatusSucceeded, + "canceling": ListWorkRequestsStatusCanceling, + "canceled": ListWorkRequestsStatusCanceled, +} + +// GetListWorkRequestsStatusEnumValues Enumerates the set of values for ListWorkRequestsStatusEnum +func GetListWorkRequestsStatusEnumValues() []ListWorkRequestsStatusEnum { + values := make([]ListWorkRequestsStatusEnum, 0) + for _, v := range mappingListWorkRequestsStatusEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestsStatusEnumStringValues Enumerates the set of values in String for ListWorkRequestsStatusEnum +func GetListWorkRequestsStatusEnumStringValues() []string { + return []string{ + "ACCEPTED", + "IN_PROGRESS", + "WAITING", + "FAILED", + "SUCCEEDED", + "CANCELING", + "CANCELED", + } +} + +// GetMappingListWorkRequestsStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestsStatusEnum(val string) (ListWorkRequestsStatusEnum, bool) { + enum, ok := mappingListWorkRequestsStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkRequestsSortOrderEnum Enum with underlying type: string +type ListWorkRequestsSortOrderEnum string + +// Set of constants representing the allowable values for ListWorkRequestsSortOrderEnum +const ( + ListWorkRequestsSortOrderAsc ListWorkRequestsSortOrderEnum = "ASC" + ListWorkRequestsSortOrderDesc ListWorkRequestsSortOrderEnum = "DESC" +) + +var mappingListWorkRequestsSortOrderEnum = map[string]ListWorkRequestsSortOrderEnum{ + "ASC": ListWorkRequestsSortOrderAsc, + "DESC": ListWorkRequestsSortOrderDesc, +} + +var mappingListWorkRequestsSortOrderEnumLowerCase = map[string]ListWorkRequestsSortOrderEnum{ + "asc": ListWorkRequestsSortOrderAsc, + "desc": ListWorkRequestsSortOrderDesc, +} + +// GetListWorkRequestsSortOrderEnumValues Enumerates the set of values for ListWorkRequestsSortOrderEnum +func GetListWorkRequestsSortOrderEnumValues() []ListWorkRequestsSortOrderEnum { + values := make([]ListWorkRequestsSortOrderEnum, 0) + for _, v := range mappingListWorkRequestsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestsSortOrderEnumStringValues Enumerates the set of values in String for ListWorkRequestsSortOrderEnum +func GetListWorkRequestsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListWorkRequestsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestsSortOrderEnum(val string) (ListWorkRequestsSortOrderEnum, bool) { + enum, ok := mappingListWorkRequestsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkRequestsSortByEnum Enum with underlying type: string +type ListWorkRequestsSortByEnum string + +// Set of constants representing the allowable values for ListWorkRequestsSortByEnum +const ( + ListWorkRequestsSortByTimeaccepted ListWorkRequestsSortByEnum = "timeAccepted" +) + +var mappingListWorkRequestsSortByEnum = map[string]ListWorkRequestsSortByEnum{ + "timeAccepted": ListWorkRequestsSortByTimeaccepted, +} + +var mappingListWorkRequestsSortByEnumLowerCase = map[string]ListWorkRequestsSortByEnum{ + "timeaccepted": ListWorkRequestsSortByTimeaccepted, +} + +// GetListWorkRequestsSortByEnumValues Enumerates the set of values for ListWorkRequestsSortByEnum +func GetListWorkRequestsSortByEnumValues() []ListWorkRequestsSortByEnum { + values := make([]ListWorkRequestsSortByEnum, 0) + for _, v := range mappingListWorkRequestsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestsSortByEnumStringValues Enumerates the set of values in String for ListWorkRequestsSortByEnum +func GetListWorkRequestsSortByEnumStringValues() []string { + return []string{ + "timeAccepted", + } +} + +// GetMappingListWorkRequestsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestsSortByEnum(val string) (ListWorkRequestsSortByEnum, bool) { + enum, ok := mappingListWorkRequestsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/management_policy.go b/psql/management_policy.go new file mode 100644 index 0000000000..bb5dac4d0f --- /dev/null +++ b/psql/management_policy.go @@ -0,0 +1,69 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ManagementPolicy PostgreSQL DB system management policy +type ManagementPolicy struct { + + // The start of the maintenance window. + MaintenanceWindowStart *string `mandatory:"true" json:"maintenanceWindowStart"` + + BackupPolicy BackupPolicy `mandatory:"true" json:"backupPolicy"` +} + +func (m ManagementPolicy) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ManagementPolicy) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *ManagementPolicy) UnmarshalJSON(data []byte) (e error) { + model := struct { + MaintenanceWindowStart *string `json:"maintenanceWindowStart"` + BackupPolicy backuppolicy `json:"backupPolicy"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.MaintenanceWindowStart = model.MaintenanceWindowStart + + nn, e = model.BackupPolicy.UnmarshalPolymorphicJSON(model.BackupPolicy.JsonData) + if e != nil { + return + } + if nn != nil { + m.BackupPolicy = nn.(BackupPolicy) + } else { + m.BackupPolicy = nil + } + + return +} diff --git a/psql/management_policy_details.go b/psql/management_policy_details.go new file mode 100644 index 0000000000..941aeea6e3 --- /dev/null +++ b/psql/management_policy_details.go @@ -0,0 +1,69 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ManagementPolicyDetails Posgresql DB system management policy update details +type ManagementPolicyDetails struct { + + // The start of the maintenance window. + MaintenanceWindowStart *string `mandatory:"false" json:"maintenanceWindowStart"` + + BackupPolicy BackupPolicy `mandatory:"false" json:"backupPolicy"` +} + +func (m ManagementPolicyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ManagementPolicyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *ManagementPolicyDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + MaintenanceWindowStart *string `json:"maintenanceWindowStart"` + BackupPolicy backuppolicy `json:"backupPolicy"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.MaintenanceWindowStart = model.MaintenanceWindowStart + + nn, e = model.BackupPolicy.UnmarshalPolymorphicJSON(model.BackupPolicy.JsonData) + if e != nil { + return + } + if nn != nil { + m.BackupPolicy = nn.(BackupPolicy) + } else { + m.BackupPolicy = nil + } + + return +} diff --git a/psql/monthly_backup_policy.go b/psql/monthly_backup_policy.go new file mode 100644 index 0000000000..3c3446dba2 --- /dev/null +++ b/psql/monthly_backup_policy.go @@ -0,0 +1,66 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MonthlyBackupPolicy Monthly backup policy +type MonthlyBackupPolicy struct { + + // Hour of the day when backup starts. + BackupStart *string `mandatory:"true" json:"backupStart"` + + // Days of the month when backup should start. + // If the day is greater last day of the current month, then it will be triggered on the last day of the current month + DaysOfTheMonth []int `mandatory:"true" json:"daysOfTheMonth"` + + // How many days the customers data should be stored after the db system deletion. + RetentionDays *int `mandatory:"false" json:"retentionDays"` +} + +// GetRetentionDays returns RetentionDays +func (m MonthlyBackupPolicy) GetRetentionDays() *int { + return m.RetentionDays +} + +func (m MonthlyBackupPolicy) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MonthlyBackupPolicy) 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 MonthlyBackupPolicy) MarshalJSON() (buff []byte, e error) { + type MarshalTypeMonthlyBackupPolicy MonthlyBackupPolicy + s := struct { + DiscriminatorParam string `json:"kind"` + MarshalTypeMonthlyBackupPolicy + }{ + "MONTHLY", + (MarshalTypeMonthlyBackupPolicy)(m), + } + + return json.Marshal(&s) +} diff --git a/psql/network_details.go b/psql/network_details.go new file mode 100644 index 0000000000..d464ba38a1 --- /dev/null +++ b/psql/network_details.go @@ -0,0 +1,46 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NetworkDetails DbSystem network details. +type NetworkDetails struct { + + // Customer Subnet identifier + SubnetId *string `mandatory:"true" json:"subnetId"` + + // Private IP in customer subnet. The value is optional. + // If the IP is not provided the IP will be chosen among the available IP addresses from the specified subnet. + PrimaryDbEndpointPrivateIp *string `mandatory:"false" json:"primaryDbEndpointPrivateIp"` + + // List of customer NetworkSecurityGroup identifiers + NsgIds []string `mandatory:"false" json:"nsgIds"` +} + +func (m NetworkDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NetworkDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/none_backup_policy.go b/psql/none_backup_policy.go new file mode 100644 index 0000000000..b4fb8f9e54 --- /dev/null +++ b/psql/none_backup_policy.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NoneBackupPolicy No backup policy +type NoneBackupPolicy struct { + + // How many days the customers data should be stored after the db system deletion. + RetentionDays *int `mandatory:"false" json:"retentionDays"` +} + +// GetRetentionDays returns RetentionDays +func (m NoneBackupPolicy) GetRetentionDays() *int { + return m.RetentionDays +} + +func (m NoneBackupPolicy) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NoneBackupPolicy) 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 NoneBackupPolicy) MarshalJSON() (buff []byte, e error) { + type MarshalTypeNoneBackupPolicy NoneBackupPolicy + s := struct { + DiscriminatorParam string `json:"kind"` + MarshalTypeNoneBackupPolicy + }{ + "NONE", + (MarshalTypeNoneBackupPolicy)(m), + } + + return json.Marshal(&s) +} diff --git a/psql/none_source_details.go b/psql/none_source_details.go new file mode 100644 index 0000000000..a75ebd28bd --- /dev/null +++ b/psql/none_source_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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NoneSourceDetails This is used to create new DB system or update without restore from backup. The DbSystem details that are part of the CreateDbSystem request are not required, but if present will override the backup's DbSystem details snapshot. +type NoneSourceDetails struct { +} + +func (m NoneSourceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NoneSourceDetails) 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 NoneSourceDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeNoneSourceDetails NoneSourceDetails + s := struct { + DiscriminatorParam string `json:"sourceType"` + MarshalTypeNoneSourceDetails + }{ + "NONE", + (MarshalTypeNoneSourceDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/psql/oci_optimized_storage_details.go b/psql/oci_optimized_storage_details.go new file mode 100644 index 0000000000..6422988b3e --- /dev/null +++ b/psql/oci_optimized_storage_details.go @@ -0,0 +1,75 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OciOptimizedStorageDetails Storage details of the OCI_OPTIMIZED_STORAGE DbSystem. +type OciOptimizedStorageDetails struct { + + // Specifies if the block volume used for the DbSystem is regional or AD-local. + // If not specified, it will be set to false. + // If isRegionallyDurable is set to true, availabilityDomain should not be specified. + // If isRegionallyDurable is set to false, availabilityDomain must be specified. + IsRegionallyDurable *bool `mandatory:"true" json:"isRegionallyDurable"` + + // Specifies the availability domain of AD-local storage. + // If isRegionallyDurable is set to true, availabilityDomain should not be specified. + // If isRegionallyDurable is set to false, availabilityDomain must be specified. + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // DbSystem Performance Unit + Iops *int64 `mandatory:"false" json:"iops"` +} + +// GetIsRegionallyDurable returns IsRegionallyDurable +func (m OciOptimizedStorageDetails) GetIsRegionallyDurable() *bool { + return m.IsRegionallyDurable +} + +// GetAvailabilityDomain returns AvailabilityDomain +func (m OciOptimizedStorageDetails) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +func (m OciOptimizedStorageDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m OciOptimizedStorageDetails) 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 OciOptimizedStorageDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeOciOptimizedStorageDetails OciOptimizedStorageDetails + s := struct { + DiscriminatorParam string `json:"systemType"` + MarshalTypeOciOptimizedStorageDetails + }{ + "OCI_OPTIMIZED_STORAGE", + (MarshalTypeOciOptimizedStorageDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/psql/operation_status.go b/psql/operation_status.go new file mode 100644 index 0000000000..2ee414b716 --- /dev/null +++ b/psql/operation_status.go @@ -0,0 +1,76 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "strings" +) + +// OperationStatusEnum Enum with underlying type: string +type OperationStatusEnum string + +// Set of constants representing the allowable values for OperationStatusEnum +const ( + OperationStatusAccepted OperationStatusEnum = "ACCEPTED" + OperationStatusInProgress OperationStatusEnum = "IN_PROGRESS" + OperationStatusWaiting OperationStatusEnum = "WAITING" + OperationStatusFailed OperationStatusEnum = "FAILED" + OperationStatusSucceeded OperationStatusEnum = "SUCCEEDED" + OperationStatusCanceling OperationStatusEnum = "CANCELING" + OperationStatusCanceled OperationStatusEnum = "CANCELED" +) + +var mappingOperationStatusEnum = map[string]OperationStatusEnum{ + "ACCEPTED": OperationStatusAccepted, + "IN_PROGRESS": OperationStatusInProgress, + "WAITING": OperationStatusWaiting, + "FAILED": OperationStatusFailed, + "SUCCEEDED": OperationStatusSucceeded, + "CANCELING": OperationStatusCanceling, + "CANCELED": OperationStatusCanceled, +} + +var mappingOperationStatusEnumLowerCase = map[string]OperationStatusEnum{ + "accepted": OperationStatusAccepted, + "in_progress": OperationStatusInProgress, + "waiting": OperationStatusWaiting, + "failed": OperationStatusFailed, + "succeeded": OperationStatusSucceeded, + "canceling": OperationStatusCanceling, + "canceled": OperationStatusCanceled, +} + +// GetOperationStatusEnumValues Enumerates the set of values for OperationStatusEnum +func GetOperationStatusEnumValues() []OperationStatusEnum { + values := make([]OperationStatusEnum, 0) + for _, v := range mappingOperationStatusEnum { + values = append(values, v) + } + return values +} + +// GetOperationStatusEnumStringValues Enumerates the set of values in String for OperationStatusEnum +func GetOperationStatusEnumStringValues() []string { + return []string{ + "ACCEPTED", + "IN_PROGRESS", + "WAITING", + "FAILED", + "SUCCEEDED", + "CANCELING", + "CANCELED", + } +} + +// GetMappingOperationStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingOperationStatusEnum(val string) (OperationStatusEnum, bool) { + enum, ok := mappingOperationStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/operation_type.go b/psql/operation_type.go new file mode 100644 index 0000000000..63f7c212da --- /dev/null +++ b/psql/operation_type.go @@ -0,0 +1,80 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "strings" +) + +// OperationTypeEnum Enum with underlying type: string +type OperationTypeEnum string + +// Set of constants representing the allowable values for OperationTypeEnum +const ( + OperationTypeCreatePostgresqlDbSystem OperationTypeEnum = "CREATE_POSTGRESQL_DB_SYSTEM" + OperationTypeUpdatePostgresqlDbSystem OperationTypeEnum = "UPDATE_POSTGRESQL_DB_SYSTEM" + OperationTypeDeletePostgresqlDbSystem OperationTypeEnum = "DELETE_POSTGRESQL_DB_SYSTEM" + OperationTypeMovePostgresqlDbSystem OperationTypeEnum = "MOVE_POSTGRESQL_DB_SYSTEM" + OperationTypeCreatePostgresqlDbSystemBackup OperationTypeEnum = "CREATE_POSTGRESQL_DB_SYSTEM_BACKUP" + OperationTypeUpdatePostgresqlDbSystemBackup OperationTypeEnum = "UPDATE_POSTGRESQL_DB_SYSTEM_BACKUP" + OperationTypeDeletePostgresqlDbSystemBackup OperationTypeEnum = "DELETE_POSTGRESQL_DB_SYSTEM_BACKUP" + OperationTypeMovePostgresqlDbSystemBackup OperationTypeEnum = "MOVE_POSTGRESQL_DB_SYSTEM_BACKUP" +) + +var mappingOperationTypeEnum = map[string]OperationTypeEnum{ + "CREATE_POSTGRESQL_DB_SYSTEM": OperationTypeCreatePostgresqlDbSystem, + "UPDATE_POSTGRESQL_DB_SYSTEM": OperationTypeUpdatePostgresqlDbSystem, + "DELETE_POSTGRESQL_DB_SYSTEM": OperationTypeDeletePostgresqlDbSystem, + "MOVE_POSTGRESQL_DB_SYSTEM": OperationTypeMovePostgresqlDbSystem, + "CREATE_POSTGRESQL_DB_SYSTEM_BACKUP": OperationTypeCreatePostgresqlDbSystemBackup, + "UPDATE_POSTGRESQL_DB_SYSTEM_BACKUP": OperationTypeUpdatePostgresqlDbSystemBackup, + "DELETE_POSTGRESQL_DB_SYSTEM_BACKUP": OperationTypeDeletePostgresqlDbSystemBackup, + "MOVE_POSTGRESQL_DB_SYSTEM_BACKUP": OperationTypeMovePostgresqlDbSystemBackup, +} + +var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ + "create_postgresql_db_system": OperationTypeCreatePostgresqlDbSystem, + "update_postgresql_db_system": OperationTypeUpdatePostgresqlDbSystem, + "delete_postgresql_db_system": OperationTypeDeletePostgresqlDbSystem, + "move_postgresql_db_system": OperationTypeMovePostgresqlDbSystem, + "create_postgresql_db_system_backup": OperationTypeCreatePostgresqlDbSystemBackup, + "update_postgresql_db_system_backup": OperationTypeUpdatePostgresqlDbSystemBackup, + "delete_postgresql_db_system_backup": OperationTypeDeletePostgresqlDbSystemBackup, + "move_postgresql_db_system_backup": OperationTypeMovePostgresqlDbSystemBackup, +} + +// GetOperationTypeEnumValues Enumerates the set of values for OperationTypeEnum +func GetOperationTypeEnumValues() []OperationTypeEnum { + values := make([]OperationTypeEnum, 0) + for _, v := range mappingOperationTypeEnum { + values = append(values, v) + } + return values +} + +// GetOperationTypeEnumStringValues Enumerates the set of values in String for OperationTypeEnum +func GetOperationTypeEnumStringValues() []string { + return []string{ + "CREATE_POSTGRESQL_DB_SYSTEM", + "UPDATE_POSTGRESQL_DB_SYSTEM", + "DELETE_POSTGRESQL_DB_SYSTEM", + "MOVE_POSTGRESQL_DB_SYSTEM", + "CREATE_POSTGRESQL_DB_SYSTEM_BACKUP", + "UPDATE_POSTGRESQL_DB_SYSTEM_BACKUP", + "DELETE_POSTGRESQL_DB_SYSTEM_BACKUP", + "MOVE_POSTGRESQL_DB_SYSTEM_BACKUP", + } +} + +// GetMappingOperationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingOperationTypeEnum(val string) (OperationTypeEnum, bool) { + enum, ok := mappingOperationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/password_details.go b/psql/password_details.go new file mode 100644 index 0000000000..c8028d58f5 --- /dev/null +++ b/psql/password_details.go @@ -0,0 +1,124 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PasswordDetails Details for the DbSystem password. +// Password can be passed as `VaultSecretPasswordDetails`(Vault) or `PlainTextPasswordDetails`. +type PasswordDetails interface { +} + +type passworddetails struct { + JsonData []byte + PasswordType string `json:"passwordType"` +} + +// UnmarshalJSON unmarshals json +func (m *passworddetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerpassworddetails passworddetails + s := struct { + Model Unmarshalerpassworddetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.PasswordType = s.Model.PasswordType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *passworddetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.PasswordType { + case "PLAIN_TEXT": + mm := PlainTextPasswordDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "VAULT_SECRET": + mm := VaultSecretPasswordDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for PasswordDetails: %s.", m.PasswordType) + return *m, nil + } +} + +func (m passworddetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m passworddetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PasswordDetailsPasswordTypeEnum Enum with underlying type: string +type PasswordDetailsPasswordTypeEnum string + +// Set of constants representing the allowable values for PasswordDetailsPasswordTypeEnum +const ( + PasswordDetailsPasswordTypePlainText PasswordDetailsPasswordTypeEnum = "PLAIN_TEXT" + PasswordDetailsPasswordTypeVaultSecret PasswordDetailsPasswordTypeEnum = "VAULT_SECRET" +) + +var mappingPasswordDetailsPasswordTypeEnum = map[string]PasswordDetailsPasswordTypeEnum{ + "PLAIN_TEXT": PasswordDetailsPasswordTypePlainText, + "VAULT_SECRET": PasswordDetailsPasswordTypeVaultSecret, +} + +var mappingPasswordDetailsPasswordTypeEnumLowerCase = map[string]PasswordDetailsPasswordTypeEnum{ + "plain_text": PasswordDetailsPasswordTypePlainText, + "vault_secret": PasswordDetailsPasswordTypeVaultSecret, +} + +// GetPasswordDetailsPasswordTypeEnumValues Enumerates the set of values for PasswordDetailsPasswordTypeEnum +func GetPasswordDetailsPasswordTypeEnumValues() []PasswordDetailsPasswordTypeEnum { + values := make([]PasswordDetailsPasswordTypeEnum, 0) + for _, v := range mappingPasswordDetailsPasswordTypeEnum { + values = append(values, v) + } + return values +} + +// GetPasswordDetailsPasswordTypeEnumStringValues Enumerates the set of values in String for PasswordDetailsPasswordTypeEnum +func GetPasswordDetailsPasswordTypeEnumStringValues() []string { + return []string{ + "PLAIN_TEXT", + "VAULT_SECRET", + } +} + +// GetMappingPasswordDetailsPasswordTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPasswordDetailsPasswordTypeEnum(val string) (PasswordDetailsPasswordTypeEnum, bool) { + enum, ok := mappingPasswordDetailsPasswordTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/patch_db_system_details.go b/psql/patch_db_system_details.go new file mode 100644 index 0000000000..ee97e56669 --- /dev/null +++ b/psql/patch_db_system_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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchDbSystemDetails For Adding Read Replica DB Instance, Operation is INSERT and Value object to specify is +// #/definitions/CreateDbInstanceDetails. +// For Removing Read Replica DB Instance, Operation is REMOVE and Value object needs to be Array of dbInstanceId's +type PatchDbSystemDetails struct { + + // List of patch instructions. + Items []PatchInstruction `mandatory:"false" json:"items"` +} + +func (m PatchDbSystemDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchDbSystemDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *PatchDbSystemDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + Items []patchinstruction `json:"items"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Items = make([]PatchInstruction, len(model.Items)) + for i, n := range model.Items { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Items[i] = nn.(PatchInstruction) + } else { + m.Items[i] = nil + } + } + return +} diff --git a/psql/patch_db_system_request_response.go b/psql/patch_db_system_request_response.go new file mode 100644 index 0000000000..28737518eb --- /dev/null +++ b/psql/patch_db_system_request_response.go @@ -0,0 +1,96 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PatchDbSystemRequest wrapper for the PatchDbSystem operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/PatchDbSystem.go.html to see an example of how to use PatchDbSystemRequest. +type PatchDbSystemRequest struct { + + // unique DbSystem identifier + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // The information to be patched. + PatchDbSystemDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PatchDbSystemRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PatchDbSystemRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PatchDbSystemRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PatchDbSystemRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PatchDbSystemRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchDbSystemResponse wrapper for the PatchDbSystem operation +type PatchDbSystemResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response PatchDbSystemResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PatchDbSystemResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/patch_insert_instruction.go b/psql/patch_insert_instruction.go new file mode 100644 index 0000000000..d8257cf4fb --- /dev/null +++ b/psql/patch_insert_instruction.go @@ -0,0 +1,117 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchInsertInstruction An operation that inserts a value into an array, shifting array items as necessary and handling NOT_FOUND exceptions by creating the implied containing structure. +type PatchInsertInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + Selection *string `mandatory:"true" json:"selection"` + + // A value to be inserted into the target. + Value *interface{} `mandatory:"true" json:"value"` + + // A selection to be evaluated against the array for identifying a particular reference item within it, with the same format and semantics as `selection`. + SelectedItem *string `mandatory:"false" json:"selectedItem"` + + // Where to insert the value, relative to the first item matched by `selectedItem`. + // If `selectedItem` is unspecified, then "BEFORE" specifies insertion at the first position in an array and "AFTER" specifies insertion at the last position. + // If `selectedItem` is specified but results in an empty selection, then both values specify insertion at the last position. + Position PatchInsertInstructionPositionEnum `mandatory:"false" json:"position,omitempty"` +} + +// GetSelection returns Selection +func (m PatchInsertInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchInsertInstruction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchInsertInstruction) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPatchInsertInstructionPositionEnum(string(m.Position)); !ok && m.Position != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Position: %s. Supported values are: %s.", m.Position, strings.Join(GetPatchInsertInstructionPositionEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PatchInsertInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchInsertInstruction PatchInsertInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchInsertInstruction + }{ + "INSERT", + (MarshalTypePatchInsertInstruction)(m), + } + + return json.Marshal(&s) +} + +// PatchInsertInstructionPositionEnum Enum with underlying type: string +type PatchInsertInstructionPositionEnum string + +// Set of constants representing the allowable values for PatchInsertInstructionPositionEnum +const ( + PatchInsertInstructionPositionBefore PatchInsertInstructionPositionEnum = "BEFORE" + PatchInsertInstructionPositionAfter PatchInsertInstructionPositionEnum = "AFTER" +) + +var mappingPatchInsertInstructionPositionEnum = map[string]PatchInsertInstructionPositionEnum{ + "BEFORE": PatchInsertInstructionPositionBefore, + "AFTER": PatchInsertInstructionPositionAfter, +} + +var mappingPatchInsertInstructionPositionEnumLowerCase = map[string]PatchInsertInstructionPositionEnum{ + "before": PatchInsertInstructionPositionBefore, + "after": PatchInsertInstructionPositionAfter, +} + +// GetPatchInsertInstructionPositionEnumValues Enumerates the set of values for PatchInsertInstructionPositionEnum +func GetPatchInsertInstructionPositionEnumValues() []PatchInsertInstructionPositionEnum { + values := make([]PatchInsertInstructionPositionEnum, 0) + for _, v := range mappingPatchInsertInstructionPositionEnum { + values = append(values, v) + } + return values +} + +// GetPatchInsertInstructionPositionEnumStringValues Enumerates the set of values in String for PatchInsertInstructionPositionEnum +func GetPatchInsertInstructionPositionEnumStringValues() []string { + return []string{ + "BEFORE", + "AFTER", + } +} + +// GetMappingPatchInsertInstructionPositionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPatchInsertInstructionPositionEnum(val string) (PatchInsertInstructionPositionEnum, bool) { + enum, ok := mappingPatchInsertInstructionPositionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/patch_instruction.go b/psql/patch_instruction.go new file mode 100644 index 0000000000..ae1b98fe4e --- /dev/null +++ b/psql/patch_instruction.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchInstruction A single instruction to be included as part of Patch request content. +type PatchInstruction interface { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + GetSelection() *string +} + +type patchinstruction struct { + JsonData []byte + Selection *string `mandatory:"true" json:"selection"` + Operation string `json:"operation"` +} + +// UnmarshalJSON unmarshals json +func (m *patchinstruction) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerpatchinstruction patchinstruction + s := struct { + Model Unmarshalerpatchinstruction + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Selection = s.Model.Selection + m.Operation = s.Model.Operation + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *patchinstruction) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Operation { + case "MOVE": + mm := PatchMoveInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + case "REMOVE": + mm := PatchRemoveInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + case "REPLACE": + mm := PatchReplaceInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + case "INSERT": + mm := PatchInsertInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + case "REQUIRE": + mm := PatchRequireInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + case "MERGE": + mm := PatchMergeInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + case "PROHIBIT": + mm := PatchProhibitInstruction{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for PatchInstruction: %s.", m.Operation) + return *m, nil + } +} + +// GetSelection returns Selection +func (m patchinstruction) GetSelection() *string { + return m.Selection +} + +func (m patchinstruction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m patchinstruction) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchInstructionOperationEnum Enum with underlying type: string +type PatchInstructionOperationEnum string + +// Set of constants representing the allowable values for PatchInstructionOperationEnum +const ( + PatchInstructionOperationRequire PatchInstructionOperationEnum = "REQUIRE" + PatchInstructionOperationProhibit PatchInstructionOperationEnum = "PROHIBIT" + PatchInstructionOperationReplace PatchInstructionOperationEnum = "REPLACE" + PatchInstructionOperationInsert PatchInstructionOperationEnum = "INSERT" + PatchInstructionOperationRemove PatchInstructionOperationEnum = "REMOVE" + PatchInstructionOperationMove PatchInstructionOperationEnum = "MOVE" + PatchInstructionOperationMerge PatchInstructionOperationEnum = "MERGE" +) + +var mappingPatchInstructionOperationEnum = map[string]PatchInstructionOperationEnum{ + "REQUIRE": PatchInstructionOperationRequire, + "PROHIBIT": PatchInstructionOperationProhibit, + "REPLACE": PatchInstructionOperationReplace, + "INSERT": PatchInstructionOperationInsert, + "REMOVE": PatchInstructionOperationRemove, + "MOVE": PatchInstructionOperationMove, + "MERGE": PatchInstructionOperationMerge, +} + +var mappingPatchInstructionOperationEnumLowerCase = map[string]PatchInstructionOperationEnum{ + "require": PatchInstructionOperationRequire, + "prohibit": PatchInstructionOperationProhibit, + "replace": PatchInstructionOperationReplace, + "insert": PatchInstructionOperationInsert, + "remove": PatchInstructionOperationRemove, + "move": PatchInstructionOperationMove, + "merge": PatchInstructionOperationMerge, +} + +// GetPatchInstructionOperationEnumValues Enumerates the set of values for PatchInstructionOperationEnum +func GetPatchInstructionOperationEnumValues() []PatchInstructionOperationEnum { + values := make([]PatchInstructionOperationEnum, 0) + for _, v := range mappingPatchInstructionOperationEnum { + values = append(values, v) + } + return values +} + +// GetPatchInstructionOperationEnumStringValues Enumerates the set of values in String for PatchInstructionOperationEnum +func GetPatchInstructionOperationEnumStringValues() []string { + return []string{ + "REQUIRE", + "PROHIBIT", + "REPLACE", + "INSERT", + "REMOVE", + "MOVE", + "MERGE", + } +} + +// GetMappingPatchInstructionOperationEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPatchInstructionOperationEnum(val string) (PatchInstructionOperationEnum, bool) { + enum, ok := mappingPatchInstructionOperationEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/patch_merge_instruction.go b/psql/patch_merge_instruction.go new file mode 100644 index 0000000000..8ed6d27c6f --- /dev/null +++ b/psql/patch_merge_instruction.go @@ -0,0 +1,70 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchMergeInstruction An operation that recursively updates items of the selection, or adding the value if the selection is empty. +// If the value is not an object, it is used directly, otherwise each key-value member is used +// to create or update a member of the same name in the target and the same process is applied recursively for each object-typed value +// (similar to RFC 7396 (https://tools.ietf.org/html/rfc7396#section-2) JSON Merge Patch, except that null values are copied +// rather than transformed into deletions). +// NOT_FOUND exceptions are handled by creating the implied containing structure. +// To avoid referential errors if an item's descendant is also in the selection, items of the selection are processed in order of decreasing depth. +type PatchMergeInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + Selection *string `mandatory:"true" json:"selection"` + + // A value to be merged into the target. + Value *interface{} `mandatory:"false" json:"value"` +} + +// GetSelection returns Selection +func (m PatchMergeInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchMergeInstruction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchMergeInstruction) 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 PatchMergeInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchMergeInstruction PatchMergeInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchMergeInstruction + }{ + "MERGE", + (MarshalTypePatchMergeInstruction)(m), + } + + return json.Marshal(&s) +} diff --git a/psql/patch_move_instruction.go b/psql/patch_move_instruction.go new file mode 100644 index 0000000000..85f26f5579 --- /dev/null +++ b/psql/patch_move_instruction.go @@ -0,0 +1,121 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchMoveInstruction An operation that "puts" values from elsewhere in the target, functionally equivalent to a single add and then a remove. +// The first item of the selection is replaced, or created if the selection is empty. +// NOT_FOUND exceptions in the selection are handled by creating the implied containing structure. +// This operation fails if the `from` selection yields any exceptions, or if an item is moved to any of its descendants. +type PatchMoveInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + Selection *string `mandatory:"true" json:"selection"` + + // The selection that is to be moved, with the same format and semantics as `selection`. + From *string `mandatory:"true" json:"from"` + + // Where to insert the value in an array, relative to the first item in the selection. + // If there is no such item, then "BEFORE" specifies insertion at the first position in an array and "AFTER" specifies insertion at the last position. + // If the first item in the selection is not the child of an array, then this field has no effect. + Position PatchMoveInstructionPositionEnum `mandatory:"false" json:"position,omitempty"` +} + +// GetSelection returns Selection +func (m PatchMoveInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchMoveInstruction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchMoveInstruction) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPatchMoveInstructionPositionEnum(string(m.Position)); !ok && m.Position != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Position: %s. Supported values are: %s.", m.Position, strings.Join(GetPatchMoveInstructionPositionEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PatchMoveInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchMoveInstruction PatchMoveInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchMoveInstruction + }{ + "MOVE", + (MarshalTypePatchMoveInstruction)(m), + } + + return json.Marshal(&s) +} + +// PatchMoveInstructionPositionEnum Enum with underlying type: string +type PatchMoveInstructionPositionEnum string + +// Set of constants representing the allowable values for PatchMoveInstructionPositionEnum +const ( + PatchMoveInstructionPositionAt PatchMoveInstructionPositionEnum = "AT" + PatchMoveInstructionPositionBefore PatchMoveInstructionPositionEnum = "BEFORE" + PatchMoveInstructionPositionAfter PatchMoveInstructionPositionEnum = "AFTER" +) + +var mappingPatchMoveInstructionPositionEnum = map[string]PatchMoveInstructionPositionEnum{ + "AT": PatchMoveInstructionPositionAt, + "BEFORE": PatchMoveInstructionPositionBefore, + "AFTER": PatchMoveInstructionPositionAfter, +} + +var mappingPatchMoveInstructionPositionEnumLowerCase = map[string]PatchMoveInstructionPositionEnum{ + "at": PatchMoveInstructionPositionAt, + "before": PatchMoveInstructionPositionBefore, + "after": PatchMoveInstructionPositionAfter, +} + +// GetPatchMoveInstructionPositionEnumValues Enumerates the set of values for PatchMoveInstructionPositionEnum +func GetPatchMoveInstructionPositionEnumValues() []PatchMoveInstructionPositionEnum { + values := make([]PatchMoveInstructionPositionEnum, 0) + for _, v := range mappingPatchMoveInstructionPositionEnum { + values = append(values, v) + } + return values +} + +// GetPatchMoveInstructionPositionEnumStringValues Enumerates the set of values in String for PatchMoveInstructionPositionEnum +func GetPatchMoveInstructionPositionEnumStringValues() []string { + return []string{ + "AT", + "BEFORE", + "AFTER", + } +} + +// GetMappingPatchMoveInstructionPositionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPatchMoveInstructionPositionEnum(val string) (PatchMoveInstructionPositionEnum, bool) { + enum, ok := mappingPatchMoveInstructionPositionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/patch_prohibit_instruction.go b/psql/patch_prohibit_instruction.go new file mode 100644 index 0000000000..ed5b80a3ac --- /dev/null +++ b/psql/patch_prohibit_instruction.go @@ -0,0 +1,69 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchProhibitInstruction A precondition operation that requires a selection to be empty, or optionally to be non-empty but include no item with a specified value +// (useful for asserting that a value does not exist before attempting to create it, avoiding accidental update). +// It fails if value is provided and the selection includes an item matching it, or if value is not provided and the selection is not empty, +// but ignores NOT_FOUND exceptions. +type PatchProhibitInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + Selection *string `mandatory:"true" json:"selection"` + + // A value to be compared against each item of the selection. + // If this value is an object, then it matches any item that would be unaffected by applying this value as a merge operation. + // Otherwise, it matches any item to which it is equal according to the rules of JSON Schema (https://tools.ietf.org/html/draft-handrews-json-schema-00#section-4.2.3). + Value *interface{} `mandatory:"false" json:"value"` +} + +// GetSelection returns Selection +func (m PatchProhibitInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchProhibitInstruction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchProhibitInstruction) 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 PatchProhibitInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchProhibitInstruction PatchProhibitInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchProhibitInstruction + }{ + "PROHIBIT", + (MarshalTypePatchProhibitInstruction)(m), + } + + return json.Marshal(&s) +} diff --git a/psql/patch_remove_instruction.go b/psql/patch_remove_instruction.go new file mode 100644 index 0000000000..b16301cbfd --- /dev/null +++ b/psql/patch_remove_instruction.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchRemoveInstruction An operation that deletes items, ignoring NOT_FOUND exceptions. +// To avoid referential errors if an item's descendant is also in the selection, items of the selection are processed in order of decreasing depth. +type PatchRemoveInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + Selection *string `mandatory:"true" json:"selection"` +} + +// GetSelection returns Selection +func (m PatchRemoveInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchRemoveInstruction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchRemoveInstruction) 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 PatchRemoveInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchRemoveInstruction PatchRemoveInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchRemoveInstruction + }{ + "REMOVE", + (MarshalTypePatchRemoveInstruction)(m), + } + + return json.Marshal(&s) +} diff --git a/psql/patch_replace_instruction.go b/psql/patch_replace_instruction.go new file mode 100644 index 0000000000..1d7e02b328 --- /dev/null +++ b/psql/patch_replace_instruction.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchReplaceInstruction An operation that "puts" a value, replacing every item of the selection with it, or creating it if the selection is empty. +// NOT_FOUND exceptions are handled by creating the implied containing structure (but note that this may put the target in an invalid state, +// which can be prevented by use of precondition operations). +// To avoid referential errors if an item's descendant is also in the selection, items of the selection are processed in order of decreasing depth. +type PatchReplaceInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + Selection *string `mandatory:"true" json:"selection"` + + // A value to be added into the target. + Value *interface{} `mandatory:"true" json:"value"` +} + +// GetSelection returns Selection +func (m PatchReplaceInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchReplaceInstruction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchReplaceInstruction) 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 PatchReplaceInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchReplaceInstruction PatchReplaceInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchReplaceInstruction + }{ + "REPLACE", + (MarshalTypePatchReplaceInstruction)(m), + } + + return json.Marshal(&s) +} diff --git a/psql/patch_require_instruction.go b/psql/patch_require_instruction.go new file mode 100644 index 0000000000..e0f7d6c7ca --- /dev/null +++ b/psql/patch_require_instruction.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchRequireInstruction A precondition operation that requires a selection to be non-empty, and optionally to include an item with a specified value +// (useful for asserting that a value exists before attempting to update it, avoiding accidental creation). +// It fails if the selection is empty, or if value is provided and no item of the selection matches it. +type PatchRequireInstruction struct { + + // The set of values to which the operation applies as a JMESPath expression (https://jmespath.org/specification.html) for evaluation against the context resource. + // An operation fails if the selection yields an exception, except as otherwise specified. + // Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + Selection *string `mandatory:"true" json:"selection"` + + // A value to be compared against each item of the selection. + // If this value is an object, then it matches any item that would be unaffected by applying this value as a merge operation. + // Otherwise, it matches any item to which it is equal according to the rules of JSON Schema (https://tools.ietf.org/html/draft-handrews-json-schema-00#section-4.2.3). + Value *interface{} `mandatory:"false" json:"value"` +} + +// GetSelection returns Selection +func (m PatchRequireInstruction) GetSelection() *string { + return m.Selection +} + +func (m PatchRequireInstruction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchRequireInstruction) 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 PatchRequireInstruction) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchRequireInstruction PatchRequireInstruction + s := struct { + DiscriminatorParam string `json:"operation"` + MarshalTypePatchRequireInstruction + }{ + "REQUIRE", + (MarshalTypePatchRequireInstruction)(m), + } + + return json.Marshal(&s) +} diff --git a/psql/plain_text_password_details.go b/psql/plain_text_password_details.go new file mode 100644 index 0000000000..1b8f60ccbe --- /dev/null +++ b/psql/plain_text_password_details.go @@ -0,0 +1,54 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PlainTextPasswordDetails Details for in-line DbSystem password. +type PlainTextPasswordDetails struct { + + // The dbSystem password. + Password *string `mandatory:"true" json:"password"` +} + +func (m PlainTextPasswordDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PlainTextPasswordDetails) 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 PlainTextPasswordDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypePlainTextPasswordDetails PlainTextPasswordDetails + s := struct { + DiscriminatorParam string `json:"passwordType"` + MarshalTypePlainTextPasswordDetails + }{ + "PLAIN_TEXT", + (MarshalTypePlainTextPasswordDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/psql/primary_db_instance_details.go b/psql/primary_db_instance_details.go new file mode 100644 index 0000000000..cc95f2ed6f --- /dev/null +++ b/psql/primary_db_instance_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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PrimaryDbInstanceDetails The primary DbInstance details. +type PrimaryDbInstanceDetails struct { + + // Unique identifier of the DbInstance. + DbInstanceId *string `mandatory:"true" json:"dbInstanceId"` +} + +func (m PrimaryDbInstanceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PrimaryDbInstanceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/psql_postgresql_client.go b/psql/psql_postgresql_client.go new file mode 100644 index 0000000000..c3045e053e --- /dev/null +++ b/psql/psql_postgresql_client.go @@ -0,0 +1,2071 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/auth" + "net/http" +) + +// PostgresqlClient a client for Postgresql +type PostgresqlClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewPostgresqlClientWithConfigurationProvider Creates a new default Postgresql client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewPostgresqlClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client PostgresqlClient, err error) { + if enabled := common.CheckForEnabledServices("psql"); !enabled { + return client, fmt.Errorf("the Alloy configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local alloy_config file configured the service you're targeting or contact the cloud provider on the availability of this service") + } + provider, err := auth.GetGenericConfigurationProvider(configProvider) + if err != nil { + return client, err + } + baseClient, e := common.NewClientWithConfig(provider) + if e != nil { + return client, e + } + return newPostgresqlClientFromBaseClient(baseClient, provider) +} + +// NewPostgresqlClientWithOboToken Creates a new default Postgresql client with the given configuration provider. +// The obotoken will be added to default headers and signed; the configuration provider will be used for the signer +// +// as well as reading the region +func NewPostgresqlClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client PostgresqlClient, err error) { + baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) + if err != nil { + return client, err + } + + return newPostgresqlClientFromBaseClient(baseClient, configProvider) +} + +func newPostgresqlClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client PostgresqlClient, err error) { + // Postgresql service default circuit breaker is enabled + baseClient.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultCircuitBreakerSettingWithServiceName("Postgresql")) + common.ConfigCircuitBreakerFromEnvVar(&baseClient) + common.ConfigCircuitBreakerFromGlobalVar(&baseClient) + + client = PostgresqlClient{BaseClient: baseClient} + client.BasePath = "20220915" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *PostgresqlClient) SetRegion(region string) { + client.Host = common.StringToRegion(region).EndpointForTemplate("psql", "https://postgresql.{region}.oci.{secondLevelDomain}") +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *PostgresqlClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + if client.Host == "" { + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + } + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *PostgresqlClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// ChangeBackupCompartment Moves a Backup resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ChangeBackupCompartment.go.html to see an example of how to use ChangeBackupCompartment API. +// A default retry strategy applies to this operation ChangeBackupCompartment() +func (client PostgresqlClient) ChangeBackupCompartment(ctx context.Context, request ChangeBackupCompartmentRequest) (response ChangeBackupCompartmentResponse, 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.changeBackupCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeBackupCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeBackupCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeBackupCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeBackupCompartmentResponse") + } + return +} + +// changeBackupCompartment implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) changeBackupCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/backups/{backupId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ChangeBackupCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "ChangeBackupCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeConfigurationCompartment Moves a Configuration resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ChangeConfigurationCompartment.go.html to see an example of how to use ChangeConfigurationCompartment API. +// A default retry strategy applies to this operation ChangeConfigurationCompartment() +func (client PostgresqlClient) ChangeConfigurationCompartment(ctx context.Context, request ChangeConfigurationCompartmentRequest) (response ChangeConfigurationCompartmentResponse, 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.changeConfigurationCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeConfigurationCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeConfigurationCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeConfigurationCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeConfigurationCompartmentResponse") + } + return +} + +// changeConfigurationCompartment implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) changeConfigurationCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/configurations/{configurationId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ChangeConfigurationCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "ChangeConfigurationCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeDbSystemCompartment Moves a DbSystem resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ChangeDbSystemCompartment.go.html to see an example of how to use ChangeDbSystemCompartment API. +// A default retry strategy applies to this operation ChangeDbSystemCompartment() +func (client PostgresqlClient) ChangeDbSystemCompartment(ctx context.Context, request ChangeDbSystemCompartmentRequest) (response ChangeDbSystemCompartmentResponse, 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.changeDbSystemCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeDbSystemCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeDbSystemCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeDbSystemCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeDbSystemCompartmentResponse") + } + return +} + +// changeDbSystemCompartment implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) changeDbSystemCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/dbSystems/{dbSystemId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ChangeDbSystemCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "ChangeDbSystemCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateBackup Creates a new Backup. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/CreateBackup.go.html to see an example of how to use CreateBackup API. +// A default retry strategy applies to this operation CreateBackup() +func (client PostgresqlClient) CreateBackup(ctx context.Context, request CreateBackupRequest) (response CreateBackupResponse, 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.createBackup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateBackupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateBackupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateBackupResponse") + } + return +} + +// createBackup implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) createBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/backups", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "CreateBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateConfiguration Creates a new Configuration Set. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/CreateConfiguration.go.html to see an example of how to use CreateConfiguration API. +// A default retry strategy applies to this operation CreateConfiguration() +func (client PostgresqlClient) CreateConfiguration(ctx context.Context, request CreateConfigurationRequest) (response CreateConfigurationResponse, 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.createConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateConfigurationResponse") + } + return +} + +// createConfiguration implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) createConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/configurations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "CreateConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateDbSystem Creates a new DbSystem. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/CreateDbSystem.go.html to see an example of how to use CreateDbSystem API. +// A default retry strategy applies to this operation CreateDbSystem() +func (client PostgresqlClient) CreateDbSystem(ctx context.Context, request CreateDbSystemRequest) (response CreateDbSystemResponse, 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.createDbSystem, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateDbSystemResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateDbSystemResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateDbSystemResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateDbSystemResponse") + } + return +} + +// createDbSystem implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) createDbSystem(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/dbSystems", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateDbSystemResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "CreateDbSystem", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteBackup Deletes a Backup resource by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/DeleteBackup.go.html to see an example of how to use DeleteBackup API. +// A default retry strategy applies to this operation DeleteBackup() +func (client PostgresqlClient) DeleteBackup(ctx context.Context, request DeleteBackupRequest) (response DeleteBackupResponse, 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.deleteBackup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteBackupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteBackupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteBackupResponse") + } + return +} + +// deleteBackup implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) deleteBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/backups/{backupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "DeleteBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteConfiguration Deletes a Cofniguration resource by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/DeleteConfiguration.go.html to see an example of how to use DeleteConfiguration API. +// A default retry strategy applies to this operation DeleteConfiguration() +func (client PostgresqlClient) DeleteConfiguration(ctx context.Context, request DeleteConfigurationRequest) (response DeleteConfigurationResponse, 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.deleteConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteConfigurationResponse") + } + return +} + +// deleteConfiguration implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) deleteConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/configurations/{configurationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "DeleteConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteDbSystem Deletes a DbSystem resource by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/DeleteDbSystem.go.html to see an example of how to use DeleteDbSystem API. +// A default retry strategy applies to this operation DeleteDbSystem() +func (client PostgresqlClient) DeleteDbSystem(ctx context.Context, request DeleteDbSystemRequest) (response DeleteDbSystemResponse, 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.deleteDbSystem, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteDbSystemResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteDbSystemResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteDbSystemResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteDbSystemResponse") + } + return +} + +// deleteDbSystem implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) deleteDbSystem(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/dbSystems/{dbSystemId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteDbSystemResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "DeleteDbSystem", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// FailoverDbSystem Runs a failover operation. Optionally user can specify the desired AD for 3AD regions. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/FailoverDbSystem.go.html to see an example of how to use FailoverDbSystem API. +// A default retry strategy applies to this operation FailoverDbSystem() +func (client PostgresqlClient) FailoverDbSystem(ctx context.Context, request FailoverDbSystemRequest) (response FailoverDbSystemResponse, 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.failoverDbSystem, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = FailoverDbSystemResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = FailoverDbSystemResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(FailoverDbSystemResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into FailoverDbSystemResponse") + } + return +} + +// failoverDbSystem implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) failoverDbSystem(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/dbSystems/{dbSystemId}/actions/failover", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response FailoverDbSystemResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "FailoverDbSystem", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetBackup Gets a Backup by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/GetBackup.go.html to see an example of how to use GetBackup API. +// A default retry strategy applies to this operation GetBackup() +func (client PostgresqlClient) GetBackup(ctx context.Context, request GetBackupRequest) (response GetBackupResponse, 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.getBackup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetBackupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetBackupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetBackupResponse") + } + return +} + +// getBackup implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) getBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/backups/{backupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "GetBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetConfiguration Gets a Configuration by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/GetConfiguration.go.html to see an example of how to use GetConfiguration API. +// A default retry strategy applies to this operation GetConfiguration() +func (client PostgresqlClient) GetConfiguration(ctx context.Context, request GetConfigurationRequest) (response GetConfigurationResponse, 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.getConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetConfigurationResponse") + } + return +} + +// getConfiguration implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) getConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/configurations/{configurationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "GetConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetConnectionDetails Gets the DbSystem connection details. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/GetConnectionDetails.go.html to see an example of how to use GetConnectionDetails API. +// A default retry strategy applies to this operation GetConnectionDetails() +func (client PostgresqlClient) GetConnectionDetails(ctx context.Context, request GetConnectionDetailsRequest) (response GetConnectionDetailsResponse, 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.getConnectionDetails, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetConnectionDetailsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetConnectionDetailsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetConnectionDetailsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetConnectionDetailsResponse") + } + return +} + +// getConnectionDetails implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) getConnectionDetails(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystems/{dbSystemId}/connectionDetails", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetConnectionDetailsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "GetConnectionDetails", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetDbSystem Gets a DbSystem by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/GetDbSystem.go.html to see an example of how to use GetDbSystem API. +// A default retry strategy applies to this operation GetDbSystem() +func (client PostgresqlClient) GetDbSystem(ctx context.Context, request GetDbSystemRequest) (response GetDbSystemResponse, 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.getDbSystem, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDbSystemResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDbSystemResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDbSystemResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDbSystemResponse") + } + return +} + +// getDbSystem implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) getDbSystem(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystems/{dbSystemId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetDbSystemResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "GetDbSystem", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetDefaultConfiguration Gets a Default Configuration by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/GetDefaultConfiguration.go.html to see an example of how to use GetDefaultConfiguration API. +// A default retry strategy applies to this operation GetDefaultConfiguration() +func (client PostgresqlClient) GetDefaultConfiguration(ctx context.Context, request GetDefaultConfigurationRequest) (response GetDefaultConfigurationResponse, 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.getDefaultConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetDefaultConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetDefaultConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetDefaultConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetDefaultConfigurationResponse") + } + return +} + +// getDefaultConfiguration implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) getDefaultConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/defaultConfigurations/{defaultConfigurationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetDefaultConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "GetDefaultConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPrimaryDbInstance Gets the primary DbInstance details. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/GetPrimaryDbInstance.go.html to see an example of how to use GetPrimaryDbInstance API. +// A default retry strategy applies to this operation GetPrimaryDbInstance() +func (client PostgresqlClient) GetPrimaryDbInstance(ctx context.Context, request GetPrimaryDbInstanceRequest) (response GetPrimaryDbInstanceResponse, 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.getPrimaryDbInstance, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPrimaryDbInstanceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPrimaryDbInstanceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPrimaryDbInstanceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPrimaryDbInstanceResponse") + } + return +} + +// getPrimaryDbInstance implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) getPrimaryDbInstance(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystems/{dbSystemId}/primaryDbInstance", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetPrimaryDbInstanceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "GetPrimaryDbInstance", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetWorkRequest Gets details of the work request with the given ID. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/GetWorkRequest.go.html to see an example of how to use GetWorkRequest API. +// A default retry strategy applies to this operation GetWorkRequest() +func (client PostgresqlClient) GetWorkRequest(ctx context.Context, request GetWorkRequestRequest) (response GetWorkRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getWorkRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetWorkRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetWorkRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetWorkRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetWorkRequestResponse") + } + return +} + +// getWorkRequest implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) getWorkRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetWorkRequestResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "GetWorkRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListBackups Returns a list of Backup. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ListBackups.go.html to see an example of how to use ListBackups API. +// A default retry strategy applies to this operation ListBackups() +func (client PostgresqlClient) ListBackups(ctx context.Context, request ListBackupsRequest) (response ListBackupsResponse, 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.listBackups, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListBackupsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListBackupsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListBackupsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListBackupsResponse") + } + return +} + +// listBackups implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) listBackups(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/backups", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListBackupsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "ListBackups", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListConfigurations Returns a list of Configurations. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ListConfigurations.go.html to see an example of how to use ListConfigurations API. +// A default retry strategy applies to this operation ListConfigurations() +func (client PostgresqlClient) ListConfigurations(ctx context.Context, request ListConfigurationsRequest) (response ListConfigurationsResponse, 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.listConfigurations, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListConfigurationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListConfigurationsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListConfigurationsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListConfigurationsResponse") + } + return +} + +// listConfigurations implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) listConfigurations(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/configurations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListConfigurationsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "ListConfigurations", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDbSystems Returns a list of DbSystems. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ListDbSystems.go.html to see an example of how to use ListDbSystems API. +// A default retry strategy applies to this operation ListDbSystems() +func (client PostgresqlClient) ListDbSystems(ctx context.Context, request ListDbSystemsRequest) (response ListDbSystemsResponse, 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.listDbSystems, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDbSystemsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDbSystemsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDbSystemsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDbSystemsResponse") + } + return +} + +// listDbSystems implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) listDbSystems(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/dbSystems", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListDbSystemsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "ListDbSystems", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListDefaultConfigurations Returns a list of Default Configurations. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ListDefaultConfigurations.go.html to see an example of how to use ListDefaultConfigurations API. +// A default retry strategy applies to this operation ListDefaultConfigurations() +func (client PostgresqlClient) ListDefaultConfigurations(ctx context.Context, request ListDefaultConfigurationsRequest) (response ListDefaultConfigurationsResponse, 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.listDefaultConfigurations, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListDefaultConfigurationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListDefaultConfigurationsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListDefaultConfigurationsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListDefaultConfigurationsResponse") + } + return +} + +// listDefaultConfigurations implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) listDefaultConfigurations(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/defaultConfigurations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListDefaultConfigurationsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "ListDefaultConfigurations", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListShapes Returns the list of shapes allowed in the region. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ListShapes.go.html to see an example of how to use ListShapes API. +// A default retry strategy applies to this operation ListShapes() +func (client PostgresqlClient) ListShapes(ctx context.Context, request ListShapesRequest) (response ListShapesResponse, 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.listShapes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListShapesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListShapesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListShapesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListShapesResponse") + } + return +} + +// listShapes implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) listShapes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/shapes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListShapesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "ListShapes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequestErrors Returns a (paginated) list of errors for the work request with the given ID. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. +// A default retry strategy applies to this operation ListWorkRequestErrors() +func (client PostgresqlClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequestErrors, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestErrorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestErrorsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestErrorsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestErrorsResponse") + } + return +} + +// listWorkRequestErrors implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) listWorkRequestErrors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/errors", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkRequestErrorsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "ListWorkRequestErrors", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequestLogs Returns a (paginated) list of logs for the work request with the given ID. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. +// A default retry strategy applies to this operation ListWorkRequestLogs() +func (client PostgresqlClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequestLogs, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestLogsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestLogsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestLogsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestLogsResponse") + } + return +} + +// listWorkRequestLogs implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) listWorkRequestLogs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/logs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkRequestLogsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "ListWorkRequestLogs", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequests Lists the work requests in a compartment. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. +// A default retry strategy applies to this operation ListWorkRequests() +func (client PostgresqlClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequests, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestsResponse") + } + return +} + +// listWorkRequests implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) listWorkRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkRequestsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "ListWorkRequests", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// PatchDbSystem Patching operation allows to add DbInstances to the DbSystem or remove them. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/PatchDbSystem.go.html to see an example of how to use PatchDbSystem API. +// A default retry strategy applies to this operation PatchDbSystem() +func (client PostgresqlClient) PatchDbSystem(ctx context.Context, request PatchDbSystemRequest) (response PatchDbSystemResponse, 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.patchDbSystem, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = PatchDbSystemResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = PatchDbSystemResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(PatchDbSystemResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into PatchDbSystemResponse") + } + return +} + +// patchDbSystem implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) patchDbSystem(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPatch, "/dbSystems/{dbSystemId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response PatchDbSystemResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "PatchDbSystem", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ResetMasterUserPassword Resets the Db system's master password. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ResetMasterUserPassword.go.html to see an example of how to use ResetMasterUserPassword API. +// A default retry strategy applies to this operation ResetMasterUserPassword() +func (client PostgresqlClient) ResetMasterUserPassword(ctx context.Context, request ResetMasterUserPasswordRequest) (response ResetMasterUserPasswordResponse, 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.resetMasterUserPassword, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ResetMasterUserPasswordResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ResetMasterUserPasswordResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ResetMasterUserPasswordResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ResetMasterUserPasswordResponse") + } + return +} + +// resetMasterUserPassword implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) resetMasterUserPassword(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/dbSystems/{dbSystemId}/actions/resetMasterUserPassword", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ResetMasterUserPasswordResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "ResetMasterUserPassword", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RestartDbInstanceInDbSystem Restarts the running DbInstance. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/RestartDbInstanceInDbSystem.go.html to see an example of how to use RestartDbInstanceInDbSystem API. +// A default retry strategy applies to this operation RestartDbInstanceInDbSystem() +func (client PostgresqlClient) RestartDbInstanceInDbSystem(ctx context.Context, request RestartDbInstanceInDbSystemRequest) (response RestartDbInstanceInDbSystemResponse, 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.restartDbInstanceInDbSystem, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RestartDbInstanceInDbSystemResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RestartDbInstanceInDbSystemResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RestartDbInstanceInDbSystemResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RestartDbInstanceInDbSystemResponse") + } + return +} + +// restartDbInstanceInDbSystem implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) restartDbInstanceInDbSystem(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/dbSystems/{dbSystemId}/actions/restartDbInstance", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response RestartDbInstanceInDbSystemResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "RestartDbInstanceInDbSystem", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// RestoreDbSystem Restore the Db System. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/RestoreDbSystem.go.html to see an example of how to use RestoreDbSystem API. +// A default retry strategy applies to this operation RestoreDbSystem() +func (client PostgresqlClient) RestoreDbSystem(ctx context.Context, request RestoreDbSystemRequest) (response RestoreDbSystemResponse, 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.restoreDbSystem, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RestoreDbSystemResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RestoreDbSystemResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RestoreDbSystemResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RestoreDbSystemResponse") + } + return +} + +// restoreDbSystem implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) restoreDbSystem(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/dbSystems/{dbSystemId}/actions/restore", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response RestoreDbSystemResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "RestoreDbSystem", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateBackup Updates the Backup +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/UpdateBackup.go.html to see an example of how to use UpdateBackup API. +// A default retry strategy applies to this operation UpdateBackup() +func (client PostgresqlClient) UpdateBackup(ctx context.Context, request UpdateBackupRequest) (response UpdateBackupResponse, 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.updateBackup, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateBackupResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateBackupResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateBackupResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateBackupResponse") + } + return +} + +// updateBackup implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) updateBackup(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/backups/{backupId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateBackupResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "UpdateBackup", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateConfiguration Updates a display name or description of the Configuration Set. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/UpdateConfiguration.go.html to see an example of how to use UpdateConfiguration API. +// A default retry strategy applies to this operation UpdateConfiguration() +func (client PostgresqlClient) UpdateConfiguration(ctx context.Context, request UpdateConfigurationRequest) (response UpdateConfigurationResponse, 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.updateConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateConfigurationResponse") + } + return +} + +// updateConfiguration implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) updateConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/configurations/{configurationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "UpdateConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateDbSystem Updates the DbSystem +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/UpdateDbSystem.go.html to see an example of how to use UpdateDbSystem API. +// A default retry strategy applies to this operation UpdateDbSystem() +func (client PostgresqlClient) UpdateDbSystem(ctx context.Context, request UpdateDbSystemRequest) (response UpdateDbSystemResponse, 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.updateDbSystem, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateDbSystemResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateDbSystemResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateDbSystemResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDbSystemResponse") + } + return +} + +// updateDbSystem implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) updateDbSystem(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/dbSystems/{dbSystemId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateDbSystemResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "UpdateDbSystem", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateDbSystemDbInstance Updates the DbInstance. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/UpdateDbSystemDbInstance.go.html to see an example of how to use UpdateDbSystemDbInstance API. +// A default retry strategy applies to this operation UpdateDbSystemDbInstance() +func (client PostgresqlClient) UpdateDbSystemDbInstance(ctx context.Context, request UpdateDbSystemDbInstanceRequest) (response UpdateDbSystemDbInstanceResponse, 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.updateDbSystemDbInstance, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateDbSystemDbInstanceResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateDbSystemDbInstanceResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateDbSystemDbInstanceResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateDbSystemDbInstanceResponse") + } + return +} + +// updateDbSystemDbInstance implements the OCIOperation interface (enables retrying operations) +func (client PostgresqlClient) updateDbSystemDbInstance(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/dbSystems/{dbSystemId}/dbinstances/{dbInstanceId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateDbSystemDbInstanceResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "" + err = common.PostProcessServiceError(err, "Postgresql", "UpdateDbSystemDbInstance", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/psql/reset_master_user_password_details.go b/psql/reset_master_user_password_details.go new file mode 100644 index 0000000000..8be5bca3aa --- /dev/null +++ b/psql/reset_master_user_password_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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ResetMasterUserPasswordDetails Password detail that will be used to reset the DbSystem's master user. +// They are not visible on any subsequent operation, such as GET /dbSystems/{dbSystemId}. +type ResetMasterUserPasswordDetails struct { + PasswordDetails PasswordDetails `mandatory:"true" json:"passwordDetails"` +} + +func (m ResetMasterUserPasswordDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ResetMasterUserPasswordDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *ResetMasterUserPasswordDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + PasswordDetails passworddetails `json:"passwordDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.PasswordDetails.UnmarshalPolymorphicJSON(model.PasswordDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.PasswordDetails = nn.(PasswordDetails) + } else { + m.PasswordDetails = nil + } + + return +} diff --git a/psql/reset_master_user_password_request_response.go b/psql/reset_master_user_password_request_response.go new file mode 100644 index 0000000000..50cabb616d --- /dev/null +++ b/psql/reset_master_user_password_request_response.go @@ -0,0 +1,99 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ResetMasterUserPasswordRequest wrapper for the ResetMasterUserPassword operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/ResetMasterUserPassword.go.html to see an example of how to use ResetMasterUserPasswordRequest. +type ResetMasterUserPasswordRequest struct { + + // unique DbSystem identifier + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // The information to be updated. + ResetMasterUserPasswordDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + 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 ResetMasterUserPasswordRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ResetMasterUserPasswordRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ResetMasterUserPasswordRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ResetMasterUserPasswordRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ResetMasterUserPasswordRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ResetMasterUserPasswordResponse wrapper for the ResetMasterUserPassword operation +type ResetMasterUserPasswordResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ResetMasterUserPasswordResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ResetMasterUserPasswordResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/restart_db_instance_in_db_system_details.go b/psql/restart_db_instance_in_db_system_details.go new file mode 100644 index 0000000000..b86b845cc3 --- /dev/null +++ b/psql/restart_db_instance_in_db_system_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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RestartDbInstanceInDbSystemDetails DbInstance restart parameters. +type RestartDbInstanceInDbSystemDetails struct { + + // Unique identifier of the DbInstance. + DbInstanceId *string `mandatory:"true" json:"dbInstanceId"` + + // The DbInstance restart type to use. + RestartType RestartDbInstanceInDbSystemDetailsRestartTypeEnum `mandatory:"true" json:"restartType"` +} + +func (m RestartDbInstanceInDbSystemDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RestartDbInstanceInDbSystemDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingRestartDbInstanceInDbSystemDetailsRestartTypeEnum(string(m.RestartType)); !ok && m.RestartType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RestartType: %s. Supported values are: %s.", m.RestartType, strings.Join(GetRestartDbInstanceInDbSystemDetailsRestartTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RestartDbInstanceInDbSystemDetailsRestartTypeEnum Enum with underlying type: string +type RestartDbInstanceInDbSystemDetailsRestartTypeEnum string + +// Set of constants representing the allowable values for RestartDbInstanceInDbSystemDetailsRestartTypeEnum +const ( + RestartDbInstanceInDbSystemDetailsRestartTypeNormal RestartDbInstanceInDbSystemDetailsRestartTypeEnum = "NORMAL" + RestartDbInstanceInDbSystemDetailsRestartTypeNodeReboot RestartDbInstanceInDbSystemDetailsRestartTypeEnum = "NODE_REBOOT" +) + +var mappingRestartDbInstanceInDbSystemDetailsRestartTypeEnum = map[string]RestartDbInstanceInDbSystemDetailsRestartTypeEnum{ + "NORMAL": RestartDbInstanceInDbSystemDetailsRestartTypeNormal, + "NODE_REBOOT": RestartDbInstanceInDbSystemDetailsRestartTypeNodeReboot, +} + +var mappingRestartDbInstanceInDbSystemDetailsRestartTypeEnumLowerCase = map[string]RestartDbInstanceInDbSystemDetailsRestartTypeEnum{ + "normal": RestartDbInstanceInDbSystemDetailsRestartTypeNormal, + "node_reboot": RestartDbInstanceInDbSystemDetailsRestartTypeNodeReboot, +} + +// GetRestartDbInstanceInDbSystemDetailsRestartTypeEnumValues Enumerates the set of values for RestartDbInstanceInDbSystemDetailsRestartTypeEnum +func GetRestartDbInstanceInDbSystemDetailsRestartTypeEnumValues() []RestartDbInstanceInDbSystemDetailsRestartTypeEnum { + values := make([]RestartDbInstanceInDbSystemDetailsRestartTypeEnum, 0) + for _, v := range mappingRestartDbInstanceInDbSystemDetailsRestartTypeEnum { + values = append(values, v) + } + return values +} + +// GetRestartDbInstanceInDbSystemDetailsRestartTypeEnumStringValues Enumerates the set of values in String for RestartDbInstanceInDbSystemDetailsRestartTypeEnum +func GetRestartDbInstanceInDbSystemDetailsRestartTypeEnumStringValues() []string { + return []string{ + "NORMAL", + "NODE_REBOOT", + } +} + +// GetMappingRestartDbInstanceInDbSystemDetailsRestartTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRestartDbInstanceInDbSystemDetailsRestartTypeEnum(val string) (RestartDbInstanceInDbSystemDetailsRestartTypeEnum, bool) { + enum, ok := mappingRestartDbInstanceInDbSystemDetailsRestartTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/restart_db_instance_in_db_system_request_response.go b/psql/restart_db_instance_in_db_system_request_response.go new file mode 100644 index 0000000000..660dacb558 --- /dev/null +++ b/psql/restart_db_instance_in_db_system_request_response.go @@ -0,0 +1,99 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RestartDbInstanceInDbSystemRequest wrapper for the RestartDbInstanceInDbSystem operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/RestartDbInstanceInDbSystem.go.html to see an example of how to use RestartDbInstanceInDbSystemRequest. +type RestartDbInstanceInDbSystemRequest struct { + + // unique DbSystem identifier + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // DdInstance restart parameters. + RestartDbInstanceInDbSystemDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + 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 RestartDbInstanceInDbSystemRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RestartDbInstanceInDbSystemRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RestartDbInstanceInDbSystemRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RestartDbInstanceInDbSystemRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RestartDbInstanceInDbSystemRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RestartDbInstanceInDbSystemResponse wrapper for the RestartDbInstanceInDbSystem operation +type RestartDbInstanceInDbSystemResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RestartDbInstanceInDbSystemResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RestartDbInstanceInDbSystemResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/restore_db_system_details.go b/psql/restore_db_system_details.go new file mode 100644 index 0000000000..c38143178a --- /dev/null +++ b/psql/restore_db_system_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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RestoreDbSystemDetails Backup details to restore the DB system. +type RestoreDbSystemDetails struct { + + // DbSystem backup identifier. + BackupId *string `mandatory:"true" json:"backupId"` + + // The desired AD for 3AD regions. Optional parameter. + // If not set the AD will be chosen based on the current DB System's AD. + Ad *string `mandatory:"false" json:"ad"` +} + +func (m RestoreDbSystemDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RestoreDbSystemDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/restore_db_system_request_response.go b/psql/restore_db_system_request_response.go new file mode 100644 index 0000000000..a52e526c96 --- /dev/null +++ b/psql/restore_db_system_request_response.go @@ -0,0 +1,99 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RestoreDbSystemRequest wrapper for the RestoreDbSystem operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/RestoreDbSystem.go.html to see an example of how to use RestoreDbSystemRequest. +type RestoreDbSystemRequest struct { + + // unique DbSystem identifier + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // DB System restore parameters. + RestoreDbSystemDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + 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 RestoreDbSystemRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RestoreDbSystemRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RestoreDbSystemRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RestoreDbSystemRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RestoreDbSystemRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RestoreDbSystemResponse wrapper for the RestoreDbSystem operation +type RestoreDbSystemResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RestoreDbSystemResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RestoreDbSystemResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/shape_collection.go b/psql/shape_collection.go new file mode 100644 index 0000000000..626f39f44e --- /dev/null +++ b/psql/shape_collection.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeCollection The list of shapes that allowed to use to create a db system. +type ShapeCollection struct { + + // List of dbSystems. + Items []ShapeSummary `mandatory:"true" json:"items"` +} + +func (m ShapeCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/shape_summary.go b/psql/shape_summary.go new file mode 100644 index 0000000000..ef49300b17 --- /dev/null +++ b/psql/shape_summary.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeSummary Summary of the DbSystem shape. +type ShapeSummary struct { + + // The Compute Shape Name like VM.Standard.E4.Flex + Shape *string `mandatory:"true" json:"shape"` + + // The number of OCPUs + OcpuCount *int `mandatory:"true" json:"ocpuCount"` + + // The amount of memory in GB + MemorySizeInGBs *int `mandatory:"true" json:"memorySizeInGBs"` + + // Unique identifier for the shape + Id *string `mandatory:"false" json:"id"` +} + +func (m ShapeSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/sort_order.go b/psql/sort_order.go new file mode 100644 index 0000000000..f632532691 --- /dev/null +++ b/psql/sort_order.go @@ -0,0 +1,56 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "strings" +) + +// SortOrderEnum Enum with underlying type: string +type SortOrderEnum string + +// Set of constants representing the allowable values for SortOrderEnum +const ( + SortOrderAsc SortOrderEnum = "ASC" + SortOrderDesc SortOrderEnum = "DESC" +) + +var mappingSortOrderEnum = map[string]SortOrderEnum{ + "ASC": SortOrderAsc, + "DESC": SortOrderDesc, +} + +var mappingSortOrderEnumLowerCase = map[string]SortOrderEnum{ + "asc": SortOrderAsc, + "desc": SortOrderDesc, +} + +// GetSortOrderEnumValues Enumerates the set of values for SortOrderEnum +func GetSortOrderEnumValues() []SortOrderEnum { + values := make([]SortOrderEnum, 0) + for _, v := range mappingSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetSortOrderEnumStringValues Enumerates the set of values in String for SortOrderEnum +func GetSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSortOrderEnum(val string) (SortOrderEnum, bool) { + enum, ok := mappingSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/source_details.go b/psql/source_details.go new file mode 100644 index 0000000000..43755e6fa3 --- /dev/null +++ b/psql/source_details.go @@ -0,0 +1,123 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SourceDetails New source is used to restore the DB system. +type SourceDetails interface { +} + +type sourcedetails struct { + JsonData []byte + SourceType string `json:"sourceType"` +} + +// UnmarshalJSON unmarshals json +func (m *sourcedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalersourcedetails sourcedetails + s := struct { + Model Unmarshalersourcedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.SourceType = s.Model.SourceType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *sourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.SourceType { + case "BACKUP": + mm := BackupSourceDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "NONE": + mm := NoneSourceDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for SourceDetails: %s.", m.SourceType) + return *m, nil + } +} + +func (m sourcedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m sourcedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SourceDetailsSourceTypeEnum Enum with underlying type: string +type SourceDetailsSourceTypeEnum string + +// Set of constants representing the allowable values for SourceDetailsSourceTypeEnum +const ( + SourceDetailsSourceTypeBackup SourceDetailsSourceTypeEnum = "BACKUP" + SourceDetailsSourceTypeNone SourceDetailsSourceTypeEnum = "NONE" +) + +var mappingSourceDetailsSourceTypeEnum = map[string]SourceDetailsSourceTypeEnum{ + "BACKUP": SourceDetailsSourceTypeBackup, + "NONE": SourceDetailsSourceTypeNone, +} + +var mappingSourceDetailsSourceTypeEnumLowerCase = map[string]SourceDetailsSourceTypeEnum{ + "backup": SourceDetailsSourceTypeBackup, + "none": SourceDetailsSourceTypeNone, +} + +// GetSourceDetailsSourceTypeEnumValues Enumerates the set of values for SourceDetailsSourceTypeEnum +func GetSourceDetailsSourceTypeEnumValues() []SourceDetailsSourceTypeEnum { + values := make([]SourceDetailsSourceTypeEnum, 0) + for _, v := range mappingSourceDetailsSourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetSourceDetailsSourceTypeEnumStringValues Enumerates the set of values in String for SourceDetailsSourceTypeEnum +func GetSourceDetailsSourceTypeEnumStringValues() []string { + return []string{ + "BACKUP", + "NONE", + } +} + +// GetMappingSourceDetailsSourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSourceDetailsSourceTypeEnum(val string) (SourceDetailsSourceTypeEnum, bool) { + enum, ok := mappingSourceDetailsSourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/storage_details.go b/psql/storage_details.go new file mode 100644 index 0000000000..5612e6aa93 --- /dev/null +++ b/psql/storage_details.go @@ -0,0 +1,102 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// StorageDetails Storage details of the DbSystem. +type StorageDetails interface { + + // Specifies if the block volume used for the DbSystem is regional or AD-local. + // If not specified, it will be set to false. + // If isRegionallyDurable is set to true, availabilityDomain should not be specified. + // If isRegionallyDurable is set to false, availabilityDomain must be specified. + GetIsRegionallyDurable() *bool + + // Specifies the availability domain of AD-local storage. + // If isRegionallyDurable is set to true, availabilityDomain should not be specified. + // If isRegionallyDurable is set to false, availabilityDomain must be specified. + GetAvailabilityDomain() *string +} + +type storagedetails struct { + JsonData []byte + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + IsRegionallyDurable *bool `mandatory:"true" json:"isRegionallyDurable"` + SystemType string `json:"systemType"` +} + +// UnmarshalJSON unmarshals json +func (m *storagedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerstoragedetails storagedetails + s := struct { + Model Unmarshalerstoragedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.IsRegionallyDurable = s.Model.IsRegionallyDurable + m.AvailabilityDomain = s.Model.AvailabilityDomain + m.SystemType = s.Model.SystemType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *storagedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.SystemType { + case "OCI_OPTIMIZED_STORAGE": + mm := OciOptimizedStorageDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for StorageDetails: %s.", m.SystemType) + return *m, nil + } +} + +// GetAvailabilityDomain returns AvailabilityDomain +func (m storagedetails) GetAvailabilityDomain() *string { + return m.AvailabilityDomain +} + +// GetIsRegionallyDurable returns IsRegionallyDurable +func (m storagedetails) GetIsRegionallyDurable() *bool { + return m.IsRegionallyDurable +} + +func (m storagedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m storagedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/update_backup_details.go b/psql/update_backup_details.go new file mode 100644 index 0000000000..58a2aaa272 --- /dev/null +++ b/psql/update_backup_details.go @@ -0,0 +1,53 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateBackupDetails The backup information to be updated. +type UpdateBackupDetails struct { + + // Backup display name + DisplayName *string `mandatory:"false" json:"displayName"` + + // Backup description + Description *string `mandatory:"false" json:"description"` + + // Backup retention period in days. + RetentionPeriod *int `mandatory:"false" json:"retentionPeriod"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateBackupDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateBackupDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/update_backup_request_response.go b/psql/update_backup_request_response.go new file mode 100644 index 0000000000..86b03f46d4 --- /dev/null +++ b/psql/update_backup_request_response.go @@ -0,0 +1,99 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateBackupRequest wrapper for the UpdateBackup operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/UpdateBackup.go.html to see an example of how to use UpdateBackupRequest. +type UpdateBackupRequest struct { + + // unique Backup identifier + BackupId *string `mandatory:"true" contributesTo:"path" name:"backupId"` + + // The information to be updated. + UpdateBackupDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateBackupRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateBackupRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateBackupRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateBackupRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateBackupRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateBackupResponse wrapper for the UpdateBackup operation +type UpdateBackupResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Backup instance + Backup `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateBackupResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateBackupResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/update_configuration_details.go b/psql/update_configuration_details.go new file mode 100644 index 0000000000..7e79b81f00 --- /dev/null +++ b/psql/update_configuration_details.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateConfigurationDetails The information to update Configuration. +type UpdateConfigurationDetails struct { + + // Configuration display name + DisplayName *string `mandatory:"false" json:"displayName"` + + // Details about the Configuration Set. + Description *string `mandatory:"false" json:"description"` +} + +func (m UpdateConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/update_configuration_request_response.go b/psql/update_configuration_request_response.go new file mode 100644 index 0000000000..31a6dabb29 --- /dev/null +++ b/psql/update_configuration_request_response.go @@ -0,0 +1,102 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateConfigurationRequest wrapper for the UpdateConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/UpdateConfiguration.go.html to see an example of how to use UpdateConfigurationRequest. +type UpdateConfigurationRequest struct { + + // unique Configuration identifier + ConfigurationId *string `mandatory:"true" contributesTo:"path" name:"configurationId"` + + // Details for Updating display name or description for Configuration. + UpdateConfigurationDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateConfigurationResponse wrapper for the UpdateConfiguration operation +type UpdateConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Configuration instance + Configuration `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` +} + +func (response UpdateConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/update_db_config_params.go b/psql/update_db_config_params.go new file mode 100644 index 0000000000..d2a158174f --- /dev/null +++ b/psql/update_db_config_params.go @@ -0,0 +1,88 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDbConfigParams Configuration for PGSQL instance. +type UpdateDbConfigParams struct { + + // Configuration identifier + ConfigId *string `mandatory:"true" json:"configId"` + + // Specify whether config update requires a restart of Db instance or reload of config. + // Some of the config changes require restart of DB instnace's to apply. + ApplyConfig UpdateDbConfigParamsApplyConfigEnum `mandatory:"false" json:"applyConfig,omitempty"` +} + +func (m UpdateDbConfigParams) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDbConfigParams) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUpdateDbConfigParamsApplyConfigEnum(string(m.ApplyConfig)); !ok && m.ApplyConfig != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ApplyConfig: %s. Supported values are: %s.", m.ApplyConfig, strings.Join(GetUpdateDbConfigParamsApplyConfigEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateDbConfigParamsApplyConfigEnum Enum with underlying type: string +type UpdateDbConfigParamsApplyConfigEnum string + +// Set of constants representing the allowable values for UpdateDbConfigParamsApplyConfigEnum +const ( + UpdateDbConfigParamsApplyConfigRestart UpdateDbConfigParamsApplyConfigEnum = "RESTART" + UpdateDbConfigParamsApplyConfigReload UpdateDbConfigParamsApplyConfigEnum = "RELOAD" +) + +var mappingUpdateDbConfigParamsApplyConfigEnum = map[string]UpdateDbConfigParamsApplyConfigEnum{ + "RESTART": UpdateDbConfigParamsApplyConfigRestart, + "RELOAD": UpdateDbConfigParamsApplyConfigReload, +} + +var mappingUpdateDbConfigParamsApplyConfigEnumLowerCase = map[string]UpdateDbConfigParamsApplyConfigEnum{ + "restart": UpdateDbConfigParamsApplyConfigRestart, + "reload": UpdateDbConfigParamsApplyConfigReload, +} + +// GetUpdateDbConfigParamsApplyConfigEnumValues Enumerates the set of values for UpdateDbConfigParamsApplyConfigEnum +func GetUpdateDbConfigParamsApplyConfigEnumValues() []UpdateDbConfigParamsApplyConfigEnum { + values := make([]UpdateDbConfigParamsApplyConfigEnum, 0) + for _, v := range mappingUpdateDbConfigParamsApplyConfigEnum { + values = append(values, v) + } + return values +} + +// GetUpdateDbConfigParamsApplyConfigEnumStringValues Enumerates the set of values in String for UpdateDbConfigParamsApplyConfigEnum +func GetUpdateDbConfigParamsApplyConfigEnumStringValues() []string { + return []string{ + "RESTART", + "RELOAD", + } +} + +// GetMappingUpdateDbConfigParamsApplyConfigEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateDbConfigParamsApplyConfigEnum(val string) (UpdateDbConfigParamsApplyConfigEnum, bool) { + enum, ok := mappingUpdateDbConfigParamsApplyConfigEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/update_db_system_db_instance_details.go b/psql/update_db_system_db_instance_details.go new file mode 100644 index 0000000000..79730618da --- /dev/null +++ b/psql/update_db_system_db_instance_details.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDbSystemDbInstanceDetails DbInstance update parameters. +type UpdateDbSystemDbInstanceDetails struct { + + // Display name of the DbInstance. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Description of the DbInstance. + Description *string `mandatory:"false" json:"description"` +} + +func (m UpdateDbSystemDbInstanceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDbSystemDbInstanceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/update_db_system_db_instance_request_response.go b/psql/update_db_system_db_instance_request_response.go new file mode 100644 index 0000000000..bb54eca4b5 --- /dev/null +++ b/psql/update_db_system_db_instance_request_response.go @@ -0,0 +1,102 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateDbSystemDbInstanceRequest wrapper for the UpdateDbSystemDbInstance operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/UpdateDbSystemDbInstance.go.html to see an example of how to use UpdateDbSystemDbInstanceRequest. +type UpdateDbSystemDbInstanceRequest struct { + + // unique DbSystem identifier + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // unique DbInstance identifier + DbInstanceId *string `mandatory:"true" contributesTo:"path" name:"dbInstanceId"` + + // DdInstance update parameters. + UpdateDbSystemDbInstanceDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + 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 UpdateDbSystemDbInstanceRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateDbSystemDbInstanceRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateDbSystemDbInstanceRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDbSystemDbInstanceRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateDbSystemDbInstanceRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateDbSystemDbInstanceResponse wrapper for the UpdateDbSystemDbInstance operation +type UpdateDbSystemDbInstanceResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateDbSystemDbInstanceResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDbSystemDbInstanceResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/update_db_system_details.go b/psql/update_db_system_details.go new file mode 100644 index 0000000000..b05d03f67e --- /dev/null +++ b/psql/update_db_system_details.go @@ -0,0 +1,56 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateDbSystemDetails The information to be updated. +type UpdateDbSystemDetails struct { + + // DbSystem display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Description of a DbSystem. This field should be input by the user. + Description *string `mandatory:"false" json:"description"` + + DbConfigurationParams *UpdateDbConfigParams `mandatory:"false" json:"dbConfigurationParams"` + + ManagementPolicy *ManagementPolicyDetails `mandatory:"false" json:"managementPolicy"` + + StorageDetails *UpdateStorageDetailsParams `mandatory:"false" json:"storageDetails"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateDbSystemDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateDbSystemDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/update_db_system_request_response.go b/psql/update_db_system_request_response.go new file mode 100644 index 0000000000..9254369b4c --- /dev/null +++ b/psql/update_db_system_request_response.go @@ -0,0 +1,99 @@ +// 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 psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateDbSystemRequest wrapper for the UpdateDbSystem operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/psql/UpdateDbSystem.go.html to see an example of how to use UpdateDbSystemRequest. +type UpdateDbSystemRequest struct { + + // unique DbSystem identifier + DbSystemId *string `mandatory:"true" contributesTo:"path" name:"dbSystemId"` + + // The information to be updated. + UpdateDbSystemDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + 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 UpdateDbSystemRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateDbSystemRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateDbSystemRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateDbSystemRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateDbSystemRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateDbSystemResponse wrapper for the UpdateDbSystem operation +type UpdateDbSystemResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateDbSystemResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateDbSystemResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/psql/update_storage_details_params.go b/psql/update_storage_details_params.go new file mode 100644 index 0000000000..5d911fded9 --- /dev/null +++ b/psql/update_storage_details_params.go @@ -0,0 +1,40 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateStorageDetailsParams Storage details of the DbSystem. +type UpdateStorageDetailsParams struct { + + // DbSystem Performance Unit. + // Only valid for `OCI_OPTIMIZED_STORAGE` dbSystem type. + Iops *int64 `mandatory:"false" json:"iops"` +} + +func (m UpdateStorageDetailsParams) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateStorageDetailsParams) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/vault_secret_password_details.go b/psql/vault_secret_password_details.go new file mode 100644 index 0000000000..944c0ebd52 --- /dev/null +++ b/psql/vault_secret_password_details.go @@ -0,0 +1,57 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VaultSecretPasswordDetails Secret details for the DbSystem password. +type VaultSecretPasswordDetails struct { + + // The OCID of secret where the password is stored. + SecretId *string `mandatory:"true" json:"secretId"` + + // The secret version where the password is stored. + SecretVersion *string `mandatory:"true" json:"secretVersion"` +} + +func (m VaultSecretPasswordDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VaultSecretPasswordDetails) 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 VaultSecretPasswordDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeVaultSecretPasswordDetails VaultSecretPasswordDetails + s := struct { + DiscriminatorParam string `json:"passwordType"` + MarshalTypeVaultSecretPasswordDetails + }{ + "VAULT_SECRET", + (MarshalTypeVaultSecretPasswordDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/psql/weekly_backup_policy.go b/psql/weekly_backup_policy.go new file mode 100644 index 0000000000..ca84235044 --- /dev/null +++ b/psql/weekly_backup_policy.go @@ -0,0 +1,132 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WeeklyBackupPolicy Weekly backup policy +type WeeklyBackupPolicy struct { + + // Hour of the day when backup starts. + BackupStart *string `mandatory:"true" json:"backupStart"` + + // How many days the customers data should be stored after the db system deletion. + RetentionDays *int `mandatory:"false" json:"retentionDays"` + + // Weekly days + DaysOfTheWeek []WeeklyBackupPolicyDaysOfTheWeekEnum `mandatory:"true" json:"daysOfTheWeek"` +} + +// GetRetentionDays returns RetentionDays +func (m WeeklyBackupPolicy) GetRetentionDays() *int { + return m.RetentionDays +} + +func (m WeeklyBackupPolicy) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WeeklyBackupPolicy) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range m.DaysOfTheWeek { + if _, ok := GetMappingWeeklyBackupPolicyDaysOfTheWeekEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DaysOfTheWeek: %s. Supported values are: %s.", val, strings.Join(GetWeeklyBackupPolicyDaysOfTheWeekEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m WeeklyBackupPolicy) MarshalJSON() (buff []byte, e error) { + type MarshalTypeWeeklyBackupPolicy WeeklyBackupPolicy + s := struct { + DiscriminatorParam string `json:"kind"` + MarshalTypeWeeklyBackupPolicy + }{ + "WEEKLY", + (MarshalTypeWeeklyBackupPolicy)(m), + } + + return json.Marshal(&s) +} + +// WeeklyBackupPolicyDaysOfTheWeekEnum Enum with underlying type: string +type WeeklyBackupPolicyDaysOfTheWeekEnum string + +// Set of constants representing the allowable values for WeeklyBackupPolicyDaysOfTheWeekEnum +const ( + WeeklyBackupPolicyDaysOfTheWeekSunday WeeklyBackupPolicyDaysOfTheWeekEnum = "SUNDAY" + WeeklyBackupPolicyDaysOfTheWeekMonday WeeklyBackupPolicyDaysOfTheWeekEnum = "MONDAY" + WeeklyBackupPolicyDaysOfTheWeekTuesday WeeklyBackupPolicyDaysOfTheWeekEnum = "TUESDAY" + WeeklyBackupPolicyDaysOfTheWeekWednesday WeeklyBackupPolicyDaysOfTheWeekEnum = "WEDNESDAY" + WeeklyBackupPolicyDaysOfTheWeekThursday WeeklyBackupPolicyDaysOfTheWeekEnum = "THURSDAY" + WeeklyBackupPolicyDaysOfTheWeekFriday WeeklyBackupPolicyDaysOfTheWeekEnum = "FRIDAY" + WeeklyBackupPolicyDaysOfTheWeekSaturday WeeklyBackupPolicyDaysOfTheWeekEnum = "SATURDAY" +) + +var mappingWeeklyBackupPolicyDaysOfTheWeekEnum = map[string]WeeklyBackupPolicyDaysOfTheWeekEnum{ + "SUNDAY": WeeklyBackupPolicyDaysOfTheWeekSunday, + "MONDAY": WeeklyBackupPolicyDaysOfTheWeekMonday, + "TUESDAY": WeeklyBackupPolicyDaysOfTheWeekTuesday, + "WEDNESDAY": WeeklyBackupPolicyDaysOfTheWeekWednesday, + "THURSDAY": WeeklyBackupPolicyDaysOfTheWeekThursday, + "FRIDAY": WeeklyBackupPolicyDaysOfTheWeekFriday, + "SATURDAY": WeeklyBackupPolicyDaysOfTheWeekSaturday, +} + +var mappingWeeklyBackupPolicyDaysOfTheWeekEnumLowerCase = map[string]WeeklyBackupPolicyDaysOfTheWeekEnum{ + "sunday": WeeklyBackupPolicyDaysOfTheWeekSunday, + "monday": WeeklyBackupPolicyDaysOfTheWeekMonday, + "tuesday": WeeklyBackupPolicyDaysOfTheWeekTuesday, + "wednesday": WeeklyBackupPolicyDaysOfTheWeekWednesday, + "thursday": WeeklyBackupPolicyDaysOfTheWeekThursday, + "friday": WeeklyBackupPolicyDaysOfTheWeekFriday, + "saturday": WeeklyBackupPolicyDaysOfTheWeekSaturday, +} + +// GetWeeklyBackupPolicyDaysOfTheWeekEnumValues Enumerates the set of values for WeeklyBackupPolicyDaysOfTheWeekEnum +func GetWeeklyBackupPolicyDaysOfTheWeekEnumValues() []WeeklyBackupPolicyDaysOfTheWeekEnum { + values := make([]WeeklyBackupPolicyDaysOfTheWeekEnum, 0) + for _, v := range mappingWeeklyBackupPolicyDaysOfTheWeekEnum { + values = append(values, v) + } + return values +} + +// GetWeeklyBackupPolicyDaysOfTheWeekEnumStringValues Enumerates the set of values in String for WeeklyBackupPolicyDaysOfTheWeekEnum +func GetWeeklyBackupPolicyDaysOfTheWeekEnumStringValues() []string { + return []string{ + "SUNDAY", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + } +} + +// GetMappingWeeklyBackupPolicyDaysOfTheWeekEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingWeeklyBackupPolicyDaysOfTheWeekEnum(val string) (WeeklyBackupPolicyDaysOfTheWeekEnum, bool) { + enum, ok := mappingWeeklyBackupPolicyDaysOfTheWeekEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/work_request.go b/psql/work_request.go new file mode 100644 index 0000000000..cc9cb9490f --- /dev/null +++ b/psql/work_request.go @@ -0,0 +1,71 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequest A description of workrequest status +type WorkRequest struct { + + // Type of the work request + OperationType OperationTypeEnum `mandatory:"true" json:"operationType"` + + // Status of current work request. + Status OperationStatusEnum `mandatory:"true" json:"status"` + + // The id of the work request. + Id *string `mandatory:"true" json:"id"` + + // The ocid of the compartment that contains the work request. Work requests should be scoped to + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The resources affected by this work request. + Resources []WorkRequestResource `mandatory:"true" json:"resources"` + + // Percentage of the request completed. + PercentComplete *float32 `mandatory:"true" json:"percentComplete"` + + // The date and time the request was created, as described in + // RFC 3339 (https://tools.ietf.org/rfc/rfc3339), section 14.29. + TimeAccepted *common.SDKTime `mandatory:"true" json:"timeAccepted"` + + // The date and time the request was started, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339), + // section 14.29. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The date and time the object was finished, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339). + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` +} + +func (m WorkRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingOperationTypeEnum(string(m.OperationType)); !ok && m.OperationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OperationType: %s. Supported values are: %s.", m.OperationType, strings.Join(GetOperationTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingOperationStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetOperationStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/work_request_error.go b/psql/work_request_error.go new file mode 100644 index 0000000000..8c5d4d5089 --- /dev/null +++ b/psql/work_request_error.go @@ -0,0 +1,46 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestError An error encountered while executing a work request. +type WorkRequestError struct { + + // A machine-usable code for the error that occured. Error codes are listed on + // (https://docs.cloud.oracle.com/Content/API/References/apierrors.htm) + Code *string `mandatory:"true" json:"code"` + + // A human readable description of the issue encountered. + Message *string `mandatory:"true" json:"message"` + + // The time the error occured. An RFC3339 formatted datetime string. + Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` +} + +func (m WorkRequestError) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestError) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/work_request_error_collection.go b/psql/work_request_error_collection.go new file mode 100644 index 0000000000..ea1665d484 --- /dev/null +++ b/psql/work_request_error_collection.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestErrorCollection Results of a workRequestError search. Contains both WorkRequestError items and other information, such as metadata. +type WorkRequestErrorCollection struct { + + // List of workRequestError objects. + Items []WorkRequestError `mandatory:"true" json:"items"` +} + +func (m WorkRequestErrorCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestErrorCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/work_request_log_entry.go b/psql/work_request_log_entry.go new file mode 100644 index 0000000000..552b0cd561 --- /dev/null +++ b/psql/work_request_log_entry.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestLogEntry A log message from the execution of a work request. +type WorkRequestLogEntry struct { + + // Human-readable log message. + Message *string `mandatory:"true" json:"message"` + + // The time the log message was written. An RFC3339 formatted datetime string + Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` +} + +func (m WorkRequestLogEntry) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestLogEntry) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/work_request_log_entry_collection.go b/psql/work_request_log_entry_collection.go new file mode 100644 index 0000000000..96140373f5 --- /dev/null +++ b/psql/work_request_log_entry_collection.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestLogEntryCollection Results of a workRequestLog search. Contains both workRequestLog items and other information, such as metadata. +type WorkRequestLogEntryCollection struct { + + // List of workRequestLogEntries. + Items []WorkRequestLogEntry `mandatory:"true" json:"items"` +} + +func (m WorkRequestLogEntryCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestLogEntryCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/work_request_resource.go b/psql/work_request_resource.go new file mode 100644 index 0000000000..54514302bf --- /dev/null +++ b/psql/work_request_resource.go @@ -0,0 +1,54 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestResource A resource created or operated on by a work request. +type WorkRequestResource struct { + + // The resource type the work request affects. + EntityType *string `mandatory:"true" json:"entityType"` + + // The way in which this resource is affected by the work tracked in the work request. + ActionType ActionTypeEnum `mandatory:"true" json:"actionType"` + + // The identifier of the resource the work request affects. + Identifier *string `mandatory:"true" json:"identifier"` + + // The URI path that the user can do a GET on to access the resource metadata + EntityUri *string `mandatory:"false" json:"entityUri"` + + // Additional information that helps to explain the resource. + Metadata map[string]string `mandatory:"false" json:"metadata"` +} + +func (m WorkRequestResource) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestResource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingActionTypeEnum(string(m.ActionType)); !ok && m.ActionType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActionType: %s. Supported values are: %s.", m.ActionType, strings.Join(GetActionTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/work_request_resource_metadata_key.go b/psql/work_request_resource_metadata_key.go new file mode 100644 index 0000000000..718f16c106 --- /dev/null +++ b/psql/work_request_resource_metadata_key.go @@ -0,0 +1,52 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "strings" +) + +// WorkRequestResourceMetadataKeyEnum Enum with underlying type: string +type WorkRequestResourceMetadataKeyEnum string + +// Set of constants representing the allowable values for WorkRequestResourceMetadataKeyEnum +const ( + WorkRequestResourceMetadataKeyIsDryRun WorkRequestResourceMetadataKeyEnum = "IS_DRY_RUN" +) + +var mappingWorkRequestResourceMetadataKeyEnum = map[string]WorkRequestResourceMetadataKeyEnum{ + "IS_DRY_RUN": WorkRequestResourceMetadataKeyIsDryRun, +} + +var mappingWorkRequestResourceMetadataKeyEnumLowerCase = map[string]WorkRequestResourceMetadataKeyEnum{ + "is_dry_run": WorkRequestResourceMetadataKeyIsDryRun, +} + +// GetWorkRequestResourceMetadataKeyEnumValues Enumerates the set of values for WorkRequestResourceMetadataKeyEnum +func GetWorkRequestResourceMetadataKeyEnumValues() []WorkRequestResourceMetadataKeyEnum { + values := make([]WorkRequestResourceMetadataKeyEnum, 0) + for _, v := range mappingWorkRequestResourceMetadataKeyEnum { + values = append(values, v) + } + return values +} + +// GetWorkRequestResourceMetadataKeyEnumStringValues Enumerates the set of values in String for WorkRequestResourceMetadataKeyEnum +func GetWorkRequestResourceMetadataKeyEnumStringValues() []string { + return []string{ + "IS_DRY_RUN", + } +} + +// GetMappingWorkRequestResourceMetadataKeyEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingWorkRequestResourceMetadataKeyEnum(val string) (WorkRequestResourceMetadataKeyEnum, bool) { + enum, ok := mappingWorkRequestResourceMetadataKeyEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/psql/work_request_summary.go b/psql/work_request_summary.go new file mode 100644 index 0000000000..4d7909a5e3 --- /dev/null +++ b/psql/work_request_summary.go @@ -0,0 +1,71 @@ +// 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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestSummary A summary of the status of a work request. +type WorkRequestSummary struct { + + // Type of the work request + OperationType OperationTypeEnum `mandatory:"true" json:"operationType"` + + // Status of current work request. + Status OperationStatusEnum `mandatory:"true" json:"status"` + + // The id of the work request. + Id *string `mandatory:"true" json:"id"` + + // The ocid of the compartment that contains the work request. Work requests should be scoped to + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The resources affected by this work request. + Resources []WorkRequestResource `mandatory:"true" json:"resources"` + + // Percentage of the request completed. + PercentComplete *float32 `mandatory:"true" json:"percentComplete"` + + // The date and time the request was created, as described in + // RFC 3339 (https://tools.ietf.org/rfc/rfc3339), section 14.29. + TimeAccepted *common.SDKTime `mandatory:"true" json:"timeAccepted"` + + // The date and time the request was started, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339), + // section 14.29. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The date and time the object was finished, as described in RFC 3339 (https://tools.ietf.org/rfc/rfc3339). + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` +} + +func (m WorkRequestSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingOperationTypeEnum(string(m.OperationType)); !ok && m.OperationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OperationType: %s. Supported values are: %s.", m.OperationType, strings.Join(GetOperationTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingOperationStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetOperationStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/psql/work_request_summary_collection.go b/psql/work_request_summary_collection.go new file mode 100644 index 0000000000..ff732ba086 --- /dev/null +++ b/psql/work_request_summary_collection.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. + +// PGSQL Control Plane API +// +// A description of the PGSQL Control Plane API +// + +package psql + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestSummaryCollection Results of a workRequest search. Contains both WorkRequest items and other information, such as metadata. +type WorkRequestSummaryCollection struct { + + // List of workRequestSummary objects. + Items []WorkRequestSummary `mandatory:"true" json:"items"` +} + +func (m WorkRequestSummaryCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestSummaryCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +}