// 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{AttributeSets: []identitydomains.AttributeSetsEnum{identitydomains.AttributeSetsDefault},
		Attributes:                common.String("EXAMPLE-attributes-Value"),
		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{AccountAlwaysTrustScope: common.Bool(false),
			CloudMigrationCustomUrl: common.String("EXAMPLE-cloudMigrationCustomUrl-Value"),
			DefaultTrustScope:       identitydomains.SettingDefaultTrustScopeExplicit,
			PrivacyPolicyUrl:        common.String("EXAMPLE-privacyPolicyUrl-Value"),
			DiagnosticLevel:         common.Int(319),
			MaxNoOfAppCMVAToReturn:  common.Int(18),
			ReAuthFactor:            []identitydomains.SettingReAuthFactorEnum{identitydomains.SettingReAuthFactorPassword},
			Timezone:                common.String("EXAMPLE-timezone-Value"),
			SubMappingAttr:          common.String("EXAMPLE-subMappingAttr-Value"),
			CustomBranding:          common.Bool(true),
			Images: []identitydomains.SettingsImages{identitydomains.SettingsImages{Display: common.String("EXAMPLE-display-Value"),
				Type:  common.String("EXAMPLE-type-Value"),
				Value: common.String("EXAMPLE-value-Value")}},
			TenantCustomClaims: []identitydomains.SettingsTenantCustomClaims{identitydomains.SettingsTenantCustomClaims{Scopes: []string{"EXAMPLE--Value"},
				TokenType:  identitydomains.SettingsTenantCustomClaimsTokenTypeAt,
				Value:      common.String("EXAMPLE-value-Value"),
				AllScopes:  common.Bool(false),
				Expression: common.Bool(true),
				Mode:       identitydomains.SettingsTenantCustomClaimsModeNever,
				Name:       common.String("EXAMPLE-name-Value")}},
			DiagnosticRecordForSearchIdentifiesReturnedResources: common.Bool(false),
			Id: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-id-Value"),
			LoginTexts: []identitydomains.SettingsLoginTexts{identitydomains.SettingsLoginTexts{Locale: common.String("EXAMPLE-locale-Value"),
				Value: common.String("EXAMPLE-value-Value")}},
			Ocid:                             common.String("EXAMPLE-ocid-Value"),
			CustomCssLocation:                common.String("EXAMPLE-customCssLocation-Value"),
			CustomHtmlLocation:               common.String("EXAMPLE-customHtmlLocation-Value"),
			ServiceAdminCannotListOtherUsers: common.Bool(false),
			IdcsLastModifiedBy: &identitydomains.IdcsLastModifiedBy{Ref: common.String("EXAMPLE-$ref-Value"),
				Display: common.String("EXAMPLE-display-Value"),
				Ocid:    common.String("EXAMPLE-ocid-Value"),
				Type:    identitydomains.IdcsLastModifiedByTypeApp,
				Value:   common.String("EXAMPLE-value-Value")},
			AuditEventRetentionPeriod: common.Int(78),
			CloudAccountName:          common.String("EXAMPLE-cloudAccountName-Value"),
			ExternalId:                common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-externalId-Value"),
			CloudMigrationUrlEnabled:  common.Bool(false),
			DefaultCompanyNames: []identitydomains.SettingsDefaultCompanyNames{identitydomains.SettingsDefaultCompanyNames{Locale: common.String("EXAMPLE-locale-Value"),
				Value: common.String("EXAMPLE-value-Value")}},
			DefaultLoginTexts: []identitydomains.SettingsDefaultLoginTexts{identitydomains.SettingsDefaultLoginTexts{Locale: common.String("EXAMPLE-locale-Value"),
				Value: common.String("EXAMPLE-value-Value")}},
			AllowedForgotPasswordFlowReturnUrls: []string{"EXAMPLE--Value"},
			AllowedDomains:                      []string{"EXAMPLE--Value"},
			CloudGateCorsSettings: &identitydomains.SettingsCloudGateCorsSettings{CloudGateCorsAllowNullOrigin: common.Bool(false),
				CloudGateCorsAllowedOrigins: []string{"EXAMPLE--Value"},
				CloudGateCorsEnabled:        common.Bool(true),
				CloudGateCorsExposedHeaders: []string{"EXAMPLE--Value"},
				CloudGateCorsMaxAge:         common.Int(825)},
			CompartmentOcid:      common.String("EXAMPLE-compartmentOcid-Value"),
			CsrAccess:            identitydomains.SettingCsrAccessNone,
			IamUpstSessionExpiry: common.Int(700),
			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")},
			IsHostedPage:           common.Bool(false),
			PreferredLanguage:      common.String("EXAMPLE-preferredLanguage-Value"),
			Schemas:                []string{"EXAMPLE--Value"},
			MigrationStatus:        common.String("EXAMPLE-migrationStatus-Value"),
			OnPremisesProvisioning: common.Bool(true),
			ReAuthWhenChangingMyAuthenticationFactors: common.Bool(false),
			TermsOfUseUrl:                   common.String("EXAMPLE-termsOfUseUrl-Value"),
			AllowedNotificationRedirectUrls: []string{"EXAMPLE--Value"},
			Issuer:                          common.String("EXAMPLE-issuer-Value"),
			PurgeConfigs: []identitydomains.SettingsPurgeConfigs{identitydomains.SettingsPurgeConfigs{RetentionPeriod: common.Int(624),
				ResourceName: common.String("EXAMPLE-resourceName-Value")}},
			TenancyOcid:                   common.String("EXAMPLE-tenancyOcid-Value"),
			ContactEmails:                 []string{"EXAMPLE--Value"},
			EnableTermsOfUse:              common.Bool(true),
			MaxNoOfAppRoleMembersToReturn: common.Int(846),
			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")},
			DefaultImages: []identitydomains.SettingsDefaultImages{identitydomains.SettingsDefaultImages{Display: common.String("EXAMPLE-display-Value"),
				Type:  common.String("EXAMPLE-type-Value"),
				Value: common.String("EXAMPLE-value-Value")}},
			DomainOcid: common.String("EXAMPLE-domainOcid-Value"),
			PrevIssuer: common.String("EXAMPLE-prevIssuer-Value"),
			Tags: []identitydomains.Tags{identitydomains.Tags{Key: common.String("EXAMPLE-key-Value"),
				Value: common.String("EXAMPLE-value-Value")}},
			CompanyNames: []identitydomains.SettingsCompanyNames{identitydomains.SettingsCompanyNames{Locale: common.String("EXAMPLE-locale-Value"),
				Value: common.String("EXAMPLE-value-Value")}},
			DeleteInProgress:          common.Bool(true),
			IdcsLastUpgradedInRelease: common.String("EXAMPLE-idcsLastUpgradedInRelease-Value"),
			CertificateValidation: &identitydomains.SettingsCertificateValidation{OcspEnabled: common.Bool(false),
				OcspResponderURL:                  common.String("EXAMPLE-ocspResponderURL-Value"),
				OcspSettingsResponderURLPreferred: common.Bool(true),
				OcspSigningCertificateAlias:       common.String("EXAMPLE-ocspSigningCertificateAlias-Value"),
				OcspTimeoutDuration:               common.Int(287),
				OcspUnknownResponseStatusAllowed:  common.Bool(false),
				CrlCheckOnOCSPFailureEnabled:      common.Bool(true),
				CrlEnabled:                        common.Bool(false),
				CrlLocation:                       common.String("EXAMPLE-crlLocation-Value"),
				CrlRefreshInterval:                common.Int(668)},
			CustomTranslation:       common.String("EXAMPLE-customTranslation-Value"),
			DiagnosticTracingUpto:   common.String("EXAMPLE-diagnosticTracingUpto-Value"),
			IdcsPreventedOperations: []identitydomains.IdcsPreventedOperationsEnum{identitydomains.IdcsPreventedOperationsUpdate},
			Locale:                  common.String("EXAMPLE-locale-Value"),
			SigningCertPublicAccess: common.Bool(false)},
		SettingId: common.String("ocid1.test.oc1..<unique_ID>EXAMPLE-settingId-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)
}