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 005ad32562..7b4a382996 100644 --- a/src/main/resources/com/google/api/codegen/ruby/sample.snip +++ b/src/main/resources/com/google/api/codegen/ruby/sample.snip @@ -23,9 +23,6 @@ require 'googleauth' @end require '{@class.serviceRequirePath}' - @if class.hasResponse - require 'json' - @end {@class.serviceVarName} = {@class.serviceTypeNamespace}::{@class.serviceTypeName}.new @@ -116,14 +113,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_unparse({@class.pageStreaming.resourceValueVarName}.to_h) + puts String({@class.pageStreaming.resourceKeyVarName} << " => " << {@class.pageStreaming.resourceValueVarName}.to_json 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_unparse({@class.pageStreaming.resourceVarName}.to_h) + puts {@class.pageStreaming.resourceVarName}.to_json end @end @else @@ -131,7 +128,7 @@ {@class.responseVarName} = {@methodCall(class)}({@paramList(class.methodCallFieldVarNames)}) @# TODO: Change code below to process the `{@class.responseVarName}` object: - puts JSON.pretty_unparse({@class.responseVarName}.to_h) + puts {@class.responseVarName}.to_json @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 c03f038549..19eaaab62e 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 @@ -7,7 +7,6 @@ # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -24,7 +23,7 @@ id = 0 # TODO: Update placeholder value. response = service.get_account(id) # TODO: Change code below to process the `response` object: -puts JSON.pretty_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -33,7 +32,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -47,7 +45,7 @@ service.authorization = nil response = service.list_accounts() # TODO: Change code below to process the `response` object: -puts JSON.pretty_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -56,7 +54,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -77,7 +74,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -86,7 +83,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -107,7 +103,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -116,7 +112,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -133,7 +128,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -142,7 +137,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -156,7 +150,7 @@ service.authorization = nil response = service.list_billing_infos() # TODO: Change code below to process the `response` object: -puts JSON.pretty_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -165,7 +159,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -185,7 +178,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -194,7 +187,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -218,7 +210,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -227,7 +219,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -251,7 +242,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -288,7 +279,6 @@ service.add_creative_deal(account_id, buyer_creative_id, deal_id) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -308,7 +298,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -317,7 +307,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -334,7 +323,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -343,7 +332,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -360,7 +348,7 @@ end items.each do |creative| # TODO: Change code below to process each `creative` resource: - puts JSON.pretty_unparse(creative.to_h) + puts creative.to_json end # BEFORE RUNNING: # --------------- @@ -370,7 +358,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -390,7 +377,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -427,7 +414,6 @@ service.remove_creative_deal(account_id, buyer_creative_id, deal_id) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -447,7 +433,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -456,7 +442,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -476,7 +461,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -485,7 +470,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -503,7 +487,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -512,7 +496,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -532,7 +515,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -541,7 +524,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -561,7 +543,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -570,7 +552,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -588,7 +569,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -622,7 +603,6 @@ service.update_marketplace_private_auction_proposal(private_auction_id, request_ # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -645,7 +625,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -679,7 +659,6 @@ service.delete_pretargeting_config(account_id, config_id) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -699,7 +678,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -708,7 +687,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -728,7 +706,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -737,7 +715,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -754,7 +731,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -763,7 +740,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -787,7 +763,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -796,7 +772,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -820,7 +795,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -829,7 +804,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -846,7 +820,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -855,7 +829,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -869,7 +842,7 @@ service.authorization = nil response = service.search_products() # TODO: Change code below to process the `response` object: -puts JSON.pretty_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -878,7 +851,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -895,7 +867,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -904,7 +876,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -921,7 +892,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -930,7 +901,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -960,7 +930,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -969,7 +939,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -983,7 +952,7 @@ service.authorization = nil response = service.search_proposals() # TODO: Change code below to process the `response` object: -puts JSON.pretty_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -1014,7 +983,6 @@ service.proposal_setup_complete(proposal_id) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -1044,7 +1012,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Ad Exchange Buyer API @@ -1053,7 +1021,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new @@ -1070,4 +1037,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_unparse(response.to_h) +puts response.to_json 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 4aed7c55d5..21bbce1eb6 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 @@ -16,7 +16,6 @@ require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -29,7 +28,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -47,7 +46,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -60,7 +58,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -78,7 +76,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -94,7 +91,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -112,7 +109,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -128,7 +124,7 @@ end locations.each do |location| # TODO: Change code below to process each `location` resource: - puts JSON.pretty_unparse(location.to_h) + puts location.to_json end # BEFORE RUNNING: # --------------- @@ -147,7 +143,6 @@ end require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -163,7 +158,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -181,7 +176,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -197,7 +191,7 @@ end operations.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_unparse(operation.to_h) + puts operation.to_json end # BEFORE RUNNING: # --------------- @@ -216,7 +210,6 @@ end require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -233,7 +226,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -251,7 +244,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -267,7 +259,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -285,7 +277,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -301,7 +292,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -319,7 +310,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -335,7 +325,7 @@ end services.each do |service2| # TODO: Change code below to process each `service2` resource: - puts JSON.pretty_unparse(service2.to_h) + puts service2.to_json end # BEFORE RUNNING: # --------------- @@ -354,7 +344,6 @@ end require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -374,7 +363,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -392,7 +381,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -411,7 +399,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -429,7 +417,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -448,7 +435,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -466,7 +453,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -485,7 +471,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -503,7 +489,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -529,7 +514,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -547,7 +532,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -570,7 +554,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -588,7 +572,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -611,7 +594,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google App Engine Admin API @@ -629,7 +612,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -651,7 +633,7 @@ end instances.each do |instance| # TODO: Change code below to process each `instance` resource: - puts JSON.pretty_unparse(instance.to_h) + puts instance.to_json end # BEFORE RUNNING: # --------------- @@ -670,7 +652,6 @@ end require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -689,7 +670,7 @@ end versions.each do |version| # TODO: Change code below to process each `version` resource: - puts JSON.pretty_unparse(version.to_h) + puts version.to_json end # BEFORE RUNNING: # --------------- @@ -708,7 +689,6 @@ end require 'googleauth' require 'google/apis/appengine_v1beta5' -require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new @@ -731,4 +711,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_unparse(response.to_h) +puts response.to_json 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 cbe1bd6edd..a3815e89e8 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 @@ -46,7 +46,6 @@ service.delete_dataset(project_id, dataset_id) require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -62,7 +61,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -80,7 +79,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -96,7 +94,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -114,7 +112,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -130,7 +127,7 @@ end datasets.each do |dataset| # TODO: Change code below to process each `dataset` resource: - puts JSON.pretty_unparse(dataset.to_h) + puts dataset.to_json end # BEFORE RUNNING: # --------------- @@ -149,7 +146,6 @@ end require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -169,7 +165,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -187,7 +183,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -207,7 +202,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -225,7 +220,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -241,7 +235,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -259,7 +253,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -275,7 +268,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -293,7 +286,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -312,7 +304,7 @@ end errors.each do |error_proto| # TODO: Change code below to process each `error_proto` resource: - puts JSON.pretty_unparse(error_proto.to_h) + puts error_proto.to_json end # BEFORE RUNNING: # --------------- @@ -331,7 +323,6 @@ end require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -351,7 +342,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -369,7 +360,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -385,7 +375,7 @@ end jobs.each do |job| # TODO: Change code below to process each `job` resource: - puts JSON.pretty_unparse(job.to_h) + puts job.to_json end # BEFORE RUNNING: # --------------- @@ -404,7 +394,6 @@ end require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -420,7 +409,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -438,7 +427,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -451,7 +439,7 @@ end projects.each do |project| # TODO: Change code below to process each `project` resource: - puts JSON.pretty_unparse(project.to_h) + puts project.to_json end # BEFORE RUNNING: # --------------- @@ -470,7 +458,6 @@ end require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -492,7 +479,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -510,7 +497,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -532,7 +518,7 @@ end rows.each do |table_row| # TODO: Change code below to process each `table_row` resource: - puts JSON.pretty_unparse(table_row.to_h) + puts table_row.to_json end # BEFORE RUNNING: # --------------- @@ -584,7 +570,6 @@ service.delete_table(project_id, dataset_id, table_id) require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -603,7 +588,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -621,7 +606,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -640,7 +624,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -658,7 +642,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -677,7 +660,7 @@ end tables.each do |table| # TODO: Change code below to process each `table` resource: - puts JSON.pretty_unparse(table.to_h) + puts table.to_json end # BEFORE RUNNING: # --------------- @@ -696,7 +679,6 @@ end require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -719,7 +701,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the BigQuery API @@ -737,7 +719,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new @@ -760,4 +741,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_unparse(response.to_h) +puts response.to_json 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 0cd881ae5c..f6b481b794 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 @@ -16,7 +16,6 @@ require 'googleauth' require 'google/apis/cloudbilling_v1' -require 'json' service = Google::Apis::CloudbillingV1::CloudbillingService.new @@ -30,7 +29,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Billing API @@ -48,7 +47,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/cloudbilling_v1' -require 'json' service = Google::Apis::CloudbillingV1::CloudbillingService.new @@ -61,7 +59,7 @@ end billing_accounts.each do |billing_account| # TODO: Change code below to process each `billing_account` resource: - puts JSON.pretty_unparse(billing_account.to_h) + puts billing_account.to_json end # BEFORE RUNNING: # --------------- @@ -80,7 +78,6 @@ end require 'googleauth' require 'google/apis/cloudbilling_v1' -require 'json' service = Google::Apis::CloudbillingV1::CloudbillingService.new @@ -97,7 +94,7 @@ end project_billing_info2.each do |project_billing_info| # TODO: Change code below to process each `project_billing_info` resource: - puts JSON.pretty_unparse(project_billing_info.to_h) + puts project_billing_info.to_json end # BEFORE RUNNING: # --------------- @@ -116,7 +113,6 @@ end require 'googleauth' require 'google/apis/cloudbilling_v1' -require 'json' service = Google::Apis::CloudbillingV1::CloudbillingService.new @@ -130,7 +126,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Billing API @@ -148,7 +144,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/cloudbilling_v1' -require 'json' service = Google::Apis::CloudbillingV1::CloudbillingService.new @@ -166,4 +161,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_unparse(response.to_h) +puts response.to_json 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 ef90299351..a72c650098 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 @@ -16,7 +16,6 @@ require 'googleauth' require 'google/apis/clouddebugger_v2' -require 'json' service = Google::Apis::ClouddebuggerV2::CloudDebuggerService.new @@ -29,7 +28,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Debugger API @@ -47,7 +46,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/clouddebugger_v2' -require 'json' service = Google::Apis::ClouddebuggerV2::CloudDebuggerService.new @@ -67,7 +65,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Debugger API @@ -85,7 +83,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/clouddebugger_v2' -require 'json' service = Google::Apis::ClouddebuggerV2::CloudDebuggerService.new @@ -98,7 +95,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Debugger API @@ -146,7 +143,6 @@ service.delete_debugger_debuggee_breakpoint(debuggee_id, breakpoint_id) require 'googleauth' require 'google/apis/clouddebugger_v2' -require 'json' service = Google::Apis::ClouddebuggerV2::CloudDebuggerService.new @@ -162,7 +158,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Debugger API @@ -180,7 +176,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/clouddebugger_v2' -require 'json' service = Google::Apis::ClouddebuggerV2::CloudDebuggerService.new @@ -193,7 +188,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Debugger API @@ -211,7 +206,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/clouddebugger_v2' -require 'json' service = Google::Apis::ClouddebuggerV2::CloudDebuggerService.new @@ -227,7 +221,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Debugger API @@ -245,7 +239,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/clouddebugger_v2' -require 'json' service = Google::Apis::ClouddebuggerV2::CloudDebuggerService.new @@ -255,4 +248,4 @@ service.authorization = \ response = service.list_debugger_debuggees() # TODO: Change code below to process the `response` object: -puts JSON.pretty_unparse(response.to_h) +puts response.to_json 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 bbb2043455..4d86d50024 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 @@ -16,7 +16,6 @@ require 'googleauth' require 'google/apis/cloudmonitoring_v2beta2' -require 'json' service = Google::Apis::CloudmonitoringV2beta2::CloudMonitoringService.new @@ -32,7 +31,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Monitoring API @@ -50,7 +49,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/cloudmonitoring_v2beta2' -require 'json' service = Google::Apis::CloudmonitoringV2beta2::CloudMonitoringService.new @@ -66,7 +64,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Monitoring API @@ -84,7 +82,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/cloudmonitoring_v2beta2' -require 'json' service = Google::Apis::CloudmonitoringV2beta2::CloudMonitoringService.new @@ -103,7 +100,7 @@ end metrics.each do |metric_descriptor| # TODO: Change code below to process each `metric_descriptor` resource: - puts JSON.pretty_unparse(metric_descriptor.to_h) + puts metric_descriptor.to_json end # BEFORE RUNNING: # --------------- @@ -122,7 +119,6 @@ end require 'googleauth' require 'google/apis/cloudmonitoring_v2beta2' -require 'json' service = Google::Apis::CloudmonitoringV2beta2::CloudMonitoringService.new @@ -149,7 +145,7 @@ end timeseries2.each do |timeseries| # TODO: Change code below to process each `timeseries` resource: - puts JSON.pretty_unparse(timeseries.to_h) + puts timeseries.to_json end # BEFORE RUNNING: # --------------- @@ -168,7 +164,6 @@ end require 'googleauth' require 'google/apis/cloudmonitoring_v2beta2' -require 'json' service = Google::Apis::CloudmonitoringV2beta2::CloudMonitoringService.new @@ -184,7 +179,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Monitoring API @@ -202,7 +197,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/cloudmonitoring_v2beta2' -require 'json' service = Google::Apis::CloudmonitoringV2beta2::CloudMonitoringService.new @@ -229,5 +223,5 @@ end timeseries.each do |timeseries_descriptor| # TODO: Change code below to process each `timeseries_descriptor` resource: - puts JSON.pretty_unparse(timeseries_descriptor.to_h) + puts timeseries_descriptor.to_json 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 071add462c..87ca7a3efa 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 @@ -16,7 +16,6 @@ require 'googleauth' require 'google/apis/cloudresourcemanager_v1' -require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new @@ -29,7 +28,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -47,7 +46,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/cloudresourcemanager_v1' -require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new @@ -60,7 +58,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -78,7 +76,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/cloudresourcemanager_v1' -require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new @@ -96,7 +93,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -114,7 +111,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/cloudresourcemanager_v1' -require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new @@ -131,7 +127,7 @@ end organizations.each do |organization| # TODO: Change code below to process each `organization` resource: - puts JSON.pretty_unparse(organization.to_h) + puts organization.to_json end # BEFORE RUNNING: # --------------- @@ -150,7 +146,6 @@ end require 'googleauth' require 'google/apis/cloudresourcemanager_v1' -require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new @@ -168,7 +163,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -186,7 +181,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/cloudresourcemanager_v1' -require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new @@ -204,7 +198,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -222,7 +216,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/cloudresourcemanager_v1' -require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new @@ -235,7 +228,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -281,7 +274,6 @@ service.delete_project(project_id) require 'googleauth' require 'google/apis/cloudresourcemanager_v1' -require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new @@ -295,7 +287,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -313,7 +305,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/cloudresourcemanager_v1' -require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new @@ -330,7 +321,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -348,7 +339,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/cloudresourcemanager_v1' -require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new @@ -366,7 +356,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -384,7 +374,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/cloudresourcemanager_v1' -require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new @@ -397,7 +386,7 @@ end projects.each do |project| # TODO: Change code below to process each `project` resource: - puts JSON.pretty_unparse(project.to_h) + puts project.to_json end # BEFORE RUNNING: # --------------- @@ -416,7 +405,6 @@ end require 'googleauth' require 'google/apis/cloudresourcemanager_v1' -require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new @@ -434,7 +422,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -452,7 +440,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/cloudresourcemanager_v1' -require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new @@ -470,7 +457,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Resource Manager API @@ -519,7 +506,6 @@ service.undelete_project(project_id, request_body) require 'googleauth' require 'google/apis/cloudresourcemanager_v1' -require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new @@ -537,4 +523,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_unparse(response.to_h) +puts response.to_json 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 18d8856220..32a44e8bff 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 @@ -47,7 +47,6 @@ service.patch_project_traces(project_id, request_body) require 'googleauth' require 'google/apis/cloudtrace_v1' -require 'json' service = Google::Apis::CloudtraceV1::CloudTraceService.new @@ -63,7 +62,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Trace API @@ -81,7 +80,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/cloudtrace_v1' -require 'json' service = Google::Apis::CloudtraceV1::CloudTraceService.new @@ -97,5 +95,5 @@ end traces.each do |trace| # TODO: Change code below to process each `trace` resource: - puts JSON.pretty_unparse(trace.to_h) + puts trace.to_json 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 1628cfbce3..f329fb0558 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 @@ -46,7 +46,6 @@ service.delete_global_accounts_operation(project, operation) require 'googleauth' require 'google/apis/clouduseraccounts_beta' -require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new @@ -62,7 +61,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -80,7 +79,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/clouduseraccounts_beta' -require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new @@ -96,7 +94,7 @@ end items.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_unparse(operation.to_h) + puts operation.to_json end # BEFORE RUNNING: # --------------- @@ -115,7 +113,6 @@ end require 'googleauth' require 'google/apis/clouduseraccounts_beta' -require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new @@ -134,7 +131,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -152,7 +149,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/clouduseraccounts_beta' -require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new @@ -168,7 +164,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -186,7 +182,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/clouduseraccounts_beta' -require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new @@ -202,7 +197,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -220,7 +215,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/clouduseraccounts_beta' -require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new @@ -236,7 +230,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -254,7 +248,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/clouduseraccounts_beta' -require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new @@ -270,7 +263,7 @@ end items.each do |group| # TODO: Change code below to process each `group` resource: - puts JSON.pretty_unparse(group.to_h) + puts group.to_json end # BEFORE RUNNING: # --------------- @@ -289,7 +282,6 @@ end require 'googleauth' require 'google/apis/clouduseraccounts_beta' -require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new @@ -308,7 +300,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -326,7 +318,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/clouduseraccounts_beta' -require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new @@ -348,7 +339,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -366,7 +357,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/clouduseraccounts_beta' -require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new @@ -385,7 +375,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -403,7 +393,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/clouduseraccounts_beta' -require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new @@ -422,7 +411,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -440,7 +429,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/clouduseraccounts_beta' -require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new @@ -456,7 +444,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -474,7 +462,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/clouduseraccounts_beta' -require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new @@ -490,7 +477,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -508,7 +495,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/clouduseraccounts_beta' -require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new @@ -524,7 +510,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud User Accounts API @@ -542,7 +528,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/clouduseraccounts_beta' -require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new @@ -558,7 +543,7 @@ end items.each do |user| # TODO: Change code below to process each `user` resource: - puts JSON.pretty_unparse(user.to_h) + puts user.to_json end # BEFORE RUNNING: # --------------- @@ -577,7 +562,6 @@ end require 'googleauth' require 'google/apis/clouduseraccounts_beta' -require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new @@ -597,4 +581,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_unparse(response.to_h) +puts response.to_json 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 f6d3c24f59..d8270de3ac 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 @@ -16,7 +16,6 @@ require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -32,7 +31,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_unparse(addresses_scoped_list.to_h) + puts String(name << " => " << addresses_scoped_list.to_json end # BEFORE RUNNING: # --------------- @@ -51,7 +50,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -70,7 +68,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -88,7 +86,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -107,7 +104,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -125,7 +122,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -144,7 +140,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -162,7 +158,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -181,7 +176,7 @@ end items.each do |address| # TODO: Change code below to process each `address` resource: - puts JSON.pretty_unparse(address.to_h) + puts address.to_json end # BEFORE RUNNING: # --------------- @@ -200,7 +195,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -216,7 +210,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_unparse(autoscalers_scoped_list.to_h) + puts String(name << " => " << autoscalers_scoped_list.to_json end # BEFORE RUNNING: # --------------- @@ -235,7 +229,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -254,7 +247,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -272,7 +265,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -291,7 +283,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -309,7 +301,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -328,7 +319,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -346,7 +337,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -365,7 +355,7 @@ end items.each do |autoscaler| # TODO: Change code below to process each `autoscaler` resource: - puts JSON.pretty_unparse(autoscaler.to_h) + puts autoscaler.to_json end # BEFORE RUNNING: # --------------- @@ -384,7 +374,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -407,7 +396,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -425,7 +414,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -445,7 +433,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -463,7 +451,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -479,7 +466,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_unparse(backend_services_scoped_list.to_h) + puts String(name << " => " << backend_services_scoped_list.to_json end # BEFORE RUNNING: # --------------- @@ -498,7 +485,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -514,7 +500,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -532,7 +518,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -548,7 +533,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -566,7 +551,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -584,7 +568,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -602,7 +586,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -618,7 +601,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -636,7 +619,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -652,7 +634,7 @@ end items.each do |backend_service| # TODO: Change code below to process each `backend_service` resource: - puts JSON.pretty_unparse(backend_service.to_h) + puts backend_service.to_json end # BEFORE RUNNING: # --------------- @@ -671,7 +653,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -691,7 +672,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -709,7 +690,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -729,7 +709,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -747,7 +727,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -763,7 +742,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_unparse(disk_types_scoped_list.to_h) + puts String(name << " => " << disk_types_scoped_list.to_json end # BEFORE RUNNING: # --------------- @@ -782,7 +761,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -801,7 +779,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -819,7 +797,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -838,7 +815,7 @@ end items.each do |disk_type| # TODO: Change code below to process each `disk_type` resource: - puts JSON.pretty_unparse(disk_type.to_h) + puts disk_type.to_json end # BEFORE RUNNING: # --------------- @@ -857,7 +834,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -873,7 +849,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_unparse(disks_scoped_list.to_h) + puts String(name << " => " << disks_scoped_list.to_json end # BEFORE RUNNING: # --------------- @@ -892,7 +868,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -914,7 +889,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -932,7 +907,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -951,7 +925,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -969,7 +943,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -988,7 +961,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1006,7 +979,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1025,7 +997,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1043,7 +1015,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1062,7 +1033,7 @@ end items.each do |disk| # TODO: Change code below to process each `disk` resource: - puts JSON.pretty_unparse(disk.to_h) + puts disk.to_json end # BEFORE RUNNING: # --------------- @@ -1081,7 +1052,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1103,7 +1073,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1121,7 +1091,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1137,7 +1106,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1155,7 +1124,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1171,7 +1139,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1189,7 +1157,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1205,7 +1172,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1223,7 +1190,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1239,7 +1205,7 @@ end items.each do |firewall| # TODO: Change code below to process each `firewall` resource: - puts JSON.pretty_unparse(firewall.to_h) + puts firewall.to_json end # BEFORE RUNNING: # --------------- @@ -1258,7 +1224,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1278,7 +1243,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1296,7 +1261,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1316,7 +1280,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1334,7 +1298,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1350,7 +1313,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_unparse(forwarding_rules_scoped_list.to_h) + puts String(name << " => " << forwarding_rules_scoped_list.to_json end # BEFORE RUNNING: # --------------- @@ -1369,7 +1332,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1388,7 +1350,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1406,7 +1368,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1425,7 +1386,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1443,7 +1404,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1462,7 +1422,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1480,7 +1440,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1499,7 +1458,7 @@ end items.each do |forwarding_rule| # TODO: Change code below to process each `forwarding_rule` resource: - puts JSON.pretty_unparse(forwarding_rule.to_h) + puts forwarding_rule.to_json end # BEFORE RUNNING: # --------------- @@ -1518,7 +1477,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1540,7 +1498,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1558,7 +1516,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1574,7 +1531,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1592,7 +1549,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1608,7 +1564,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1626,7 +1582,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1642,7 +1597,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1660,7 +1615,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1676,7 +1630,7 @@ end items.each do |address| # TODO: Change code below to process each `address` resource: - puts JSON.pretty_unparse(address.to_h) + puts address.to_json end # BEFORE RUNNING: # --------------- @@ -1695,7 +1649,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1711,7 +1664,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1729,7 +1682,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1745,7 +1697,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1763,7 +1715,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1779,7 +1730,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1797,7 +1748,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1813,7 +1763,7 @@ end items.each do |forwarding_rule| # TODO: Change code below to process each `forwarding_rule` resource: - puts JSON.pretty_unparse(forwarding_rule.to_h) + puts forwarding_rule.to_json end # BEFORE RUNNING: # --------------- @@ -1832,7 +1782,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1851,7 +1800,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1869,7 +1818,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1885,7 +1833,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_unparse(operations_scoped_list.to_h) + puts String(name << " => " << operations_scoped_list.to_json end # BEFORE RUNNING: # --------------- @@ -1934,7 +1882,6 @@ service.delete_global_operation(project, operation) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1950,7 +1897,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -1968,7 +1915,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -1984,7 +1930,7 @@ end items.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_unparse(operation.to_h) + puts operation.to_json end # BEFORE RUNNING: # --------------- @@ -2003,7 +1949,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2019,7 +1964,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2037,7 +1982,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2053,7 +1997,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2071,7 +2015,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2087,7 +2030,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2105,7 +2048,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2121,7 +2063,7 @@ end items.each do |health_check| # TODO: Change code below to process each `health_check` resource: - puts JSON.pretty_unparse(health_check.to_h) + puts health_check.to_json end # BEFORE RUNNING: # --------------- @@ -2140,7 +2082,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2160,7 +2101,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2178,7 +2119,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2198,7 +2138,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2216,7 +2156,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2232,7 +2171,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2250,7 +2189,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2266,7 +2204,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2284,7 +2222,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2300,7 +2237,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2318,7 +2255,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2334,7 +2270,7 @@ end items.each do |http_health_check| # TODO: Change code below to process each `http_health_check` resource: - puts JSON.pretty_unparse(http_health_check.to_h) + puts http_health_check.to_json end # BEFORE RUNNING: # --------------- @@ -2353,7 +2289,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2373,7 +2308,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2391,7 +2326,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2411,7 +2345,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2429,7 +2363,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2445,7 +2378,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2463,7 +2396,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2479,7 +2411,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2497,7 +2429,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2513,7 +2444,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2531,7 +2462,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2547,7 +2477,7 @@ end items.each do |https_health_check| # TODO: Change code below to process each `https_health_check` resource: - puts JSON.pretty_unparse(https_health_check.to_h) + puts https_health_check.to_json end # BEFORE RUNNING: # --------------- @@ -2566,7 +2496,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2586,7 +2515,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2604,7 +2533,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2624,7 +2552,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2642,7 +2570,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2658,7 +2585,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2676,7 +2603,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2695,7 +2621,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2713,7 +2639,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2729,7 +2654,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2747,7 +2672,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2763,7 +2687,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2781,7 +2705,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2797,7 +2720,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2815,7 +2738,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2831,7 +2753,7 @@ end items.each do |image| # TODO: Change code below to process each `image` resource: - puts JSON.pretty_unparse(image.to_h) + puts image.to_json end # BEFORE RUNNING: # --------------- @@ -2850,7 +2772,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2872,7 +2793,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2890,7 +2811,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2906,7 +2826,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_unparse(instance_group_managers_scoped_list.to_h) + puts String(name << " => " << instance_group_managers_scoped_list.to_json end # BEFORE RUNNING: # --------------- @@ -2925,7 +2845,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2944,7 +2863,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -2962,7 +2881,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -2984,7 +2902,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3002,7 +2920,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3021,7 +2938,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3039,7 +2956,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3058,7 +2974,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3076,7 +2992,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3095,7 +3010,7 @@ end items.each do |instance_group_manager| # TODO: Change code below to process each `instance_group_manager` resource: - puts JSON.pretty_unparse(instance_group_manager.to_h) + puts instance_group_manager.to_json end # BEFORE RUNNING: # --------------- @@ -3114,7 +3029,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3133,7 +3047,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3151,7 +3065,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3173,7 +3086,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3191,7 +3104,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3215,7 +3127,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3233,7 +3145,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3255,7 +3166,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3273,7 +3184,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3295,7 +3205,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3313,7 +3223,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3335,7 +3244,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3353,7 +3262,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3369,7 +3277,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_unparse(instance_groups_scoped_list.to_h) + puts String(name << " => " << instance_groups_scoped_list.to_json end # BEFORE RUNNING: # --------------- @@ -3388,7 +3296,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3407,7 +3314,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3425,7 +3332,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3444,7 +3350,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3462,7 +3368,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3481,7 +3386,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3499,7 +3404,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3518,7 +3422,7 @@ end items.each do |instance_group| # TODO: Change code below to process each `instance_group` resource: - puts JSON.pretty_unparse(instance_group.to_h) + puts instance_group.to_json end # BEFORE RUNNING: # --------------- @@ -3537,7 +3441,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3562,7 +3465,7 @@ end items.each do |instance_with_named_ports| # TODO: Change code below to process each `instance_with_named_ports` resource: - puts JSON.pretty_unparse(instance_with_named_ports.to_h) + puts instance_with_named_ports.to_json end # BEFORE RUNNING: # --------------- @@ -3581,7 +3484,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3603,7 +3505,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3621,7 +3523,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3643,7 +3544,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3661,7 +3562,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3677,7 +3577,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3695,7 +3595,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3711,7 +3610,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3729,7 +3628,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3745,7 +3643,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3763,7 +3661,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3779,7 +3676,7 @@ end items.each do |instance_template| # TODO: Change code below to process each `instance_template` resource: - puts JSON.pretty_unparse(instance_template.to_h) + puts instance_template.to_json end # BEFORE RUNNING: # --------------- @@ -3798,7 +3695,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3823,7 +3719,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3841,7 +3737,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3857,7 +3752,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_unparse(instances_scoped_list.to_h) + puts String(name << " => " << instances_scoped_list.to_json end # BEFORE RUNNING: # --------------- @@ -3876,7 +3771,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3898,7 +3792,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3916,7 +3810,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3935,7 +3828,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3953,7 +3846,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -3978,7 +3870,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -3996,7 +3888,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4018,7 +3909,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4036,7 +3927,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4055,7 +3945,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4073,7 +3963,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4092,7 +3981,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4110,7 +3999,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4129,7 +4017,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4147,7 +4035,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4166,7 +4053,7 @@ end items.each do |instance| # TODO: Change code below to process each `instance` resource: - puts JSON.pretty_unparse(instance.to_h) + puts instance.to_json end # BEFORE RUNNING: # --------------- @@ -4185,7 +4072,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4204,7 +4090,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4222,7 +4108,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4247,7 +4132,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4265,7 +4150,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4287,7 +4171,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4305,7 +4189,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4327,7 +4210,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4345,7 +4228,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4367,7 +4249,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4385,7 +4267,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4407,7 +4288,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4425,7 +4306,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4447,7 +4327,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4465,7 +4345,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4484,7 +4363,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4502,7 +4381,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4524,7 +4402,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4542,7 +4420,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4561,7 +4438,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4579,7 +4456,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4595,7 +4471,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4613,7 +4489,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4629,7 +4504,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_unparse(machine_types_scoped_list.to_h) + puts String(name << " => " << machine_types_scoped_list.to_json end # BEFORE RUNNING: # --------------- @@ -4648,7 +4523,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4667,7 +4541,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4685,7 +4559,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4704,7 +4577,7 @@ end items.each do |machine_type| # TODO: Change code below to process each `machine_type` resource: - puts JSON.pretty_unparse(machine_type.to_h) + puts machine_type.to_json end # BEFORE RUNNING: # --------------- @@ -4723,7 +4596,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4739,7 +4611,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4757,7 +4629,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4773,7 +4644,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4791,7 +4662,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4807,7 +4677,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4825,7 +4695,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4841,7 +4710,7 @@ end items.each do |network| # TODO: Change code below to process each `network` resource: - puts JSON.pretty_unparse(network.to_h) + puts network.to_json end # BEFORE RUNNING: # --------------- @@ -4860,7 +4729,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4876,7 +4744,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4894,7 +4762,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4907,7 +4774,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4925,7 +4792,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4941,7 +4807,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4959,7 +4825,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -4975,7 +4840,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -4993,7 +4858,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5009,7 +4873,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5027,7 +4891,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5043,7 +4906,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5061,7 +4924,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5080,7 +4942,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5098,7 +4960,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5117,7 +4978,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5135,7 +4996,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5154,7 +5014,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5172,7 +5032,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5191,7 +5050,7 @@ end items.each do |autoscaler| # TODO: Change code below to process each `autoscaler` resource: - puts JSON.pretty_unparse(autoscaler.to_h) + puts autoscaler.to_json end # BEFORE RUNNING: # --------------- @@ -5210,7 +5069,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5233,7 +5091,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5251,7 +5109,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5271,7 +5128,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5289,7 +5146,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5308,7 +5164,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5326,7 +5182,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5345,7 +5200,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5363,7 +5218,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5384,7 +5238,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5402,7 +5256,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5421,7 +5274,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5439,7 +5292,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5458,7 +5310,7 @@ end items.each do |backend_service| # TODO: Change code below to process each `backend_service` resource: - puts JSON.pretty_unparse(backend_service.to_h) + puts backend_service.to_json end # BEFORE RUNNING: # --------------- @@ -5477,7 +5329,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5500,7 +5351,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5518,7 +5369,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5541,7 +5391,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5559,7 +5409,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5581,7 +5430,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5599,7 +5448,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5618,7 +5466,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5636,7 +5484,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5658,7 +5505,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5676,7 +5523,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5695,7 +5541,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5713,7 +5559,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5732,7 +5577,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5750,7 +5595,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5769,7 +5613,7 @@ end items.each do |instance_group_manager| # TODO: Change code below to process each `instance_group_manager` resource: - puts JSON.pretty_unparse(instance_group_manager.to_h) + puts instance_group_manager.to_json end # BEFORE RUNNING: # --------------- @@ -5788,7 +5632,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5807,7 +5650,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5825,7 +5668,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5847,7 +5689,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5865,7 +5707,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5887,7 +5728,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5905,7 +5746,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5927,7 +5767,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5945,7 +5785,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -5967,7 +5806,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -5985,7 +5824,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6004,7 +5842,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6022,7 +5860,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6041,7 +5878,7 @@ end items.each do |instance_group| # TODO: Change code below to process each `instance_group` resource: - puts JSON.pretty_unparse(instance_group.to_h) + puts instance_group.to_json end # BEFORE RUNNING: # --------------- @@ -6060,7 +5897,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6085,7 +5921,7 @@ end items.each do |instance_with_named_ports| # TODO: Change code below to process each `instance_with_named_ports` resource: - puts JSON.pretty_unparse(instance_with_named_ports.to_h) + puts instance_with_named_ports.to_json end # BEFORE RUNNING: # --------------- @@ -6104,7 +5940,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6126,7 +5961,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6177,7 +6012,6 @@ service.delete_region_operation(project, region, operation) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6196,7 +6030,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6214,7 +6048,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6233,7 +6066,7 @@ end items.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_unparse(operation.to_h) + puts operation.to_json end # BEFORE RUNNING: # --------------- @@ -6252,7 +6085,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6268,7 +6100,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6286,7 +6118,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6302,7 +6133,7 @@ end items.each do |region| # TODO: Change code below to process each `region` resource: - puts JSON.pretty_unparse(region.to_h) + puts region.to_json end # BEFORE RUNNING: # --------------- @@ -6321,7 +6152,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6337,7 +6167,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_unparse(routers_scoped_list.to_h) + puts String(name << " => " << routers_scoped_list.to_json end # BEFORE RUNNING: # --------------- @@ -6356,7 +6186,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6375,7 +6204,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6393,7 +6222,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6412,7 +6240,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6430,7 +6258,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6449,7 +6276,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6467,7 +6294,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6486,7 +6312,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6504,7 +6330,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6523,7 +6348,7 @@ end items.each do |router| # TODO: Change code below to process each `router` resource: - puts JSON.pretty_unparse(router.to_h) + puts router.to_json end # BEFORE RUNNING: # --------------- @@ -6542,7 +6367,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6565,7 +6389,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6583,7 +6407,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6605,7 +6428,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6623,7 +6446,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6646,7 +6468,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6664,7 +6486,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6680,7 +6501,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6698,7 +6519,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6714,7 +6534,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6732,7 +6552,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6748,7 +6567,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6766,7 +6585,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6782,7 +6600,7 @@ end items.each do |route| # TODO: Change code below to process each `route` resource: - puts JSON.pretty_unparse(route.to_h) + puts route.to_json end # BEFORE RUNNING: # --------------- @@ -6801,7 +6619,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6817,7 +6634,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6835,7 +6652,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6851,7 +6667,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6869,7 +6685,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6885,7 +6700,7 @@ end items.each do |snapshot| # TODO: Change code below to process each `snapshot` resource: - puts JSON.pretty_unparse(snapshot.to_h) + puts snapshot.to_json end # BEFORE RUNNING: # --------------- @@ -6904,7 +6719,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6920,7 +6734,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6938,7 +6752,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6954,7 +6767,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -6972,7 +6785,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -6988,7 +6800,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7006,7 +6818,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7022,7 +6833,7 @@ end items.each do |ssl_certificate| # TODO: Change code below to process each `ssl_certificate` resource: - puts JSON.pretty_unparse(ssl_certificate.to_h) + puts ssl_certificate.to_json end # BEFORE RUNNING: # --------------- @@ -7041,7 +6852,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7057,7 +6867,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_unparse(subnetworks_scoped_list.to_h) + puts String(name << " => " << subnetworks_scoped_list.to_json end # BEFORE RUNNING: # --------------- @@ -7076,7 +6886,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7095,7 +6904,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7113,7 +6922,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7135,7 +6943,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7153,7 +6961,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7172,7 +6979,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7190,7 +6997,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7209,7 +7015,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7227,7 +7033,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7246,7 +7051,7 @@ end items.each do |subnetwork| # TODO: Change code below to process each `subnetwork` resource: - puts JSON.pretty_unparse(subnetwork.to_h) + puts subnetwork.to_json end # BEFORE RUNNING: # --------------- @@ -7265,7 +7070,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7281,7 +7085,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7299,7 +7103,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7315,7 +7118,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7333,7 +7136,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7349,7 +7151,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7367,7 +7169,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7383,7 +7184,7 @@ end items.each do |target_http_proxy| # TODO: Change code below to process each `target_http_proxy` resource: - puts JSON.pretty_unparse(target_http_proxy.to_h) + puts target_http_proxy.to_json end # BEFORE RUNNING: # --------------- @@ -7402,7 +7203,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7421,7 +7221,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7439,7 +7239,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7455,7 +7254,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7473,7 +7272,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7489,7 +7287,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7507,7 +7305,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7523,7 +7320,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7541,7 +7338,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7557,7 +7353,7 @@ end items.each do |target_https_proxy| # TODO: Change code below to process each `target_https_proxy` resource: - puts JSON.pretty_unparse(target_https_proxy.to_h) + puts target_https_proxy.to_json end # BEFORE RUNNING: # --------------- @@ -7576,7 +7372,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7595,7 +7390,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7613,7 +7408,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7632,7 +7426,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7650,7 +7444,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7666,7 +7459,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_unparse(target_instances_scoped_list.to_h) + puts String(name << " => " << target_instances_scoped_list.to_json end # BEFORE RUNNING: # --------------- @@ -7685,7 +7478,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7704,7 +7496,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7722,7 +7514,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7741,7 +7532,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7759,7 +7550,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7778,7 +7568,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7796,7 +7586,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7815,7 +7604,7 @@ end items.each do |target_instance| # TODO: Change code below to process each `target_instance` resource: - puts JSON.pretty_unparse(target_instance.to_h) + puts target_instance.to_json end # BEFORE RUNNING: # --------------- @@ -7834,7 +7623,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7856,7 +7644,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7874,7 +7662,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7896,7 +7683,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7914,7 +7701,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7930,7 +7716,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_unparse(target_pools_scoped_list.to_h) + puts String(name << " => " << target_pools_scoped_list.to_json end # BEFORE RUNNING: # --------------- @@ -7949,7 +7735,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -7968,7 +7753,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -7986,7 +7771,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8005,7 +7789,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8023,7 +7807,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8045,7 +7828,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8063,7 +7846,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8082,7 +7864,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8100,7 +7882,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8119,7 +7900,7 @@ end items.each do |target_pool| # TODO: Change code below to process each `target_pool` resource: - puts JSON.pretty_unparse(target_pool.to_h) + puts target_pool.to_json end # BEFORE RUNNING: # --------------- @@ -8138,7 +7919,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8160,7 +7940,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8178,7 +7958,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8200,7 +7979,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8218,7 +7997,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8240,7 +8018,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8258,7 +8036,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8274,7 +8051,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8292,7 +8069,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8308,7 +8084,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8326,7 +8102,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8342,7 +8117,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8360,7 +8135,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8376,7 +8150,7 @@ end items.each do |target_ssl_proxy| # TODO: Change code below to process each `target_ssl_proxy` resource: - puts JSON.pretty_unparse(target_ssl_proxy.to_h) + puts target_ssl_proxy.to_json end # BEFORE RUNNING: # --------------- @@ -8395,7 +8169,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8414,7 +8187,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8432,7 +8205,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8451,7 +8223,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8469,7 +8241,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8488,7 +8259,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8506,7 +8277,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8522,7 +8292,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_unparse(target_vpn_gateways_scoped_list.to_h) + puts String(name << " => " << target_vpn_gateways_scoped_list.to_json end # BEFORE RUNNING: # --------------- @@ -8541,7 +8311,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8560,7 +8329,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8578,7 +8347,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8597,7 +8365,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8615,7 +8383,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8634,7 +8401,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8652,7 +8419,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8671,7 +8437,7 @@ end items.each do |target_vpn_gateway| # TODO: Change code below to process each `target_vpn_gateway` resource: - puts JSON.pretty_unparse(target_vpn_gateway.to_h) + puts target_vpn_gateway.to_json end # BEFORE RUNNING: # --------------- @@ -8690,7 +8456,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8706,7 +8471,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8724,7 +8489,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8740,7 +8504,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8758,7 +8522,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8774,7 +8537,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8792,7 +8555,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8811,7 +8573,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8829,7 +8591,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8845,7 +8606,7 @@ end items.each do |url_map| # TODO: Change code below to process each `url_map` resource: - puts JSON.pretty_unparse(url_map.to_h) + puts url_map.to_json end # BEFORE RUNNING: # --------------- @@ -8864,7 +8625,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8884,7 +8644,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8902,7 +8662,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8922,7 +8681,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8940,7 +8699,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8959,7 +8717,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -8977,7 +8735,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -8993,7 +8750,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_unparse(vpn_tunnels_scoped_list.to_h) + puts String(name << " => " << vpn_tunnels_scoped_list.to_json end # BEFORE RUNNING: # --------------- @@ -9012,7 +8769,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -9031,7 +8787,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -9049,7 +8805,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -9068,7 +8823,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -9086,7 +8841,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -9105,7 +8859,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -9123,7 +8877,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -9142,7 +8895,7 @@ end items.each do |vpn_tunnel| # TODO: Change code below to process each `vpn_tunnel` resource: - puts JSON.pretty_unparse(vpn_tunnel.to_h) + puts vpn_tunnel.to_json end # BEFORE RUNNING: # --------------- @@ -9194,7 +8947,6 @@ service.delete_zone_operation(project, zone, operation) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -9213,7 +8965,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -9231,7 +8983,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -9250,7 +9001,7 @@ end items.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_unparse(operation.to_h) + puts operation.to_json end # BEFORE RUNNING: # --------------- @@ -9269,7 +9020,6 @@ end require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -9285,7 +9035,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Compute Engine API @@ -9303,7 +9053,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new @@ -9319,5 +9068,5 @@ end items.each do |zone| # TODO: Change code below to process each `zone` resource: - puts JSON.pretty_unparse(zone.to_h) + puts zone.to_json 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 1c8b3c84fc..07dc7e7ae4 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 @@ -16,7 +16,6 @@ require 'googleauth' require 'google/apis/container_v1' -require 'json' service = Google::Apis::ContainerV1::ContainerService.new @@ -37,7 +36,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -55,7 +54,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/container_v1' -require 'json' service = Google::Apis::ContainerV1::ContainerService.new @@ -76,7 +74,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -94,7 +92,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/container_v1' -require 'json' service = Google::Apis::ContainerV1::ContainerService.new @@ -115,7 +112,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -133,7 +130,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/container_v1' -require 'json' service = Google::Apis::ContainerV1::ContainerService.new @@ -151,7 +147,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -169,7 +165,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/container_v1' -require 'json' service = Google::Apis::ContainerV1::ContainerService.new @@ -193,7 +188,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -211,7 +206,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/container_v1' -require 'json' service = Google::Apis::ContainerV1::ContainerService.new @@ -235,7 +229,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -253,7 +247,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/container_v1' -require 'json' service = Google::Apis::ContainerV1::ContainerService.new @@ -277,7 +270,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -295,7 +288,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/container_v1' -require 'json' service = Google::Apis::ContainerV1::ContainerService.new @@ -316,7 +308,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -334,7 +326,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/container_v1' -require 'json' service = Google::Apis::ContainerV1::ContainerService.new @@ -359,7 +350,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -377,7 +368,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/container_v1' -require 'json' service = Google::Apis::ContainerV1::ContainerService.new @@ -395,7 +385,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -413,7 +403,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/container_v1' -require 'json' service = Google::Apis::ContainerV1::ContainerService.new @@ -434,7 +423,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Container Engine API @@ -452,7 +441,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/container_v1' -require 'json' service = Google::Apis::ContainerV1::ContainerService.new @@ -470,4 +458,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_unparse(response.to_h) +puts response.to_json 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 204bb30e52..e657b4d23a 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 @@ -16,7 +16,6 @@ require 'googleauth' require 'google/apis/datastore_v1' -require 'json' service = Google::Apis::DatastoreV1::DatastoreService.new @@ -32,7 +31,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Datastore API @@ -50,7 +49,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/datastore_v1' -require 'json' service = Google::Apis::DatastoreV1::DatastoreService.new @@ -66,7 +64,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Datastore API @@ -84,7 +82,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/datastore_v1' -require 'json' service = Google::Apis::DatastoreV1::DatastoreService.new @@ -100,7 +97,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Datastore API @@ -118,7 +115,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/datastore_v1' -require 'json' service = Google::Apis::DatastoreV1::DatastoreService.new @@ -134,7 +130,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Datastore API @@ -152,7 +148,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/datastore_v1' -require 'json' service = Google::Apis::DatastoreV1::DatastoreService.new @@ -168,7 +163,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Datastore API @@ -186,7 +181,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/datastore_v1' -require 'json' service = Google::Apis::DatastoreV1::DatastoreService.new @@ -202,4 +196,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_unparse(response.to_h) +puts response.to_json 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 a528102280..1e989238c2 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 @@ -16,7 +16,6 @@ require 'googleauth' require 'google/apis/deploymentmanager_v2' -require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new @@ -35,7 +34,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -53,7 +52,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/deploymentmanager_v2' -require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new @@ -69,7 +67,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -87,7 +85,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/deploymentmanager_v2' -require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new @@ -103,7 +100,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -121,7 +118,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/deploymentmanager_v2' -require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new @@ -137,7 +133,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -155,7 +151,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/deploymentmanager_v2' -require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new @@ -171,7 +166,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -189,7 +184,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/deploymentmanager_v2' -require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new @@ -205,7 +199,7 @@ end deployments.each do |deployment| # TODO: Change code below to process each `deployment` resource: - puts JSON.pretty_unparse(deployment.to_h) + puts deployment.to_json end # BEFORE RUNNING: # --------------- @@ -224,7 +218,6 @@ end require 'googleauth' require 'google/apis/deploymentmanager_v2' -require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new @@ -244,7 +237,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -262,7 +255,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/deploymentmanager_v2' -require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new @@ -281,7 +273,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -299,7 +291,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/deploymentmanager_v2' -require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new @@ -318,7 +309,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -336,7 +327,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/deploymentmanager_v2' -require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new @@ -355,7 +345,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -373,7 +363,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/deploymentmanager_v2' -require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new @@ -393,7 +382,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -411,7 +400,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/deploymentmanager_v2' -require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new @@ -430,7 +418,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -448,7 +436,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/deploymentmanager_v2' -require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new @@ -467,7 +454,7 @@ end manifests.each do |manifest| # TODO: Change code below to process each `manifest` resource: - puts JSON.pretty_unparse(manifest.to_h) + puts manifest.to_json end # BEFORE RUNNING: # --------------- @@ -486,7 +473,6 @@ end require 'googleauth' require 'google/apis/deploymentmanager_v2' -require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new @@ -502,7 +488,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -520,7 +506,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/deploymentmanager_v2' -require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new @@ -536,7 +521,7 @@ end operations.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_unparse(operation.to_h) + puts operation.to_json end # BEFORE RUNNING: # --------------- @@ -555,7 +540,6 @@ end require 'googleauth' require 'google/apis/deploymentmanager_v2' -require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new @@ -574,7 +558,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Deployment Manager API @@ -592,7 +576,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/deploymentmanager_v2' -require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new @@ -611,7 +594,7 @@ end resources.each do |resource| # TODO: Change code below to process each `resource` resource: - puts JSON.pretty_unparse(resource.to_h) + puts resource.to_json end # BEFORE RUNNING: # --------------- @@ -630,7 +613,6 @@ end require 'googleauth' require 'google/apis/deploymentmanager_v2' -require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new @@ -646,5 +628,5 @@ end types.each do |type| # TODO: Change code below to process each `type` resource: - puts JSON.pretty_unparse(type.to_h) + puts type.to_json 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 7cc43b2864..5946bc789e 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 @@ -7,7 +7,6 @@ # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -27,7 +26,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -36,7 +35,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -56,7 +54,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -65,7 +63,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -82,7 +79,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -91,7 +88,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -111,7 +107,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -120,7 +116,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -137,7 +132,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -146,7 +141,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -166,7 +160,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -175,7 +169,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -195,7 +188,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -204,7 +197,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -224,7 +216,7 @@ end account_user_profiles.each do |account_user_profile| # TODO: Change code below to process each `account_user_profile` resource: - puts JSON.pretty_unparse(account_user_profile.to_h) + puts account_user_profile.to_json end # BEFORE RUNNING: # --------------- @@ -234,7 +226,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -258,7 +249,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -267,7 +258,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -288,7 +278,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -297,7 +287,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -317,7 +306,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -326,7 +315,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -346,7 +334,7 @@ end accounts.each do |account| # TODO: Change code below to process each `account` resource: - puts JSON.pretty_unparse(account.to_h) + puts account.to_json end # BEFORE RUNNING: # --------------- @@ -356,7 +344,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -380,7 +367,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -389,7 +376,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -410,7 +396,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -419,7 +405,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -439,7 +424,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -448,7 +433,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -468,7 +452,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -477,7 +461,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -497,7 +480,7 @@ end ads.each do |ad| # TODO: Change code below to process each `ad` resource: - puts JSON.pretty_unparse(ad.to_h) + puts ad.to_json end # BEFORE RUNNING: # --------------- @@ -507,7 +490,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -531,7 +513,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -540,7 +522,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -561,7 +542,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -595,7 +576,6 @@ service.delete_advertiser_group(profile_id, id) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -615,7 +595,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -624,7 +604,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -644,7 +623,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -653,7 +632,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -673,7 +651,7 @@ end advertiser_groups.each do |advertiser_group| # TODO: Change code below to process each `advertiser_group` resource: - puts JSON.pretty_unparse(advertiser_group.to_h) + puts advertiser_group.to_json end # BEFORE RUNNING: # --------------- @@ -683,7 +661,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -707,7 +684,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -716,7 +693,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -737,7 +713,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -746,7 +722,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -766,7 +741,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -775,7 +750,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -795,7 +769,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -804,7 +778,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -824,7 +797,7 @@ end advertisers.each do |advertiser| # TODO: Change code below to process each `advertiser` resource: - puts JSON.pretty_unparse(advertiser.to_h) + puts advertiser.to_json end # BEFORE RUNNING: # --------------- @@ -834,7 +807,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -858,7 +830,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -867,7 +839,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -888,7 +859,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -897,7 +868,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -914,7 +884,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -923,7 +893,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -946,7 +915,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -955,7 +924,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -978,7 +946,7 @@ end campaign_creative_associations.each do |campaign_creative_association| # TODO: Change code below to process each `campaign_creative_association` resource: - puts JSON.pretty_unparse(campaign_creative_association.to_h) + puts campaign_creative_association.to_json end # BEFORE RUNNING: # --------------- @@ -988,7 +956,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1008,7 +975,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1017,7 +984,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1043,7 +1009,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1052,7 +1018,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1072,7 +1037,7 @@ end campaigns.each do |campaign| # TODO: Change code below to process each `campaign` resource: - puts JSON.pretty_unparse(campaign.to_h) + puts campaign.to_json end # BEFORE RUNNING: # --------------- @@ -1082,7 +1047,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1106,7 +1070,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1115,7 +1079,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1136,7 +1099,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1145,7 +1108,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1165,7 +1127,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1174,7 +1136,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1194,7 +1155,7 @@ end change_logs.each do |change_log| # TODO: Change code below to process each `change_log` resource: - puts JSON.pretty_unparse(change_log.to_h) + puts change_log.to_json end # BEFORE RUNNING: # --------------- @@ -1204,7 +1165,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1221,7 +1181,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1230,7 +1190,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1250,7 +1209,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1259,7 +1218,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1276,7 +1234,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1310,7 +1268,6 @@ service.delete_content_category(profile_id, id) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1330,7 +1287,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1339,7 +1296,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1359,7 +1315,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1368,7 +1324,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1388,7 +1343,7 @@ end content_categories.each do |content_category| # TODO: Change code below to process each `content_category` resource: - puts JSON.pretty_unparse(content_category.to_h) + puts content_category.to_json end # BEFORE RUNNING: # --------------- @@ -1398,7 +1353,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1422,7 +1376,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1431,7 +1385,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1452,7 +1405,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1461,7 +1414,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1481,7 +1433,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1490,7 +1442,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1510,7 +1461,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1519,7 +1470,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1536,7 +1486,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1545,7 +1495,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1572,7 +1521,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1609,7 +1558,6 @@ service.delete_creative_field_value(profile_id, creative_field_id, id) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1632,7 +1580,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1641,7 +1589,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1664,7 +1611,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1673,7 +1620,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1696,7 +1642,7 @@ end creative_field_values.each do |creative_field_value| # TODO: Change code below to process each `creative_field_value` resource: - puts JSON.pretty_unparse(creative_field_value.to_h) + puts creative_field_value.to_json end # BEFORE RUNNING: # --------------- @@ -1706,7 +1652,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1733,7 +1678,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1742,7 +1687,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1766,7 +1710,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1800,7 +1744,6 @@ service.delete_creative_field(profile_id, id) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1820,7 +1763,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1829,7 +1772,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1849,7 +1791,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1858,7 +1800,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1878,7 +1819,7 @@ end creative_fields.each do |creative_field| # TODO: Change code below to process each `creative_field` resource: - puts JSON.pretty_unparse(creative_field.to_h) + puts creative_field.to_json end # BEFORE RUNNING: # --------------- @@ -1888,7 +1829,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1912,7 +1852,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1921,7 +1861,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1942,7 +1881,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1951,7 +1890,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -1971,7 +1909,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -1980,7 +1918,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2000,7 +1937,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2009,7 +1946,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2029,7 +1965,7 @@ end creative_groups.each do |creative_group| # TODO: Change code below to process each `creative_group` resource: - puts JSON.pretty_unparse(creative_group.to_h) + puts creative_group.to_json end # BEFORE RUNNING: # --------------- @@ -2039,7 +1975,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2063,7 +1998,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2072,7 +2007,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2093,7 +2027,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2102,7 +2036,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2122,7 +2055,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2131,7 +2064,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2151,7 +2083,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2160,7 +2092,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2180,7 +2111,7 @@ end creatives.each do |creative| # TODO: Change code below to process each `creative` resource: - puts JSON.pretty_unparse(creative.to_h) + puts creative.to_json end # BEFORE RUNNING: # --------------- @@ -2190,7 +2121,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2214,7 +2144,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2223,7 +2153,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2244,7 +2173,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2253,7 +2182,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2276,7 +2204,7 @@ end items.each do |dimension_value| # TODO: Change code below to process each `dimension_value` resource: - puts JSON.pretty_unparse(dimension_value.to_h) + puts dimension_value.to_json end # BEFORE RUNNING: # --------------- @@ -2286,7 +2214,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2306,7 +2233,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2315,7 +2242,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2335,7 +2261,7 @@ end directory_site_contacts.each do |directory_site_contact| # TODO: Change code below to process each `directory_site_contact` resource: - puts JSON.pretty_unparse(directory_site_contact.to_h) + puts directory_site_contact.to_json end # BEFORE RUNNING: # --------------- @@ -2345,7 +2271,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2365,7 +2290,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2374,7 +2299,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2394,7 +2318,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2403,7 +2327,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2423,7 +2346,7 @@ end directory_sites.each do |directory_site| # TODO: Change code below to process each `directory_site` resource: - puts JSON.pretty_unparse(directory_site.to_h) + puts directory_site.to_json end # BEFORE RUNNING: # --------------- @@ -2465,7 +2388,6 @@ service.delete_dynamic_targeting_key(profile_id, object_id_, name, object_type) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2485,7 +2407,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2494,7 +2416,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2511,7 +2432,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2545,7 +2466,6 @@ service.delete_event_tag(profile_id, id) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2565,7 +2485,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2574,7 +2494,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2594,7 +2513,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2603,7 +2522,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2620,7 +2538,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2629,7 +2547,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2653,7 +2570,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2662,7 +2579,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2683,7 +2599,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2692,7 +2608,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2716,7 +2631,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2725,7 +2640,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2745,7 +2659,7 @@ end items.each do |file| # TODO: Change code below to process each `file` resource: - puts JSON.pretty_unparse(file.to_h) + puts file.to_json end # BEFORE RUNNING: # --------------- @@ -2780,7 +2694,6 @@ service.delete_floodlight_activity(profile_id, id) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2797,7 +2710,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2806,7 +2719,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2826,7 +2738,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2835,7 +2747,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2855,7 +2766,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2864,7 +2775,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2884,7 +2794,7 @@ end floodlight_activities.each do |floodlight_activity| # TODO: Change code below to process each `floodlight_activity` resource: - puts JSON.pretty_unparse(floodlight_activity.to_h) + puts floodlight_activity.to_json end # BEFORE RUNNING: # --------------- @@ -2894,7 +2804,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2918,7 +2827,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2927,7 +2836,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2948,7 +2856,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2957,7 +2865,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -2977,7 +2884,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -2986,7 +2893,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3006,7 +2912,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3015,7 +2921,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3035,7 +2940,7 @@ end floodlight_activity_groups.each do |floodlight_activity_group| # TODO: Change code below to process each `floodlight_activity_group` resource: - puts JSON.pretty_unparse(floodlight_activity_group.to_h) + puts floodlight_activity_group.to_json end # BEFORE RUNNING: # --------------- @@ -3045,7 +2950,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3069,7 +2973,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3078,7 +2982,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3099,7 +3002,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3108,7 +3011,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3128,7 +3030,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3137,7 +3039,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3154,7 +3055,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3163,7 +3064,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3187,7 +3087,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3196,7 +3096,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3217,7 +3116,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3226,7 +3125,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3249,7 +3147,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3258,7 +3156,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3281,7 +3178,7 @@ end inventory_items.each do |inventory_item| # TODO: Change code below to process each `inventory_item` resource: - puts JSON.pretty_unparse(inventory_item.to_h) + puts inventory_item.to_json end # BEFORE RUNNING: # --------------- @@ -3319,7 +3216,6 @@ service.delete_landing_page(profile_id, campaign_id, id) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3342,7 +3238,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3351,7 +3247,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3374,7 +3269,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3383,7 +3278,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3403,7 +3297,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3412,7 +3306,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3439,7 +3332,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3448,7 +3341,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3472,7 +3364,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3481,7 +3373,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3498,7 +3389,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3507,7 +3398,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3524,7 +3414,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3533,7 +3423,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3553,7 +3442,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3562,7 +3451,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3579,7 +3467,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3588,7 +3476,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3608,7 +3495,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3617,7 +3504,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3634,7 +3520,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3643,7 +3529,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3663,7 +3548,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3672,7 +3557,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3689,7 +3573,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3698,7 +3582,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3721,7 +3604,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3730,7 +3613,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3753,7 +3635,7 @@ end order_documents.each do |order_document| # TODO: Change code below to process each `order_document` resource: - puts JSON.pretty_unparse(order_document.to_h) + puts order_document.to_json end # BEFORE RUNNING: # --------------- @@ -3763,7 +3645,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3786,7 +3667,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3795,7 +3676,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3818,7 +3698,7 @@ end orders.each do |order| # TODO: Change code below to process each `order` resource: - puts JSON.pretty_unparse(order.to_h) + puts order.to_json end # BEFORE RUNNING: # --------------- @@ -3828,7 +3708,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3848,7 +3727,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3857,7 +3736,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3877,7 +3755,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3886,7 +3764,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3906,7 +3783,7 @@ end placement_groups.each do |placement_group| # TODO: Change code below to process each `placement_group` resource: - puts JSON.pretty_unparse(placement_group.to_h) + puts placement_group.to_json end # BEFORE RUNNING: # --------------- @@ -3916,7 +3793,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3940,7 +3816,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -3949,7 +3825,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -3970,7 +3845,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4004,7 +3879,6 @@ service.delete_placement_strategy(profile_id, id) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4024,7 +3898,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4033,7 +3907,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4053,7 +3926,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4062,7 +3935,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4082,7 +3954,7 @@ end placement_strategies.each do |placement_strategy| # TODO: Change code below to process each `placement_strategy` resource: - puts JSON.pretty_unparse(placement_strategy.to_h) + puts placement_strategy.to_json end # BEFORE RUNNING: # --------------- @@ -4092,7 +3964,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4116,7 +3987,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4125,7 +3996,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4146,7 +4016,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4155,7 +4025,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4172,7 +4041,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4181,7 +4050,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4201,7 +4069,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4210,7 +4078,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4230,7 +4097,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4239,7 +4106,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4259,7 +4125,7 @@ end placements.each do |placement| # TODO: Change code below to process each `placement` resource: - puts JSON.pretty_unparse(placement.to_h) + puts placement.to_json end # BEFORE RUNNING: # --------------- @@ -4269,7 +4135,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4293,7 +4158,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4302,7 +4167,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4323,7 +4187,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4332,7 +4196,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4352,7 +4215,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4361,7 +4224,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4378,7 +4240,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4387,7 +4249,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4407,7 +4268,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4416,7 +4277,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4433,7 +4293,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4442,7 +4302,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4462,7 +4321,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4471,7 +4330,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4491,7 +4349,7 @@ end projects.each do |project| # TODO: Change code below to process each `project` resource: - puts JSON.pretty_unparse(project.to_h) + puts project.to_json end # BEFORE RUNNING: # --------------- @@ -4501,7 +4359,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4518,7 +4375,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4527,7 +4384,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4547,7 +4403,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4556,7 +4412,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4580,7 +4435,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4589,7 +4444,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4610,7 +4464,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4619,7 +4473,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4639,7 +4492,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4648,7 +4501,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4668,7 +4520,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4677,7 +4529,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4700,7 +4551,7 @@ end remarketing_lists.each do |remarketing_list| # TODO: Change code below to process each `remarketing_list` resource: - puts JSON.pretty_unparse(remarketing_list.to_h) + puts remarketing_list.to_json end # BEFORE RUNNING: # --------------- @@ -4710,7 +4561,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4734,7 +4584,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4743,7 +4593,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4764,7 +4613,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4773,7 +4622,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4793,7 +4641,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4827,7 +4675,6 @@ service.delete_report(profile_id, report_id) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4854,7 +4701,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4863,7 +4710,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4886,7 +4732,7 @@ end items.each do |file| # TODO: Change code below to process each `file` resource: - puts JSON.pretty_unparse(file.to_h) + puts file.to_json end # BEFORE RUNNING: # --------------- @@ -4896,7 +4742,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4916,7 +4761,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4925,7 +4770,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4945,7 +4789,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -4954,7 +4798,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -4974,7 +4817,7 @@ end items.each do |report| # TODO: Change code below to process each `report` resource: - puts JSON.pretty_unparse(report.to_h) + puts report.to_json end # BEFORE RUNNING: # --------------- @@ -4984,7 +4827,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5008,7 +4850,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5017,7 +4859,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5037,7 +4878,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5046,7 +4887,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5070,7 +4910,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5079,7 +4919,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5099,7 +4938,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5108,7 +4947,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5128,7 +4966,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5137,7 +4975,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5157,7 +4994,7 @@ end sites.each do |site| # TODO: Change code below to process each `site` resource: - puts JSON.pretty_unparse(site.to_h) + puts site.to_json end # BEFORE RUNNING: # --------------- @@ -5167,7 +5004,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5191,7 +5027,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5200,7 +5036,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5221,7 +5056,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5230,7 +5065,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5250,7 +5084,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5259,7 +5093,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5279,7 +5112,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5288,7 +5121,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5305,7 +5137,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5314,7 +5146,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5334,7 +5165,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5343,7 +5174,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5363,7 +5193,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5372,7 +5202,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5392,7 +5221,7 @@ end subaccounts.each do |subaccount| # TODO: Change code below to process each `subaccount` resource: - puts JSON.pretty_unparse(subaccount.to_h) + puts subaccount.to_json end # BEFORE RUNNING: # --------------- @@ -5402,7 +5231,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5426,7 +5254,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5435,7 +5263,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5456,7 +5283,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5465,7 +5292,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5485,7 +5311,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5494,7 +5320,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5517,7 +5342,7 @@ end targetable_remarketing_lists.each do |targetable_remarketing_list| # TODO: Change code below to process each `targetable_remarketing_list` resource: - puts JSON.pretty_unparse(targetable_remarketing_list.to_h) + puts targetable_remarketing_list.to_json end # BEFORE RUNNING: # --------------- @@ -5527,7 +5352,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5547,7 +5371,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5556,7 +5380,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5576,7 +5399,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5585,7 +5408,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5605,7 +5427,7 @@ end targeting_templates.each do |targeting_template| # TODO: Change code below to process each `targeting_template` resource: - puts JSON.pretty_unparse(targeting_template.to_h) + puts targeting_template.to_json end # BEFORE RUNNING: # --------------- @@ -5615,7 +5437,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5639,7 +5460,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5648,7 +5469,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5669,7 +5489,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5678,7 +5498,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5696,7 +5515,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5705,7 +5524,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5720,7 +5538,7 @@ service.authorization = nil response = service.list_user_profiles() # TODO: Change code below to process the `response` object: -puts JSON.pretty_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5729,7 +5547,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5749,7 +5566,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5758,7 +5575,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5775,7 +5591,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5784,7 +5600,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5804,7 +5619,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5813,7 +5628,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5830,7 +5644,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5864,7 +5678,6 @@ service.delete_user_role(profile_id, id) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5884,7 +5697,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5893,7 +5706,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5913,7 +5725,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5922,7 +5734,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5942,7 +5753,7 @@ end user_roles.each do |user_role| # TODO: Change code below to process each `user_role` resource: - puts JSON.pretty_unparse(user_role.to_h) + puts user_role.to_json end # BEFORE RUNNING: # --------------- @@ -5952,7 +5763,6 @@ end # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -5976,7 +5786,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the DCM/DFA Reporting And Trafficking API @@ -5985,7 +5795,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new @@ -6006,4 +5815,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_unparse(response.to_h) +puts response.to_json 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 645156ec07..5254db5248 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 @@ -16,7 +16,6 @@ require 'googleauth' require 'google/apis/dns_v1' -require 'json' service = Google::Apis::DnsV1::DnsService.new @@ -35,7 +34,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud DNS API @@ -53,7 +52,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/dns_v1' -require 'json' service = Google::Apis::DnsV1::DnsService.new @@ -72,7 +70,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud DNS API @@ -90,7 +88,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/dns_v1' -require 'json' service = Google::Apis::DnsV1::DnsService.new @@ -109,7 +106,7 @@ end changes.each do |change| # TODO: Change code below to process each `change` resource: - puts JSON.pretty_unparse(change.to_h) + puts change.to_json end # BEFORE RUNNING: # --------------- @@ -128,7 +125,6 @@ end require 'googleauth' require 'google/apis/dns_v1' -require 'json' service = Google::Apis::DnsV1::DnsService.new @@ -144,7 +140,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud DNS API @@ -192,7 +188,6 @@ service.delete_managed_zone(project, managed_zone) require 'googleauth' require 'google/apis/dns_v1' -require 'json' service = Google::Apis::DnsV1::DnsService.new @@ -208,7 +203,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud DNS API @@ -226,7 +221,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/dns_v1' -require 'json' service = Google::Apis::DnsV1::DnsService.new @@ -242,7 +236,7 @@ end managed_zones.each do |managed_zone| # TODO: Change code below to process each `managed_zone` resource: - puts JSON.pretty_unparse(managed_zone.to_h) + puts managed_zone.to_json end # BEFORE RUNNING: # --------------- @@ -261,7 +255,6 @@ end require 'googleauth' require 'google/apis/dns_v1' -require 'json' service = Google::Apis::DnsV1::DnsService.new @@ -274,7 +267,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud DNS API @@ -292,7 +285,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/dns_v1' -require 'json' service = Google::Apis::DnsV1::DnsService.new @@ -311,5 +303,5 @@ end rrsets.each do |resource_record_set| # TODO: Change code below to process each `resource_record_set` resource: - puts JSON.pretty_unparse(resource_record_set.to_h) + puts resource_record_set.to_json 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 aa289808bd..1dca655c7d 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 @@ -7,11 +7,10 @@ # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/foo_v1' -require 'json' service = Google::Apis::FooV1::FooService.new response = service.get_bar_baz() # TODO: Change code below to process the `response` object: -puts JSON.pretty_unparse(response.to_h) +puts response.to_json 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 b277c40ef9..e8b218c5ab 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 @@ -16,7 +16,6 @@ require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -29,7 +28,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -47,7 +46,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -60,7 +58,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -105,7 +103,6 @@ service.delete_annotation(annotation_id) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -118,7 +115,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -136,7 +133,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -153,7 +149,7 @@ end annotations.each do |annotation| # TODO: Change code below to process each `annotation` resource: - puts JSON.pretty_unparse(annotation.to_h) + puts annotation.to_json end # BEFORE RUNNING: # --------------- @@ -172,7 +168,6 @@ end require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -189,7 +184,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -207,7 +202,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -220,7 +214,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -265,7 +259,6 @@ service.delete_annotationset(annotation_set_id) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -278,7 +271,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -296,7 +289,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -313,7 +305,7 @@ end annotation_sets.each do |annotation_set| # TODO: Change code below to process each `annotation_set` resource: - puts JSON.pretty_unparse(annotation_set.to_h) + puts annotation_set.to_json end # BEFORE RUNNING: # --------------- @@ -332,7 +324,6 @@ end require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -349,7 +340,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -367,7 +358,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -380,7 +370,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -425,7 +415,6 @@ service.delete_call_set(call_set_id) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -438,7 +427,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -456,7 +445,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -473,7 +461,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -491,7 +479,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -508,7 +495,7 @@ end call_sets.each do |call_set| # TODO: Change code below to process each `call_set` resource: - puts JSON.pretty_unparse(call_set.to_h) + puts call_set.to_json end # BEFORE RUNNING: # --------------- @@ -527,7 +514,6 @@ end require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -540,7 +526,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -585,7 +571,6 @@ service.delete_dataset(dataset_id) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -598,7 +583,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -616,7 +601,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -632,7 +616,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -650,7 +634,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -663,7 +646,7 @@ end datasets.each do |dataset| # TODO: Change code below to process each `dataset` resource: - puts JSON.pretty_unparse(dataset.to_h) + puts dataset.to_json end # BEFORE RUNNING: # --------------- @@ -682,7 +665,6 @@ end require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -699,7 +681,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -717,7 +699,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -733,7 +714,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -751,7 +732,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -767,7 +747,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -785,7 +765,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -801,7 +780,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -849,7 +828,6 @@ service.cancel_operation(name, request_body) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -862,7 +840,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -880,7 +858,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -896,7 +873,7 @@ end operations.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_unparse(operation.to_h) + puts operation.to_json end # BEFORE RUNNING: # --------------- @@ -915,7 +892,6 @@ end require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -931,7 +907,7 @@ end coverage_buckets.each do |coverage_bucket| # TODO: Change code below to process each `coverage_bucket` resource: - puts JSON.pretty_unparse(coverage_bucket.to_h) + puts coverage_bucket.to_json end # BEFORE RUNNING: # --------------- @@ -978,7 +954,6 @@ service.delete_read_group_set(read_group_set_id) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -995,7 +970,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1013,7 +988,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1026,7 +1000,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1044,7 +1018,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1057,7 +1030,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1075,7 +1048,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1093,7 +1065,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1111,7 +1083,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1128,7 +1099,7 @@ end read_group_sets.each do |read_group_set| # TODO: Change code below to process each `read_group_set` resource: - puts JSON.pretty_unparse(read_group_set.to_h) + puts read_group_set.to_json end # BEFORE RUNNING: # --------------- @@ -1147,7 +1118,6 @@ end require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1164,7 +1134,7 @@ end alignments.each do |read| # TODO: Change code below to process each `read` resource: - puts JSON.pretty_unparse(read.to_h) + puts read.to_json end # BEFORE RUNNING: # --------------- @@ -1183,7 +1153,6 @@ end require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1196,7 +1165,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1214,7 +1183,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1230,7 +1198,7 @@ end sequence.each do |item| # TODO: Change code below to process each `item` resource: - puts JSON.pretty_unparse(item.to_h) + puts item.to_json end # BEFORE RUNNING: # --------------- @@ -1249,7 +1217,6 @@ end require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1262,7 +1229,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1280,7 +1247,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1297,7 +1263,7 @@ end references.each do |reference| # TODO: Change code below to process each `reference` resource: - puts JSON.pretty_unparse(reference.to_h) + puts reference.to_json end # BEFORE RUNNING: # --------------- @@ -1316,7 +1282,6 @@ end require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1329,7 +1294,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1347,7 +1312,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1364,7 +1328,7 @@ end reference_sets.each do |reference_set| # TODO: Change code below to process each `reference_set` resource: - puts JSON.pretty_unparse(reference_set.to_h) + puts reference_set.to_json end # BEFORE RUNNING: # --------------- @@ -1383,7 +1347,6 @@ end require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1396,7 +1359,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1441,7 +1404,6 @@ service.delete_variant(variant_id) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1454,7 +1416,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1472,7 +1434,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1485,7 +1446,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1530,7 +1491,6 @@ service.merge_variants(request_body) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1547,7 +1507,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1565,7 +1525,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1582,7 +1541,7 @@ end variants.each do |variant| # TODO: Change code below to process each `variant` resource: - puts JSON.pretty_unparse(variant.to_h) + puts variant.to_json end # BEFORE RUNNING: # --------------- @@ -1601,7 +1560,6 @@ end require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1614,7 +1572,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1632,7 +1590,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1645,7 +1602,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1690,7 +1647,6 @@ service.delete_variantset(variant_set_id) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1707,7 +1663,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1725,7 +1681,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1738,7 +1693,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1756,7 +1711,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1773,7 +1727,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Genomics API @@ -1791,7 +1745,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/genomics_v1' -require 'json' service = Google::Apis::GenomicsV1::GenomicsService.new @@ -1808,5 +1761,5 @@ end variant_sets.each do |variant_set| # TODO: Change code below to process each `variant_set` resource: - puts JSON.pretty_unparse(variant_set.to_h) + puts variant_set.to_json 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 fb4954a855..9ef9ac51cb 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 @@ -48,7 +48,6 @@ service.delete_billing_account_log(log_name) require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new @@ -66,7 +65,7 @@ end log_names.each do |item| # TODO: Change code below to process each `item` resource: - puts JSON.pretty_unparse(item.to_h) + puts item.to_json end # BEFORE RUNNING: # --------------- @@ -85,7 +84,6 @@ end require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new @@ -102,7 +100,7 @@ end entries.each do |log_entry| # TODO: Change code below to process each `log_entry` resource: - puts JSON.pretty_unparse(log_entry.to_h) + puts log_entry.to_json end # BEFORE RUNNING: # --------------- @@ -121,7 +119,6 @@ end require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new @@ -134,7 +131,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Logging API @@ -152,7 +149,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new @@ -165,7 +161,7 @@ end resource_descriptors.each do |monitored_resource_descriptor| # TODO: Change code below to process each `monitored_resource_descriptor` resource: - puts JSON.pretty_unparse(monitored_resource_descriptor.to_h) + puts monitored_resource_descriptor.to_json end # BEFORE RUNNING: # --------------- @@ -216,7 +212,6 @@ service.delete_organization_log(log_name) require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new @@ -234,7 +229,7 @@ end log_names.each do |item| # TODO: Change code below to process each `item` resource: - puts JSON.pretty_unparse(item.to_h) + puts item.to_json end # BEFORE RUNNING: # --------------- @@ -285,7 +280,6 @@ service.delete_log(log_name) require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new @@ -303,7 +297,7 @@ end log_names.each do |item| # TODO: Change code below to process each `item` resource: - puts JSON.pretty_unparse(item.to_h) + puts item.to_json end # BEFORE RUNNING: # --------------- @@ -322,7 +316,6 @@ end require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new @@ -340,7 +333,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Logging API @@ -386,7 +379,6 @@ service.delete_project_metric(metric_name) require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new @@ -400,7 +392,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Logging API @@ -418,7 +410,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new @@ -435,7 +426,7 @@ end metrics.each do |log_metric| # TODO: Change code below to process each `log_metric` resource: - puts JSON.pretty_unparse(log_metric.to_h) + puts log_metric.to_json end # BEFORE RUNNING: # --------------- @@ -454,7 +445,6 @@ end require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new @@ -474,7 +464,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Logging API @@ -492,7 +482,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new @@ -511,7 +500,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Logging API @@ -561,7 +550,6 @@ service.delete_project_sink(sink_name) require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new @@ -577,7 +565,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Stackdriver Logging API @@ -595,7 +583,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new @@ -612,7 +599,7 @@ end sinks.each do |log_sink| # TODO: Change code below to process each `log_sink` resource: - puts JSON.pretty_unparse(log_sink.to_h) + puts log_sink.to_json end # BEFORE RUNNING: # --------------- @@ -631,7 +618,6 @@ end require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new @@ -652,4 +638,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_unparse(response.to_h) +puts response.to_json 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 326ea39e42..4eba31feec 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 @@ -16,7 +16,6 @@ require 'googleauth' require 'google/apis/prediction_v1_6' -require 'json' service = Google::Apis::PredictionV1_6::PredictionService.new @@ -35,7 +34,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Prediction API @@ -53,7 +52,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/prediction_v1_6' -require 'json' service = Google::Apis::PredictionV1_6::PredictionService.new @@ -69,7 +67,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Prediction API @@ -117,7 +115,6 @@ service.delete_trained_model(project, id) require 'googleauth' require 'google/apis/prediction_v1_6' -require 'json' service = Google::Apis::PredictionV1_6::PredictionService.new @@ -133,7 +130,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Prediction API @@ -151,7 +148,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/prediction_v1_6' -require 'json' service = Google::Apis::PredictionV1_6::PredictionService.new @@ -167,7 +163,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Prediction API @@ -185,7 +181,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/prediction_v1_6' -require 'json' service = Google::Apis::PredictionV1_6::PredictionService.new @@ -201,7 +196,7 @@ end items.each do |insert2| # TODO: Change code below to process each `insert2` resource: - puts JSON.pretty_unparse(insert2.to_h) + puts insert2.to_json end # BEFORE RUNNING: # --------------- @@ -220,7 +215,6 @@ end require 'googleauth' require 'google/apis/prediction_v1_6' -require 'json' service = Google::Apis::PredictionV1_6::PredictionService.new @@ -239,7 +233,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Prediction API @@ -257,7 +251,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/prediction_v1_6' -require 'json' service = Google::Apis::PredictionV1_6::PredictionService.new @@ -277,4 +270,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_unparse(response.to_h) +puts response.to_json 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 06b023a207..a2c4a8a530 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 @@ -16,7 +16,6 @@ require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new @@ -31,7 +30,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -49,7 +48,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new @@ -67,7 +65,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -85,7 +83,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new @@ -103,7 +100,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -152,7 +149,6 @@ service.acknowledge_subscription(subscription, request_body) require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new @@ -174,7 +170,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -220,7 +216,6 @@ service.delete_subscription(subscription) require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new @@ -234,7 +229,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -252,7 +247,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new @@ -267,7 +261,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -285,7 +279,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new @@ -302,7 +295,7 @@ end subscriptions.each do |subscription| # TODO: Change code below to process each `subscription` resource: - puts JSON.pretty_unparse(subscription.to_h) + puts subscription.to_json end # BEFORE RUNNING: # --------------- @@ -383,7 +376,6 @@ service.modify_subscription_push_config(subscription, request_body) require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new @@ -400,7 +392,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -418,7 +410,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new @@ -436,7 +427,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -454,7 +445,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new @@ -472,7 +462,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -490,7 +480,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new @@ -512,7 +501,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -558,7 +547,6 @@ service.delete_topic(topic) require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new @@ -572,7 +560,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -590,7 +578,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new @@ -605,7 +592,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -623,7 +610,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new @@ -640,7 +626,7 @@ end topics.each do |topic| # TODO: Change code below to process each `topic` resource: - puts JSON.pretty_unparse(topic.to_h) + puts topic.to_json end # BEFORE RUNNING: # --------------- @@ -659,7 +645,6 @@ end require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new @@ -676,7 +661,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -694,7 +679,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new @@ -712,7 +696,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Cloud Pub/Sub API @@ -730,7 +714,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new @@ -747,7 +730,7 @@ end subscriptions.each do |item| # TODO: Change code below to process each `item` resource: - puts JSON.pretty_unparse(item.to_h) + puts item.to_json end # BEFORE RUNNING: # --------------- @@ -766,7 +749,6 @@ end require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new @@ -784,4 +766,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_unparse(response.to_h) +puts response.to_json 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 c5892308df..3545b5f6e8 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 @@ -16,7 +16,6 @@ require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' -require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new @@ -35,7 +34,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Compute Engine Instance Group Updater API @@ -53,7 +52,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' -require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new @@ -72,7 +70,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Compute Engine Instance Group Updater API @@ -90,7 +88,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' -require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new @@ -109,7 +106,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Compute Engine Instance Group Updater API @@ -127,7 +124,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' -require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new @@ -146,7 +142,7 @@ end items.each do |rolling_update| # TODO: Change code below to process each `rolling_update` resource: - puts JSON.pretty_unparse(rolling_update.to_h) + puts rolling_update.to_json end # BEFORE RUNNING: # --------------- @@ -165,7 +161,6 @@ end require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' -require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new @@ -187,7 +182,7 @@ end items.each do |instance_update| # TODO: Change code below to process each `instance_update` resource: - puts JSON.pretty_unparse(instance_update.to_h) + puts instance_update.to_json end # BEFORE RUNNING: # --------------- @@ -206,7 +201,6 @@ end require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' -require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new @@ -225,7 +219,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Compute Engine Instance Group Updater API @@ -243,7 +237,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' -require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new @@ -262,7 +255,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Compute Engine Instance Group Updater API @@ -280,7 +273,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' -require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new @@ -299,7 +291,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Compute Engine Instance Group Updater API @@ -317,7 +309,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' -require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new @@ -336,7 +327,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Compute Engine Instance Group Updater API @@ -354,7 +345,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' -require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new @@ -373,5 +363,5 @@ end items.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_unparse(operation.to_h) + puts operation.to_json 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 473d222ab6..eb845c69e5 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 @@ -7,7 +7,6 @@ # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/sheets_v4' -require 'json' service = Google::Apis::SheetsV4::SheetsService.new @@ -32,7 +31,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -41,7 +40,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/sheets_v4' -require 'json' service = Google::Apis::SheetsV4::SheetsService.new @@ -59,7 +57,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -68,7 +66,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/sheets_v4' -require 'json' service = Google::Apis::SheetsV4::SheetsService.new @@ -95,7 +92,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -104,7 +101,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/sheets_v4' -require 'json' service = Google::Apis::SheetsV4::SheetsService.new @@ -132,7 +128,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -141,7 +137,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/sheets_v4' -require 'json' service = Google::Apis::SheetsV4::SheetsService.new @@ -172,7 +167,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -181,7 +176,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/sheets_v4' -require 'json' service = Google::Apis::SheetsV4::SheetsService.new @@ -206,7 +200,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -215,7 +209,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/sheets_v4' -require 'json' service = Google::Apis::SheetsV4::SheetsService.new @@ -248,7 +241,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -257,7 +250,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/sheets_v4' -require 'json' service = Google::Apis::SheetsV4::SheetsService.new @@ -286,7 +278,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -295,7 +287,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/sheets_v4' -require 'json' service = Google::Apis::SheetsV4::SheetsService.new @@ -319,7 +310,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -328,7 +319,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/sheets_v4' -require 'json' service = Google::Apis::SheetsV4::SheetsService.new @@ -361,7 +351,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Sheets API @@ -370,7 +360,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/sheets_v4' -require 'json' service = Google::Apis::SheetsV4::SheetsService.new @@ -398,4 +387,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_unparse(response.to_h) +puts response.to_json 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 a0e12d2e54..7000f2c16a 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 @@ -16,7 +16,6 @@ require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -35,7 +34,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -53,7 +52,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -72,7 +70,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -90,7 +88,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -109,7 +106,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -127,7 +124,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -146,7 +142,7 @@ end items.each do |backup_run| # TODO: Change code below to process each `backup_run` resource: - puts JSON.pretty_unparse(backup_run.to_h) + puts backup_run.to_json end # BEFORE RUNNING: # --------------- @@ -165,7 +161,6 @@ end require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -184,7 +179,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -202,7 +197,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -221,7 +215,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -239,7 +233,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -258,7 +251,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -276,7 +269,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -292,7 +284,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -310,7 +302,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -333,7 +324,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -351,7 +342,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -374,7 +364,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -392,7 +382,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -402,7 +391,7 @@ service.authorization = \ response = service.list_flags() # TODO: Change code below to process the `response` object: -puts JSON.pretty_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -420,7 +409,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -439,7 +427,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -457,7 +445,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -473,7 +460,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -491,7 +478,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -510,7 +496,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -528,7 +514,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -547,7 +532,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -565,7 +550,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -581,7 +565,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -599,7 +583,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -618,7 +601,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -636,7 +619,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -652,7 +634,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -670,7 +652,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -686,7 +667,7 @@ end items.each do |database_instance| # TODO: Change code below to process each `database_instance` resource: - puts JSON.pretty_unparse(database_instance.to_h) + puts database_instance.to_json end # BEFORE RUNNING: # --------------- @@ -705,7 +686,6 @@ end require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -725,7 +705,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -743,7 +723,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -759,7 +738,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -777,7 +756,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -793,7 +771,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -811,7 +789,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -827,7 +804,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -845,7 +822,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -864,7 +840,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -882,7 +858,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -898,7 +873,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -916,7 +891,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -932,7 +906,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -950,7 +924,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -969,7 +942,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -987,7 +960,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -1007,7 +979,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1025,7 +997,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -1041,7 +1012,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1059,7 +1030,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -1078,7 +1048,7 @@ end items.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_unparse(operation.to_h) + puts operation.to_json end # BEFORE RUNNING: # --------------- @@ -1097,7 +1067,6 @@ end require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -1116,7 +1085,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1134,7 +1103,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -1153,7 +1121,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1171,7 +1139,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -1190,7 +1157,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1208,7 +1175,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -1227,7 +1193,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1245,7 +1211,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -1261,7 +1226,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1279,7 +1244,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -1292,7 +1256,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1310,7 +1274,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -1332,7 +1295,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1350,7 +1313,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -1369,7 +1331,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1387,7 +1349,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -1403,7 +1364,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1421,7 +1382,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/sqladmin_v1beta4' -require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new @@ -1447,4 +1407,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_unparse(response.to_h) +puts response.to_json 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 80c45a3df3..e06b4f9378 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 @@ -47,7 +47,6 @@ service.delete_bucket_access_control(bucket, entity) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -64,7 +63,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -82,7 +81,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -98,7 +96,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -116,7 +114,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -129,7 +126,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -147,7 +144,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -168,7 +164,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -186,7 +182,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -207,7 +202,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -252,7 +247,6 @@ service.delete_bucket(bucket) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -265,7 +259,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -283,7 +277,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -299,7 +292,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -317,7 +310,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -333,7 +325,7 @@ end items.each do |bucket| # TODO: Change code below to process each `bucket` resource: - puts JSON.pretty_unparse(bucket.to_h) + puts bucket.to_json end # BEFORE RUNNING: # --------------- @@ -352,7 +344,6 @@ end require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -369,7 +360,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -387,7 +378,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -404,7 +394,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -480,7 +470,6 @@ service.delete_default_object_access_control(bucket, entity) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -497,7 +486,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -515,7 +504,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -531,7 +519,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -549,7 +537,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -562,7 +549,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -580,7 +567,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -601,7 +587,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -619,7 +605,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -640,7 +625,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -693,7 +678,6 @@ service.delete_object_access_control(bucket, object, entity) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -714,7 +698,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -732,7 +716,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -752,7 +735,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -770,7 +753,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -787,7 +769,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -805,7 +787,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -830,7 +811,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -848,7 +829,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -873,7 +853,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -891,7 +871,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -915,7 +894,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -933,7 +912,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -966,7 +944,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -1015,7 +993,6 @@ service.delete_object(bucket, object) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -1036,7 +1013,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -1054,7 +1031,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -1075,7 +1051,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -1093,7 +1069,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -1109,7 +1084,7 @@ end items.each do |object| # TODO: Change code below to process each `object` resource: - puts JSON.pretty_unparse(object.to_h) + puts object.to_json end # BEFORE RUNNING: # --------------- @@ -1128,7 +1103,6 @@ end require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -1149,7 +1123,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -1167,7 +1141,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -1196,7 +1169,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -1214,7 +1187,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -1239,7 +1211,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud Storage JSON API @@ -1257,7 +1229,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new @@ -1273,4 +1244,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_unparse(response.to_h) +puts response.to_json 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 1508856f50..274f626b1f 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 @@ -16,7 +16,6 @@ require 'googleauth' require 'google/apis/storagetransfer_v1' -require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new @@ -26,7 +25,7 @@ service.authorization = \ response = service.get_google_service_account_v1() # TODO: Change code below to process the `response` object: -puts JSON.pretty_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Storage Transfer API @@ -44,7 +43,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storagetransfer_v1' -require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new @@ -58,7 +56,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Storage Transfer API @@ -76,7 +74,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storagetransfer_v1' -require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new @@ -89,7 +86,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Storage Transfer API @@ -107,7 +104,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storagetransfer_v1' -require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new @@ -120,7 +116,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Storage Transfer API @@ -138,7 +134,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storagetransfer_v1' -require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new @@ -151,7 +146,7 @@ end transfer_jobs.each do |transfer_job| # TODO: Change code below to process each `transfer_job` resource: - puts JSON.pretty_unparse(transfer_job.to_h) + puts transfer_job.to_json end # BEFORE RUNNING: # --------------- @@ -170,7 +165,6 @@ end require 'googleauth' require 'google/apis/storagetransfer_v1' -require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new @@ -187,7 +181,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Storage Transfer API @@ -259,7 +253,6 @@ service.delete_transfer_operation(name) require 'googleauth' require 'google/apis/storagetransfer_v1' -require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new @@ -272,7 +265,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Google Storage Transfer API @@ -290,7 +283,6 @@ puts JSON.pretty_unparse(response.to_h) require 'googleauth' require 'google/apis/storagetransfer_v1' -require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new @@ -306,7 +298,7 @@ end operations.each do |operation| # TODO: Change code below to process each `operation` resource: - puts JSON.pretty_unparse(operation.to_h) + puts operation.to_json 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 0f59a167d5..06e79b72f5 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 @@ -7,7 +7,6 @@ # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/taskqueue_v1beta2' -require 'json' service = Google::Apis::TaskqueueV1beta2::TaskqueueService.new @@ -28,7 +27,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the TaskQueue API @@ -66,7 +65,6 @@ service.delete_task(project, taskqueue, task) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/taskqueue_v1beta2' -require 'json' service = Google::Apis::TaskqueueV1beta2::TaskqueueService.new @@ -90,7 +88,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the TaskQueue API @@ -99,7 +97,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/taskqueue_v1beta2' -require 'json' service = Google::Apis::TaskqueueV1beta2::TaskqueueService.new @@ -123,7 +120,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the TaskQueue API @@ -132,7 +129,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/taskqueue_v1beta2' -require 'json' service = Google::Apis::TaskqueueV1beta2::TaskqueueService.new @@ -159,7 +155,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the TaskQueue API @@ -168,7 +164,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/taskqueue_v1beta2' -require 'json' service = Google::Apis::TaskqueueV1beta2::TaskqueueService.new @@ -189,7 +184,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the TaskQueue API @@ -198,7 +193,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/taskqueue_v1beta2' -require 'json' service = Google::Apis::TaskqueueV1beta2::TaskqueueService.new @@ -227,7 +221,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the TaskQueue API @@ -236,7 +230,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/taskqueue_v1beta2' -require 'json' service = Google::Apis::TaskqueueV1beta2::TaskqueueService.new @@ -264,4 +257,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_unparse(response.to_h) +puts response.to_json 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 7c58409041..c9744d3716 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 @@ -7,7 +7,6 @@ # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/translate_v2' -require 'json' service = Google::Apis::TranslateV2::TranslateService.new @@ -19,7 +18,7 @@ q = [] # TODO: Update placeholder value. response = service.list_detections(q) # TODO: Change code below to process the `response` object: -puts JSON.pretty_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Translate API @@ -28,7 +27,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/translate_v2' -require 'json' service = Google::Apis::TranslateV2::TranslateService.new @@ -37,7 +35,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_unparse(response.to_h) +puts response.to_json # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Translate API @@ -46,7 +44,6 @@ puts JSON.pretty_unparse(response.to_h) # 2. Install the Ruby client library by running `gem install google-api-client` require 'google/apis/translate_v2' -require 'json' service = Google::Apis::TranslateV2::TranslateService.new @@ -61,4 +58,4 @@ target = '' # TODO: Update placeholder value. response = service.list_translations(q, target) # TODO: Change code below to process the `response` object: -puts JSON.pretty_unparse(response.to_h) +puts response.to_json 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 73d60d1fac..aeac8c1a9e 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 @@ -16,7 +16,6 @@ require 'googleauth' require 'google/apis/vision_v1' -require 'json' service = Google::Apis::VisionV1::VisionService.new @@ -29,4 +28,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_unparse(response.to_h) +puts response.to_json