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

	// 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)
}