// This is an automatically generated code sample.
// To make this code sample work in your Oracle Cloud tenancy,
// please replace the values for any parameters whose current values do not fit
// your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
// boolean, number, and enum parameters with values not fitting your use case).

package main

import (
	"context"
	"fmt"

	"github.com/oracle/oci-go-sdk/v65/common"
	"github.com/oracle/oci-go-sdk/v65/example/helpers"
	"github.com/oracle/oci-go-sdk/v65/identitydomains"
)

func ExamplePutSetting() {
	// Create a default authentication provider that uses the DEFAULT
	// profile in the configuration file.
	// Refer to <see href="https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File>the public documentation</see> on how to prepare a configuration file.
	client, err := identitydomains.NewIdentityDomainsClientWithConfigurationProvider(common.DefaultConfigProvider(), "specificEndpoint")
	helpers.FatalIfError(err)

	// Create a request and dependent object(s).

	req := identitydomains.PutSettingRequest{Authorization: common.String("EXAMPLE-authorization-Value"),
		IfMatch:                   common.String("EXAMPLE-ifMatch-Value"),
		OpcRetryToken:             common.String("EXAMPLE-opcRetryToken-Value"),
		ResourceTypeSchemaVersion: common.String("EXAMPLE-resourceTypeSchemaVersion-Value"),
		Setting: identitydomains.Setting{CertificateValidation: &identitydomains.SettingsCertificateValidation{OcspTimeoutDuration: common.Int(962),
			CrlLocation:                       common.String("EXAMPLE-crlLocation-Value"),
			CrlRefreshInterval:                common.Int(205),
			OcspEnabled:                       common.Bool(true),
			OcspSettingsResponderURLPreferred: common.Bool(false),
			OcspUnknownResponseStatusAllowed:  common.Bool(false),
			CrlCheckOnOCSPFailureEnabled:      common.Bool(false),
			CrlEnabled:                        common.Bool(false),
			OcspResponderURL:                  common.String("EXAMPLE-ocspResponderURL-Value"),
			OcspSigningCertificateAlias:       common.String("EXAMPLE-ocspSigningCertificateAlias-Value")},
			CloudMigrationUrlEnabled: common.Bool(false),
			DefaultImages: []identitydomains.SettingsDefaultImages{identitydomains.SettingsDefaultImages{Type: common.String("EXAMPLE-type-Value"),
				Value:   common.String("EXAMPLE-value-Value"),
				Display: common.String("EXAMPLE-display-Value")}},
			PrevIssuer: common.String("EXAMPLE-prevIssuer-Value"),
			Images: []identitydomains.SettingsImages{identitydomains.SettingsImages{Display: common.String("EXAMPLE-display-Value"),
				Type:  common.String("EXAMPLE-type-Value"),
				Value: common.String("EXAMPLE-value-Value")}},
			PreferredLanguage:                common.String("EXAMPLE-preferredLanguage-Value"),
			ReAuthFactor:                     []identitydomains.SettingReAuthFactorEnum{identitydomains.SettingReAuthFactorPassword},
			ServiceAdminCannotListOtherUsers: common.Bool(false),
			SigningCertPublicAccess:          common.Bool(false),
			Tags: []identitydomains.Tags{identitydomains.Tags{Value: common.String("EXAMPLE-value-Value"),
				Key: common.String("EXAMPLE-key-Value")}},
			CloudAccountName: common.String("EXAMPLE-cloudAccountName-Value"),
			ExternalId:       common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-externalId-Value"),
			DefaultLoginTexts: []identitydomains.SettingsDefaultLoginTexts{identitydomains.SettingsDefaultLoginTexts{Locale: common.String("EXAMPLE-locale-Value"),
				Value: common.String("EXAMPLE-value-Value")}},
			AuditEventRetentionPeriod:                            common.Int(662),
			DiagnosticRecordForSearchIdentifiesReturnedResources: common.Bool(true),
			IamUpstSessionExpiry:                                 common.Int(658),
			IdcsLastModifiedBy: &identitydomains.IdcsLastModifiedBy{Type: identitydomains.IdcsLastModifiedByTypeUser,
				Value:   common.String("EXAMPLE-value-Value"),
				Ref:     common.String("EXAMPLE-$ref-Value"),
				Display: common.String("EXAMPLE-display-Value"),
				Ocid:    common.String("EXAMPLE-ocid-Value")},
			OnPremisesProvisioning: common.Bool(true),
			TermsOfUseUrl:          common.String("EXAMPLE-termsOfUseUrl-Value"),
			CloudGateCorsSettings: &identitydomains.SettingsCloudGateCorsSettings{CloudGateCorsAllowNullOrigin: common.Bool(true),
				CloudGateCorsAllowedOrigins: []string{"EXAMPLE--Value"},
				CloudGateCorsEnabled:        common.Bool(false),
				CloudGateCorsExposedHeaders: []string{"EXAMPLE--Value"},
				CloudGateCorsMaxAge:         common.Int(850)},
			DiagnosticTracingUpto:                     common.String("EXAMPLE-diagnosticTracingUpto-Value"),
			DomainOcid:                                common.String("EXAMPLE-domainOcid-Value"),
			MaxNoOfAppRoleMembersToReturn:             common.Int(39),
			MigrationStatus:                           common.String("EXAMPLE-migrationStatus-Value"),
			ReAuthWhenChangingMyAuthenticationFactors: common.Bool(true),
			Issuer: common.String("EXAMPLE-issuer-Value"),
			PurgeConfigs: []identitydomains.SettingsPurgeConfigs{identitydomains.SettingsPurgeConfigs{ResourceName: common.String("EXAMPLE-resourceName-Value"),
				RetentionPeriod: common.Int(433)}},
			ContactEmails: []string{"EXAMPLE--Value"},
			CompanyNames: []identitydomains.SettingsCompanyNames{identitydomains.SettingsCompanyNames{Locale: common.String("EXAMPLE-locale-Value"),
				Value: common.String("EXAMPLE-value-Value")}},
			IdcsCreatedBy: &identitydomains.IdcsCreatedBy{Ref: common.String("EXAMPLE-$ref-Value"),
				Display: common.String("EXAMPLE-display-Value"),
				Ocid:    common.String("EXAMPLE-ocid-Value"),
				Type:    identitydomains.IdcsCreatedByTypeApp,
				Value:   common.String("EXAMPLE-value-Value")},
			TenancyOcid: common.String("EXAMPLE-tenancyOcid-Value"),
			TenantCustomClaims: []identitydomains.SettingsTenantCustomClaims{identitydomains.SettingsTenantCustomClaims{AllScopes: common.Bool(true),
				Expression: common.Bool(true),
				Mode:       identitydomains.SettingsTenantCustomClaimsModeAlways,
				Name:       common.String("EXAMPLE-name-Value"),
				Scopes:     []string{"EXAMPLE--Value"},
				TokenType:  identitydomains.SettingsTenantCustomClaimsTokenTypeAt,
				Value:      common.String("EXAMPLE-value-Value")}},
			CustomHtmlLocation: common.String("EXAMPLE-customHtmlLocation-Value"),
			DefaultCompanyNames: []identitydomains.SettingsDefaultCompanyNames{identitydomains.SettingsDefaultCompanyNames{Locale: common.String("EXAMPLE-locale-Value"),
				Value: common.String("EXAMPLE-value-Value")}},
			DeleteInProgress: common.Bool(false),
			Meta: &identitydomains.Meta{Created: common.String("EXAMPLE-created-Value"),
				LastModified: common.String("EXAMPLE-lastModified-Value"),
				Location:     common.String("EXAMPLE-location-Value"),
				ResourceType: common.String("EXAMPLE-resourceType-Value"),
				Version:      common.String("EXAMPLE-version-Value")},
			PrivacyPolicyUrl:                common.String("EXAMPLE-privacyPolicyUrl-Value"),
			CompartmentOcid:                 common.String("EXAMPLE-compartmentOcid-Value"),
			AllowedDomains:                  []string{"EXAMPLE--Value"},
			CloudMigrationCustomUrl:         common.String("EXAMPLE-cloudMigrationCustomUrl-Value"),
			MaxNoOfAppCMVAToReturn:          common.Int(790),
			Ocid:                            common.String("EXAMPLE-ocid-Value"),
			CustomBranding:                  common.Bool(true),
			DiagnosticLevel:                 common.Int(713),
			Timezone:                        common.String("EXAMPLE-timezone-Value"),
			IsHostedPage:                    common.Bool(true),
			Schemas:                         []string{"EXAMPLE--Value"},
			AllowedNotificationRedirectUrls: []string{"EXAMPLE--Value"},
			Id:                              common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-id-Value"),
			IdcsPreventedOperations:         []identitydomains.IdcsPreventedOperationsEnum{identitydomains.IdcsPreventedOperationsDelete},
			CustomTranslation:               common.String("EXAMPLE-customTranslation-Value"),
			EnableTermsOfUse:                common.Bool(false),
			IdcsLastUpgradedInRelease:       common.String("EXAMPLE-idcsLastUpgradedInRelease-Value"),
			CustomCssLocation:               common.String("EXAMPLE-customCssLocation-Value"),
			Locale:                          common.String("EXAMPLE-locale-Value"),
			LoginTexts: []identitydomains.SettingsLoginTexts{identitydomains.SettingsLoginTexts{Locale: common.String("EXAMPLE-locale-Value"),
				Value: common.String("EXAMPLE-value-Value")}},
			SubMappingAttr:                      common.String("EXAMPLE-subMappingAttr-Value"),
			DefaultTrustScope:                   identitydomains.SettingDefaultTrustScopeExplicit,
			CsrAccess:                           identitydomains.SettingCsrAccessReadonly,
			AccountAlwaysTrustScope:             common.Bool(false),
			AllowedForgotPasswordFlowReturnUrls: []string{"EXAMPLE--Value"}},
		SettingId:     common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-settingId-Value"),
		AttributeSets: []identitydomains.AttributeSetsEnum{identitydomains.AttributeSetsAll},
		Attributes:    common.String("EXAMPLE-attributes-Value")}

	// Send the request using the service client
	resp, err := client.PutSetting(context.Background(), req)
	helpers.FatalIfError(err)

	// Retrieve value from the response.
	fmt.Println(resp)
}