diff --git a/src/main/resources/com/google/api/codegen/ruby/sample.snip b/src/main/resources/com/google/api/codegen/ruby/sample.snip index b824196b48..005ad32562 100644 --- a/src/main/resources/com/google/api/codegen/ruby/sample.snip +++ b/src/main/resources/com/google/api/codegen/ruby/sample.snip @@ -116,14 +116,14 @@ @if class.pageStreaming.isResourceMap {@class.pageStreaming.pageVarName}.each do |{@class.pageStreaming.resourceKeyVarName}, {@class.pageStreaming.resourceValueVarName}| @# TODO: Change code below to process each ({@class.pageStreaming.resourceKeyVarName}, {@class.pageStreaming.resourceValueVarName}) pair: - puts String({@class.pageStreaming.resourceKeyVarName} << " => " << JSON.pretty_generate({@class.pageStreaming.resourceValueVarName}) + puts String({@class.pageStreaming.resourceKeyVarName} << " => " << JSON.pretty_unparse({@class.pageStreaming.resourceValueVarName}.to_h) end @else # We don't handle non-repeated page streaming resources separately in Ruby # because the fetch_all treats them correctly. {@class.pageStreaming.pageVarName}.each do |{@class.pageStreaming.resourceVarName}| @# TODO: Change code below to process each `{@class.pageStreaming.resourceVarName}` resource: - puts JSON.pretty_generate({@class.pageStreaming.resourceVarName}) + puts JSON.pretty_unparse({@class.pageStreaming.resourceVarName}.to_h) end @end @else @@ -131,7 +131,7 @@ {@class.responseVarName} = {@methodCall(class)}({@paramList(class.methodCallFieldVarNames)}) @# TODO: Change code below to process the `{@class.responseVarName}` object: - puts JSON.pretty_generate({@class.responseVarName}) + puts JSON.pretty_unparse({@class.responseVarName}.to_h) @else {@methodCall(class)}({@paramList(class.methodCallFieldVarNames)}) @end diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_adexchangebuyer.v1.4.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_adexchangebuyer.v1.4.json.baseline index c93b47822a..c03f038549 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_adexchangebuyer.v1.4.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_adexchangebuyer.v1.4.json.baseline @@ -24,7 +24,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_account(id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -47,7 +47,7 @@ service.authorization = nil response = service.list_accounts() # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -77,7 +77,7 @@ request_body = Google::Apis::AdexchangebuyerV1_4::Account.new response = service.patch_account(id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -107,7 +107,7 @@ request_body = Google::Apis::AdexchangebuyerV1_4::Account.new response = service.update_account(id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -133,7 +133,7 @@ account_id = 0 # TODO: Update placeholder value. response = service.get_billing_info(account_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -156,7 +156,7 @@ service.authorization = nil response = service.list_billing_infos() # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -185,7 +185,7 @@ billing_id = 0 # TODO: Update placeholder value. response = service.get_budget(account_id, billing_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -218,7 +218,7 @@ request_body = Google::Apis::AdexchangebuyerV1_4::Budget.new response = service.patch_budget(account_id, billing_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -251,7 +251,7 @@ request_body = Google::Apis::AdexchangebuyerV1_4::Budget.new response = service.update_budget(account_id, billing_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -308,7 +308,7 @@ buyer_creative_id = 'my-buyer-creative-id' # TODO: Update placeholder value. response = service.get_creative(account_id, buyer_creative_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -334,7 +334,7 @@ request_body = Google::Apis::AdexchangebuyerV1_4::Creative.new response = service.insert_creative(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -360,7 +360,7 @@ end items.each do |creative| # TODO: Change code below to process each `creative` resource: - puts JSON.pretty_generate(creative) + puts JSON.pretty_unparse(creative.to_h) end # BEFORE RUNNING: # --------------- @@ -390,7 +390,7 @@ buyer_creative_id = 'my-buyer-creative-id' # TODO: Update placeholder value. response = service.list_creative_deals(account_id, buyer_creative_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -447,7 +447,7 @@ request_body = Google::Apis::AdexchangebuyerV1_4::DeleteOrderDealsRequest.new response = service.delete_marketplacedeal_order_deals(proposal_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -476,7 +476,7 @@ request_body = Google::Apis::AdexchangebuyerV1_4::AddOrderDealsRequest.new response = service.insert_marketplacedeal(proposal_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -503,7 +503,7 @@ proposal_id = 'my-proposal-id' # TODO: Update placeholder value. response = service.list_marketplacedeals(proposal_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -532,7 +532,7 @@ request_body = Google::Apis::AdexchangebuyerV1_4::EditAllOrderDealsRequest.new response = service.update_marketplacedeal(proposal_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -561,7 +561,7 @@ request_body = Google::Apis::AdexchangebuyerV1_4::AddOrderNotesRequest.new response = service.insert_marketplacenote(proposal_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -588,7 +588,7 @@ proposal_id = 'my-proposal-id' # TODO: Update placeholder value. response = service.list_marketplacenotes(proposal_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -645,7 +645,7 @@ start_date_time = '' # TODO: Update placeholder value. response = service.list_performance_reports(account_id, end_date_time, start_date_time) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -699,7 +699,7 @@ config_id = 0 # TODO: Update placeholder value. response = service.get_pretargeting_config(account_id, config_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -728,7 +728,7 @@ request_body = Google::Apis::AdexchangebuyerV1_4::PretargetingConfig.new response = service.insert_pretargeting_config(account_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -754,7 +754,7 @@ account_id = 0 # TODO: Update placeholder value. response = service.list_pretargeting_configs(account_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -787,7 +787,7 @@ request_body = Google::Apis::AdexchangebuyerV1_4::PretargetingConfig.new response = service.patch_pretargeting_config(account_id, config_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -820,7 +820,7 @@ request_body = Google::Apis::AdexchangebuyerV1_4::PretargetingConfig.new response = service.update_pretargeting_config(account_id, config_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -846,7 +846,7 @@ product_id = 'my-product-id' # TODO: Update placeholder value. response = service.get_product(product_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -869,7 +869,7 @@ service.authorization = nil response = service.search_products() # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -895,7 +895,7 @@ proposal_id = 'my-proposal-id' # TODO: Update placeholder value. response = service.get_proposal(proposal_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -921,7 +921,7 @@ request_body = Google::Apis::AdexchangebuyerV1_4::CreateOrdersRequest.new response = service.insert_proposal(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -960,7 +960,7 @@ request_body = Google::Apis::AdexchangebuyerV1_4::Proposal.new response = service.patch_proposal(proposal_id, revision_number, update_action, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -983,7 +983,7 @@ service.authorization = nil response = service.search_proposals() # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -1044,7 +1044,7 @@ request_body = Google::Apis::AdexchangebuyerV1_4::Proposal.new response = service.update_proposal(proposal_id, revision_number, update_action, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -1070,4 +1070,4 @@ account_id = 0 # TODO: Update placeholder value. response = service.list_pub_profiles(account_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_appengine.v1beta5.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_appengine.v1beta5.json.baseline index e1cc873a8f..4aed7c55d5 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_appengine.v1beta5.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_appengine.v1beta5.json.baseline @@ -29,7 +29,7 @@ request_body = Google::Apis::AppengineV1beta5::Application.new response = service.create_app(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -60,7 +60,7 @@ apps_id = 'my-apps-id' # TODO: Update placeholder value. response = service.get_app(apps_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -94,7 +94,7 @@ locations_id = 'my-locations-id' # TODO: Update placeholder value. response = service.get_app_location(apps_id, locations_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -128,7 +128,7 @@ end locations.each do |location| # TODO: Change code below to process each `location` resource: - puts JSON.pretty_generate(location) + puts JSON.pretty_unparse(location.to_h) end # BEFORE RUNNING: # --------------- @@ -163,7 +163,7 @@ operations_id = 'my-operations-id' # TODO: Update placeholder value. response = service.get_app_operation(apps_id, operations_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -197,7 +197,7 @@ end operations.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_generate(operation) + puts JSON.pretty_unparse(operation.to_h) end # BEFORE RUNNING: # --------------- @@ -233,7 +233,7 @@ request_body = Google::Apis::AppengineV1beta5::Application.new response = service.patch_app(apps_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -267,7 +267,7 @@ services_id = 'my-services-id' # TODO: Update placeholder value. response = service.delete_app_service(apps_id, services_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -301,7 +301,7 @@ services_id = 'my-services-id' # TODO: Update placeholder value. response = service.get_app_service(apps_id, services_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -335,7 +335,7 @@ end services.each do |service2| # TODO: Change code below to process each `service2` resource: - puts JSON.pretty_generate(service2) + puts JSON.pretty_unparse(service2.to_h) end # BEFORE RUNNING: # --------------- @@ -374,7 +374,7 @@ request_body = Google::Apis::AppengineV1beta5::Service.new response = service.patch_app_service(apps_id, services_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -411,7 +411,7 @@ request_body = Google::Apis::AppengineV1beta5::Version.new response = service.create_app_service_version(apps_id, services_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -448,7 +448,7 @@ versions_id = 'my-versions-id' # TODO: Update placeholder value. response = service.delete_app_service_version(apps_id, services_id, versions_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -485,7 +485,7 @@ versions_id = 'my-versions-id' # TODO: Update placeholder value. response = service.get_app_service_version(apps_id, services_id, versions_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -529,7 +529,7 @@ request_body = Google::Apis::AppengineV1beta5::DebugInstanceRequest.new response = service.debug_instance(apps_id, services_id, versions_id, instances_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -570,7 +570,7 @@ instances_id = 'my-instances-id' # TODO: Update placeholder value. response = service.delete_app_service_version_instance(apps_id, services_id, versions_id, instances_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -611,7 +611,7 @@ instances_id = 'my-instances-id' # TODO: Update placeholder value. response = service.get_app_service_version_instance(apps_id, services_id, versions_id, instances_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -651,7 +651,7 @@ end instances.each do |instance| # TODO: Change code below to process each `instance` resource: - puts JSON.pretty_generate(instance) + puts JSON.pretty_unparse(instance.to_h) end # BEFORE RUNNING: # --------------- @@ -689,7 +689,7 @@ end versions.each do |version| # TODO: Change code below to process each `version` resource: - puts JSON.pretty_generate(version) + puts JSON.pretty_unparse(version.to_h) end # BEFORE RUNNING: # --------------- @@ -731,4 +731,4 @@ request_body = Google::Apis::AppengineV1beta5::Version.new response = service.patch_app_service_version(apps_id, services_id, versions_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_bigquery.v2.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_bigquery.v2.json.baseline index 2dfb2aa57c..cbe1bd6edd 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_bigquery.v2.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_bigquery.v2.json.baseline @@ -62,7 +62,7 @@ dataset_id = 'my-dataset-id' # TODO: Update placeholder value. response = service.get_dataset(project_id, dataset_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -96,7 +96,7 @@ request_body = Google::Apis::BigqueryV2::Dataset.new response = service.insert_dataset(project_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -130,7 +130,7 @@ end datasets.each do |dataset| # TODO: Change code below to process each `dataset` resource: - puts JSON.pretty_generate(dataset) + puts JSON.pretty_unparse(dataset.to_h) end # BEFORE RUNNING: # --------------- @@ -169,7 +169,7 @@ request_body = Google::Apis::BigqueryV2::Dataset.new response = service.patch_dataset(project_id, dataset_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -207,7 +207,7 @@ request_body = Google::Apis::BigqueryV2::Dataset.new response = service.update_dataset(project_id, dataset_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -241,7 +241,7 @@ job_id = 'my-job-id' # TODO: Update placeholder value. response = service.cancel_job(project_id, job_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -275,7 +275,7 @@ job_id = 'my-job-id' # TODO: Update placeholder value. response = service.get_job(project_id, job_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -312,7 +312,7 @@ end errors.each do |error_proto| # TODO: Change code below to process each `error_proto` resource: - puts JSON.pretty_generate(error_proto) + puts JSON.pretty_unparse(error_proto.to_h) end # BEFORE RUNNING: # --------------- @@ -351,7 +351,7 @@ request_body = Google::Apis::BigqueryV2::Job.new response = service.insert_job(project_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -385,7 +385,7 @@ end jobs.each do |job| # TODO: Change code below to process each `job` resource: - puts JSON.pretty_generate(job) + puts JSON.pretty_unparse(job.to_h) end # BEFORE RUNNING: # --------------- @@ -420,7 +420,7 @@ request_body = Google::Apis::BigqueryV2::QueryRequest.new response = service.query_job(project_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -451,7 +451,7 @@ end projects.each do |project| # TODO: Change code below to process each `project` resource: - puts JSON.pretty_generate(project) + puts JSON.pretty_unparse(project.to_h) end # BEFORE RUNNING: # --------------- @@ -492,7 +492,7 @@ request_body = Google::Apis::BigqueryV2::InsertAllTableDataRequest.new response = service.insert_all_table_data(project_id, dataset_id, table_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -532,7 +532,7 @@ end rows.each do |table_row| # TODO: Change code below to process each `table_row` resource: - puts JSON.pretty_generate(table_row) + puts JSON.pretty_unparse(table_row.to_h) end # BEFORE RUNNING: # --------------- @@ -603,7 +603,7 @@ table_id = 'my-table-id' # TODO: Update placeholder value. response = service.get_table(project_id, dataset_id, table_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -640,7 +640,7 @@ request_body = Google::Apis::BigqueryV2::Table.new response = service.insert_table(project_id, dataset_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -677,7 +677,7 @@ end tables.each do |table| # TODO: Change code below to process each `table` resource: - puts JSON.pretty_generate(table) + puts JSON.pretty_unparse(table.to_h) end # BEFORE RUNNING: # --------------- @@ -719,7 +719,7 @@ request_body = Google::Apis::BigqueryV2::Table.new response = service.patch_table(project_id, dataset_id, table_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -760,4 +760,4 @@ request_body = Google::Apis::BigqueryV2::Table.new response = service.update_table(project_id, dataset_id, table_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudbilling.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudbilling.v1.json.baseline index 1d13b8cb2b..0cd881ae5c 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudbilling.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudbilling.v1.json.baseline @@ -30,7 +30,7 @@ name = 'billingAccounts/my-billing-account' # TODO: Update placeholder value. response = service.get_billing_account(name) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Billing API @@ -61,7 +61,7 @@ end billing_accounts.each do |billing_account| # TODO: Change code below to process each `billing_account` resource: - puts JSON.pretty_generate(billing_account) + puts JSON.pretty_unparse(billing_account.to_h) end # BEFORE RUNNING: # --------------- @@ -97,7 +97,7 @@ end project_billing_info2.each do |project_billing_info| # TODO: Change code below to process each `project_billing_info` resource: - puts JSON.pretty_generate(project_billing_info) + puts JSON.pretty_unparse(project_billing_info.to_h) end # BEFORE RUNNING: # --------------- @@ -130,7 +130,7 @@ name = 'projects/my-project' # TODO: Update placeholder value. response = service.get_project_billing_info(name) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Billing API @@ -166,4 +166,4 @@ request_body = Google::Apis::CloudbillingV1::ProjectBillingInfo.new response = service.update_project_billing_info(name, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_clouddebugger.v2.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_clouddebugger.v2.json.baseline index 57029dc4ba..ef90299351 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_clouddebugger.v2.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_clouddebugger.v2.json.baseline @@ -29,7 +29,7 @@ debuggee_id = 'my-debuggee-id' # TODO: Update placeholder value. response = service.list_controller_debuggee_breakpoints(debuggee_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Debugger API @@ -67,7 +67,7 @@ request_body = Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointRequest.new response = service.update_active_breakpoint(debuggee_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Debugger API @@ -98,7 +98,7 @@ request_body = Google::Apis::ClouddebuggerV2::RegisterDebuggeeRequest.new response = service.register_debuggee(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Debugger API @@ -162,7 +162,7 @@ breakpoint_id = 'my-breakpoint-id' # TODO: Update placeholder value. response = service.get_debugger_debuggee_breakpoint(debuggee_id, breakpoint_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Debugger API @@ -193,7 +193,7 @@ debuggee_id = 'my-debuggee-id' # TODO: Update placeholder value. response = service.list_debugger_debuggee_breakpoints(debuggee_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Debugger API @@ -227,7 +227,7 @@ request_body = Google::Apis::ClouddebuggerV2::Breakpoint.new response = service.set_debugger_debuggee_breakpoint(debuggee_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Debugger API @@ -255,4 +255,4 @@ service.authorization = \ response = service.list_debugger_debuggees() # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudmonitoring.v2beta2.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudmonitoring.v2beta2.json.baseline index c1239bd714..bbb2043455 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudmonitoring.v2beta2.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudmonitoring.v2beta2.json.baseline @@ -32,7 +32,7 @@ request_body = Google::Apis::CloudmonitoringV2beta2::MetricDescriptor.new response = service.create_metric_descriptor(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Monitoring API @@ -66,7 +66,7 @@ metric = 'my-metric' # TODO: Update placeholder value. response = service.delete_metric_descriptor(project, metric) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Monitoring API @@ -103,7 +103,7 @@ end metrics.each do |metric_descriptor| # TODO: Change code below to process each `metric_descriptor` resource: - puts JSON.pretty_generate(metric_descriptor) + puts JSON.pretty_unparse(metric_descriptor.to_h) end # BEFORE RUNNING: # --------------- @@ -149,7 +149,7 @@ end timeseries2.each do |timeseries| # TODO: Change code below to process each `timeseries` resource: - puts JSON.pretty_generate(timeseries) + puts JSON.pretty_unparse(timeseries.to_h) end # BEFORE RUNNING: # --------------- @@ -184,7 +184,7 @@ request_body = Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesRequest.new response = service.write_timeseries(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Monitoring API @@ -229,5 +229,5 @@ end timeseries.each do |timeseries_descriptor| # TODO: Change code below to process each `timeseries_descriptor` resource: - puts JSON.pretty_generate(timeseries_descriptor) + puts JSON.pretty_unparse(timeseries_descriptor.to_h) end diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudresourcemanager.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudresourcemanager.v1.json.baseline index da826c13b6..071add462c 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudresourcemanager.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudresourcemanager.v1.json.baseline @@ -29,7 +29,7 @@ name = 'operations/my-operation' # TODO: Update placeholder value. response = service.get_operation(name) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -60,7 +60,7 @@ name = 'organizations/my-organization' # TODO: Update placeholder value. response = service.get_organization(name) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -96,7 +96,7 @@ request_body = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest.new response = service.get_organization_iam_policy(resource, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -131,7 +131,7 @@ end organizations.each do |organization| # TODO: Change code below to process each `organization` resource: - puts JSON.pretty_generate(organization) + puts JSON.pretty_unparse(organization.to_h) end # BEFORE RUNNING: # --------------- @@ -168,7 +168,7 @@ request_body = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest.new response = service.set_organization_iam_policy(resource, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -204,7 +204,7 @@ request_body = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest.n response = service.test_organization_iam_permissions(resource, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -235,7 +235,7 @@ request_body = Google::Apis::CloudresourcemanagerV1::Project.new response = service.create_project(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -295,7 +295,7 @@ project_id = 'my-project-id' # TODO: Update placeholder value. response = service.get_project(project_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -330,7 +330,7 @@ request_body = Google::Apis::CloudresourcemanagerV1::GetAncestryRequest.new response = service.get_project_ancestry(project_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -366,7 +366,7 @@ request_body = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest.new response = service.get_project_iam_policy(resource, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -397,7 +397,7 @@ end projects.each do |project| # TODO: Change code below to process each `project` resource: - puts JSON.pretty_generate(project) + puts JSON.pretty_unparse(project.to_h) end # BEFORE RUNNING: # --------------- @@ -434,7 +434,7 @@ request_body = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest.new response = service.set_project_iam_policy(resource, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -470,7 +470,7 @@ request_body = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest.n response = service.test_project_iam_permissions(resource, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -537,4 +537,4 @@ request_body = Google::Apis::CloudresourcemanagerV1::Project.new response = service.update_project(project_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudtrace.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudtrace.v1.json.baseline index e7aab75db2..18d8856220 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudtrace.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudtrace.v1.json.baseline @@ -63,7 +63,7 @@ trace_id = 'my-trace-id' # TODO: Update placeholder value. response = service.get_project_trace(project_id, trace_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Trace API @@ -97,5 +97,5 @@ end traces.each do |trace| # TODO: Change code below to process each `trace` resource: - puts JSON.pretty_generate(trace) + puts JSON.pretty_unparse(trace.to_h) end diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_clouduseraccounts.beta.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_clouduseraccounts.beta.json.baseline index d15ad0b058..1628cfbce3 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_clouduseraccounts.beta.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_clouduseraccounts.beta.json.baseline @@ -62,7 +62,7 @@ operation = 'my-operation' # TODO: Update placeholder value. response = service.get_global_accounts_operation(project, operation) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -96,7 +96,7 @@ end items.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_generate(operation) + puts JSON.pretty_unparse(operation.to_h) end # BEFORE RUNNING: # --------------- @@ -134,7 +134,7 @@ request_body = Google::Apis::ClouduseraccountsBeta::GroupsAddMemberRequest.new response = service.add_group_member(project, group_name, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -168,7 +168,7 @@ group_name = 'my-group-name' # TODO: Update placeholder value. response = service.delete_group(project, group_name) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -202,7 +202,7 @@ group_name = 'my-group-name' # TODO: Update placeholder value. response = service.get_group(project, group_name) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -236,7 +236,7 @@ request_body = Google::Apis::ClouduseraccountsBeta::Group.new response = service.insert_group(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -270,7 +270,7 @@ end items.each do |group| # TODO: Change code below to process each `group` resource: - puts JSON.pretty_generate(group) + puts JSON.pretty_unparse(group.to_h) end # BEFORE RUNNING: # --------------- @@ -308,7 +308,7 @@ request_body = Google::Apis::ClouduseraccountsBeta::GroupsRemoveMemberRequest.ne response = service.remove_group_member(project, group_name, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -348,7 +348,7 @@ instance = '' # TODO: Update placeholder value. response = service.get_linux_authorized_keys_view(project, zone, user, instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -385,7 +385,7 @@ instance = '' # TODO: Update placeholder value. response = service.get_linux_linux_account_views(project, zone, instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -422,7 +422,7 @@ request_body = Google::Apis::ClouduseraccountsBeta::PublicKey.new response = service.add_user_public_key(project, user, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -456,7 +456,7 @@ user = 'my-user' # TODO: Update placeholder value. response = service.delete_user(project, user) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -490,7 +490,7 @@ user = 'my-user' # TODO: Update placeholder value. response = service.get_user(project, user) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -524,7 +524,7 @@ request_body = Google::Apis::ClouduseraccountsBeta::User.new response = service.insert_user(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -558,7 +558,7 @@ end items.each do |user| # TODO: Change code below to process each `user` resource: - puts JSON.pretty_generate(user) + puts JSON.pretty_unparse(user.to_h) end # BEFORE RUNNING: # --------------- @@ -597,4 +597,4 @@ fingerprint = '' # TODO: Update placeholder value. response = service.remove_user_public_key(project, user, fingerprint) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_compute.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_compute.v1.json.baseline index ec635ca6f9..f6d3c24f59 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_compute.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_compute.v1.json.baseline @@ -32,7 +32,7 @@ end items.each do |name, addresses_scoped_list| # TODO: Change code below to process each (name, addresses_scoped_list) pair: - puts String(name << " => " << JSON.pretty_generate(addresses_scoped_list) + puts String(name << " => " << JSON.pretty_unparse(addresses_scoped_list.to_h) end # BEFORE RUNNING: # --------------- @@ -70,7 +70,7 @@ address = 'my-address' # TODO: Update placeholder value. response = service.delete_address(project, region, address) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -107,7 +107,7 @@ address = 'my-address' # TODO: Update placeholder value. response = service.get_address(project, region, address) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -144,7 +144,7 @@ request_body = Google::Apis::ComputeV1::Address.new response = service.insert_address(project, region, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -181,7 +181,7 @@ end items.each do |address| # TODO: Change code below to process each `address` resource: - puts JSON.pretty_generate(address) + puts JSON.pretty_unparse(address.to_h) end # BEFORE RUNNING: # --------------- @@ -216,7 +216,7 @@ end items.each do |name, autoscalers_scoped_list| # TODO: Change code below to process each (name, autoscalers_scoped_list) pair: - puts String(name << " => " << JSON.pretty_generate(autoscalers_scoped_list) + puts String(name << " => " << JSON.pretty_unparse(autoscalers_scoped_list.to_h) end # BEFORE RUNNING: # --------------- @@ -254,7 +254,7 @@ autoscaler = 'my-autoscaler' # TODO: Update placeholder value. response = service.delete_autoscaler(project, zone, autoscaler) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -291,7 +291,7 @@ autoscaler = 'my-autoscaler' # TODO: Update placeholder value. response = service.get_autoscaler(project, zone, autoscaler) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -328,7 +328,7 @@ request_body = Google::Apis::ComputeV1::Autoscaler.new response = service.insert_autoscaler(project, zone, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -365,7 +365,7 @@ end items.each do |autoscaler| # TODO: Change code below to process each `autoscaler` resource: - puts JSON.pretty_generate(autoscaler) + puts JSON.pretty_unparse(autoscaler.to_h) end # BEFORE RUNNING: # --------------- @@ -407,7 +407,7 @@ request_body = Google::Apis::ComputeV1::Autoscaler.new response = service.patch_autoscaler(project, zone, autoscaler, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -445,7 +445,7 @@ request_body = Google::Apis::ComputeV1::Autoscaler.new response = service.update_autoscaler(project, zone, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -479,7 +479,7 @@ end items.each do |name, backend_services_scoped_list| # TODO: Change code below to process each (name, backend_services_scoped_list) pair: - puts String(name << " => " << JSON.pretty_generate(backend_services_scoped_list) + puts String(name << " => " << JSON.pretty_unparse(backend_services_scoped_list.to_h) end # BEFORE RUNNING: # --------------- @@ -514,7 +514,7 @@ backend_service = 'my-backend-service' # TODO: Update placeholder value. response = service.delete_backend_service(project, backend_service) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -548,7 +548,7 @@ backend_service = 'my-backend-service' # TODO: Update placeholder value. response = service.get_backend_service(project, backend_service) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -584,7 +584,7 @@ request_body = Google::Apis::ComputeV1::ResourceGroupReference.new response = service.get_backend_service_health(project, backend_service, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -618,7 +618,7 @@ request_body = Google::Apis::ComputeV1::BackendService.new response = service.insert_backend_service(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -652,7 +652,7 @@ end items.each do |backend_service| # TODO: Change code below to process each `backend_service` resource: - puts JSON.pretty_generate(backend_service) + puts JSON.pretty_unparse(backend_service.to_h) end # BEFORE RUNNING: # --------------- @@ -691,7 +691,7 @@ request_body = Google::Apis::ComputeV1::BackendService.new response = service.patch_backend_service(project, backend_service, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -729,7 +729,7 @@ request_body = Google::Apis::ComputeV1::BackendService.new response = service.update_backend_service(project, backend_service, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -763,7 +763,7 @@ end items.each do |name, disk_types_scoped_list| # TODO: Change code below to process each (name, disk_types_scoped_list) pair: - puts String(name << " => " << JSON.pretty_generate(disk_types_scoped_list) + puts String(name << " => " << JSON.pretty_unparse(disk_types_scoped_list.to_h) end # BEFORE RUNNING: # --------------- @@ -801,7 +801,7 @@ disk_type = 'my-disk-type' # TODO: Update placeholder value. response = service.get_disk_type(project, zone, disk_type) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -838,7 +838,7 @@ end items.each do |disk_type| # TODO: Change code below to process each `disk_type` resource: - puts JSON.pretty_generate(disk_type) + puts JSON.pretty_unparse(disk_type.to_h) end # BEFORE RUNNING: # --------------- @@ -873,7 +873,7 @@ end items.each do |name, disks_scoped_list| # TODO: Change code below to process each (name, disks_scoped_list) pair: - puts String(name << " => " << JSON.pretty_generate(disks_scoped_list) + puts String(name << " => " << JSON.pretty_unparse(disks_scoped_list.to_h) end # BEFORE RUNNING: # --------------- @@ -914,7 +914,7 @@ request_body = Google::Apis::ComputeV1::Snapshot.new response = service.create_disk_snapshot(project, zone, disk, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -951,7 +951,7 @@ disk = 'my-disk' # TODO: Update placeholder value. response = service.delete_disk(project, zone, disk) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -988,7 +988,7 @@ disk = 'my-disk' # TODO: Update placeholder value. response = service.get_disk(project, zone, disk) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1025,7 +1025,7 @@ request_body = Google::Apis::ComputeV1::Disk.new response = service.insert_disk(project, zone, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1062,7 +1062,7 @@ end items.each do |disk| # TODO: Change code below to process each `disk` resource: - puts JSON.pretty_generate(disk) + puts JSON.pretty_unparse(disk.to_h) end # BEFORE RUNNING: # --------------- @@ -1103,7 +1103,7 @@ request_body = Google::Apis::ComputeV1::DisksResizeRequest.new response = service.resize_disk(project, zone, disk, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1137,7 +1137,7 @@ firewall = 'my-firewall' # TODO: Update placeholder value. response = service.delete_firewall(project, firewall) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1171,7 +1171,7 @@ firewall = 'my-firewall' # TODO: Update placeholder value. response = service.get_firewall(project, firewall) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1205,7 +1205,7 @@ request_body = Google::Apis::ComputeV1::Firewall.new response = service.insert_firewall(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1239,7 +1239,7 @@ end items.each do |firewall| # TODO: Change code below to process each `firewall` resource: - puts JSON.pretty_generate(firewall) + puts JSON.pretty_unparse(firewall.to_h) end # BEFORE RUNNING: # --------------- @@ -1278,7 +1278,7 @@ request_body = Google::Apis::ComputeV1::Firewall.new response = service.patch_firewall(project, firewall, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1316,7 +1316,7 @@ request_body = Google::Apis::ComputeV1::Firewall.new response = service.update_firewall(project, firewall, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1350,7 +1350,7 @@ end items.each do |name, forwarding_rules_scoped_list| # TODO: Change code below to process each (name, forwarding_rules_scoped_list) pair: - puts String(name << " => " << JSON.pretty_generate(forwarding_rules_scoped_list) + puts String(name << " => " << JSON.pretty_unparse(forwarding_rules_scoped_list.to_h) end # BEFORE RUNNING: # --------------- @@ -1388,7 +1388,7 @@ forwarding_rule = 'my-forwarding-rule' # TODO: Update placeholder value. response = service.delete_forwarding_rule(project, region, forwarding_rule) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1425,7 +1425,7 @@ forwarding_rule = 'my-forwarding-rule' # TODO: Update placeholder value. response = service.get_forwarding_rule(project, region, forwarding_rule) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1462,7 +1462,7 @@ request_body = Google::Apis::ComputeV1::ForwardingRule.new response = service.insert_forwarding_rule(project, region, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1499,7 +1499,7 @@ end items.each do |forwarding_rule| # TODO: Change code below to process each `forwarding_rule` resource: - puts JSON.pretty_generate(forwarding_rule) + puts JSON.pretty_unparse(forwarding_rule.to_h) end # BEFORE RUNNING: # --------------- @@ -1540,7 +1540,7 @@ request_body = Google::Apis::ComputeV1::TargetReference.new response = service.set_forwarding_rule_target(project, region, forwarding_rule, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1574,7 +1574,7 @@ address = 'my-address' # TODO: Update placeholder value. response = service.delete_global_address(project, address) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1608,7 +1608,7 @@ address = 'my-address' # TODO: Update placeholder value. response = service.get_global_address(project, address) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1642,7 +1642,7 @@ request_body = Google::Apis::ComputeV1::Address.new response = service.insert_global_address(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1676,7 +1676,7 @@ end items.each do |address| # TODO: Change code below to process each `address` resource: - puts JSON.pretty_generate(address) + puts JSON.pretty_unparse(address.to_h) end # BEFORE RUNNING: # --------------- @@ -1711,7 +1711,7 @@ forwarding_rule = 'my-forwarding-rule' # TODO: Update placeholder value. response = service.delete_global_forwarding_rule(project, forwarding_rule) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1745,7 +1745,7 @@ forwarding_rule = 'my-forwarding-rule' # TODO: Update placeholder value. response = service.get_global_forwarding_rule(project, forwarding_rule) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1779,7 +1779,7 @@ request_body = Google::Apis::ComputeV1::ForwardingRule.new response = service.insert_global_forwarding_rule(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1813,7 +1813,7 @@ end items.each do |forwarding_rule| # TODO: Change code below to process each `forwarding_rule` resource: - puts JSON.pretty_generate(forwarding_rule) + puts JSON.pretty_unparse(forwarding_rule.to_h) end # BEFORE RUNNING: # --------------- @@ -1851,7 +1851,7 @@ request_body = Google::Apis::ComputeV1::TargetReference.new response = service.set_global_forwarding_rule_target(project, forwarding_rule, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1885,7 +1885,7 @@ end items.each do |name, operations_scoped_list| # TODO: Change code below to process each (name, operations_scoped_list) pair: - puts String(name << " => " << JSON.pretty_generate(operations_scoped_list) + puts String(name << " => " << JSON.pretty_unparse(operations_scoped_list.to_h) end # BEFORE RUNNING: # --------------- @@ -1950,7 +1950,7 @@ operation = 'my-operation' # TODO: Update placeholder value. response = service.get_global_operation(project, operation) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1984,7 +1984,7 @@ end items.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_generate(operation) + puts JSON.pretty_unparse(operation.to_h) end # BEFORE RUNNING: # --------------- @@ -2019,7 +2019,7 @@ health_check = 'my-health-check' # TODO: Update placeholder value. response = service.delete_health_check(project, health_check) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2053,7 +2053,7 @@ health_check = 'my-health-check' # TODO: Update placeholder value. response = service.get_health_check(project, health_check) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2087,7 +2087,7 @@ request_body = Google::Apis::ComputeV1::HealthCheck.new response = service.insert_health_check(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2121,7 +2121,7 @@ end items.each do |health_check| # TODO: Change code below to process each `health_check` resource: - puts JSON.pretty_generate(health_check) + puts JSON.pretty_unparse(health_check.to_h) end # BEFORE RUNNING: # --------------- @@ -2160,7 +2160,7 @@ request_body = Google::Apis::ComputeV1::HealthCheck.new response = service.patch_health_check(project, health_check, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2198,7 +2198,7 @@ request_body = Google::Apis::ComputeV1::HealthCheck.new response = service.update_health_check(project, health_check, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2232,7 +2232,7 @@ http_health_check = 'my-http-health-check' # TODO: Update placeholder value. response = service.delete_http_health_check(project, http_health_check) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2266,7 +2266,7 @@ http_health_check = 'my-http-health-check' # TODO: Update placeholder value. response = service.get_http_health_check(project, http_health_check) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2300,7 +2300,7 @@ request_body = Google::Apis::ComputeV1::HttpHealthCheck.new response = service.insert_http_health_check(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2334,7 +2334,7 @@ end items.each do |http_health_check| # TODO: Change code below to process each `http_health_check` resource: - puts JSON.pretty_generate(http_health_check) + puts JSON.pretty_unparse(http_health_check.to_h) end # BEFORE RUNNING: # --------------- @@ -2373,7 +2373,7 @@ request_body = Google::Apis::ComputeV1::HttpHealthCheck.new response = service.patch_http_health_check(project, http_health_check, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2411,7 +2411,7 @@ request_body = Google::Apis::ComputeV1::HttpHealthCheck.new response = service.update_http_health_check(project, http_health_check, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2445,7 +2445,7 @@ https_health_check = 'my-https-health-check' # TODO: Update placeholder value. response = service.delete_https_health_check(project, https_health_check) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2479,7 +2479,7 @@ https_health_check = 'my-https-health-check' # TODO: Update placeholder value. response = service.get_https_health_check(project, https_health_check) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2513,7 +2513,7 @@ request_body = Google::Apis::ComputeV1::HttpsHealthCheck.new response = service.insert_https_health_check(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2547,7 +2547,7 @@ end items.each do |https_health_check| # TODO: Change code below to process each `https_health_check` resource: - puts JSON.pretty_generate(https_health_check) + puts JSON.pretty_unparse(https_health_check.to_h) end # BEFORE RUNNING: # --------------- @@ -2586,7 +2586,7 @@ request_body = Google::Apis::ComputeV1::HttpsHealthCheck.new response = service.patch_https_health_check(project, https_health_check, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2624,7 +2624,7 @@ request_body = Google::Apis::ComputeV1::HttpsHealthCheck.new response = service.update_https_health_check(project, https_health_check, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2658,7 +2658,7 @@ image = 'my-image' # TODO: Update placeholder value. response = service.delete_image(project, image) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2695,7 +2695,7 @@ request_body = Google::Apis::ComputeV1::DeprecationStatus.new response = service.deprecate_image(project, image, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2729,7 +2729,7 @@ image = 'my-image' # TODO: Update placeholder value. response = service.get_image(project, image) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2763,7 +2763,7 @@ family = 'my-family' # TODO: Update placeholder value. response = service.get_image_from_family(project, family) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2797,7 +2797,7 @@ request_body = Google::Apis::ComputeV1::Image.new response = service.insert_image(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2831,7 +2831,7 @@ end items.each do |image| # TODO: Change code below to process each `image` resource: - puts JSON.pretty_generate(image) + puts JSON.pretty_unparse(image.to_h) end # BEFORE RUNNING: # --------------- @@ -2872,7 +2872,7 @@ request_body = Google::Apis::ComputeV1::InstanceGroupManagersAbandonInstancesReq response = service.abandon_instance_group_manager_instances(project, zone, instance_group_manager, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2906,7 +2906,7 @@ end items.each do |name, instance_group_managers_scoped_list| # TODO: Change code below to process each (name, instance_group_managers_scoped_list) pair: - puts String(name << " => " << JSON.pretty_generate(instance_group_managers_scoped_list) + puts String(name << " => " << JSON.pretty_unparse(instance_group_managers_scoped_list.to_h) end # BEFORE RUNNING: # --------------- @@ -2944,7 +2944,7 @@ instance_group_manager = 'my-instance-group-manager' # TODO: Update placeholder response = service.delete_instance_group_manager(project, zone, instance_group_manager) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2984,7 +2984,7 @@ request_body = Google::Apis::ComputeV1::InstanceGroupManagersDeleteInstancesRequ response = service.delete_instance_group_manager_instances(project, zone, instance_group_manager, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3021,7 +3021,7 @@ instance_group_manager = 'my-instance-group-manager' # TODO: Update placeholder response = service.get_instance_group_manager(project, zone, instance_group_manager) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3058,7 +3058,7 @@ request_body = Google::Apis::ComputeV1::InstanceGroupManager.new response = service.insert_instance_group_manager(project, zone, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3095,7 +3095,7 @@ end items.each do |instance_group_manager| # TODO: Change code below to process each `instance_group_manager` resource: - puts JSON.pretty_generate(instance_group_manager) + puts JSON.pretty_unparse(instance_group_manager.to_h) end # BEFORE RUNNING: # --------------- @@ -3133,7 +3133,7 @@ instance_group_manager = 'my-instance-group-manager' # TODO: Update placeholder response = service.list_instance_group_manager_managed_instances(project, zone, instance_group_manager) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3173,7 +3173,7 @@ request_body = Google::Apis::ComputeV1::InstanceGroupManagersRecreateInstancesRe response = service.recreate_instance_group_manager_instances(project, zone, instance_group_manager, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3215,7 +3215,7 @@ size = 0 # TODO: Update placeholder value. response = service.resize_instance_group_manager(project, zone, instance_group_manager, size) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3255,7 +3255,7 @@ request_body = Google::Apis::ComputeV1::InstanceGroupManagersSetInstanceTemplate response = service.set_instance_group_manager_instance_template(project, zone, instance_group_manager, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3295,7 +3295,7 @@ request_body = Google::Apis::ComputeV1::InstanceGroupManagersSetTargetPoolsReque response = service.set_instance_group_manager_target_pools(project, zone, instance_group_manager, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3335,7 +3335,7 @@ request_body = Google::Apis::ComputeV1::InstanceGroupsAddInstancesRequest.new response = service.add_instance_group_instances(project, zone, instance_group, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3369,7 +3369,7 @@ end items.each do |name, instance_groups_scoped_list| # TODO: Change code below to process each (name, instance_groups_scoped_list) pair: - puts String(name << " => " << JSON.pretty_generate(instance_groups_scoped_list) + puts String(name << " => " << JSON.pretty_unparse(instance_groups_scoped_list.to_h) end # BEFORE RUNNING: # --------------- @@ -3407,7 +3407,7 @@ instance_group = 'my-instance-group' # TODO: Update placeholder value. response = service.delete_instance_group(project, zone, instance_group) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3444,7 +3444,7 @@ instance_group = 'my-instance-group' # TODO: Update placeholder value. response = service.get_instance_group(project, zone, instance_group) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3481,7 +3481,7 @@ request_body = Google::Apis::ComputeV1::InstanceGroup.new response = service.insert_instance_group(project, zone, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3518,7 +3518,7 @@ end items.each do |instance_group| # TODO: Change code below to process each `instance_group` resource: - puts JSON.pretty_generate(instance_group) + puts JSON.pretty_unparse(instance_group.to_h) end # BEFORE RUNNING: # --------------- @@ -3562,7 +3562,7 @@ end items.each do |instance_with_named_ports| # TODO: Change code below to process each `instance_with_named_ports` resource: - puts JSON.pretty_generate(instance_with_named_ports) + puts JSON.pretty_unparse(instance_with_named_ports.to_h) end # BEFORE RUNNING: # --------------- @@ -3603,7 +3603,7 @@ request_body = Google::Apis::ComputeV1::InstanceGroupsRemoveInstancesRequest.new response = service.remove_instance_group_instances(project, zone, instance_group, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3643,7 +3643,7 @@ request_body = Google::Apis::ComputeV1::InstanceGroupsSetNamedPortsRequest.new response = service.set_instance_group_named_ports(project, zone, instance_group, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3677,7 +3677,7 @@ instance_template = 'my-instance-template' # TODO: Update placeholder value. response = service.delete_instance_template(project, instance_template) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3711,7 +3711,7 @@ instance_template = 'my-instance-template' # TODO: Update placeholder value. response = service.get_instance_template(project, instance_template) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3745,7 +3745,7 @@ request_body = Google::Apis::ComputeV1::InstanceTemplate.new response = service.insert_instance_template(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3779,7 +3779,7 @@ end items.each do |instance_template| # TODO: Change code below to process each `instance_template` resource: - puts JSON.pretty_generate(instance_template) + puts JSON.pretty_unparse(instance_template.to_h) end # BEFORE RUNNING: # --------------- @@ -3823,7 +3823,7 @@ request_body = Google::Apis::ComputeV1::AccessConfig.new response = service.add_instance_access_config(project, zone, instance, network_interface, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3857,7 +3857,7 @@ end items.each do |name, instances_scoped_list| # TODO: Change code below to process each (name, instances_scoped_list) pair: - puts String(name << " => " << JSON.pretty_generate(instances_scoped_list) + puts String(name << " => " << JSON.pretty_unparse(instances_scoped_list.to_h) end # BEFORE RUNNING: # --------------- @@ -3898,7 +3898,7 @@ request_body = Google::Apis::ComputeV1::AttachedDisk.new response = service.attach_disk(project, zone, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3935,7 +3935,7 @@ instance = 'my-instance' # TODO: Update placeholder value. response = service.delete_instance(project, zone, instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3978,7 +3978,7 @@ network_interface = '' # TODO: Update placeholder value. response = service.delete_instance_access_config(project, zone, instance, access_config, network_interface) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4018,7 +4018,7 @@ device_name = '' # TODO: Update placeholder value. response = service.detach_disk(project, zone, instance, device_name) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4055,7 +4055,7 @@ instance = 'my-instance' # TODO: Update placeholder value. response = service.get_instance(project, zone, instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4092,7 +4092,7 @@ instance = 'my-instance' # TODO: Update placeholder value. response = service.get_instance_serial_port_output(project, zone, instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4129,7 +4129,7 @@ request_body = Google::Apis::ComputeV1::Instance.new response = service.insert_instance(project, zone, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4166,7 +4166,7 @@ end items.each do |instance| # TODO: Change code below to process each `instance` resource: - puts JSON.pretty_generate(instance) + puts JSON.pretty_unparse(instance.to_h) end # BEFORE RUNNING: # --------------- @@ -4204,7 +4204,7 @@ instance = 'my-instance' # TODO: Update placeholder value. response = service.reset_instance(project, zone, instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4247,7 +4247,7 @@ device_name = '' # TODO: Update placeholder value. response = service.set_disk_auto_delete(project, zone, instance, auto_delete, device_name) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4287,7 +4287,7 @@ request_body = Google::Apis::ComputeV1::InstancesSetMachineTypeRequest.new response = service.set_instance_machine_type(project, zone, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4327,7 +4327,7 @@ request_body = Google::Apis::ComputeV1::Metadata.new response = service.set_instance_metadata(project, zone, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4367,7 +4367,7 @@ request_body = Google::Apis::ComputeV1::Scheduling.new response = service.set_instance_scheduling(project, zone, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4407,7 +4407,7 @@ request_body = Google::Apis::ComputeV1::InstancesSetServiceAccountRequest.new response = service.set_instance_service_account(project, zone, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4447,7 +4447,7 @@ request_body = Google::Apis::ComputeV1::Tags.new response = service.set_instance_tags(project, zone, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4484,7 +4484,7 @@ instance = 'my-instance' # TODO: Update placeholder value. response = service.start_instance(project, zone, instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4524,7 +4524,7 @@ request_body = Google::Apis::ComputeV1::InstancesStartWithEncryptionKeyRequest.n response = service.start_instance_with_encryption_key(project, zone, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4561,7 +4561,7 @@ instance = 'my-instance' # TODO: Update placeholder value. response = service.stop_instance(project, zone, instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4595,7 +4595,7 @@ license = 'my-license' # TODO: Update placeholder value. response = service.get_license(project, license) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4629,7 +4629,7 @@ end items.each do |name, machine_types_scoped_list| # TODO: Change code below to process each (name, machine_types_scoped_list) pair: - puts String(name << " => " << JSON.pretty_generate(machine_types_scoped_list) + puts String(name << " => " << JSON.pretty_unparse(machine_types_scoped_list.to_h) end # BEFORE RUNNING: # --------------- @@ -4667,7 +4667,7 @@ machine_type = 'my-machine-type' # TODO: Update placeholder value. response = service.get_machine_type(project, zone, machine_type) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4704,7 +4704,7 @@ end items.each do |machine_type| # TODO: Change code below to process each `machine_type` resource: - puts JSON.pretty_generate(machine_type) + puts JSON.pretty_unparse(machine_type.to_h) end # BEFORE RUNNING: # --------------- @@ -4739,7 +4739,7 @@ network = 'my-network' # TODO: Update placeholder value. response = service.delete_network(project, network) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4773,7 +4773,7 @@ network = 'my-network' # TODO: Update placeholder value. response = service.get_network(project, network) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4807,7 +4807,7 @@ request_body = Google::Apis::ComputeV1::Network.new response = service.insert_network(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4841,7 +4841,7 @@ end items.each do |network| # TODO: Change code below to process each `network` resource: - puts JSON.pretty_generate(network) + puts JSON.pretty_unparse(network.to_h) end # BEFORE RUNNING: # --------------- @@ -4876,7 +4876,7 @@ network = 'my-network' # TODO: Update placeholder value. response = service.switch_network_to_custom_mode(project, network) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4907,7 +4907,7 @@ project = 'my-project' # TODO: Update placeholder value. response = service.get_project(project) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4941,7 +4941,7 @@ request_body = Google::Apis::ComputeV1::MoveDiskRequest.new response = service.move_disk(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4975,7 +4975,7 @@ request_body = Google::Apis::ComputeV1::MoveInstanceRequest.new response = service.move_instance(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5009,7 +5009,7 @@ request_body = Google::Apis::ComputeV1::Metadata.new response = service.set_common_instance_metadata(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5043,7 +5043,7 @@ request_body = Google::Apis::ComputeV1::UsageExportLocation.new response = service.set_usage_export_bucket(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5080,7 +5080,7 @@ autoscaler = 'my-autoscaler' # TODO: Update placeholder value. response = service.delete_region_autoscaler(project, region, autoscaler) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5117,7 +5117,7 @@ autoscaler = 'my-autoscaler' # TODO: Update placeholder value. response = service.get_region_autoscaler(project, region, autoscaler) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5154,7 +5154,7 @@ request_body = Google::Apis::ComputeV1::Autoscaler.new response = service.insert_region_autoscaler(project, region, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5191,7 +5191,7 @@ end items.each do |autoscaler| # TODO: Change code below to process each `autoscaler` resource: - puts JSON.pretty_generate(autoscaler) + puts JSON.pretty_unparse(autoscaler.to_h) end # BEFORE RUNNING: # --------------- @@ -5233,7 +5233,7 @@ request_body = Google::Apis::ComputeV1::Autoscaler.new response = service.patch_region_autoscaler(project, region, autoscaler, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5271,7 +5271,7 @@ request_body = Google::Apis::ComputeV1::Autoscaler.new response = service.update_region_autoscaler(project, region, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5308,7 +5308,7 @@ backend_service = 'my-backend-service' # TODO: Update placeholder value. response = service.delete_region_backend_service(project, region, backend_service) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5345,7 +5345,7 @@ backend_service = 'my-backend-service' # TODO: Update placeholder value. response = service.get_region_backend_service(project, region, backend_service) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5384,7 +5384,7 @@ request_body = Google::Apis::ComputeV1::ResourceGroupReference.new response = service.get_region_backend_service_health(project, region, backend_service, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5421,7 +5421,7 @@ request_body = Google::Apis::ComputeV1::BackendService.new response = service.insert_region_backend_service(project, region, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5458,7 +5458,7 @@ end items.each do |backend_service| # TODO: Change code below to process each `backend_service` resource: - puts JSON.pretty_generate(backend_service) + puts JSON.pretty_unparse(backend_service.to_h) end # BEFORE RUNNING: # --------------- @@ -5500,7 +5500,7 @@ request_body = Google::Apis::ComputeV1::BackendService.new response = service.patch_region_backend_service(project, region, backend_service, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5541,7 +5541,7 @@ request_body = Google::Apis::ComputeV1::BackendService.new response = service.update_region_backend_service(project, region, backend_service, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5581,7 +5581,7 @@ request_body = Google::Apis::ComputeV1::RegionInstanceGroupManagersAbandonInstan response = service.abandon_region_instance_group_manager_instances(project, region, instance_group_manager, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5618,7 +5618,7 @@ instance_group_manager = 'my-instance-group-manager' # TODO: Update placeholder response = service.delete_region_instance_group_manager(project, region, instance_group_manager) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5658,7 +5658,7 @@ request_body = Google::Apis::ComputeV1::RegionInstanceGroupManagersDeleteInstanc response = service.delete_region_instance_group_manager_instances(project, region, instance_group_manager, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5695,7 +5695,7 @@ instance_group_manager = 'my-instance-group-manager' # TODO: Update placeholder response = service.get_region_instance_group_manager(project, region, instance_group_manager) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5732,7 +5732,7 @@ request_body = Google::Apis::ComputeV1::InstanceGroupManager.new response = service.insert_region_instance_group_manager(project, region, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5769,7 +5769,7 @@ end items.each do |instance_group_manager| # TODO: Change code below to process each `instance_group_manager` resource: - puts JSON.pretty_generate(instance_group_manager) + puts JSON.pretty_unparse(instance_group_manager.to_h) end # BEFORE RUNNING: # --------------- @@ -5807,7 +5807,7 @@ instance_group_manager = 'my-instance-group-manager' # TODO: Update placeholder response = service.list_region_instance_group_manager_managed_instances(project, region, instance_group_manager) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5847,7 +5847,7 @@ request_body = Google::Apis::ComputeV1::RegionInstanceGroupManagersRecreateReque response = service.recreate_region_instance_group_manager_instances(project, region, instance_group_manager, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5887,7 +5887,7 @@ size = 0 # TODO: Update placeholder value. response = service.resize_region_instance_group_manager(project, region, instance_group_manager, size) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5927,7 +5927,7 @@ request_body = Google::Apis::ComputeV1::RegionInstanceGroupManagersSetTemplateRe response = service.set_region_instance_group_manager_instance_template(project, region, instance_group_manager, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5967,7 +5967,7 @@ request_body = Google::Apis::ComputeV1::RegionInstanceGroupManagersSetTargetPool response = service.set_region_instance_group_manager_target_pools(project, region, instance_group_manager, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6004,7 +6004,7 @@ instance_group = 'my-instance-group' # TODO: Update placeholder value. response = service.get_region_instance_group(project, region, instance_group) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6041,7 +6041,7 @@ end items.each do |instance_group| # TODO: Change code below to process each `instance_group` resource: - puts JSON.pretty_generate(instance_group) + puts JSON.pretty_unparse(instance_group.to_h) end # BEFORE RUNNING: # --------------- @@ -6085,7 +6085,7 @@ end items.each do |instance_with_named_ports| # TODO: Change code below to process each `instance_with_named_ports` resource: - puts JSON.pretty_generate(instance_with_named_ports) + puts JSON.pretty_unparse(instance_with_named_ports.to_h) end # BEFORE RUNNING: # --------------- @@ -6126,7 +6126,7 @@ request_body = Google::Apis::ComputeV1::RegionInstanceGroupsSetNamedPortsRequest response = service.set_region_instance_group_named_ports(project, region, instance_group, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6196,7 +6196,7 @@ operation = 'my-operation' # TODO: Update placeholder value. response = service.get_region_operation(project, region, operation) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6233,7 +6233,7 @@ end items.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_generate(operation) + puts JSON.pretty_unparse(operation.to_h) end # BEFORE RUNNING: # --------------- @@ -6268,7 +6268,7 @@ region = 'my-region' # TODO: Update placeholder value. response = service.get_region(project, region) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6302,7 +6302,7 @@ end items.each do |region| # TODO: Change code below to process each `region` resource: - puts JSON.pretty_generate(region) + puts JSON.pretty_unparse(region.to_h) end # BEFORE RUNNING: # --------------- @@ -6337,7 +6337,7 @@ end items.each do |name, routers_scoped_list| # TODO: Change code below to process each (name, routers_scoped_list) pair: - puts String(name << " => " << JSON.pretty_generate(routers_scoped_list) + puts String(name << " => " << JSON.pretty_unparse(routers_scoped_list.to_h) end # BEFORE RUNNING: # --------------- @@ -6375,7 +6375,7 @@ router = 'my-router' # TODO: Update placeholder value. response = service.delete_router(project, region, router) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6412,7 +6412,7 @@ router = 'my-router' # TODO: Update placeholder value. response = service.get_router(project, region, router) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6449,7 +6449,7 @@ router = 'my-router' # TODO: Update placeholder value. response = service.get_router_router_status(project, region, router) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6486,7 +6486,7 @@ request_body = Google::Apis::ComputeV1::Router.new response = service.insert_router(project, region, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6523,7 +6523,7 @@ end items.each do |router| # TODO: Change code below to process each `router` resource: - puts JSON.pretty_generate(router) + puts JSON.pretty_unparse(router.to_h) end # BEFORE RUNNING: # --------------- @@ -6565,7 +6565,7 @@ request_body = Google::Apis::ComputeV1::Router.new response = service.patch_router(project, region, router, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6605,7 +6605,7 @@ request_body = Google::Apis::ComputeV1::Router.new response = service.preview_router(project, region, router, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6646,7 +6646,7 @@ request_body = Google::Apis::ComputeV1::Router.new response = service.update_router(project, region, router, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6680,7 +6680,7 @@ route = 'my-route' # TODO: Update placeholder value. response = service.delete_route(project, route) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6714,7 +6714,7 @@ route = 'my-route' # TODO: Update placeholder value. response = service.get_route(project, route) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6748,7 +6748,7 @@ request_body = Google::Apis::ComputeV1::Route.new response = service.insert_route(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6782,7 +6782,7 @@ end items.each do |route| # TODO: Change code below to process each `route` resource: - puts JSON.pretty_generate(route) + puts JSON.pretty_unparse(route.to_h) end # BEFORE RUNNING: # --------------- @@ -6817,7 +6817,7 @@ snapshot = 'my-snapshot' # TODO: Update placeholder value. response = service.delete_snapshot(project, snapshot) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6851,7 +6851,7 @@ snapshot = 'my-snapshot' # TODO: Update placeholder value. response = service.get_snapshot(project, snapshot) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6885,7 +6885,7 @@ end items.each do |snapshot| # TODO: Change code below to process each `snapshot` resource: - puts JSON.pretty_generate(snapshot) + puts JSON.pretty_unparse(snapshot.to_h) end # BEFORE RUNNING: # --------------- @@ -6920,7 +6920,7 @@ ssl_certificate = 'my-ssl-certificate' # TODO: Update placeholder value. response = service.delete_ssl_certificate(project, ssl_certificate) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6954,7 +6954,7 @@ ssl_certificate = 'my-ssl-certificate' # TODO: Update placeholder value. response = service.get_ssl_certificate(project, ssl_certificate) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6988,7 +6988,7 @@ request_body = Google::Apis::ComputeV1::SslCertificate.new response = service.insert_ssl_certificate(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7022,7 +7022,7 @@ end items.each do |ssl_certificate| # TODO: Change code below to process each `ssl_certificate` resource: - puts JSON.pretty_generate(ssl_certificate) + puts JSON.pretty_unparse(ssl_certificate.to_h) end # BEFORE RUNNING: # --------------- @@ -7057,7 +7057,7 @@ end items.each do |name, subnetworks_scoped_list| # TODO: Change code below to process each (name, subnetworks_scoped_list) pair: - puts String(name << " => " << JSON.pretty_generate(subnetworks_scoped_list) + puts String(name << " => " << JSON.pretty_unparse(subnetworks_scoped_list.to_h) end # BEFORE RUNNING: # --------------- @@ -7095,7 +7095,7 @@ subnetwork = 'my-subnetwork' # TODO: Update placeholder value. response = service.delete_subnetwork(project, region, subnetwork) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7135,7 +7135,7 @@ request_body = Google::Apis::ComputeV1::SubnetworksExpandIpCidrRangeRequest.new response = service.expand_subnetwork_ip_cidr_range(project, region, subnetwork, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7172,7 +7172,7 @@ subnetwork = 'my-subnetwork' # TODO: Update placeholder value. response = service.get_subnetwork(project, region, subnetwork) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7209,7 +7209,7 @@ request_body = Google::Apis::ComputeV1::Subnetwork.new response = service.insert_subnetwork(project, region, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7246,7 +7246,7 @@ end items.each do |subnetwork| # TODO: Change code below to process each `subnetwork` resource: - puts JSON.pretty_generate(subnetwork) + puts JSON.pretty_unparse(subnetwork.to_h) end # BEFORE RUNNING: # --------------- @@ -7281,7 +7281,7 @@ target_http_proxy = 'my-target-http-proxy' # TODO: Update placeholder value. response = service.delete_target_http_proxy(project, target_http_proxy) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7315,7 +7315,7 @@ target_http_proxy = 'my-target-http-proxy' # TODO: Update placeholder value. response = service.get_target_http_proxy(project, target_http_proxy) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7349,7 +7349,7 @@ request_body = Google::Apis::ComputeV1::TargetHttpProxy.new response = service.insert_target_http_proxy(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7383,7 +7383,7 @@ end items.each do |target_http_proxy| # TODO: Change code below to process each `target_http_proxy` resource: - puts JSON.pretty_generate(target_http_proxy) + puts JSON.pretty_unparse(target_http_proxy.to_h) end # BEFORE RUNNING: # --------------- @@ -7421,7 +7421,7 @@ request_body = Google::Apis::ComputeV1::UrlMapReference.new response = service.set_target_http_proxy_url_map(project, target_http_proxy, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7455,7 +7455,7 @@ target_https_proxy = 'my-target-https-proxy' # TODO: Update placeholder value. response = service.delete_target_https_proxy(project, target_https_proxy) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7489,7 +7489,7 @@ target_https_proxy = 'my-target-https-proxy' # TODO: Update placeholder value. response = service.get_target_https_proxy(project, target_https_proxy) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7523,7 +7523,7 @@ request_body = Google::Apis::ComputeV1::TargetHttpsProxy.new response = service.insert_target_https_proxy(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7557,7 +7557,7 @@ end items.each do |target_https_proxy| # TODO: Change code below to process each `target_https_proxy` resource: - puts JSON.pretty_generate(target_https_proxy) + puts JSON.pretty_unparse(target_https_proxy.to_h) end # BEFORE RUNNING: # --------------- @@ -7595,7 +7595,7 @@ request_body = Google::Apis::ComputeV1::TargetHttpsProxiesSetSslCertificatesRequ response = service.set_target_https_proxy_ssl_certificates(project, target_https_proxy, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7632,7 +7632,7 @@ request_body = Google::Apis::ComputeV1::UrlMapReference.new response = service.set_target_https_proxy_url_map(project, target_https_proxy, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7666,7 +7666,7 @@ end items.each do |name, target_instances_scoped_list| # TODO: Change code below to process each (name, target_instances_scoped_list) pair: - puts String(name << " => " << JSON.pretty_generate(target_instances_scoped_list) + puts String(name << " => " << JSON.pretty_unparse(target_instances_scoped_list.to_h) end # BEFORE RUNNING: # --------------- @@ -7704,7 +7704,7 @@ target_instance = 'my-target-instance' # TODO: Update placeholder value. response = service.delete_target_instance(project, zone, target_instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7741,7 +7741,7 @@ target_instance = 'my-target-instance' # TODO: Update placeholder value. response = service.get_target_instance(project, zone, target_instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7778,7 +7778,7 @@ request_body = Google::Apis::ComputeV1::TargetInstance.new response = service.insert_target_instance(project, zone, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7815,7 +7815,7 @@ end items.each do |target_instance| # TODO: Change code below to process each `target_instance` resource: - puts JSON.pretty_generate(target_instance) + puts JSON.pretty_unparse(target_instance.to_h) end # BEFORE RUNNING: # --------------- @@ -7856,7 +7856,7 @@ request_body = Google::Apis::ComputeV1::AddTargetPoolsHealthCheckRequest.new response = service.add_target_pool_health_check(project, region, target_pool, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7896,7 +7896,7 @@ request_body = Google::Apis::ComputeV1::AddTargetPoolsInstanceRequest.new response = service.add_target_pool_instance(project, region, target_pool, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7930,7 +7930,7 @@ end items.each do |name, target_pools_scoped_list| # TODO: Change code below to process each (name, target_pools_scoped_list) pair: - puts String(name << " => " << JSON.pretty_generate(target_pools_scoped_list) + puts String(name << " => " << JSON.pretty_unparse(target_pools_scoped_list.to_h) end # BEFORE RUNNING: # --------------- @@ -7968,7 +7968,7 @@ target_pool = 'my-target-pool' # TODO: Update placeholder value. response = service.delete_target_pool(project, region, target_pool) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8005,7 +8005,7 @@ target_pool = 'my-target-pool' # TODO: Update placeholder value. response = service.get_target_pool(project, region, target_pool) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8045,7 +8045,7 @@ request_body = Google::Apis::ComputeV1::InstanceReference.new response = service.get_target_pool_health(project, region, target_pool, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8082,7 +8082,7 @@ request_body = Google::Apis::ComputeV1::TargetPool.new response = service.insert_target_pool(project, region, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8119,7 +8119,7 @@ end items.each do |target_pool| # TODO: Change code below to process each `target_pool` resource: - puts JSON.pretty_generate(target_pool) + puts JSON.pretty_unparse(target_pool.to_h) end # BEFORE RUNNING: # --------------- @@ -8160,7 +8160,7 @@ request_body = Google::Apis::ComputeV1::RemoveTargetPoolsHealthCheckRequest.new response = service.remove_target_pool_health_check(project, region, target_pool, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8200,7 +8200,7 @@ request_body = Google::Apis::ComputeV1::RemoveTargetPoolsInstanceRequest.new response = service.remove_target_pool_instance(project, region, target_pool, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8240,7 +8240,7 @@ request_body = Google::Apis::ComputeV1::TargetReference.new response = service.set_target_pool_backup(project, region, target_pool, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8274,7 +8274,7 @@ target_ssl_proxy = 'my-target-ssl-proxy' # TODO: Update placeholder value. response = service.delete_target_ssl_proxy(project, target_ssl_proxy) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8308,7 +8308,7 @@ target_ssl_proxy = 'my-target-ssl-proxy' # TODO: Update placeholder value. response = service.get_target_ssl_proxy(project, target_ssl_proxy) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8342,7 +8342,7 @@ request_body = Google::Apis::ComputeV1::TargetSslProxy.new response = service.insert_target_ssl_proxy(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8376,7 +8376,7 @@ end items.each do |target_ssl_proxy| # TODO: Change code below to process each `target_ssl_proxy` resource: - puts JSON.pretty_generate(target_ssl_proxy) + puts JSON.pretty_unparse(target_ssl_proxy.to_h) end # BEFORE RUNNING: # --------------- @@ -8414,7 +8414,7 @@ request_body = Google::Apis::ComputeV1::TargetSslProxiesSetBackendServiceRequest response = service.set_target_ssl_proxy_backend_service(project, target_ssl_proxy, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8451,7 +8451,7 @@ request_body = Google::Apis::ComputeV1::TargetSslProxiesSetProxyHeaderRequest.ne response = service.set_target_ssl_proxy_proxy_header(project, target_ssl_proxy, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8488,7 +8488,7 @@ request_body = Google::Apis::ComputeV1::TargetSslProxiesSetSslCertificatesReques response = service.set_target_ssl_proxy_ssl_certificates(project, target_ssl_proxy, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8522,7 +8522,7 @@ end items.each do |name, target_vpn_gateways_scoped_list| # TODO: Change code below to process each (name, target_vpn_gateways_scoped_list) pair: - puts String(name << " => " << JSON.pretty_generate(target_vpn_gateways_scoped_list) + puts String(name << " => " << JSON.pretty_unparse(target_vpn_gateways_scoped_list.to_h) end # BEFORE RUNNING: # --------------- @@ -8560,7 +8560,7 @@ target_vpn_gateway = 'my-target-vpn-gateway' # TODO: Update placeholder value. response = service.delete_target_vpn_gateway(project, region, target_vpn_gateway) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8597,7 +8597,7 @@ target_vpn_gateway = 'my-target-vpn-gateway' # TODO: Update placeholder value. response = service.get_target_vpn_gateway(project, region, target_vpn_gateway) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8634,7 +8634,7 @@ request_body = Google::Apis::ComputeV1::TargetVpnGateway.new response = service.insert_target_vpn_gateway(project, region, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8671,7 +8671,7 @@ end items.each do |target_vpn_gateway| # TODO: Change code below to process each `target_vpn_gateway` resource: - puts JSON.pretty_generate(target_vpn_gateway) + puts JSON.pretty_unparse(target_vpn_gateway.to_h) end # BEFORE RUNNING: # --------------- @@ -8706,7 +8706,7 @@ url_map = 'my-url-map' # TODO: Update placeholder value. response = service.delete_url_map(project, url_map) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8740,7 +8740,7 @@ url_map = 'my-url-map' # TODO: Update placeholder value. response = service.get_url_map(project, url_map) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8774,7 +8774,7 @@ request_body = Google::Apis::ComputeV1::UrlMap.new response = service.insert_url_map(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8811,7 +8811,7 @@ request_body = Google::Apis::ComputeV1::CacheInvalidationRule.new response = service.invalidate_url_map_cache(project, url_map, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8845,7 +8845,7 @@ end items.each do |url_map| # TODO: Change code below to process each `url_map` resource: - puts JSON.pretty_generate(url_map) + puts JSON.pretty_unparse(url_map.to_h) end # BEFORE RUNNING: # --------------- @@ -8884,7 +8884,7 @@ request_body = Google::Apis::ComputeV1::UrlMap.new response = service.patch_url_map(project, url_map, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8922,7 +8922,7 @@ request_body = Google::Apis::ComputeV1::UrlMap.new response = service.update_url_map(project, url_map, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8959,7 +8959,7 @@ request_body = Google::Apis::ComputeV1::ValidateUrlMapsRequest.new response = service.validate_url_map(project, url_map, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8993,7 +8993,7 @@ end items.each do |name, vpn_tunnels_scoped_list| # TODO: Change code below to process each (name, vpn_tunnels_scoped_list) pair: - puts String(name << " => " << JSON.pretty_generate(vpn_tunnels_scoped_list) + puts String(name << " => " << JSON.pretty_unparse(vpn_tunnels_scoped_list.to_h) end # BEFORE RUNNING: # --------------- @@ -9031,7 +9031,7 @@ vpn_tunnel = 'my-vpn-tunnel' # TODO: Update placeholder value. response = service.delete_vpn_tunnel(project, region, vpn_tunnel) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -9068,7 +9068,7 @@ vpn_tunnel = 'my-vpn-tunnel' # TODO: Update placeholder value. response = service.get_vpn_tunnel(project, region, vpn_tunnel) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -9105,7 +9105,7 @@ request_body = Google::Apis::ComputeV1::VpnTunnel.new response = service.insert_vpn_tunnel(project, region, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -9142,7 +9142,7 @@ end items.each do |vpn_tunnel| # TODO: Change code below to process each `vpn_tunnel` resource: - puts JSON.pretty_generate(vpn_tunnel) + puts JSON.pretty_unparse(vpn_tunnel.to_h) end # BEFORE RUNNING: # --------------- @@ -9213,7 +9213,7 @@ operation = 'my-operation' # TODO: Update placeholder value. response = service.get_zone_operation(project, zone, operation) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -9250,7 +9250,7 @@ end items.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_generate(operation) + puts JSON.pretty_unparse(operation.to_h) end # BEFORE RUNNING: # --------------- @@ -9285,7 +9285,7 @@ zone = 'my-zone' # TODO: Update placeholder value. response = service.get_zone(project, zone) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -9319,5 +9319,5 @@ end items.each do |zone| # TODO: Change code below to process each `zone` resource: - puts JSON.pretty_generate(zone) + puts JSON.pretty_unparse(zone.to_h) end diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_container.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_container.v1.json.baseline index 511f509a33..1c8b3c84fc 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_container.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_container.v1.json.baseline @@ -37,7 +37,7 @@ request_body = Google::Apis::ContainerV1::CreateClusterRequest.new response = service.create_cluster(project_id, zone, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -76,7 +76,7 @@ cluster_id = 'my-cluster-id' # TODO: Update placeholder value. response = service.delete_zone_cluster(project_id, zone, cluster_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -115,7 +115,7 @@ cluster_id = 'my-cluster-id' # TODO: Update placeholder value. response = service.get_zone_cluster(project_id, zone, cluster_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -151,7 +151,7 @@ zone = 'my-zone' # TODO: Update placeholder value. response = service.list_zone_clusters(project_id, zone) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -193,7 +193,7 @@ request_body = Google::Apis::ContainerV1::CreateNodePoolRequest.new response = service.create_node_pool(project_id, zone, cluster_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -235,7 +235,7 @@ node_pool_id = 'my-node-pool-id' # TODO: Update placeholder value. response = service.delete_project_zone_cluster_node_pool(project_id, zone, cluster_id, node_pool_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -277,7 +277,7 @@ node_pool_id = 'my-node-pool-id' # TODO: Update placeholder value. response = service.get_project_zone_cluster_node_pool(project_id, zone, cluster_id, node_pool_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -316,7 +316,7 @@ cluster_id = 'my-cluster-id' # TODO: Update placeholder value. response = service.list_project_zone_cluster_node_pools(project_id, zone, cluster_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -359,7 +359,7 @@ request_body = Google::Apis::ContainerV1::UpdateClusterRequest.new response = service.update_cluster(project_id, zone, cluster_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -395,7 +395,7 @@ zone = 'my-zone' # TODO: Update placeholder value. response = service.get_project_zone_serverconfig(project_id, zone) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -434,7 +434,7 @@ operation_id = 'my-operation-id' # TODO: Update placeholder value. response = service.get_zone_operation(project_id, zone, operation_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -470,4 +470,4 @@ zone = 'my-zone' # TODO: Update placeholder value. response = service.list_zone_operations(project_id, zone) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_datastore.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_datastore.v1.json.baseline index 936c56e240..204bb30e52 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_datastore.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_datastore.v1.json.baseline @@ -32,7 +32,7 @@ request_body = Google::Apis::DatastoreV1::AllocateIdsRequest.new response = service.allocate_project_ids(project_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Datastore API @@ -66,7 +66,7 @@ request_body = Google::Apis::DatastoreV1::BeginTransactionRequest.new response = service.begin_project_transaction(project_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Datastore API @@ -100,7 +100,7 @@ request_body = Google::Apis::DatastoreV1::CommitRequest.new response = service.commit_project(project_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Datastore API @@ -134,7 +134,7 @@ request_body = Google::Apis::DatastoreV1::LookupRequest.new response = service.lookup_project(project_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Datastore API @@ -168,7 +168,7 @@ request_body = Google::Apis::DatastoreV1::RollbackRequest.new response = service.rollback_project(project_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Datastore API @@ -202,4 +202,4 @@ request_body = Google::Apis::DatastoreV1::RunQueryRequest.new response = service.run_project_query(project_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_deploymentmanager.v2.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_deploymentmanager.v2.json.baseline index 011bbacffa..a528102280 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_deploymentmanager.v2.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_deploymentmanager.v2.json.baseline @@ -35,7 +35,7 @@ request_body = Google::Apis::DeploymentmanagerV2::DeploymentsCancelPreviewReques response = service.cancel_deployment_preview(project, deployment, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -69,7 +69,7 @@ deployment = 'my-deployment' # TODO: Update placeholder value. response = service.delete_deployment(project, deployment) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -103,7 +103,7 @@ deployment = 'my-deployment' # TODO: Update placeholder value. response = service.get_deployment(project, deployment) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -137,7 +137,7 @@ resource = 'my-resource' # TODO: Update placeholder value. response = service.get_deployment_iam_policy(project, resource) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -171,7 +171,7 @@ request_body = Google::Apis::DeploymentmanagerV2::Deployment.new response = service.insert_deployment(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -205,7 +205,7 @@ end deployments.each do |deployment| # TODO: Change code below to process each `deployment` resource: - puts JSON.pretty_generate(deployment) + puts JSON.pretty_unparse(deployment.to_h) end # BEFORE RUNNING: # --------------- @@ -244,7 +244,7 @@ request_body = Google::Apis::DeploymentmanagerV2::Deployment.new response = service.patch_deployment(project, deployment, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -281,7 +281,7 @@ request_body = Google::Apis::DeploymentmanagerV2::Policy.new response = service.set_deployment_iam_policy(project, resource, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -318,7 +318,7 @@ request_body = Google::Apis::DeploymentmanagerV2::DeploymentsStopRequest.new response = service.stop_deployment(project, deployment, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -355,7 +355,7 @@ request_body = Google::Apis::DeploymentmanagerV2::TestPermissionsRequest.new response = service.test_deployment_iam_permissions(project, resource, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -393,7 +393,7 @@ request_body = Google::Apis::DeploymentmanagerV2::Deployment.new response = service.update_deployment(project, deployment, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -430,7 +430,7 @@ manifest = 'my-manifest' # TODO: Update placeholder value. response = service.get_manifest(project, deployment, manifest) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -467,7 +467,7 @@ end manifests.each do |manifest| # TODO: Change code below to process each `manifest` resource: - puts JSON.pretty_generate(manifest) + puts JSON.pretty_unparse(manifest.to_h) end # BEFORE RUNNING: # --------------- @@ -502,7 +502,7 @@ operation = 'my-operation' # TODO: Update placeholder value. response = service.get_operation(project, operation) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -536,7 +536,7 @@ end operations.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_generate(operation) + puts JSON.pretty_unparse(operation.to_h) end # BEFORE RUNNING: # --------------- @@ -574,7 +574,7 @@ resource = 'my-resource' # TODO: Update placeholder value. response = service.get_resource(project, deployment, resource) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -611,7 +611,7 @@ end resources.each do |resource| # TODO: Change code below to process each `resource` resource: - puts JSON.pretty_generate(resource) + puts JSON.pretty_unparse(resource.to_h) end # BEFORE RUNNING: # --------------- @@ -646,5 +646,5 @@ end types.each do |type| # TODO: Change code below to process each `type` resource: - puts JSON.pretty_generate(type) + puts JSON.pretty_unparse(type.to_h) end diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dfareporting.v2.6.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dfareporting.v2.6.json.baseline index 63c3a9b1c9..7cc43b2864 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dfareporting.v2.6.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dfareporting.v2.6.json.baseline @@ -27,7 +27,7 @@ summary_account_id = 0 # TODO: Update placeholder value. response = service.get_account_active_ad_summary(profile_id, summary_account_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -56,7 +56,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_account_permission_group(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -82,7 +82,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_account_permission_groups(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -111,7 +111,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_account_permission(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -137,7 +137,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_account_permissions(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -166,7 +166,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_account_user_profile(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -195,7 +195,7 @@ request_body = Google::Apis::DfareportingV2_6::AccountUserProfile.new response = service.insert_account_user_profile(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -224,7 +224,7 @@ end account_user_profiles.each do |account_user_profile| # TODO: Change code below to process each `account_user_profile` resource: - puts JSON.pretty_generate(account_user_profile) + puts JSON.pretty_unparse(account_user_profile.to_h) end # BEFORE RUNNING: # --------------- @@ -258,7 +258,7 @@ request_body = Google::Apis::DfareportingV2_6::AccountUserProfile.new response = service.patch_account_user_profile(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -288,7 +288,7 @@ request_body = Google::Apis::DfareportingV2_6::AccountUserProfile.new response = service.update_account_user_profile(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -317,7 +317,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_account(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -346,7 +346,7 @@ end accounts.each do |account| # TODO: Change code below to process each `account` resource: - puts JSON.pretty_generate(account) + puts JSON.pretty_unparse(account.to_h) end # BEFORE RUNNING: # --------------- @@ -380,7 +380,7 @@ request_body = Google::Apis::DfareportingV2_6::Account.new response = service.patch_account(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -410,7 +410,7 @@ request_body = Google::Apis::DfareportingV2_6::Account.new response = service.update_account(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -439,7 +439,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_ad(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -468,7 +468,7 @@ request_body = Google::Apis::DfareportingV2_6::Ad.new response = service.insert_ad(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -497,7 +497,7 @@ end ads.each do |ad| # TODO: Change code below to process each `ad` resource: - puts JSON.pretty_generate(ad) + puts JSON.pretty_unparse(ad.to_h) end # BEFORE RUNNING: # --------------- @@ -531,7 +531,7 @@ request_body = Google::Apis::DfareportingV2_6::Ad.new response = service.patch_ad(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -561,7 +561,7 @@ request_body = Google::Apis::DfareportingV2_6::Ad.new response = service.update_ad(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -615,7 +615,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_advertiser_group(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -644,7 +644,7 @@ request_body = Google::Apis::DfareportingV2_6::AdvertiserGroup.new response = service.insert_advertiser_group(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -673,7 +673,7 @@ end advertiser_groups.each do |advertiser_group| # TODO: Change code below to process each `advertiser_group` resource: - puts JSON.pretty_generate(advertiser_group) + puts JSON.pretty_unparse(advertiser_group.to_h) end # BEFORE RUNNING: # --------------- @@ -707,7 +707,7 @@ request_body = Google::Apis::DfareportingV2_6::AdvertiserGroup.new response = service.patch_advertiser_group(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -737,7 +737,7 @@ request_body = Google::Apis::DfareportingV2_6::AdvertiserGroup.new response = service.update_advertiser_group(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -766,7 +766,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_advertiser(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -795,7 +795,7 @@ request_body = Google::Apis::DfareportingV2_6::Advertiser.new response = service.insert_advertiser(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -824,7 +824,7 @@ end advertisers.each do |advertiser| # TODO: Change code below to process each `advertiser` resource: - puts JSON.pretty_generate(advertiser) + puts JSON.pretty_unparse(advertiser.to_h) end # BEFORE RUNNING: # --------------- @@ -858,7 +858,7 @@ request_body = Google::Apis::DfareportingV2_6::Advertiser.new response = service.patch_advertiser(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -888,7 +888,7 @@ request_body = Google::Apis::DfareportingV2_6::Advertiser.new response = service.update_advertiser(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -914,7 +914,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_browsers(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -946,7 +946,7 @@ request_body = Google::Apis::DfareportingV2_6::CampaignCreativeAssociation.new response = service.insert_campaign_creative_association(profile_id, campaign_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -978,7 +978,7 @@ end campaign_creative_associations.each do |campaign_creative_association| # TODO: Change code below to process each `campaign_creative_association` resource: - puts JSON.pretty_generate(campaign_creative_association) + puts JSON.pretty_unparse(campaign_creative_association.to_h) end # BEFORE RUNNING: # --------------- @@ -1008,7 +1008,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_campaign(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1043,7 +1043,7 @@ request_body = Google::Apis::DfareportingV2_6::Campaign.new response = service.insert_campaign(profile_id, default_landing_page_name, default_landing_page_url, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1072,7 +1072,7 @@ end campaigns.each do |campaign| # TODO: Change code below to process each `campaign` resource: - puts JSON.pretty_generate(campaign) + puts JSON.pretty_unparse(campaign.to_h) end # BEFORE RUNNING: # --------------- @@ -1106,7 +1106,7 @@ request_body = Google::Apis::DfareportingV2_6::Campaign.new response = service.patch_campaign(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1136,7 +1136,7 @@ request_body = Google::Apis::DfareportingV2_6::Campaign.new response = service.update_campaign(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1165,7 +1165,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_change_log(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1194,7 +1194,7 @@ end change_logs.each do |change_log| # TODO: Change code below to process each `change_log` resource: - puts JSON.pretty_generate(change_log) + puts JSON.pretty_unparse(change_log.to_h) end # BEFORE RUNNING: # --------------- @@ -1221,7 +1221,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_cities(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1250,7 +1250,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_connection_type(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1276,7 +1276,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_connection_types(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1330,7 +1330,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_content_category(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1359,7 +1359,7 @@ request_body = Google::Apis::DfareportingV2_6::ContentCategory.new response = service.insert_content_category(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1388,7 +1388,7 @@ end content_categories.each do |content_category| # TODO: Change code below to process each `content_category` resource: - puts JSON.pretty_generate(content_category) + puts JSON.pretty_unparse(content_category.to_h) end # BEFORE RUNNING: # --------------- @@ -1422,7 +1422,7 @@ request_body = Google::Apis::DfareportingV2_6::ContentCategory.new response = service.patch_content_category(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1452,7 +1452,7 @@ request_body = Google::Apis::DfareportingV2_6::ContentCategory.new response = service.update_content_category(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1481,7 +1481,7 @@ request_body = Google::Apis::DfareportingV2_6::ConversionsBatchInsertRequest.new response = service.batchinsert_conversion(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1510,7 +1510,7 @@ dart_id = 0 # TODO: Update placeholder value. response = service.get_country(profile_id, dart_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1536,7 +1536,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_countries(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1572,7 +1572,7 @@ request_body = Google::Apis::DfareportingV2_6::CreativeAssetMetadata.new response = service.insert_creative_asset(profile_id, advertiser_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1632,7 +1632,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_creative_field_value(profile_id, creative_field_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1664,7 +1664,7 @@ request_body = Google::Apis::DfareportingV2_6::CreativeFieldValue.new response = service.insert_creative_field_value(profile_id, creative_field_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1696,7 +1696,7 @@ end creative_field_values.each do |creative_field_value| # TODO: Change code below to process each `creative_field_value` resource: - puts JSON.pretty_generate(creative_field_value) + puts JSON.pretty_unparse(creative_field_value.to_h) end # BEFORE RUNNING: # --------------- @@ -1733,7 +1733,7 @@ request_body = Google::Apis::DfareportingV2_6::CreativeFieldValue.new response = service.patch_creative_field_value(profile_id, creative_field_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1766,7 +1766,7 @@ request_body = Google::Apis::DfareportingV2_6::CreativeFieldValue.new response = service.update_creative_field_value(profile_id, creative_field_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1820,7 +1820,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_creative_field(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1849,7 +1849,7 @@ request_body = Google::Apis::DfareportingV2_6::CreativeField.new response = service.insert_creative_field(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1878,7 +1878,7 @@ end creative_fields.each do |creative_field| # TODO: Change code below to process each `creative_field` resource: - puts JSON.pretty_generate(creative_field) + puts JSON.pretty_unparse(creative_field.to_h) end # BEFORE RUNNING: # --------------- @@ -1912,7 +1912,7 @@ request_body = Google::Apis::DfareportingV2_6::CreativeField.new response = service.patch_creative_field(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1942,7 +1942,7 @@ request_body = Google::Apis::DfareportingV2_6::CreativeField.new response = service.update_creative_field(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1971,7 +1971,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_creative_group(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2000,7 +2000,7 @@ request_body = Google::Apis::DfareportingV2_6::CreativeGroup.new response = service.insert_creative_group(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2029,7 +2029,7 @@ end creative_groups.each do |creative_group| # TODO: Change code below to process each `creative_group` resource: - puts JSON.pretty_generate(creative_group) + puts JSON.pretty_unparse(creative_group.to_h) end # BEFORE RUNNING: # --------------- @@ -2063,7 +2063,7 @@ request_body = Google::Apis::DfareportingV2_6::CreativeGroup.new response = service.patch_creative_group(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2093,7 +2093,7 @@ request_body = Google::Apis::DfareportingV2_6::CreativeGroup.new response = service.update_creative_group(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2122,7 +2122,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_creative(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2151,7 +2151,7 @@ request_body = Google::Apis::DfareportingV2_6::Creative.new response = service.insert_creative(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2180,7 +2180,7 @@ end creatives.each do |creative| # TODO: Change code below to process each `creative` resource: - puts JSON.pretty_generate(creative) + puts JSON.pretty_unparse(creative.to_h) end # BEFORE RUNNING: # --------------- @@ -2214,7 +2214,7 @@ request_body = Google::Apis::DfareportingV2_6::Creative.new response = service.patch_creative(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2244,7 +2244,7 @@ request_body = Google::Apis::DfareportingV2_6::Creative.new response = service.update_creative(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2276,7 +2276,7 @@ end items.each do |dimension_value| # TODO: Change code below to process each `dimension_value` resource: - puts JSON.pretty_generate(dimension_value) + puts JSON.pretty_unparse(dimension_value.to_h) end # BEFORE RUNNING: # --------------- @@ -2306,7 +2306,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_directory_site_contact(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2335,7 +2335,7 @@ end directory_site_contacts.each do |directory_site_contact| # TODO: Change code below to process each `directory_site_contact` resource: - puts JSON.pretty_generate(directory_site_contact) + puts JSON.pretty_unparse(directory_site_contact.to_h) end # BEFORE RUNNING: # --------------- @@ -2365,7 +2365,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_directory_site(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2394,7 +2394,7 @@ request_body = Google::Apis::DfareportingV2_6::DirectorySite.new response = service.insert_directory_site(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2423,7 +2423,7 @@ end directory_sites.each do |directory_site| # TODO: Change code below to process each `directory_site` resource: - puts JSON.pretty_generate(directory_site) + puts JSON.pretty_unparse(directory_site.to_h) end # BEFORE RUNNING: # --------------- @@ -2485,7 +2485,7 @@ request_body = Google::Apis::DfareportingV2_6::DynamicTargetingKey.new response = service.insert_dynamic_targeting_key(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2511,7 +2511,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_dynamic_targeting_keys(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2565,7 +2565,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_event_tag(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2594,7 +2594,7 @@ request_body = Google::Apis::DfareportingV2_6::EventTag.new response = service.insert_event_tag(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2620,7 +2620,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_event_tags(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2653,7 +2653,7 @@ request_body = Google::Apis::DfareportingV2_6::EventTag.new response = service.patch_event_tag(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2683,7 +2683,7 @@ request_body = Google::Apis::DfareportingV2_6::EventTag.new response = service.update_event_tag(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2716,7 +2716,7 @@ file_id = 0 # TODO: Update placeholder value. response = service.get_file(report_id, file_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2745,7 +2745,7 @@ end items.each do |file| # TODO: Change code below to process each `file` resource: - puts JSON.pretty_generate(file) + puts JSON.pretty_unparse(file.to_h) end # BEFORE RUNNING: # --------------- @@ -2797,7 +2797,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.generate_floodlight_activity_tag(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2826,7 +2826,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_floodlight_activity(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2855,7 +2855,7 @@ request_body = Google::Apis::DfareportingV2_6::FloodlightActivity.new response = service.insert_floodlight_activity(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2884,7 +2884,7 @@ end floodlight_activities.each do |floodlight_activity| # TODO: Change code below to process each `floodlight_activity` resource: - puts JSON.pretty_generate(floodlight_activity) + puts JSON.pretty_unparse(floodlight_activity.to_h) end # BEFORE RUNNING: # --------------- @@ -2918,7 +2918,7 @@ request_body = Google::Apis::DfareportingV2_6::FloodlightActivity.new response = service.patch_floodlight_activity(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2948,7 +2948,7 @@ request_body = Google::Apis::DfareportingV2_6::FloodlightActivity.new response = service.update_floodlight_activity(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2977,7 +2977,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_floodlight_activity_group(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3006,7 +3006,7 @@ request_body = Google::Apis::DfareportingV2_6::FloodlightActivityGroup.new response = service.insert_floodlight_activity_group(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3035,7 +3035,7 @@ end floodlight_activity_groups.each do |floodlight_activity_group| # TODO: Change code below to process each `floodlight_activity_group` resource: - puts JSON.pretty_generate(floodlight_activity_group) + puts JSON.pretty_unparse(floodlight_activity_group.to_h) end # BEFORE RUNNING: # --------------- @@ -3069,7 +3069,7 @@ request_body = Google::Apis::DfareportingV2_6::FloodlightActivityGroup.new response = service.patch_floodlight_activity_group(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3099,7 +3099,7 @@ request_body = Google::Apis::DfareportingV2_6::FloodlightActivityGroup.new response = service.update_floodlight_activity_group(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3128,7 +3128,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_floodlight_configuration(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3154,7 +3154,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_floodlight_configurations(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3187,7 +3187,7 @@ request_body = Google::Apis::DfareportingV2_6::FloodlightConfiguration.new response = service.patch_floodlight_configuration(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3217,7 +3217,7 @@ request_body = Google::Apis::DfareportingV2_6::FloodlightConfiguration.new response = service.update_floodlight_configuration(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3249,7 +3249,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_inventory_item(profile_id, project_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3281,7 +3281,7 @@ end inventory_items.each do |inventory_item| # TODO: Change code below to process each `inventory_item` resource: - puts JSON.pretty_generate(inventory_item) + puts JSON.pretty_unparse(inventory_item.to_h) end # BEFORE RUNNING: # --------------- @@ -3342,7 +3342,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_landing_page(profile_id, campaign_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3374,7 +3374,7 @@ request_body = Google::Apis::DfareportingV2_6::LandingPage.new response = service.insert_landing_page(profile_id, campaign_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3403,7 +3403,7 @@ campaign_id = 0 # TODO: Update placeholder value. response = service.list_landing_pages(profile_id, campaign_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3439,7 +3439,7 @@ request_body = Google::Apis::DfareportingV2_6::LandingPage.new response = service.patch_landing_page(profile_id, campaign_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3472,7 +3472,7 @@ request_body = Google::Apis::DfareportingV2_6::LandingPage.new response = service.update_landing_page(profile_id, campaign_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3498,7 +3498,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_languages(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3524,7 +3524,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_metros(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3553,7 +3553,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_mobile_carrier(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3579,7 +3579,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_mobile_carriers(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3608,7 +3608,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_operating_system_version(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3634,7 +3634,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_operating_system_versions(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3663,7 +3663,7 @@ dart_id = 0 # TODO: Update placeholder value. response = service.get_operating_system(profile_id, dart_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3689,7 +3689,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_operating_systems(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3721,7 +3721,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_order_document(profile_id, project_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3753,7 +3753,7 @@ end order_documents.each do |order_document| # TODO: Change code below to process each `order_document` resource: - puts JSON.pretty_generate(order_document) + puts JSON.pretty_unparse(order_document.to_h) end # BEFORE RUNNING: # --------------- @@ -3786,7 +3786,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_order(profile_id, project_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3818,7 +3818,7 @@ end orders.each do |order| # TODO: Change code below to process each `order` resource: - puts JSON.pretty_generate(order) + puts JSON.pretty_unparse(order.to_h) end # BEFORE RUNNING: # --------------- @@ -3848,7 +3848,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_placement_group(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3877,7 +3877,7 @@ request_body = Google::Apis::DfareportingV2_6::PlacementGroup.new response = service.insert_placement_group(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3906,7 +3906,7 @@ end placement_groups.each do |placement_group| # TODO: Change code below to process each `placement_group` resource: - puts JSON.pretty_generate(placement_group) + puts JSON.pretty_unparse(placement_group.to_h) end # BEFORE RUNNING: # --------------- @@ -3940,7 +3940,7 @@ request_body = Google::Apis::DfareportingV2_6::PlacementGroup.new response = service.patch_placement_group(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3970,7 +3970,7 @@ request_body = Google::Apis::DfareportingV2_6::PlacementGroup.new response = service.update_placement_group(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4024,7 +4024,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_placement_strategy(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4053,7 +4053,7 @@ request_body = Google::Apis::DfareportingV2_6::PlacementStrategy.new response = service.insert_placement_strategy(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4082,7 +4082,7 @@ end placement_strategies.each do |placement_strategy| # TODO: Change code below to process each `placement_strategy` resource: - puts JSON.pretty_generate(placement_strategy) + puts JSON.pretty_unparse(placement_strategy.to_h) end # BEFORE RUNNING: # --------------- @@ -4116,7 +4116,7 @@ request_body = Google::Apis::DfareportingV2_6::PlacementStrategy.new response = service.patch_placement_strategy(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4146,7 +4146,7 @@ request_body = Google::Apis::DfareportingV2_6::PlacementStrategy.new response = service.update_placement_strategy(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4172,7 +4172,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.generate_placement_tags(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4201,7 +4201,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_placement(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4230,7 +4230,7 @@ request_body = Google::Apis::DfareportingV2_6::Placement.new response = service.insert_placement(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4259,7 +4259,7 @@ end placements.each do |placement| # TODO: Change code below to process each `placement` resource: - puts JSON.pretty_generate(placement) + puts JSON.pretty_unparse(placement.to_h) end # BEFORE RUNNING: # --------------- @@ -4293,7 +4293,7 @@ request_body = Google::Apis::DfareportingV2_6::Placement.new response = service.patch_placement(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4323,7 +4323,7 @@ request_body = Google::Apis::DfareportingV2_6::Placement.new response = service.update_placement(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4352,7 +4352,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_platform_type(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4378,7 +4378,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_platform_types(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4407,7 +4407,7 @@ code = 'my-code' # TODO: Update placeholder value. response = service.get_postal_code(profile_id, code) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4433,7 +4433,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_postal_codes(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4462,7 +4462,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_project(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4491,7 +4491,7 @@ end projects.each do |project| # TODO: Change code below to process each `project` resource: - puts JSON.pretty_generate(project) + puts JSON.pretty_unparse(project.to_h) end # BEFORE RUNNING: # --------------- @@ -4518,7 +4518,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_regions(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4547,7 +4547,7 @@ remarketing_list_id = 0 # TODO: Update placeholder value. response = service.get_remarketing_list_share(profile_id, remarketing_list_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4580,7 +4580,7 @@ request_body = Google::Apis::DfareportingV2_6::RemarketingListShare.new response = service.patch_remarketing_list_share(profile_id, remarketing_list_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4610,7 +4610,7 @@ request_body = Google::Apis::DfareportingV2_6::RemarketingListShare.new response = service.update_remarketing_list_share(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4639,7 +4639,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_remarketing_list(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4668,7 +4668,7 @@ request_body = Google::Apis::DfareportingV2_6::RemarketingList.new response = service.insert_remarketing_list(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4700,7 +4700,7 @@ end remarketing_lists.each do |remarketing_list| # TODO: Change code below to process each `remarketing_list` resource: - puts JSON.pretty_generate(remarketing_list) + puts JSON.pretty_unparse(remarketing_list.to_h) end # BEFORE RUNNING: # --------------- @@ -4734,7 +4734,7 @@ request_body = Google::Apis::DfareportingV2_6::RemarketingList.new response = service.patch_remarketing_list(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4764,7 +4764,7 @@ request_body = Google::Apis::DfareportingV2_6::RemarketingList.new response = service.update_remarketing_list(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4793,7 +4793,7 @@ request_body = Google::Apis::DfareportingV2_6::Report.new response = service.query_report_compatible_field(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4854,7 +4854,7 @@ file_id = 0 # TODO: Update placeholder value. response = service.get_report_file(profile_id, report_id, file_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4886,7 +4886,7 @@ end items.each do |file| # TODO: Change code below to process each `file` resource: - puts JSON.pretty_generate(file) + puts JSON.pretty_unparse(file.to_h) end # BEFORE RUNNING: # --------------- @@ -4916,7 +4916,7 @@ report_id = 0 # TODO: Update placeholder value. response = service.get_report(profile_id, report_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4945,7 +4945,7 @@ request_body = Google::Apis::DfareportingV2_6::Report.new response = service.insert_report(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4974,7 +4974,7 @@ end items.each do |report| # TODO: Change code below to process each `report` resource: - puts JSON.pretty_generate(report) + puts JSON.pretty_unparse(report.to_h) end # BEFORE RUNNING: # --------------- @@ -5008,7 +5008,7 @@ request_body = Google::Apis::DfareportingV2_6::Report.new response = service.patch_report(profile_id, report_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5037,7 +5037,7 @@ report_id = 0 # TODO: Update placeholder value. response = service.run_report(profile_id, report_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5070,7 +5070,7 @@ request_body = Google::Apis::DfareportingV2_6::Report.new response = service.update_report(profile_id, report_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5099,7 +5099,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_site(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5128,7 +5128,7 @@ request_body = Google::Apis::DfareportingV2_6::Site.new response = service.insert_site(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5157,7 +5157,7 @@ end sites.each do |site| # TODO: Change code below to process each `site` resource: - puts JSON.pretty_generate(site) + puts JSON.pretty_unparse(site.to_h) end # BEFORE RUNNING: # --------------- @@ -5191,7 +5191,7 @@ request_body = Google::Apis::DfareportingV2_6::Site.new response = service.patch_site(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5221,7 +5221,7 @@ request_body = Google::Apis::DfareportingV2_6::Site.new response = service.update_site(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5250,7 +5250,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_size(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5279,7 +5279,7 @@ request_body = Google::Apis::DfareportingV2_6::Size.new response = service.insert_size(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5305,7 +5305,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_sizes(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5334,7 +5334,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_subaccount(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5363,7 +5363,7 @@ request_body = Google::Apis::DfareportingV2_6::Subaccount.new response = service.insert_subaccount(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5392,7 +5392,7 @@ end subaccounts.each do |subaccount| # TODO: Change code below to process each `subaccount` resource: - puts JSON.pretty_generate(subaccount) + puts JSON.pretty_unparse(subaccount.to_h) end # BEFORE RUNNING: # --------------- @@ -5426,7 +5426,7 @@ request_body = Google::Apis::DfareportingV2_6::Subaccount.new response = service.patch_subaccount(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5456,7 +5456,7 @@ request_body = Google::Apis::DfareportingV2_6::Subaccount.new response = service.update_subaccount(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5485,7 +5485,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_targetable_remarketing_list(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5517,7 +5517,7 @@ end targetable_remarketing_lists.each do |targetable_remarketing_list| # TODO: Change code below to process each `targetable_remarketing_list` resource: - puts JSON.pretty_generate(targetable_remarketing_list) + puts JSON.pretty_unparse(targetable_remarketing_list.to_h) end # BEFORE RUNNING: # --------------- @@ -5547,7 +5547,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_targeting_template(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5576,7 +5576,7 @@ request_body = Google::Apis::DfareportingV2_6::TargetingTemplate.new response = service.insert_targeting_template(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5605,7 +5605,7 @@ end targeting_templates.each do |targeting_template| # TODO: Change code below to process each `targeting_template` resource: - puts JSON.pretty_generate(targeting_template) + puts JSON.pretty_unparse(targeting_template.to_h) end # BEFORE RUNNING: # --------------- @@ -5639,7 +5639,7 @@ request_body = Google::Apis::DfareportingV2_6::TargetingTemplate.new response = service.patch_targeting_template(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5669,7 +5669,7 @@ request_body = Google::Apis::DfareportingV2_6::TargetingTemplate.new response = service.update_targeting_template(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5696,7 +5696,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.get_user_profile(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5720,7 +5720,7 @@ service.authorization = nil response = service.list_user_profiles() # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5749,7 +5749,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_user_role_permission_group(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5775,7 +5775,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_user_role_permission_groups(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5804,7 +5804,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_user_role_permission(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5830,7 +5830,7 @@ profile_id = 0 # TODO: Update placeholder value. response = service.list_user_role_permissions(profile_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5884,7 +5884,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_user_role(profile_id, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5913,7 +5913,7 @@ request_body = Google::Apis::DfareportingV2_6::UserRole.new response = service.insert_user_role(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5942,7 +5942,7 @@ end user_roles.each do |user_role| # TODO: Change code below to process each `user_role` resource: - puts JSON.pretty_generate(user_role) + puts JSON.pretty_unparse(user_role.to_h) end # BEFORE RUNNING: # --------------- @@ -5976,7 +5976,7 @@ request_body = Google::Apis::DfareportingV2_6::UserRole.new response = service.patch_user_role(profile_id, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -6006,4 +6006,4 @@ request_body = Google::Apis::DfareportingV2_6::UserRole.new response = service.update_user_role(profile_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dns.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dns.v1.json.baseline index 4eeac27b92..645156ec07 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dns.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dns.v1.json.baseline @@ -35,7 +35,7 @@ request_body = Google::Apis::DnsV1::Change.new response = service.create_change(project, managed_zone, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud DNS API @@ -72,7 +72,7 @@ change_id = 'my-change-id' # TODO: Update placeholder value. response = service.get_change(project, managed_zone, change_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud DNS API @@ -109,7 +109,7 @@ end changes.each do |change| # TODO: Change code below to process each `change` resource: - puts JSON.pretty_generate(change) + puts JSON.pretty_unparse(change.to_h) end # BEFORE RUNNING: # --------------- @@ -144,7 +144,7 @@ request_body = Google::Apis::DnsV1::ManagedZone.new response = service.create_managed_zone(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud DNS API @@ -208,7 +208,7 @@ managed_zone = 'my-managed-zone' # TODO: Update placeholder value. response = service.get_managed_zone(project, managed_zone) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud DNS API @@ -242,7 +242,7 @@ end managed_zones.each do |managed_zone| # TODO: Change code below to process each `managed_zone` resource: - puts JSON.pretty_generate(managed_zone) + puts JSON.pretty_unparse(managed_zone.to_h) end # BEFORE RUNNING: # --------------- @@ -274,7 +274,7 @@ project = 'my-project' # TODO: Update placeholder value. response = service.get_project(project) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud DNS API @@ -311,5 +311,5 @@ end rrsets.each do |resource_record_set| # TODO: Change code below to process each `resource_record_set` resource: - puts JSON.pretty_generate(resource_record_set) + puts JSON.pretty_unparse(resource_record_set.to_h) end diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_foo.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_foo.v1.json.baseline index bcf5fd8433..aa289808bd 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_foo.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_foo.v1.json.baseline @@ -14,4 +14,4 @@ service = Google::Apis::FooV1::FooService.new response = service.get_bar_baz() # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_genomics.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_genomics.v1.json.baseline index 82032f7f42..b277c40ef9 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_genomics.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_genomics.v1.json.baseline @@ -29,7 +29,7 @@ request_body = Google::Apis::GenomicsV1::BatchCreateAnnotationsRequest.new response = service.batch_create_annotations(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -60,7 +60,7 @@ request_body = Google::Apis::GenomicsV1::Annotation.new response = service.create_annotation(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -118,7 +118,7 @@ annotation_id = 'my-annotation-id' # TODO: Update placeholder value. response = service.get_annotation(annotation_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -153,7 +153,7 @@ end annotations.each do |annotation| # TODO: Change code below to process each `annotation` resource: - puts JSON.pretty_generate(annotation) + puts JSON.pretty_unparse(annotation.to_h) end # BEFORE RUNNING: # --------------- @@ -189,7 +189,7 @@ request_body = Google::Apis::GenomicsV1::Annotation.new response = service.update_annotation(annotation_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -220,7 +220,7 @@ request_body = Google::Apis::GenomicsV1::AnnotationSet.new response = service.create_annotation_set(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -278,7 +278,7 @@ annotation_set_id = 'my-annotation-set-id' # TODO: Update placeholder value. response = service.get_annotation_set(annotation_set_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -313,7 +313,7 @@ end annotation_sets.each do |annotation_set| # TODO: Change code below to process each `annotation_set` resource: - puts JSON.pretty_generate(annotation_set) + puts JSON.pretty_unparse(annotation_set.to_h) end # BEFORE RUNNING: # --------------- @@ -349,7 +349,7 @@ request_body = Google::Apis::GenomicsV1::AnnotationSet.new response = service.update_annotationset(annotation_set_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -380,7 +380,7 @@ request_body = Google::Apis::GenomicsV1::CallSet.new response = service.create_call_set(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -438,7 +438,7 @@ call_set_id = 'my-call-set-id' # TODO: Update placeholder value. response = service.get_call_set(call_set_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -473,7 +473,7 @@ request_body = Google::Apis::GenomicsV1::CallSet.new response = service.patch_call_set(call_set_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -508,7 +508,7 @@ end call_sets.each do |call_set| # TODO: Change code below to process each `call_set` resource: - puts JSON.pretty_generate(call_set) + puts JSON.pretty_unparse(call_set.to_h) end # BEFORE RUNNING: # --------------- @@ -540,7 +540,7 @@ request_body = Google::Apis::GenomicsV1::Dataset.new response = service.create_dataset(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -598,7 +598,7 @@ dataset_id = 'my-dataset-id' # TODO: Update placeholder value. response = service.get_dataset(dataset_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -632,7 +632,7 @@ request_body = Google::Apis::GenomicsV1::GetIamPolicyRequest.new response = service.get_dataset_iam_policy(resource, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -663,7 +663,7 @@ end datasets.each do |dataset| # TODO: Change code below to process each `dataset` resource: - puts JSON.pretty_generate(dataset) + puts JSON.pretty_unparse(dataset.to_h) end # BEFORE RUNNING: # --------------- @@ -699,7 +699,7 @@ request_body = Google::Apis::GenomicsV1::Dataset.new response = service.patch_dataset(dataset_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -733,7 +733,7 @@ request_body = Google::Apis::GenomicsV1::SetIamPolicyRequest.new response = service.set_dataset_iam_policy(resource, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -767,7 +767,7 @@ request_body = Google::Apis::GenomicsV1::TestIamPermissionsRequest.new response = service.test_dataset_iam_permissions(resource, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -801,7 +801,7 @@ request_body = Google::Apis::GenomicsV1::UndeleteDatasetRequest.new response = service.undelete_dataset(dataset_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -862,7 +862,7 @@ name = 'operations/my-operation' # TODO: Update placeholder value. response = service.get_operation(name) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -896,7 +896,7 @@ end operations.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_generate(operation) + puts JSON.pretty_unparse(operation.to_h) end # BEFORE RUNNING: # --------------- @@ -931,7 +931,7 @@ end coverage_buckets.each do |coverage_bucket| # TODO: Change code below to process each `coverage_bucket` resource: - puts JSON.pretty_generate(coverage_bucket) + puts JSON.pretty_unparse(coverage_bucket.to_h) end # BEFORE RUNNING: # --------------- @@ -995,7 +995,7 @@ request_body = Google::Apis::GenomicsV1::ExportReadGroupSetRequest.new response = service.export_read_group_sets(read_group_set_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1026,7 +1026,7 @@ read_group_set_id = 'my-read-group-set-id' # TODO: Update placeholder value. response = service.get_read_group_set(read_group_set_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1057,7 +1057,7 @@ request_body = Google::Apis::GenomicsV1::ImportReadGroupSetsRequest.new response = service.import_read_group_sets(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1093,7 +1093,7 @@ request_body = Google::Apis::GenomicsV1::ReadGroupSet.new response = service.patch_read_group_set(read_group_set_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1128,7 +1128,7 @@ end read_group_sets.each do |read_group_set| # TODO: Change code below to process each `read_group_set` resource: - puts JSON.pretty_generate(read_group_set) + puts JSON.pretty_unparse(read_group_set.to_h) end # BEFORE RUNNING: # --------------- @@ -1164,7 +1164,7 @@ end alignments.each do |read| # TODO: Change code below to process each `read` resource: - puts JSON.pretty_generate(read) + puts JSON.pretty_unparse(read.to_h) end # BEFORE RUNNING: # --------------- @@ -1196,7 +1196,7 @@ request_body = Google::Apis::GenomicsV1::StreamReadsRequest.new response = service.stream_reads(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1230,7 +1230,7 @@ end sequence.each do |item| # TODO: Change code below to process each `item` resource: - puts JSON.pretty_generate(item) + puts JSON.pretty_unparse(item.to_h) end # BEFORE RUNNING: # --------------- @@ -1262,7 +1262,7 @@ reference_id = 'my-reference-id' # TODO: Update placeholder value. response = service.get_reference(reference_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1297,7 +1297,7 @@ end references.each do |reference| # TODO: Change code below to process each `reference` resource: - puts JSON.pretty_generate(reference) + puts JSON.pretty_unparse(reference.to_h) end # BEFORE RUNNING: # --------------- @@ -1329,7 +1329,7 @@ reference_set_id = 'my-reference-set-id' # TODO: Update placeholder value. response = service.get_reference_set(reference_set_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1364,7 +1364,7 @@ end reference_sets.each do |reference_set| # TODO: Change code below to process each `reference_set` resource: - puts JSON.pretty_generate(reference_set) + puts JSON.pretty_unparse(reference_set.to_h) end # BEFORE RUNNING: # --------------- @@ -1396,7 +1396,7 @@ request_body = Google::Apis::GenomicsV1::Variant.new response = service.create_variant(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1454,7 +1454,7 @@ variant_id = 'my-variant-id' # TODO: Update placeholder value. response = service.get_variant(variant_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1485,7 +1485,7 @@ request_body = Google::Apis::GenomicsV1::ImportVariantsRequest.new response = service.import_variants(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1547,7 +1547,7 @@ request_body = Google::Apis::GenomicsV1::Variant.new response = service.patch_variant(variant_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1582,7 +1582,7 @@ end variants.each do |variant| # TODO: Change code below to process each `variant` resource: - puts JSON.pretty_generate(variant) + puts JSON.pretty_unparse(variant.to_h) end # BEFORE RUNNING: # --------------- @@ -1614,7 +1614,7 @@ request_body = Google::Apis::GenomicsV1::StreamVariantsRequest.new response = service.stream_variants(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1645,7 +1645,7 @@ request_body = Google::Apis::GenomicsV1::VariantSet.new response = service.create_variantset(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1707,7 +1707,7 @@ request_body = Google::Apis::GenomicsV1::ExportVariantSetRequest.new response = service.export_variant_set(variant_set_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1738,7 +1738,7 @@ variant_set_id = 'my-variant-set-id' # TODO: Update placeholder value. response = service.get_variantset(variant_set_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1773,7 +1773,7 @@ request_body = Google::Apis::GenomicsV1::VariantSet.new response = service.patch_variantset(variant_set_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1808,5 +1808,5 @@ end variant_sets.each do |variant_set| # TODO: Change code below to process each `variant_set` resource: - puts JSON.pretty_generate(variant_set) + puts JSON.pretty_unparse(variant_set.to_h) end diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_logging.v2beta1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_logging.v2beta1.json.baseline index b9c7f9c2cd..fb4954a855 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_logging.v2beta1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_logging.v2beta1.json.baseline @@ -66,7 +66,7 @@ end log_names.each do |item| # TODO: Change code below to process each `item` resource: - puts JSON.pretty_generate(item) + puts JSON.pretty_unparse(item.to_h) end # BEFORE RUNNING: # --------------- @@ -102,7 +102,7 @@ end entries.each do |log_entry| # TODO: Change code below to process each `log_entry` resource: - puts JSON.pretty_generate(log_entry) + puts JSON.pretty_unparse(log_entry.to_h) end # BEFORE RUNNING: # --------------- @@ -134,7 +134,7 @@ request_body = Google::Apis::LoggingV2beta1::WriteLogEntriesRequest.new response = service.write_entry_log_entries(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Logging API @@ -165,7 +165,7 @@ end resource_descriptors.each do |monitored_resource_descriptor| # TODO: Change code below to process each `monitored_resource_descriptor` resource: - puts JSON.pretty_generate(monitored_resource_descriptor) + puts JSON.pretty_unparse(monitored_resource_descriptor.to_h) end # BEFORE RUNNING: # --------------- @@ -234,7 +234,7 @@ end log_names.each do |item| # TODO: Change code below to process each `item` resource: - puts JSON.pretty_generate(item) + puts JSON.pretty_unparse(item.to_h) end # BEFORE RUNNING: # --------------- @@ -303,7 +303,7 @@ end log_names.each do |item| # TODO: Change code below to process each `item` resource: - puts JSON.pretty_generate(item) + puts JSON.pretty_unparse(item.to_h) end # BEFORE RUNNING: # --------------- @@ -340,7 +340,7 @@ request_body = Google::Apis::LoggingV2beta1::LogMetric.new response = service.create_project_metric(parent, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Logging API @@ -400,7 +400,7 @@ metric_name = 'projects/my-project/metrics/my-metric' # TODO: Update placeholde response = service.get_project_metric(metric_name) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Logging API @@ -435,7 +435,7 @@ end metrics.each do |log_metric| # TODO: Change code below to process each `log_metric` resource: - puts JSON.pretty_generate(log_metric) + puts JSON.pretty_unparse(log_metric.to_h) end # BEFORE RUNNING: # --------------- @@ -474,7 +474,7 @@ request_body = Google::Apis::LoggingV2beta1::LogMetric.new response = service.update_project_metric(metric_name, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Logging API @@ -511,7 +511,7 @@ request_body = Google::Apis::LoggingV2beta1::LogSink.new response = service.create_project_sink(parent, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Logging API @@ -577,7 +577,7 @@ sink_name = 'projects/my-project/sinks/my-sink' # TODO: Update placeholder valu response = service.get_project_sink(sink_name) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Logging API @@ -612,7 +612,7 @@ end sinks.each do |log_sink| # TODO: Change code below to process each `log_sink` resource: - puts JSON.pretty_generate(log_sink) + puts JSON.pretty_unparse(log_sink.to_h) end # BEFORE RUNNING: # --------------- @@ -652,4 +652,4 @@ request_body = Google::Apis::LoggingV2beta1::LogSink.new response = service.update_project_sink(sink_name, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_prediction.v1.6.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_prediction.v1.6.json.baseline index 848ccf32f9..326ea39e42 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_prediction.v1.6.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_prediction.v1.6.json.baseline @@ -35,7 +35,7 @@ request_body = Google::Apis::PredictionV1_6::Input.new response = service.predict_hosted_model(project, hosted_model_name, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Prediction API @@ -69,7 +69,7 @@ id = 'my-id' # TODO: Update placeholder value. response = service.analyze_trained_model(project, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Prediction API @@ -133,7 +133,7 @@ id = 'my-id' # TODO: Update placeholder value. response = service.get_trained_model(project, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Prediction API @@ -167,7 +167,7 @@ request_body = Google::Apis::PredictionV1_6::Insert.new response = service.insert_trained_model(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Prediction API @@ -201,7 +201,7 @@ end items.each do |insert2| # TODO: Change code below to process each `insert2` resource: - puts JSON.pretty_generate(insert2) + puts JSON.pretty_unparse(insert2.to_h) end # BEFORE RUNNING: # --------------- @@ -239,7 +239,7 @@ request_body = Google::Apis::PredictionV1_6::Input.new response = service.predict_trained_model(project, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Prediction API @@ -277,4 +277,4 @@ request_body = Google::Apis::PredictionV1_6::Update.new response = service.update_trained_model(project, id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_pubsub.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_pubsub.v1.json.baseline index 5a105c1897..06b023a207 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_pubsub.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_pubsub.v1.json.baseline @@ -31,7 +31,7 @@ resource = 'projects/my-project/snapshots/my-snapshot' # TODO: Update placehold response = service.get_project_snapshot_iam_policy(resource) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -67,7 +67,7 @@ request_body = Google::Apis::PubsubV1::SetIamPolicyRequest.new response = service.set_snapshot_iam_policy(resource, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -103,7 +103,7 @@ request_body = Google::Apis::PubsubV1::TestIamPermissionsRequest.new response = service.test_snapshot_iam_permissions(resource, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -174,7 +174,7 @@ request_body = Google::Apis::PubsubV1::Subscription.new response = service.create_subscription(name, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -234,7 +234,7 @@ subscription = 'projects/my-project/subscriptions/my-subscription' # TODO: Upda response = service.get_subscription(subscription) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -267,7 +267,7 @@ resource = 'projects/my-project/subscriptions/my-subscription' # TODO: Update p response = service.get_project_subscription_iam_policy(resource) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -302,7 +302,7 @@ end subscriptions.each do |subscription| # TODO: Change code below to process each `subscription` resource: - puts JSON.pretty_generate(subscription) + puts JSON.pretty_unparse(subscription.to_h) end # BEFORE RUNNING: # --------------- @@ -400,7 +400,7 @@ request_body = Google::Apis::PubsubV1::PullRequest.new response = service.pull_subscription(subscription, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -436,7 +436,7 @@ request_body = Google::Apis::PubsubV1::SetIamPolicyRequest.new response = service.set_subscription_iam_policy(resource, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -472,7 +472,7 @@ request_body = Google::Apis::PubsubV1::TestIamPermissionsRequest.new response = service.test_subscription_iam_permissions(resource, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -512,7 +512,7 @@ request_body = Google::Apis::PubsubV1::Topic.new response = service.create_topic(name, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -572,7 +572,7 @@ topic = 'projects/my-project/topics/my-topic' # TODO: Update placeholder value. response = service.get_topic(topic) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -605,7 +605,7 @@ resource = 'projects/my-project/topics/my-topic' # TODO: Update placeholder val response = service.get_project_topic_iam_policy(resource) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -640,7 +640,7 @@ end topics.each do |topic| # TODO: Change code below to process each `topic` resource: - puts JSON.pretty_generate(topic) + puts JSON.pretty_unparse(topic.to_h) end # BEFORE RUNNING: # --------------- @@ -676,7 +676,7 @@ request_body = Google::Apis::PubsubV1::PublishRequest.new response = service.publish_topic(topic, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -712,7 +712,7 @@ request_body = Google::Apis::PubsubV1::SetIamPolicyRequest.new response = service.set_topic_iam_policy(resource, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -747,7 +747,7 @@ end subscriptions.each do |item| # TODO: Change code below to process each `item` resource: - puts JSON.pretty_generate(item) + puts JSON.pretty_unparse(item.to_h) end # BEFORE RUNNING: # --------------- @@ -784,4 +784,4 @@ request_body = Google::Apis::PubsubV1::TestIamPermissionsRequest.new response = service.test_topic_iam_permissions(resource, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_replicapoolupdater.v1beta1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_replicapoolupdater.v1beta1.json.baseline index e1da0bfc71..c5892308df 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_replicapoolupdater.v1beta1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_replicapoolupdater.v1beta1.json.baseline @@ -35,7 +35,7 @@ rolling_update = 'my-rolling-update' # TODO: Update placeholder value. response = service.cancel_rolling_update(project, zone, rolling_update) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Compute Engine Instance Group Updater API @@ -72,7 +72,7 @@ rolling_update = 'my-rolling-update' # TODO: Update placeholder value. response = service.get_rolling_update(project, zone, rolling_update) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Compute Engine Instance Group Updater API @@ -109,7 +109,7 @@ request_body = Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdate.new response = service.insert_rolling_update(project, zone, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Compute Engine Instance Group Updater API @@ -146,7 +146,7 @@ end items.each do |rolling_update| # TODO: Change code below to process each `rolling_update` resource: - puts JSON.pretty_generate(rolling_update) + puts JSON.pretty_unparse(rolling_update.to_h) end # BEFORE RUNNING: # --------------- @@ -187,7 +187,7 @@ end items.each do |instance_update| # TODO: Change code below to process each `instance_update` resource: - puts JSON.pretty_generate(instance_update) + puts JSON.pretty_unparse(instance_update.to_h) end # BEFORE RUNNING: # --------------- @@ -225,7 +225,7 @@ rolling_update = 'my-rolling-update' # TODO: Update placeholder value. response = service.pause_rolling_update(project, zone, rolling_update) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Compute Engine Instance Group Updater API @@ -262,7 +262,7 @@ rolling_update = 'my-rolling-update' # TODO: Update placeholder value. response = service.resume_rolling_update(project, zone, rolling_update) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Compute Engine Instance Group Updater API @@ -299,7 +299,7 @@ rolling_update = 'my-rolling-update' # TODO: Update placeholder value. response = service.rollback_rolling_update(project, zone, rolling_update) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Compute Engine Instance Group Updater API @@ -336,7 +336,7 @@ operation = 'my-operation' # TODO: Update placeholder value. response = service.get_zone_operation(project, zone, operation) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Compute Engine Instance Group Updater API @@ -373,5 +373,5 @@ end items.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_generate(operation) + puts JSON.pretty_unparse(operation.to_h) end diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_sheets.v4.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_sheets.v4.json.baseline index 2bbd263208..473d222ab6 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_sheets.v4.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_sheets.v4.json.baseline @@ -32,7 +32,7 @@ request_body.requests = requests; response = service.batch_update_spreadsheet(spreadsheet_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -59,7 +59,7 @@ request_body = Google::Apis::SheetsV4::Spreadsheet.new response = service.create_spreadsheet(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -95,7 +95,7 @@ include_grid_data = false # TODO: Update placeholder value. response = service.get_spreadsheet(spreadsheet_id, ranges: ranges, include_grid_data: include_grid_data) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -132,7 +132,7 @@ request_body.destination_spreadsheet_id = destination_spreadsheet_id; response = service.copy_spreadsheet(spreadsheet_id, sheet_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -172,7 +172,7 @@ request_body = Google::Apis::SheetsV4::ValueRange.new response = service.append_spreadsheet_value(spreadsheet_id, range, request_body, value_input_option: value_input_option, insert_data_option: insert_data_option) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -206,7 +206,7 @@ request_body.ranges = ranges; response = service.batch_clear_values(spreadsheet_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -248,7 +248,7 @@ date_time_render_option = '' # TODO: Update placeholder value. response = service.batch_get_spreadsheet_values(spreadsheet_id, ranges: ranges, value_render_option: value_render_option, date_time_render_option: date_time_render_option) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -286,7 +286,7 @@ request_body.data = data; response = service.batch_update_values(spreadsheet_id, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -319,7 +319,7 @@ request_body = Google::Apis::SheetsV4::ClearValuesRequest.new response = service.clear_values(spreadsheet_id, range, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -361,7 +361,7 @@ date_time_render_option = '' # TODO: Update placeholder value. response = service.get_spreadsheet_values(spreadsheet_id, range, value_render_option: value_render_option, date_time_render_option: date_time_render_option) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -398,4 +398,4 @@ request_body = Google::Apis::SheetsV4::ValueRange.new response = service.update_spreadsheet_value(spreadsheet_id, range, request_body, value_input_option: value_input_option) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_sqladmin.v1beta4.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_sqladmin.v1beta4.json.baseline index 3eb114fa7f..a0e12d2e54 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_sqladmin.v1beta4.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_sqladmin.v1beta4.json.baseline @@ -35,7 +35,7 @@ id = 0 # TODO: Update placeholder value. response = service.delete_backup_run(project, instance, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -72,7 +72,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_backup_run(project, instance, id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -109,7 +109,7 @@ request_body = Google::Apis::SqladminV1beta4::BackupRun.new response = service.insert_backup_run(project, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -146,7 +146,7 @@ end items.each do |backup_run| # TODO: Change code below to process each `backup_run` resource: - puts JSON.pretty_generate(backup_run) + puts JSON.pretty_unparse(backup_run.to_h) end # BEFORE RUNNING: # --------------- @@ -184,7 +184,7 @@ database = 'my-database' # TODO: Update placeholder value. response = service.delete_database(project, instance, database) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -221,7 +221,7 @@ database = 'my-database' # TODO: Update placeholder value. response = service.get_database(project, instance, database) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -258,7 +258,7 @@ request_body = Google::Apis::SqladminV1beta4::Database.new response = service.insert_database(project, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -292,7 +292,7 @@ instance = 'my-instance' # TODO: Update placeholder value. response = service.list_databases(project, instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -333,7 +333,7 @@ request_body = Google::Apis::SqladminV1beta4::Database.new response = service.patch_database(project, instance, database, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -374,7 +374,7 @@ request_body = Google::Apis::SqladminV1beta4::Database.new response = service.update_database(project, instance, database, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -402,7 +402,7 @@ service.authorization = \ response = service.list_flags() # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -439,7 +439,7 @@ request_body = Google::Apis::SqladminV1beta4::CloneInstancesRequest.new response = service.clone_instance(project, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -473,7 +473,7 @@ instance = 'my-instance' # TODO: Update placeholder value. response = service.delete_instance(project, instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -510,7 +510,7 @@ request_body = Google::Apis::SqladminV1beta4::ExportInstancesRequest.new response = service.export_instance(project, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -547,7 +547,7 @@ request_body = Google::Apis::SqladminV1beta4::InstancesFailoverRequest.new response = service.failover_instance(project, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -581,7 +581,7 @@ instance = 'my-instance' # TODO: Update placeholder value. response = service.get_instance(project, instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -618,7 +618,7 @@ request_body = Google::Apis::SqladminV1beta4::ImportInstancesRequest.new response = service.import_instance(project, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -652,7 +652,7 @@ request_body = Google::Apis::SqladminV1beta4::DatabaseInstance.new response = service.insert_instance(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -686,7 +686,7 @@ end items.each do |database_instance| # TODO: Change code below to process each `database_instance` resource: - puts JSON.pretty_generate(database_instance) + puts JSON.pretty_unparse(database_instance.to_h) end # BEFORE RUNNING: # --------------- @@ -725,7 +725,7 @@ request_body = Google::Apis::SqladminV1beta4::DatabaseInstance.new response = service.patch_instance(project, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -759,7 +759,7 @@ instance = 'my-instance' # TODO: Update placeholder value. response = service.promote_instance_replica(project, instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -793,7 +793,7 @@ instance = 'my-instance' # TODO: Update placeholder value. response = service.reset_instance_ssl_config(project, instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -827,7 +827,7 @@ instance = 'my-instance' # TODO: Update placeholder value. response = service.restart_instance(project, instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -864,7 +864,7 @@ request_body = Google::Apis::SqladminV1beta4::RestoreInstancesBackupRequest.new response = service.restore_instance_backup(project, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -898,7 +898,7 @@ instance = 'my-instance' # TODO: Update placeholder value. response = service.start_instance_replica(project, instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -932,7 +932,7 @@ instance = 'my-instance' # TODO: Update placeholder value. response = service.stop_instance_replica(project, instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -969,7 +969,7 @@ request_body = Google::Apis::SqladminV1beta4::InstancesTruncateLogRequest.new response = service.truncate_instance_log(project, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1007,7 +1007,7 @@ request_body = Google::Apis::SqladminV1beta4::DatabaseInstance.new response = service.update_instance(project, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1041,7 +1041,7 @@ operation = 'my-operation' # TODO: Update placeholder value. response = service.get_operation(project, operation) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1078,7 +1078,7 @@ end items.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_generate(operation) + puts JSON.pretty_unparse(operation.to_h) end # BEFORE RUNNING: # --------------- @@ -1116,7 +1116,7 @@ request_body = Google::Apis::SqladminV1beta4::SslCertsCreateEphemeralRequest.new response = service.create_ssl_cert_ephemeral(project, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1153,7 +1153,7 @@ sha1_fingerprint = 'my-sha1-fingerprint' # TODO: Update placeholder value. response = service.delete_ssl_cert(project, instance, sha1_fingerprint) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1190,7 +1190,7 @@ sha1_fingerprint = 'my-sha1-fingerprint' # TODO: Update placeholder value. response = service.get_ssl_cert(project, instance, sha1_fingerprint) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1227,7 +1227,7 @@ request_body = Google::Apis::SqladminV1beta4::InsertSslCertsRequest.new response = service.insert_ssl_cert(project, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1261,7 +1261,7 @@ instance = 'my-instance' # TODO: Update placeholder value. response = service.list_ssl_certs(project, instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1292,7 +1292,7 @@ project = 'my-project' # TODO: Update placeholder value. response = service.list_tiers(project) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1332,7 +1332,7 @@ name = '' # TODO: Update placeholder value. response = service.delete_user(project, instance, host, name) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1369,7 +1369,7 @@ request_body = Google::Apis::SqladminV1beta4::User.new response = service.insert_user(project, instance, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1403,7 +1403,7 @@ instance = 'my-instance' # TODO: Update placeholder value. response = service.list_users(project, instance) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1447,4 +1447,4 @@ request_body = Google::Apis::SqladminV1beta4::User.new response = service.update_user(project, instance, host, name, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_storage.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_storage.v1.json.baseline index ca4dd43bfb..80c45a3df3 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_storage.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_storage.v1.json.baseline @@ -64,7 +64,7 @@ entity = 'my-entity' # TODO: Update placeholder value. response = service.get_bucket_access_control(bucket, entity) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -98,7 +98,7 @@ request_body = Google::Apis::StorageV1::BucketAccessControl.new response = service.insert_bucket_access_control(bucket, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -129,7 +129,7 @@ bucket = 'my-bucket' # TODO: Update placeholder value. response = service.list_bucket_access_controls(bucket) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -168,7 +168,7 @@ request_body = Google::Apis::StorageV1::BucketAccessControl.new response = service.patch_bucket_access_control(bucket, entity, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -207,7 +207,7 @@ request_body = Google::Apis::StorageV1::BucketAccessControl.new response = service.update_bucket_access_control(bucket, entity, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -265,7 +265,7 @@ bucket = 'my-bucket' # TODO: Update placeholder value. response = service.get_bucket(bucket) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -299,7 +299,7 @@ request_body = Google::Apis::StorageV1::Bucket.new response = service.insert_bucket(project, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -333,7 +333,7 @@ end items.each do |bucket| # TODO: Change code below to process each `bucket` resource: - puts JSON.pretty_generate(bucket) + puts JSON.pretty_unparse(bucket.to_h) end # BEFORE RUNNING: # --------------- @@ -369,7 +369,7 @@ request_body = Google::Apis::StorageV1::Bucket.new response = service.patch_bucket(bucket, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -404,7 +404,7 @@ request_body = Google::Apis::StorageV1::Bucket.new response = service.update_bucket(bucket, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -497,7 +497,7 @@ entity = 'my-entity' # TODO: Update placeholder value. response = service.get_default_object_access_control(bucket, entity) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -531,7 +531,7 @@ request_body = Google::Apis::StorageV1::ObjectAccessControl.new response = service.insert_default_object_access_control(bucket, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -562,7 +562,7 @@ bucket = 'my-bucket' # TODO: Update placeholder value. response = service.list_default_object_access_controls(bucket) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -601,7 +601,7 @@ request_body = Google::Apis::StorageV1::ObjectAccessControl.new response = service.patch_default_object_access_control(bucket, entity, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -640,7 +640,7 @@ request_body = Google::Apis::StorageV1::ObjectAccessControl.new response = service.update_default_object_access_control(bucket, entity, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -714,7 +714,7 @@ entity = 'my-entity' # TODO: Update placeholder value. response = service.get_object_access_control(bucket, object, entity) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -752,7 +752,7 @@ request_body = Google::Apis::StorageV1::ObjectAccessControl.new response = service.insert_object_access_control(bucket, object, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -787,7 +787,7 @@ object = 'my-object' # TODO: Update placeholder value. response = service.list_object_access_controls(bucket, object) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -830,7 +830,7 @@ request_body = Google::Apis::StorageV1::ObjectAccessControl.new response = service.patch_object_access_control(bucket, object, entity, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -873,7 +873,7 @@ request_body = Google::Apis::StorageV1::ObjectAccessControl.new response = service.update_object_access_control(bucket, object, entity, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -915,7 +915,7 @@ request_body = Google::Apis::StorageV1::ComposeRequest.new response = service.compose_object(destination_bucket, destination_object, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -966,7 +966,7 @@ request_body = Google::Apis::StorageV1::Object.new response = service.copy_object(source_bucket, source_object, destination_bucket, destination_object, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -1036,7 +1036,7 @@ object = 'my-object' # TODO: Update placeholder value. response = service.get_object(bucket, object) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -1075,7 +1075,7 @@ request_body = Google::Apis::StorageV1::Object.new response = service.insert_object(bucket, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -1109,7 +1109,7 @@ end items.each do |object| # TODO: Change code below to process each `object` resource: - puts JSON.pretty_generate(object) + puts JSON.pretty_unparse(object.to_h) end # BEFORE RUNNING: # --------------- @@ -1149,7 +1149,7 @@ request_body = Google::Apis::StorageV1::Object.new response = service.patch_object(bucket, object, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -1196,7 +1196,7 @@ request_body = Google::Apis::StorageV1::Object.new response = service.rewrite_object(source_bucket, source_object, destination_bucket, destination_object, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -1239,7 +1239,7 @@ request_body = Google::Apis::StorageV1::Object.new response = service.update_object(bucket, object, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -1273,4 +1273,4 @@ request_body = Google::Apis::StorageV1::Channel.new response = service.watch_all_objects(bucket, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_storagetransfer.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_storagetransfer.v1.json.baseline index a60d0e961d..1508856f50 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_storagetransfer.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_storagetransfer.v1.json.baseline @@ -26,7 +26,7 @@ service.authorization = \ response = service.get_google_service_account_v1() # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Storage Transfer API @@ -58,7 +58,7 @@ project_id = 'my-project-id' # TODO: Update placeholder value. response = service.get_google_service_account(project_id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Storage Transfer API @@ -89,7 +89,7 @@ request_body = Google::Apis::StoragetransferV1::TransferJob.new response = service.create_transfer_job(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Storage Transfer API @@ -120,7 +120,7 @@ job_name = 'transferJobs/my-transfer-job' # TODO: Update placeholder value. response = service.get_transfer_job(job_name) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Storage Transfer API @@ -151,7 +151,7 @@ end transfer_jobs.each do |transfer_job| # TODO: Change code below to process each `transfer_job` resource: - puts JSON.pretty_generate(transfer_job) + puts JSON.pretty_unparse(transfer_job.to_h) end # BEFORE RUNNING: # --------------- @@ -187,7 +187,7 @@ request_body = Google::Apis::StoragetransferV1::UpdateTransferJobRequest.new response = service.patch_transfer_job(job_name, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Storage Transfer API @@ -272,7 +272,7 @@ name = 'transferOperations/my-transfer-operation' # TODO: Update placeholder va response = service.get_transfer_operation(name) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Storage Transfer API @@ -306,7 +306,7 @@ end operations.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_generate(operation) + puts JSON.pretty_unparse(operation.to_h) end # BEFORE RUNNING: # --------------- diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_taskqueue.v1beta2.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_taskqueue.v1beta2.json.baseline index 6baf30bb24..0f59a167d5 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_taskqueue.v1beta2.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_taskqueue.v1beta2.json.baseline @@ -28,7 +28,7 @@ taskqueue = 'my-taskqueue' # TODO: Update placeholder value. response = service.get_taskqueue(project, taskqueue) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the TaskQueue API @@ -90,7 +90,7 @@ task = 'my-task' # TODO: Update placeholder value. response = service.get_task(project, taskqueue, task) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the TaskQueue API @@ -123,7 +123,7 @@ request_body = Google::Apis::TaskqueueV1beta2::Task.new response = service.insert_task(project, taskqueue, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the TaskQueue API @@ -159,7 +159,7 @@ lease_secs = 0 # TODO: Update placeholder value. response = service.lease_task(project, taskqueue, num_tasks, lease_secs) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the TaskQueue API @@ -189,7 +189,7 @@ taskqueue = 'my-taskqueue' # TODO: Update placeholder value. response = service.list_tasks(project, taskqueue) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the TaskQueue API @@ -227,7 +227,7 @@ request_body = Google::Apis::TaskqueueV1beta2::Task.new response = service.patch_task(project, taskqueue, task, new_lease_seconds, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the TaskQueue API @@ -264,4 +264,4 @@ request_body = Google::Apis::TaskqueueV1beta2::Task.new response = service.update_task(project, taskqueue, task, new_lease_seconds, request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_translate.v2.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_translate.v2.json.baseline index 0874d31d32..7c58409041 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_translate.v2.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_translate.v2.json.baseline @@ -19,7 +19,7 @@ q = [] # TODO: Update placeholder value. response = service.list_detections(q) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Translate API @@ -37,7 +37,7 @@ service.key = '' # TODO: Update placeholder with desired API key. response = service.list_languages() # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Translate API @@ -61,4 +61,4 @@ target = '' # TODO: Update placeholder value. response = service.list_translations(q, target) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_vision.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_vision.v1.json.baseline index 403b1688c9..73d60d1fac 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_vision.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_vision.v1.json.baseline @@ -29,4 +29,4 @@ request_body = Google::Apis::VisionV1::BatchAnnotateImagesRequest.new response = service.annotate_image(request_body) # TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +puts JSON.pretty_unparse(response.to_h)