# 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
blockchain_client =
  OCI::Blockchain::BlockchainPlatformClient.new(config: config)

# Send the request to service, some parameters are not required, see API doc for more info
preview_scale_blockchain_platform_response =
  blockchain_client.preview_scale_blockchain_platform(
    'ocid1.test.oc1..<unique_ID>EXAMPLE-blockchainPlatformId-Value',
    OCI::Blockchain::Models::ScaleBlockchainPlatformDetails.new(
      add_osns: [
        OCI::Blockchain::Models::CreateOsnDetails.new(
          ad: 'AD2',
          ocpu_allocation_param:
            OCI::Blockchain::Models::OcpuAllocationNumberParam.new(
              ocpu_allocation_number: 19.483482
            )
        )
      ],
      add_replicas:
        OCI::Blockchain::Models::ReplicaDetails.new(
          proxy_count: 2, ca_count: 4, console_count: 9
        ),
      add_peers: [
        OCI::Blockchain::Models::CreatePeerDetails.new(
          role: 'ADMIN',
          ocpu_allocation_param:
            OCI::Blockchain::Models::OcpuAllocationNumberParam.new(
              ocpu_allocation_number: 21.039818
            ),
          ad: 'AD1',
          alias: 'EXAMPLE-alias-Value'
        )
      ],
      add_storage:
        OCI::Blockchain::Models::ScaleStorageDetails.new(
          storage_size_in_tbs: 48
        ),
      modify_peers: [
        OCI::Blockchain::Models::ModifyPeerDetails.new(
          peer_name: 'EXAMPLE-peerName-Value',
          ocpu_allocation_param:
            OCI::Blockchain::Models::OcpuAllocationNumberParam.new(
              ocpu_allocation_number: 35.961483
            )
        )
      ],
      remove_replicas:
        OCI::Blockchain::Models::ReplicaDetails.new(
          proxy_count: 8, ca_count: 8, console_count: 8
        ),
      remove_osns: %w[EXAMPLE--Value],
      remove_peers: %w[EXAMPLE--Value]
    )
  )

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