# 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).

require 'oci'

# Create a default config using DEFAULT profile in default location
# Refer to https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File for more info
config = OCI::ConfigFileLoader.load_config

# Initialize service client with default config file
devops_client = OCI::Devops::DevopsClient.new(config: config)

# Send the request to service, some parameters are not required, see API doc for more info
trigger_deployment_dry_run_response =
  devops_client.trigger_deployment_dry_run(
    OCI::Devops::Models::TriggerDeploymentDryRunDetails.new(
      helm_diff_arguments:
        OCI::Devops::Models::HelmDiffArgumentCollection.new(
          items: [
            OCI::Devops::Models::HelmDiffArgument.new(
              stage_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-stageId-Value',
              helm_arg_set_values:
                OCI::Devops::Models::HelmSetValueCollection.new(
                  items: [
                    OCI::Devops::Models::HelmSetValue.new(
                      name: 'EXAMPLE-name-Value', value: 'EXAMPLE-value-Value'
                    )
                  ]
                ),
              helm_arg_string_values:
                OCI::Devops::Models::HelmSetValueCollection.new(
                  items: [
                    OCI::Devops::Models::HelmSetValue.new(
                      name: 'EXAMPLE-name-Value', value: 'EXAMPLE-value-Value'
                    )
                  ]
                ),
              value_artifact_contents:
                OCI::Devops::Models::ValueArtifactContentCollection.new(
                  items: [
                    OCI::Devops::Models::ValueArtifactContent.new(
                      name: 'EXAMPLE-name-Value', value: 'EXAMPLE-value-Value'
                    )
                  ]
                ),
              helm_stage_contents: [
                OCI::Devops::Models::HelmStageContent.new(
                  name: 'EXAMPLE-name-Value', value: 'EXAMPLE-value-Value'
                )
              ]
            )
          ]
        ),
      create_deployment_details:
        OCI::Devops::Models::CreateDeployPipelineRedeploymentDetails.new(
          deployment_type: 'PIPELINE_REDEPLOYMENT',
          deploy_pipeline_id:
            'ocid1.test.oc1..<unique_ID>EXAMPLE-deployPipelineId-Value',
          previous_deployment_id:
            'ocid1.test.oc1..<unique_ID>EXAMPLE-previousDeploymentId-Value',
          display_name: 'EXAMPLE-displayName-Value',
          freeform_tags: {
            'EXAMPLE_KEY_mwqWu' => 'EXAMPLE_VALUE_5H0Msrg2PAit9Ijuzd3V'
          },
          defined_tags: {
            'EXAMPLE_KEY_gNg9F' => { 'EXAMPLE_KEY_b52Yh' => 'EXAMPLE--Value' }
          }
        )
    )
  )

# Get the data from response
puts "#{trigger_deployment_dry_run_response.data}"