From 5e36fcd5367c0ee10bd1623f84a423b127cfb844 Mon Sep 17 00:00:00 2001 From: Samir <85890442+sa-progress@users.noreply.github.com> Date: Wed, 3 Jan 2024 21:20:37 +0530 Subject: [PATCH 1/2] Removed: frozen string litral Signed-off-by: Samir <85890442+sa-progress@users.noreply.github.com> --- .rubocop.yml | 4 ++-- generate/gen-controls/dns_resource_record_set.rb | 2 +- generate/libraries/google_appengine_standard_app_version.rb | 4 ++-- generate/libraries/google_bigquery_dataset.rb | 4 ++-- generate/libraries/google_bigquery_table.rb | 4 ++-- generate/libraries/google_cloudbuild_trigger.rb | 4 ++-- generate/libraries/google_cloudfunctions_cloud_function.rb | 4 ++-- generate/libraries/google_compute_autoscaler.rb | 4 ++-- generate/libraries/google_compute_backend_bucket.rb | 4 ++-- generate/libraries/google_compute_backend_service.rb | 4 ++-- generate/libraries/google_compute_disk.rb | 4 ++-- generate/libraries/google_compute_firewall.rb | 4 ++-- generate/libraries/google_compute_forwarding_rules.rb | 2 +- generate/libraries/google_compute_global_address.rb | 4 ++-- generate/libraries/google_compute_global_forwarding_rule.rb | 4 ++-- generate/libraries/google_compute_health_check.rb | 4 ++-- generate/libraries/google_compute_http_health_check.rb | 4 ++-- generate/libraries/google_compute_https_health_check.rb | 4 ++-- generate/libraries/google_compute_instance.rb | 4 ++-- generate/libraries/google_compute_instance_group_manager.rb | 4 ++-- generate/libraries/google_compute_instance_template.rb | 4 ++-- generate/libraries/google_compute_network.rb | 4 ++-- generate/libraries/google_compute_network_endpoint_group.rb | 4 ++-- generate/libraries/google_compute_node_group.rb | 4 ++-- generate/libraries/google_compute_node_template.rb | 4 ++-- generate/libraries/google_compute_region.rb | 4 ++-- generate/libraries/google_compute_region_backend_service.rb | 4 ++-- generate/libraries/google_compute_route.rb | 4 ++-- generate/libraries/google_compute_router.rb | 4 ++-- generate/libraries/google_compute_snapshot.rb | 4 ++-- generate/libraries/google_compute_ssl_certificate.rb | 4 ++-- generate/libraries/google_compute_ssl_policy.rb | 4 ++-- generate/libraries/google_compute_subnetwork.rb | 4 ++-- generate/libraries/google_compute_target_http_proxy.rb | 4 ++-- generate/libraries/google_compute_target_https_proxy.rb | 4 ++-- generate/libraries/google_compute_target_pool.rb | 4 ++-- generate/libraries/google_compute_target_tcp_proxy.rb | 4 ++-- generate/libraries/google_compute_url_map.rb | 4 ++-- generate/libraries/google_container_regional_cluster.rb | 4 ++-- generate/libraries/google_container_regional_node_pool.rb | 4 ++-- generate/libraries/google_dataproc_cluster.rb | 4 ++-- generate/libraries/google_dns_resource_record_set.rb | 4 ++-- generate/libraries/google_filestore_instance.rb | 4 ++-- generate/libraries/google_logging_folder_exclusion.rb | 4 ++-- generate/libraries/google_logging_folder_log_sink.rb | 4 ++-- generate/libraries/google_logging_organization_log_sink.rb | 4 ++-- generate/libraries/google_ml_engine_model.rb | 4 ++-- generate/libraries/google_pubsub_subscription.rb | 4 ++-- generate/libraries/google_pubsub_topic.rb | 4 ++-- generate/libraries/google_redis_instance.rb | 4 ++-- generate/libraries/google_resourcemanager_folder.rb | 4 ++-- generate/libraries/google_runtime_config_config.rb | 4 ++-- generate/libraries/google_runtime_config_variable.rb | 4 ++-- generate/libraries/google_sourcerepo_repository.rb | 4 ++-- 54 files changed, 106 insertions(+), 106 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index e404d22e9..ee1db0e16 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,5 @@ AllCops: - TargetRubyVersion: 2.6 + TargetRubyVersion: 3.1 Exclude: - Gemfile - generate/Gemfile @@ -61,7 +61,7 @@ Style/Not: Enabled: false Naming/FileName: Enabled: true - Regex: !ruby/regexp '/^.{3,200}$/' + Regex: !ruby/regexp '/^.{3, 99}$/' Style/TrailingCommaInArrayLiteral: EnforcedStyleForMultiline: comma Style/TrailingCommaInHashLiteral: diff --git a/generate/gen-controls/dns_resource_record_set.rb b/generate/gen-controls/dns_resource_record_set.rb index efdc6ab3e..2b9900445 100644 --- a/generate/gen-controls/dns_resource_record_set.rb +++ b/generate/gen-controls/dns_resource_record_set.rb @@ -46,7 +46,7 @@ managed_zones = google_dns_managed_zones(project: project_name).zone_names managed_zones.each do |managed_zone| plural_identifiers.each do |plural_identifier| - next_identifiers.push(plural_identifier.merge({ managed_zone: managed_zone })) + next_identifiers.push(plural_identifier.merge({ managed_zone: })) end end plural_identifiers = next_identifiers diff --git a/generate/libraries/google_appengine_standard_app_version.rb b/generate/libraries/google_appengine_standard_app_version.rb index eec74636c..a24877481 100644 --- a/generate/libraries/google_appengine_standard_app_version.rb +++ b/generate/libraries/google_appengine_standard_app_version.rb @@ -72,8 +72,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_appengine_standard_app_version', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_bigquery_dataset.rb b/generate/libraries/google_bigquery_dataset.rb index ee750a2bb..fd19cef7e 100644 --- a/generate/libraries/google_bigquery_dataset.rb +++ b/generate/libraries/google_bigquery_dataset.rb @@ -102,8 +102,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_bigquery_dataset', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_bigquery_table.rb b/generate/libraries/google_bigquery_table.rb index e263b5d78..06a0b6452 100644 --- a/generate/libraries/google_bigquery_table.rb +++ b/generate/libraries/google_bigquery_table.rb @@ -144,8 +144,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_bigquery_table', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_cloudbuild_trigger.rb b/generate/libraries/google_cloudbuild_trigger.rb index 94cf4311a..368586aa9 100644 --- a/generate/libraries/google_cloudbuild_trigger.rb +++ b/generate/libraries/google_cloudbuild_trigger.rb @@ -93,8 +93,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_cloudbuild_trigger', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_cloudfunctions_cloud_function.rb b/generate/libraries/google_cloudfunctions_cloud_function.rb index 4db181b17..3b55f513a 100644 --- a/generate/libraries/google_cloudfunctions_cloud_function.rb +++ b/generate/libraries/google_cloudfunctions_cloud_function.rb @@ -117,8 +117,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_cloudfunctions_cloud_function', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_autoscaler.rb b/generate/libraries/google_compute_autoscaler.rb index 7064243b6..cf14a3d28 100644 --- a/generate/libraries/google_compute_autoscaler.rb +++ b/generate/libraries/google_compute_autoscaler.rb @@ -85,8 +85,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_autoscaler', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_backend_bucket.rb b/generate/libraries/google_compute_backend_bucket.rb index 365ef4a1d..bb925ece9 100644 --- a/generate/libraries/google_compute_backend_bucket.rb +++ b/generate/libraries/google_compute_backend_bucket.rb @@ -82,8 +82,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_backend_bucket', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_backend_service.rb b/generate/libraries/google_compute_backend_service.rb index f543cdd8f..c8fcd434c 100644 --- a/generate/libraries/google_compute_backend_service.rb +++ b/generate/libraries/google_compute_backend_service.rb @@ -119,8 +119,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_backend_service', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_disk.rb b/generate/libraries/google_compute_disk.rb index 29b07ea52..ccea867d0 100644 --- a/generate/libraries/google_compute_disk.rb +++ b/generate/libraries/google_compute_disk.rb @@ -126,8 +126,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_disk', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_firewall.rb b/generate/libraries/google_compute_firewall.rb index 51884c939..59456c3c4 100644 --- a/generate/libraries/google_compute_firewall.rb +++ b/generate/libraries/google_compute_firewall.rb @@ -110,8 +110,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_firewall', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_forwarding_rules.rb b/generate/libraries/google_compute_forwarding_rules.rb index 4ffad14c2..b1d9cf4db 100644 --- a/generate/libraries/google_compute_forwarding_rules.rb +++ b/generate/libraries/google_compute_forwarding_rules.rb @@ -42,7 +42,7 @@ def fetch_data forwarding_rule_network = forwarding_rule.network.split('/').last if !forwarding_rule.network.nil? forwarding_rule_rows+=[{ forwarding_rule_id: forwarding_rule.id, forwarding_rule_name: forwarding_rule.name, - forwarding_rule_network: forwarding_rule_network, + forwarding_rule_network:, forwarding_rule_load_balancing_scheme: forwarding_rule.load_balancing_scheme }] end next_page = @forwarding_rules.next_page_token diff --git a/generate/libraries/google_compute_global_address.rb b/generate/libraries/google_compute_global_address.rb index 710d838a9..4af83f3dc 100644 --- a/generate/libraries/google_compute_global_address.rb +++ b/generate/libraries/google_compute_global_address.rb @@ -93,8 +93,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_global_address', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_global_forwarding_rule.rb b/generate/libraries/google_compute_global_forwarding_rule.rb index abbb62f68..0896d72b0 100644 --- a/generate/libraries/google_compute_global_forwarding_rule.rb +++ b/generate/libraries/google_compute_global_forwarding_rule.rb @@ -97,8 +97,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_global_forwarding_rule', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_health_check.rb b/generate/libraries/google_compute_health_check.rb index 90b7e65bb..acf4a3a87 100644 --- a/generate/libraries/google_compute_health_check.rb +++ b/generate/libraries/google_compute_health_check.rb @@ -107,8 +107,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_health_check', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_http_health_check.rb b/generate/libraries/google_compute_http_health_check.rb index 1140ad35d..c8e48dd98 100644 --- a/generate/libraries/google_compute_http_health_check.rb +++ b/generate/libraries/google_compute_http_health_check.rb @@ -93,8 +93,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_http_health_check', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_https_health_check.rb b/generate/libraries/google_compute_https_health_check.rb index b298c9f8b..5e7505d55 100644 --- a/generate/libraries/google_compute_https_health_check.rb +++ b/generate/libraries/google_compute_https_health_check.rb @@ -93,8 +93,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_https_health_check', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_instance.rb b/generate/libraries/google_compute_instance.rb index 7602d1b34..c0cd53cc7 100644 --- a/generate/libraries/google_compute_instance.rb +++ b/generate/libraries/google_compute_instance.rb @@ -133,8 +133,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_instance', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_instance_group_manager.rb b/generate/libraries/google_compute_instance_group_manager.rb index f6999b5bf..422f94f14 100644 --- a/generate/libraries/google_compute_instance_group_manager.rb +++ b/generate/libraries/google_compute_instance_group_manager.rb @@ -101,8 +101,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_instance_group_manager', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_instance_template.rb b/generate/libraries/google_compute_instance_template.rb index 5398cd292..c5e129bcf 100644 --- a/generate/libraries/google_compute_instance_template.rb +++ b/generate/libraries/google_compute_instance_template.rb @@ -82,8 +82,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_instance_template', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_network.rb b/generate/libraries/google_compute_network.rb index 96214474f..ce923f400 100644 --- a/generate/libraries/google_compute_network.rb +++ b/generate/libraries/google_compute_network.rb @@ -85,8 +85,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_network', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_network_endpoint_group.rb b/generate/libraries/google_compute_network_endpoint_group.rb index d4aff4c27..26ab7060b 100644 --- a/generate/libraries/google_compute_network_endpoint_group.rb +++ b/generate/libraries/google_compute_network_endpoint_group.rb @@ -87,8 +87,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_network_endpoint_group', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_node_group.rb b/generate/libraries/google_compute_node_group.rb index 934619d93..1f39e226d 100644 --- a/generate/libraries/google_compute_node_group.rb +++ b/generate/libraries/google_compute_node_group.rb @@ -78,8 +78,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_node_group', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_node_template.rb b/generate/libraries/google_compute_node_template.rb index a13e29731..9f44ab611 100644 --- a/generate/libraries/google_compute_node_template.rb +++ b/generate/libraries/google_compute_node_template.rb @@ -82,8 +82,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_node_template', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_region.rb b/generate/libraries/google_compute_region.rb index 4e10de20c..81973622b 100644 --- a/generate/libraries/google_compute_region.rb +++ b/generate/libraries/google_compute_region.rb @@ -86,8 +86,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_region', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_region_backend_service.rb b/generate/libraries/google_compute_region_backend_service.rb index 9d5756f69..2c767ac33 100644 --- a/generate/libraries/google_compute_region_backend_service.rb +++ b/generate/libraries/google_compute_region_backend_service.rb @@ -95,8 +95,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_region_backend_service', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_route.rb b/generate/libraries/google_compute_route.rb index 015e0b8c6..1d8f16205 100644 --- a/generate/libraries/google_compute_route.rb +++ b/generate/libraries/google_compute_route.rb @@ -93,8 +93,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_route', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_router.rb b/generate/libraries/google_compute_router.rb index 580b91d4e..19ade5369 100644 --- a/generate/libraries/google_compute_router.rb +++ b/generate/libraries/google_compute_router.rb @@ -83,8 +83,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_router', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_snapshot.rb b/generate/libraries/google_compute_snapshot.rb index 11f6475a7..123d442bb 100644 --- a/generate/libraries/google_compute_snapshot.rb +++ b/generate/libraries/google_compute_snapshot.rb @@ -101,8 +101,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_snapshot', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_ssl_certificate.rb b/generate/libraries/google_compute_ssl_certificate.rb index fdb52ca26..21e37c856 100644 --- a/generate/libraries/google_compute_ssl_certificate.rb +++ b/generate/libraries/google_compute_ssl_certificate.rb @@ -78,8 +78,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_ssl_certificate', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_ssl_policy.rb b/generate/libraries/google_compute_ssl_policy.rb index 16dd00937..8419ecebb 100644 --- a/generate/libraries/google_compute_ssl_policy.rb +++ b/generate/libraries/google_compute_ssl_policy.rb @@ -91,8 +91,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_ssl_policy', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_subnetwork.rb b/generate/libraries/google_compute_subnetwork.rb index 1cfe26cb4..4c5edbf56 100644 --- a/generate/libraries/google_compute_subnetwork.rb +++ b/generate/libraries/google_compute_subnetwork.rb @@ -98,8 +98,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_subnetwork', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_target_http_proxy.rb b/generate/libraries/google_compute_target_http_proxy.rb index 423135d04..468f0ff4e 100644 --- a/generate/libraries/google_compute_target_http_proxy.rb +++ b/generate/libraries/google_compute_target_http_proxy.rb @@ -75,8 +75,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_target_http_proxy', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_target_https_proxy.rb b/generate/libraries/google_compute_target_https_proxy.rb index 425b015ea..9c96520dd 100644 --- a/generate/libraries/google_compute_target_https_proxy.rb +++ b/generate/libraries/google_compute_target_https_proxy.rb @@ -84,8 +84,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_target_https_proxy', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_target_pool.rb b/generate/libraries/google_compute_target_pool.rb index 89e99e2c2..e6ab7f4f1 100644 --- a/generate/libraries/google_compute_target_pool.rb +++ b/generate/libraries/google_compute_target_pool.rb @@ -90,8 +90,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_target_pool', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_target_tcp_proxy.rb b/generate/libraries/google_compute_target_tcp_proxy.rb index aece0cd78..1311e09d6 100644 --- a/generate/libraries/google_compute_target_tcp_proxy.rb +++ b/generate/libraries/google_compute_target_tcp_proxy.rb @@ -78,8 +78,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_target_tcp_proxy', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_compute_url_map.rb b/generate/libraries/google_compute_url_map.rb index b52240921..5eec4f033 100644 --- a/generate/libraries/google_compute_url_map.rb +++ b/generate/libraries/google_compute_url_map.rb @@ -90,8 +90,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_compute_url_map', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_container_regional_cluster.rb b/generate/libraries/google_container_regional_cluster.rb index df391ab7d..6807ef806 100644 --- a/generate/libraries/google_container_regional_cluster.rb +++ b/generate/libraries/google_container_regional_cluster.rb @@ -183,8 +183,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_container_regional_cluster', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_container_regional_node_pool.rb b/generate/libraries/google_container_regional_node_pool.rb index c2daa29ba..fb515deaf 100644 --- a/generate/libraries/google_container_regional_node_pool.rb +++ b/generate/libraries/google_container_regional_node_pool.rb @@ -107,8 +107,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_container_regional_node_pool', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_dataproc_cluster.rb b/generate/libraries/google_dataproc_cluster.rb index b8f02eeb3..87be903df 100644 --- a/generate/libraries/google_dataproc_cluster.rb +++ b/generate/libraries/google_dataproc_cluster.rb @@ -88,8 +88,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_dataproc_cluster', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_dns_resource_record_set.rb b/generate/libraries/google_dns_resource_record_set.rb index ef2c72656..32e36a7ed 100644 --- a/generate/libraries/google_dns_resource_record_set.rb +++ b/generate/libraries/google_dns_resource_record_set.rb @@ -87,8 +87,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_dns_resource_record_set', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_filestore_instance.rb b/generate/libraries/google_filestore_instance.rb index e3b312178..0565d2989 100644 --- a/generate/libraries/google_filestore_instance.rb +++ b/generate/libraries/google_filestore_instance.rb @@ -89,8 +89,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_filestore_instance', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_logging_folder_exclusion.rb b/generate/libraries/google_logging_folder_exclusion.rb index d536f3482..34a83122a 100644 --- a/generate/libraries/google_logging_folder_exclusion.rb +++ b/generate/libraries/google_logging_folder_exclusion.rb @@ -75,8 +75,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_logging_folder_exclusion', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_logging_folder_log_sink.rb b/generate/libraries/google_logging_folder_log_sink.rb index 499d9f0c1..2e7fa872e 100644 --- a/generate/libraries/google_logging_folder_log_sink.rb +++ b/generate/libraries/google_logging_folder_log_sink.rb @@ -78,8 +78,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_logging_folder_log_sink', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_logging_organization_log_sink.rb b/generate/libraries/google_logging_organization_log_sink.rb index e09799385..96e57f989 100644 --- a/generate/libraries/google_logging_organization_log_sink.rb +++ b/generate/libraries/google_logging_organization_log_sink.rb @@ -78,8 +78,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_logging_organization_log_sink', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_ml_engine_model.rb b/generate/libraries/google_ml_engine_model.rb index bb218e252..8ed948059 100644 --- a/generate/libraries/google_ml_engine_model.rb +++ b/generate/libraries/google_ml_engine_model.rb @@ -82,8 +82,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_ml_engine_model', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_pubsub_subscription.rb b/generate/libraries/google_pubsub_subscription.rb index 8436eff08..15a654c54 100644 --- a/generate/libraries/google_pubsub_subscription.rb +++ b/generate/libraries/google_pubsub_subscription.rb @@ -86,8 +86,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_pubsub_subscription', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_pubsub_topic.rb b/generate/libraries/google_pubsub_topic.rb index 05ae3b14f..cda190266 100644 --- a/generate/libraries/google_pubsub_topic.rb +++ b/generate/libraries/google_pubsub_topic.rb @@ -73,8 +73,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_pubsub_topic', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_redis_instance.rb b/generate/libraries/google_redis_instance.rb index 7455bf7bb..bb1392562 100644 --- a/generate/libraries/google_redis_instance.rb +++ b/generate/libraries/google_redis_instance.rb @@ -108,8 +108,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_redis_instance', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_resourcemanager_folder.rb b/generate/libraries/google_resourcemanager_folder.rb index 19059a110..17600376c 100644 --- a/generate/libraries/google_resourcemanager_folder.rb +++ b/generate/libraries/google_resourcemanager_folder.rb @@ -75,8 +75,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_resourcemanager_folder', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_runtime_config_config.rb b/generate/libraries/google_runtime_config_config.rb index 97912df49..1f8f76a7b 100644 --- a/generate/libraries/google_runtime_config_config.rb +++ b/generate/libraries/google_runtime_config_config.rb @@ -66,8 +66,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_runtime_config_config', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_runtime_config_variable.rb b/generate/libraries/google_runtime_config_variable.rb index 2d8eb9c32..55a18876a 100644 --- a/generate/libraries/google_runtime_config_variable.rb +++ b/generate/libraries/google_runtime_config_variable.rb @@ -72,8 +72,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_runtime_config_variable', identifiers: @params, number: test_number, diff --git a/generate/libraries/google_sourcerepo_repository.rb b/generate/libraries/google_sourcerepo_repository.rb index 34b7db769..3849b09f5 100644 --- a/generate/libraries/google_sourcerepo_repository.rb +++ b/generate/libraries/google_sourcerepo_repository.rb @@ -69,8 +69,8 @@ def dump(path, template_path, test_number, ignored_fields) v.call(method(k.to_sym).call, k) end template_vars = { - name: name, - arr: arr, + name:, + arr:, type: 'google_sourcerepo_repository', identifiers: @params, number: test_number, From 4aface068fbe79603e3a8dfc739a4810ddf871a5 Mon Sep 17 00:00:00 2001 From: Samir <85890442+sa-progress@users.noreply.github.com> Date: Thu, 4 Jan 2024 11:10:26 +0530 Subject: [PATCH 2/2] linting updated from rubocop to chefstyle Signed-off-by: Samir <85890442+sa-progress@users.noreply.github.com> --- generate/gen-controls/bigquery_dataset.rb | 38 ++-- generate/gen-controls/bigquery_table.rb | 40 ++-- .../cloudfunctions_cloud_function.rb | 38 ++-- generate/gen-controls/compute_autoscaler.rb | 38 ++-- .../gen-controls/compute_backend_bucket.rb | 38 ++-- .../gen-controls/compute_backend_service.rb | 38 ++-- generate/gen-controls/compute_disk.rb | 38 ++-- generate/gen-controls/compute_firewall.rb | 38 ++-- .../gen-controls/compute_global_address.rb | 38 ++-- .../compute_global_forwarding_rule.rb | 38 ++-- generate/gen-controls/compute_health_check.rb | 38 ++-- .../gen-controls/compute_http_health_check.rb | 38 ++-- .../compute_https_health_check.rb | 38 ++-- generate/gen-controls/compute_instance.rb | 38 ++-- .../compute_instance_group_manager.rb | 38 ++-- .../gen-controls/compute_instance_template.rb | 38 ++-- generate/gen-controls/compute_network.rb | 38 ++-- .../compute_network_endpoint_group.rb | 38 ++-- generate/gen-controls/compute_node_group.rb | 38 ++-- .../gen-controls/compute_node_template.rb | 38 ++-- .../compute_region_backend_service.rb | 38 ++-- generate/gen-controls/compute_route.rb | 38 ++-- generate/gen-controls/compute_router.rb | 38 ++-- generate/gen-controls/compute_snapshot.rb | 38 ++-- .../gen-controls/compute_ssl_certificate.rb | 38 ++-- generate/gen-controls/compute_ssl_policy.rb | 38 ++-- generate/gen-controls/compute_subnetwork.rb | 38 ++-- .../gen-controls/compute_target_http_proxy.rb | 38 ++-- .../compute_target_https_proxy.rb | 38 ++-- generate/gen-controls/compute_target_pool.rb | 38 ++-- .../gen-controls/compute_target_tcp_proxy.rb | 38 ++-- generate/gen-controls/compute_url_map.rb | 38 ++-- generate/gen-controls/dataproc_cluster.rb | 38 ++-- .../gen-controls/dns_resource_record_set.rb | 38 ++-- generate/gen-controls/filestore_instance.rb | 38 ++-- generate/gen-controls/mlengine_model.rb | 38 ++-- generate/gen-controls/pubsub_subscription.rb | 38 ++-- generate/gen-controls/pubsub_topic.rb | 38 ++-- generate/gen-controls/redis_instance.rb | 38 ++-- generate/libraries/gcp_backend.rb | 70 +++---- .../bigquery/property/dataset_access.rb | 28 +-- .../bigquery/property/dataset_access_view.rb | 14 +- .../property/dataset_dataset_reference.rb | 10 +- ...ataset_default_encryption_configuration.rb | 6 +- .../table_encryption_configuration.rb | 6 +- .../table_external_data_configuration.rb | 54 ++--- ...nal_data_configuration_bigtable_options.rb | 16 +- ...ration_bigtable_options_column_families.rb | 24 +-- ...igtable_options_column_families_columns.rb | 22 +- ...external_data_configuration_csv_options.rb | 26 +-- ...ata_configuration_google_sheets_options.rb | 6 +- ...able_external_data_configuration_schema.rb | 8 +- ...ternal_data_configuration_schema_fields.rb | 22 +- .../google/bigquery/property/table_schema.rb | 8 +- .../bigquery/property/table_schema_fields.rb | 22 +- .../property/table_streaming_buffer.rb | 14 +- .../property/table_table_reference.rb | 14 +- .../property/table_time_partitioning.rb | 14 +- .../google/bigquery/property/table_view.rb | 12 +- ...le_view_user_defined_function_resources.rb | 10 +- .../cloudbuild/property/trigger_build.rb | 16 +- .../property/trigger_build_steps.rb | 48 ++--- .../property/trigger_build_steps_volumes.rb | 10 +- .../property/trigger_trigger_template.rb | 26 +-- .../property/cloudfunction_event_trigger.rb | 14 +- .../property/cloudfunction_https_trigger.rb | 6 +- .../cloudfunction_source_repository.rb | 10 +- .../property/autoscaler_autoscaling_policy.rb | 32 +-- ...aler_autoscaling_policy_cpu_utilization.rb | 6 +- ...aling_policy_custom_metric_utilizations.rb | 14 +- ...aling_policy_load_balancing_utilization.rb | 6 +- .../property/backendbucket_cdn_policy.rb | 6 +- .../property/backendservice_backends.rb | 46 ++-- .../property/backendservice_cdn_policy.rb | 12 +- ...kendservice_cdn_policy_cache_key_policy.rb | 22 +- .../backendservice_connection_draining.rb | 6 +- .../compute/property/backendservice_iap.rb | 18 +- .../property/disk_disk_encryption_key.rb | 14 +- .../disk_source_image_encryption_key.rb | 14 +- .../disk_source_snapshot_encryption_key.rb | 14 +- .../compute/property/firewall_allowed.rb | 10 +- .../compute/property/firewall_denied.rb | 10 +- .../globalforwardingrule_metadata_filters.rb | 12 +- ...dingrule_metadata_filters_filter_labels.rb | 10 +- .../healthcheck_http2_health_check.rb | 30 +-- .../property/healthcheck_http_health_check.rb | 30 +-- .../healthcheck_https_health_check.rb | 30 +-- .../property/healthcheck_ssl_health_check.rb | 26 +-- .../property/healthcheck_tcp_health_check.rb | 26 +-- .../google/compute/property/instance_disks.rb | 48 ++--- .../instance_disks_disk_encryption_key.rb | 14 +- .../instance_disks_initialize_params.rb | 24 +-- ...lize_params_source_image_encryption_key.rb | 10 +- .../property/instance_guest_accelerators.rb | 10 +- .../property/instance_network_interfaces.rb | 30 +-- ...tance_network_interfaces_access_configs.rb | 14 +- ...ance_network_interfaces_alias_ip_ranges.rb | 10 +- .../compute/property/instance_scheduling.rb | 14 +- .../property/instance_service_accounts.rb | 10 +- .../instance_shielded_instance_config.rb | 14 +- .../google/compute/property/instance_tags.rb | 10 +- .../instancegroupmanager_current_actions.rb | 34 +-- .../instancegroupmanager_named_ports.rb | 10 +- .../property/instancetemplate_properties.rb | 62 +++--- .../instancetemplate_properties_disks.rb | 48 ++--- ...te_properties_disks_disk_encryption_key.rb | 14 +- ...late_properties_disks_initialize_params.rb | 24 +-- ...lize_params_source_image_encryption_key.rb | 10 +- ...etemplate_properties_guest_accelerators.rb | 10 +- ...etemplate_properties_network_interfaces.rb | 30 +-- ...rties_network_interfaces_access_configs.rb | 14 +- ...ties_network_interfaces_alias_ip_ranges.rb | 10 +- .../instancetemplate_properties_scheduling.rb | 14 +- ...ncetemplate_properties_service_accounts.rb | 10 +- .../instancetemplate_properties_tags.rb | 10 +- .../nodetemplate_node_type_flexibility.rb | 14 +- .../compute/property/region_deprecated.rb | 22 +- .../google/compute/property/region_quotas.rb | 18 +- .../property/regionbackendservice_backends.rb | 10 +- ...egionbackendservice_connection_draining.rb | 6 +- .../google/compute/property/router_bgp.rb | 20 +- .../router_bgp_advertised_ip_ranges.rb | 10 +- .../snapshot_snapshot_encryption_key.rb | 14 +- .../snapshot_source_disk_encryption_key.rb | 10 +- .../compute/property/sslpolicy_warnings.rb | 10 +- .../compute/property/urlmap_host_rules.rb | 14 +- .../compute/property/urlmap_path_matchers.rb | 20 +- .../urlmap_path_matchers_path_rules.rb | 10 +- .../google/compute/property/urlmap_tests.rb | 18 +- .../property/regionalcluster_addons_config.rb | 26 +-- ...ddons_config_horizontal_pod_autoscaling.rb | 6 +- ...uster_addons_config_http_load_balancing.rb | 6 +- ...ster_addons_config_kubernetes_dashboard.rb | 6 +- ...ter_addons_config_network_policy_config.rb | 6 +- .../property/regionalcluster_conditions.rb | 10 +- ...onalcluster_default_max_pods_constraint.rb | 6 +- .../regionalcluster_ip_allocation_policy.rb | 38 ++-- .../property/regionalcluster_legacy_abac.rb | 6 +- .../property/regionalcluster_master_auth.rb | 28 +-- ...r_master_auth_client_certificate_config.rb | 6 +- ...uster_master_authorized_networks_config.rb | 12 +- ..._authorized_networks_config_cidr_blocks.rb | 10 +- .../regionalcluster_network_policy.rb | 10 +- .../property/regionalcluster_node_config.rb | 62 +++--- ...egionalcluster_node_config_accelerators.rb | 10 +- .../regionalcluster_node_config_taints.rb | 14 +- .../regionalcluster_private_cluster_config.rb | 22 +- .../property/regionalnodepool_autoscaling.rb | 14 +- .../property/regionalnodepool_conditions.rb | 6 +- .../property/regionalnodepool_config.rb | 62 +++--- .../regionalnodepool_config_accelerators.rb | 10 +- .../regionalnodepool_config_taints.rb | 14 +- .../property/regionalnodepool_management.rb | 16 +- ...onalnodepool_management_upgrade_options.rb | 10 +- .../regionalnodepool_max_pods_constraint.rb | 6 +- .../dataproc/property/cluster_config.rb | 68 +++--- .../cluster_config_encryption_config.rb | 6 +- .../cluster_config_gce_cluster_config.rb | 30 +-- .../cluster_config_initialization_actions.rb | 10 +- .../property/cluster_config_master_config.rb | 34 +-- ...luster_config_master_config_disk_config.rb | 14 +- ...nfig_master_config_managed_group_config.rb | 10 +- .../cluster_config_secondary_worker_config.rb | 34 +-- ...fig_secondary_worker_config_disk_config.rb | 14 +- ...dary_worker_config_managed_group_config.rb | 10 +- .../cluster_config_security_config.rb | 8 +- ..._config_security_config_kerberos_config.rb | 54 ++--- .../cluster_config_software_config.rb | 14 +- .../property/cluster_config_worker_config.rb | 34 +-- ...luster_config_worker_config_disk_config.rb | 14 +- ...nfig_worker_config_managed_group_config.rb | 10 +- .../property/instance_file_shares.rb | 10 +- .../filestore/property/instance_networks.rb | 18 +- .../iam/property/iam_policy_audit_configs.rb | 8 +- ..._policy_audit_configs_audit_log_configs.rb | 6 +- .../iam/property/iam_policy_bindings.rb | 6 +- .../property/model_default_version.rb | 6 +- .../subscription_expiration_policy.rb | 6 +- .../property/subscription_push_config.rb | 10 +- .../property/topic_message_storage_policy.rb | 6 +- .../organizationpolicy_boolean_policy.rb | 4 +- .../organizationpolicy_list_policy.rb | 6 +- .../google_appengine_standard_app_version.rb | 38 ++-- .../google_appengine_standard_app_versions.rb | 26 +-- generate/libraries/google_bigquery_dataset.rb | 80 +++---- .../libraries/google_bigquery_datasets.rb | 36 ++-- generate/libraries/google_bigquery_table.rb | 144 ++++++------- generate/libraries/google_bigquery_tables.rb | 62 +++--- .../libraries/google_cloudbuild_trigger.rb | 68 +++--- .../libraries/google_cloudbuild_triggers.rb | 38 ++-- .../google_cloudfunctions_cloud_function.rb | 100 ++++----- .../google_cloudfunctions_cloud_functions.rb | 54 ++--- generate/libraries/google_compute_address.rb | 12 +- .../libraries/google_compute_autoscaler.rb | 58 ++--- .../libraries/google_compute_autoscalers.rb | 32 +-- .../google_compute_backend_bucket.rb | 52 ++--- .../google_compute_backend_buckets.rb | 32 +-- .../google_compute_backend_service.rb | 104 ++++----- .../google_compute_backend_services.rb | 54 ++--- generate/libraries/google_compute_disk.rb | 112 +++++----- generate/libraries/google_compute_disks.rb | 60 +++--- generate/libraries/google_compute_firewall.rb | 90 ++++---- .../libraries/google_compute_firewalls.rb | 50 ++--- .../google_compute_forwarding_rule.rb | 8 +- .../google_compute_forwarding_rules.rb | 10 +- .../google_compute_global_address.rb | 66 +++--- .../google_compute_global_addresses.rb | 40 ++-- .../google_compute_global_forwarding_rule.rb | 72 +++---- .../google_compute_global_forwarding_rules.rb | 42 ++-- .../libraries/google_compute_health_check.rb | 88 ++++---- .../libraries/google_compute_health_checks.rb | 46 ++-- .../google_compute_http_health_check.rb | 66 +++--- .../google_compute_http_health_checks.rb | 40 ++-- .../google_compute_https_health_check.rb | 66 +++--- .../google_compute_https_health_checks.rb | 40 ++-- generate/libraries/google_compute_image.rb | 8 +- generate/libraries/google_compute_instance.rb | 124 +++++------ .../google_compute_instance_group.rb | 8 +- .../google_compute_instance_group_manager.rb | 78 +++---- .../google_compute_instance_group_managers.rb | 44 ++-- .../google_compute_instance_groups.rb | 8 +- .../google_compute_instance_template.rb | 56 ++--- .../google_compute_instance_templates.rb | 28 +-- .../libraries/google_compute_instances.rb | 62 +++--- generate/libraries/google_compute_network.rb | 56 ++--- .../google_compute_network_endpoint_group.rb | 58 ++--- .../google_compute_network_endpoint_groups.rb | 36 ++-- generate/libraries/google_compute_networks.rb | 34 +-- .../libraries/google_compute_node_group.rb | 46 ++-- .../libraries/google_compute_node_groups.rb | 30 +-- .../libraries/google_compute_node_template.rb | 52 ++--- .../google_compute_node_templates.rb | 32 +-- .../libraries/google_compute_project_info.rb | 10 +- generate/libraries/google_compute_region.rb | 62 +++--- .../google_compute_region_backend_service.rb | 70 +++---- .../google_compute_region_backend_services.rb | 40 ++-- ...e_compute_region_instance_group_manager.rb | 8 +- ..._compute_region_instance_group_managers.rb | 8 +- .../libraries/google_compute_regional_disk.rb | 68 +++--- generate/libraries/google_compute_regions.rb | 34 +-- generate/libraries/google_compute_route.rb | 66 +++--- generate/libraries/google_compute_router.rb | 54 ++--- generate/libraries/google_compute_routers.rb | 32 +-- generate/libraries/google_compute_routes.rb | 40 ++-- generate/libraries/google_compute_snapshot.rb | 78 +++---- .../libraries/google_compute_snapshots.rb | 44 ++-- .../google_compute_ssl_certificate.rb | 46 ++-- .../google_compute_ssl_certificates.rb | 30 +-- .../libraries/google_compute_ssl_policies.rb | 38 ++-- .../libraries/google_compute_ssl_policy.rb | 64 +++--- .../libraries/google_compute_subnetwork.rb | 74 +++---- .../google_compute_subnetwork_iam_policy.rb | 24 +-- .../libraries/google_compute_subnetworks.rb | 42 ++-- .../google_compute_target_http_proxies.rb | 28 +-- .../google_compute_target_http_proxy.rb | 42 ++-- .../google_compute_target_https_proxies.rb | 34 +-- .../google_compute_target_https_proxy.rb | 54 ++--- .../libraries/google_compute_target_pool.rb | 62 +++--- .../libraries/google_compute_target_pools.rb | 38 ++-- .../google_compute_target_tcp_proxies.rb | 30 +-- .../google_compute_target_tcp_proxy.rb | 46 ++-- generate/libraries/google_compute_url_map.rb | 64 +++--- generate/libraries/google_compute_url_maps.rb | 36 ++-- .../libraries/google_compute_vpn_tunnel.rb | 8 +- .../libraries/google_compute_vpn_tunnels.rb | 8 +- generate/libraries/google_compute_zone.rb | 14 +- generate/libraries/google_compute_zones.rb | 8 +- .../libraries/google_container_cluster.rb | 12 +- .../libraries/google_container_clusters.rb | 8 +- .../libraries/google_container_node_pool.rb | 18 +- .../libraries/google_container_node_pools.rb | 8 +- .../google_container_regional_cluster.rb | 198 +++++++++--------- .../google_container_regional_clusters.rb | 88 ++++---- .../google_container_regional_node_pool.rb | 90 ++++---- .../google_container_regional_node_pools.rb | 44 ++-- generate/libraries/google_dataproc_cluster.rb | 70 +++---- .../libraries/google_dataproc_clusters.rb | 26 +-- generate/libraries/google_dns_managed_zone.rb | 16 +- .../libraries/google_dns_managed_zones.rb | 12 +- .../google_dns_resource_record_set.rb | 44 ++-- .../google_dns_resource_record_sets.rb | 28 +-- .../libraries/google_filestore_instance.rb | 62 +++--- .../libraries/google_filestore_instances.rb | 36 ++-- generate/libraries/google_kms_crypto_key.rb | 24 +-- .../google_kms_crypto_key_iam_binding.rb | 8 +- .../google_kms_crypto_key_iam_bindings.rb | 8 +- generate/libraries/google_kms_crypto_keys.rb | 10 +- generate/libraries/google_kms_key_ring.rb | 18 +- .../google_kms_key_ring_iam_binding.rb | 8 +- .../google_kms_key_ring_iam_bindings.rb | 8 +- generate/libraries/google_kms_key_rings.rb | 10 +- .../google_logging_folder_exclusion.rb | 42 ++-- .../google_logging_folder_exclusions.rb | 28 +-- .../google_logging_folder_log_sink.rb | 46 ++-- .../google_logging_folder_log_sinks.rb | 30 +-- .../google_logging_organization_log_sink.rb | 46 ++-- .../google_logging_organization_log_sinks.rb | 30 +-- .../google_logging_project_exclusion.rb | 10 +- .../libraries/google_logging_project_sink.rb | 10 +- .../libraries/google_logging_project_sinks.rb | 8 +- generate/libraries/google_ml_engine_model.rb | 52 ++--- generate/libraries/google_ml_engine_models.rb | 32 +-- generate/libraries/google_organization.rb | 8 +- .../libraries/google_organization_policy.rb | 8 +- generate/libraries/google_organizations.rb | 8 +- generate/libraries/google_project.rb | 8 +- .../google_project_alert_policies.rb | 10 +- .../libraries/google_project_alert_policy.rb | 10 +- .../google_project_alert_policy_condition.rb | 10 +- .../libraries/google_project_iam_binding.rb | 8 +- .../libraries/google_project_iam_bindings.rb | 8 +- .../google_project_iam_custom_role.rb | 8 +- .../google_project_logging_audit_config.rb | 10 +- generate/libraries/google_project_metric.rb | 10 +- generate/libraries/google_project_metrics.rb | 10 +- generate/libraries/google_projects.rb | 8 +- .../libraries/google_pubsub_subscription.rb | 58 ++--- .../google_pubsub_subscription_iam_policy.rb | 24 +-- .../libraries/google_pubsub_subscriptions.rb | 34 +-- generate/libraries/google_pubsub_topic.rb | 40 ++-- .../google_pubsub_topic_iam_policy.rb | 24 +-- generate/libraries/google_pubsub_topics.rb | 26 +-- generate/libraries/google_redis_instance.rb | 86 ++++---- generate/libraries/google_redis_instances.rb | 50 ++--- .../google_resourcemanager_folder.rb | 42 ++-- .../google_resourcemanager_folders.rb | 28 +-- ...gle_resourcemanager_organization_policy.rb | 24 +-- ...ogle_resourcemanager_project_iam_policy.rb | 24 +-- .../libraries/google_runtime_config_config.rb | 30 +-- ...google_runtime_config_config_iam_policy.rb | 24 +-- .../google_runtime_config_configs.rb | 22 +- .../google_runtime_config_variable.rb | 38 ++-- .../google_runtime_config_variables.rb | 26 +-- generate/libraries/google_service_account.rb | 10 +- .../libraries/google_service_account_key.rb | 10 +- .../libraries/google_service_account_keys.rb | 8 +- generate/libraries/google_service_accounts.rb | 8 +- .../google_sourcerepo_repositories.rb | 24 +-- .../libraries/google_sourcerepo_repository.rb | 34 +-- .../libraries/google_sql_database_instance.rb | 14 +- .../google_sql_database_instances.rb | 8 +- generate/libraries/google_sql_users.rb | 8 +- generate/libraries/google_storage_bucket.rb | 8 +- .../libraries/google_storage_bucket_acl.rb | 8 +- .../google_storage_bucket_iam_binding.rb | 8 +- .../google_storage_bucket_iam_bindings.rb | 8 +- .../libraries/google_storage_bucket_object.rb | 10 +- .../google_storage_bucket_objects.rb | 8 +- generate/libraries/google_storage_buckets.rb | 8 +- .../google_storage_default_object_acl.rb | 8 +- .../libraries/google_storage_object_acl.rb | 10 +- generate/libraries/google_user.rb | 10 +- generate/libraries/google_users.rb | 14 +- libraries/gcp_backend.rb | 86 ++++---- .../property/accesslevel_basic.rb | 8 +- .../property/accesslevel_basic_conditions.rb | 18 +- ...esslevel_basic_conditions_device_policy.rb | 16 +- ...conditions_device_policy_os_constraints.rb | 6 +- .../property/accesslevel_custom.rb | 6 +- .../property/accesslevel_custom_expr.rb | 10 +- .../property/serviceperimeter_spec.rb | 12 +- ...eperimeter_spec_vpc_accessible_services.rb | 6 +- .../property/serviceperimeter_status.rb | 12 +- ...erimeter_status_vpc_accessible_services.rb | 6 +- .../property/organization_addons_config.rb | 26 +-- ...n_addons_config_advanced_api_ops_config.rb | 4 +- ...nization_addons_config_analytics_config.rb | 10 +- ...ation_addons_config_api_security_config.rb | 6 +- ...ddons_config_connectors_platform_config.rb | 6 +- ...zation_addons_config_integration_config.rb | 4 +- ...ation_addons_config_monetization_config.rb | 4 +- .../property/organization_properties.rb | 6 +- .../organization_properties_property.rb | 6 +- .../standardappversion_automatic_scaling.rb | 16 +- ...tic_scaling_standard_scheduler_settings.rb | 10 +- .../standardappversion_basic_scaling.rb | 6 +- .../standardappversion_manual_scaling.rb | 4 +- ...standardappversion_vpc_access_connector.rb | 4 +- ...jectlocationrepository_cleanup_policies.rb | 4 +- ...projectlocationrepository_docker_config.rb | 4 +- .../projectlocationrepository_labels.rb | 4 +- .../projectlocationrepository_maven_config.rb | 6 +- ...tionrepository_remote_repository_config.rb | 38 ++-- ...remote_repository_config_apt_repository.rb | 6 +- ...config_apt_repository_public_repository.rb | 6 +- ...ote_repository_config_docker_repository.rb | 4 +- ...mote_repository_config_maven_repository.rb | 4 +- ...remote_repository_config_npm_repository.rb | 4 +- ...ote_repository_config_python_repository.rb | 4 +- ..._repository_config_upstream_credentials.rb | 6 +- ...edentials_username_password_credentials.rb | 6 +- ...remote_repository_config_yum_repository.rb | 6 +- ...config_yum_repository_public_repository.rb | 6 +- ...ionrepository_virtual_repository_config.rb | 6 +- ...ual_repository_config_upstream_policies.rb | 8 +- .../bigquery/property/dataset_access.rb | 18 +- .../bigquery/property/dataset_access_view.rb | 8 +- .../property/dataset_dataset_reference.rb | 6 +- ...ataset_default_encryption_configuration.rb | 4 +- .../table_encryption_configuration.rb | 4 +- .../table_external_data_configuration.rb | 34 +-- ...nal_data_configuration_bigtable_options.rb | 10 +- ...ration_bigtable_options_column_families.rb | 14 +- ...igtable_options_column_families_columns.rb | 12 +- ...external_data_configuration_csv_options.rb | 14 +- ...ata_configuration_google_sheets_options.rb | 4 +- ...able_external_data_configuration_schema.rb | 6 +- ...ternal_data_configuration_schema_fields.rb | 12 +- .../google/bigquery/property/table_schema.rb | 6 +- .../bigquery/property/table_schema_fields.rb | 12 +- .../property/table_streaming_buffer.rb | 8 +- .../property/table_table_reference.rb | 8 +- .../property/table_time_partitioning.rb | 8 +- .../google/bigquery/property/table_view.rb | 8 +- ...le_view_user_defined_function_resources.rb | 6 +- .../cloudbuild/property/trigger_build.rb | 44 ++-- .../property/trigger_build_artifacts.rb | 10 +- .../trigger_build_artifacts_objects.rb | 10 +- .../trigger_build_artifacts_objects_timing.rb | 6 +- .../property/trigger_build_options.rb | 28 +-- .../property/trigger_build_options_volumes.rb | 6 +- .../property/trigger_build_secrets.rb | 6 +- .../property/trigger_build_source.rb | 10 +- .../trigger_build_source_repo_source.rb | 18 +- .../trigger_build_source_storage_source.rb | 8 +- .../property/trigger_build_steps.rb | 26 +-- .../property/trigger_build_steps_volumes.rb | 6 +- .../cloudbuild/property/trigger_github.rb | 14 +- .../property/trigger_github_pull_request.rb | 8 +- .../property/trigger_github_push.rb | 8 +- .../property/trigger_trigger_template.rb | 16 +- .../property/cloudfunction_event_trigger.rb | 8 +- .../property/cloudfunction_https_trigger.rb | 4 +- .../cloudfunction_source_repository.rb | 6 +- .../property/job_app_engine_http_target.rb | 14 +- ...p_engine_http_target_app_engine_routing.rb | 8 +- .../property/job_http_target.rb | 18 +- .../property/job_http_target_oauth_token.rb | 6 +- .../property/job_http_target_oidc_token.rb | 6 +- .../property/job_pubsub_target.rb | 8 +- .../property/job_retry_config.rb | 12 +- .../projectlocationenvironment_config.rb | 86 ++++---- ...ationenvironment_config_database_config.rb | 6 +- ...ionenvironment_config_encryption_config.rb | 4 +- ...onenvironment_config_maintenance_window.rb | 8 +- ...onfig_master_authorized_networks_config.rb | 8 +- ..._authorized_networks_config_cidr_blocks.rb | 6 +- ...tlocationenvironment_config_node_config.rb | 24 +-- ...config_node_config_ip_allocation_policy.rb | 12 +- ...nment_config_private_environment_config.rb | 26 +-- ...te_environment_config_networking_config.rb | 4 +- ...vironment_config_private_cluster_config.rb | 8 +- ...ationenvironment_config_recovery_config.rb | 6 +- ...overy_config_scheduled_snapshots_config.rb | 10 +- ...ationenvironment_config_software_config.rb | 20 +- ...oftware_config_airflow_config_overrides.rb | 4 +- ...nt_config_software_config_env_variables.rb | 4 +- ...nt_config_software_config_pypi_packages.rb | 4 +- ...ionenvironment_config_web_server_config.rb | 4 +- ...onfig_web_server_network_access_control.rb | 6 +- ...etwork_access_control_allowed_ip_ranges.rb | 6 +- ...tionenvironment_config_workloads_config.rb | 18 +- ...nment_config_workloads_config_scheduler.rb | 10 +- ...nment_config_workloads_config_triggerer.rb | 8 +- ...ment_config_workloads_config_web_server.rb | 8 +- ...ironment_config_workloads_config_worker.rb | 12 +- .../projectlocationenvironment_labels.rb | 2 +- ...ojectlocationenvironment_storage_config.rb | 4 +- .../property/acceleratortype_deprecated.rb | 12 +- .../property/autoscaler_autoscaling_policy.rb | 38 ++-- ...aler_autoscaling_policy_cpu_utilization.rb | 6 +- ...aling_policy_custom_metric_utilizations.rb | 12 +- ...aling_policy_load_balancing_utilization.rb | 4 +- ...r_autoscaling_policy_scale_down_control.rb | 8 +- ...e_down_control_max_scaled_down_replicas.rb | 6 +- ...ler_autoscaling_policy_scale_in_control.rb | 8 +- ...scale_in_control_max_scaled_in_replicas.rb | 6 +- ...er_autoscaling_policy_scaling_schedules.rb | 14 +- .../property/backendbucket_cdn_policy.rb | 20 +- ...cket_cdn_policy_negative_caching_policy.rb | 6 +- .../property/backendservice_backends.rb | 24 +-- .../property/backendservice_cdn_policy.rb | 24 +-- ...kendservice_cdn_policy_cache_key_policy.rb | 12 +- ...vice_cdn_policy_negative_caching_policy.rb | 6 +- .../backendservice_circuit_breakers.rb | 16 +- ...ervice_circuit_breakers_connect_timeout.rb | 6 +- .../backendservice_connection_draining.rb | 4 +- .../backendservice_consistent_hash.rb | 12 +- ...kendservice_consistent_hash_http_cookie.rb | 10 +- ...service_consistent_hash_http_cookie_ttl.rb | 6 +- .../compute/property/backendservice_iap.rb | 10 +- .../property/backendservice_log_config.rb | 6 +- .../backendservice_outlier_detection.rb | 28 +-- ...ce_outlier_detection_base_ejection_time.rb | 6 +- ...ckendservice_outlier_detection_interval.rb | 6 +- .../property/disk_disk_encryption_key.rb | 10 +- .../disk_source_image_encryption_key.rb | 10 +- .../disk_source_snapshot_encryption_key.rb | 10 +- .../compute/property/disktype_deprecated.rb | 12 +- .../property/externalvpngateway_interfaces.rb | 6 +- .../compute/property/firewall_allowed.rb | 6 +- .../compute/property/firewall_denied.rb | 6 +- .../compute/property/firewall_log_config.rb | 6 +- .../globalforwardingrule_metadata_filters.rb | 8 +- ...dingrule_metadata_filters_filter_labels.rb | 6 +- .../property/healthcheck_grpc_health_check.rb | 10 +- .../healthcheck_http2_health_check.rb | 16 +- .../property/healthcheck_http_health_check.rb | 16 +- .../healthcheck_https_health_check.rb | 16 +- .../property/healthcheck_log_config.rb | 4 +- .../property/healthcheck_ssl_health_check.rb | 14 +- .../property/healthcheck_tcp_health_check.rb | 14 +- .../compute/property/image_deprecated.rb | 12 +- .../property/image_guest_os_features.rb | 4 +- .../property/image_image_encryption_key.rb | 8 +- .../google/compute/property/image_raw_disk.rb | 8 +- .../image_source_disk_encryption_key.rb | 8 +- .../compute/property/imagefamilyview_image.rb | 56 ++--- .../imagefamilyview_image_deprecated.rb | 12 +- ...gefamilyview_image_image_encryption_key.rb | 12 +- .../imagefamilyview_image_raw_disk.rb | 8 +- ...lyview_image_source_disk_encryption_key.rb | 12 +- ...ew_image_source_snapshot_encryption_key.rb | 18 +- ...mage_source_snapshot_encryption_key_dbs.rb | 6 +- ...age_source_snapshot_encryption_key_dbxs.rb | 6 +- ...age_source_snapshot_encryption_key_keks.rb | 6 +- ...image_source_snapshot_encryption_key_pk.rb | 6 +- .../google/compute/property/instance_disks.rb | 30 +-- .../instance_disks_disk_encryption_key.rb | 8 +- .../instance_disks_initialize_params.rb | 14 +- ...lize_params_source_image_encryption_key.rb | 6 +- .../property/instance_guest_accelerators.rb | 6 +- .../property/instance_network_interfaces.rb | 18 +- ...tance_network_interfaces_access_configs.rb | 14 +- ...ance_network_interfaces_alias_ip_ranges.rb | 6 +- .../compute/property/instance_scheduling.rb | 8 +- .../property/instance_service_accounts.rb | 6 +- .../instance_shielded_instance_config.rb | 8 +- .../google/compute/property/instance_tags.rb | 6 +- .../property/instancegroup_named_ports.rb | 6 +- .../instancegroupmanager_current_actions.rb | 18 +- .../instancegroupmanager_named_ports.rb | 6 +- .../property/instancetemplate_properties.rb | 38 ++-- .../instancetemplate_properties_disks.rb | 30 +-- ...te_properties_disks_disk_encryption_key.rb | 8 +- ...late_properties_disks_initialize_params.rb | 14 +- ...lize_params_source_image_encryption_key.rb | 6 +- ...etemplate_properties_guest_accelerators.rb | 6 +- ...etemplate_properties_network_interfaces.rb | 18 +- ...rties_network_interfaces_access_configs.rb | 14 +- ...ties_network_interfaces_alias_ip_ranges.rb | 6 +- .../instancetemplate_properties_scheduling.rb | 8 +- ...ncetemplate_properties_service_accounts.rb | 6 +- .../instancetemplate_properties_tags.rb | 6 +- .../property/interconnect_circuit_infos.rb | 8 +- .../property/interconnect_expected_outages.rb | 18 +- .../property/licensecode_license_alias.rb | 6 +- .../compute/property/network_peerings.rb | 16 +- .../property/network_routing_config.rb | 4 +- .../property/nodegroup_autoscaling_policy.rb | 8 +- .../nodetemplate_node_type_flexibility.rb | 8 +- .../property/nodetemplate_server_binding.rb | 4 +- .../projectinfo_common_instance_metadata.rb | 6 +- ...jectinfo_common_instance_metadata_items.rb | 6 +- .../compute/property/projectinfo_quotas.rb | 10 +- .../compute/property/region_deprecated.rb | 12 +- .../google/compute/property/region_quotas.rb | 10 +- .../property/regionbackendservice_backends.rb | 26 +-- .../regionbackendservice_cdn_policy.rb | 24 +-- ...kendservice_cdn_policy_cache_key_policy.rb | 12 +- ...vice_cdn_policy_negative_caching_policy.rb | 6 +- .../regionbackendservice_circuit_breakers.rb | 16 +- ...ervice_circuit_breakers_connect_timeout.rb | 6 +- ...egionbackendservice_connection_draining.rb | 4 +- .../regionbackendservice_consistent_hash.rb | 12 +- ...kendservice_consistent_hash_http_cookie.rb | 10 +- ...service_consistent_hash_http_cookie_ttl.rb | 6 +- .../regionbackendservice_failover_policy.rb | 8 +- .../regionbackendservice_log_config.rb | 6 +- .../regionbackendservice_outlier_detection.rb | 28 +-- ...ce_outlier_detection_base_ejection_time.rb | 6 +- ...ckendservice_outlier_detection_interval.rb | 6 +- .../regionhealthcheck_grpc_health_check.rb | 10 +- .../regionhealthcheck_http2_health_check.rb | 16 +- .../regionhealthcheck_http_health_check.rb | 16 +- .../regionhealthcheck_https_health_check.rb | 16 +- .../property/regionhealthcheck_log_config.rb | 4 +- .../regionhealthcheck_ssl_health_check.rb | 14 +- .../regionhealthcheck_tcp_health_check.rb | 14 +- .../regioninstancegroup_named_ports.rb | 6 +- ...tancegroupmanager_auto_healing_policies.rb | 6 +- ...ioninstancegroupmanager_current_actions.rb | 18 +- .../regioninstancegroupmanager_named_ports.rb | 6 +- ...curitypolicy_adaptive_protection_config.rb | 8 +- ...ction_config_layer7_ddos_defense_config.rb | 10 +- ...7_ddos_defense_config_threshold_configs.rb | 12 +- ...nsecuritypolicy_advanced_options_config.rb | 10 +- ...anced_options_config_json_custom_config.rb | 4 +- ...onsecuritypolicy_ddos_protection_config.rb | 4 +- .../property/regionsecuritypolicy_labels.rb | 4 +- ...securitypolicy_recaptcha_options_config.rb | 4 +- .../property/regionsecuritypolicy_rules.rb | 48 ++--- ...egionsecuritypolicy_rules_header_action.rb | 6 +- ...s_header_action_request_headers_to_adds.rb | 6 +- .../regionsecuritypolicy_rules_match.rb | 12 +- ...regionsecuritypolicy_rules_match_config.rb | 4 +- .../regionsecuritypolicy_rules_match_expr.rb | 10 +- ...typolicy_rules_preconfigured_waf_config.rb | 6 +- ...les_preconfigured_waf_config_exclusions.rb | 22 +- ...g_exclusions_request_cookies_to_exclude.rb | 6 +- ...g_exclusions_request_headers_to_exclude.rb | 6 +- ...lusions_request_query_params_to_exclude.rb | 6 +- ...nfig_exclusions_request_uris_to_exclude.rb | 6 +- ...securitypolicy_rules_rate_limit_options.rb | 28 +-- ..._rules_rate_limit_options_ban_threshold.rb | 6 +- ...te_limit_options_enforce_on_key_configs.rb | 6 +- ...e_limit_options_exceed_redirect_options.rb | 6 +- ...rate_limit_options_rate_limit_threshold.rb | 6 +- ...onsecuritypolicy_rules_redirect_options.rb | 6 +- .../google/compute/property/router_bgp.rb | 12 +- .../router_bgp_advertised_ip_ranges.rb | 6 +- .../compute/property/routernat_log_config.rb | 6 +- .../compute/property/routernat_subnetwork.rb | 8 +- .../compute/property/securitypolicy_rules.rb | 18 +- .../property/securitypolicy_rules_match.rb | 14 +- .../securitypolicy_rules_match_config.rb | 4 +- .../securitypolicy_rules_match_expr.rb | 10 +- .../serviceattachment_connected_endpoints.rb | 10 +- ...serviceattachment_consumer_accept_lists.rb | 8 +- ...iceattachment_psc_service_attachment_id.rb | 6 +- .../snapshot_snapshot_encryption_key.rb | 10 +- .../snapshot_source_disk_encryption_key.rb | 8 +- .../compute/property/sslpolicy_warnings.rb | 6 +- .../compute/property/subnetwork_log_config.rb | 14 +- .../subnetwork_secondary_ip_ranges.rb | 6 +- .../property/urlmap_default_route_action.rb | 38 ++-- ...urlmap_default_route_action_cors_policy.rb | 18 +- ...ult_route_action_fault_injection_policy.rb | 12 +- ...ute_action_fault_injection_policy_abort.rb | 6 +- ...ute_action_fault_injection_policy_delay.rb | 8 +- ...ault_injection_policy_delay_fixed_delay.rb | 6 +- ...ault_route_action_request_mirror_policy.rb | 4 +- ...rlmap_default_route_action_retry_policy.rb | 10 +- ...ute_action_retry_policy_per_try_timeout.rb | 6 +- .../urlmap_default_route_action_timeout.rb | 6 +- ...urlmap_default_route_action_url_rewrite.rb | 6 +- ..._route_action_weighted_backend_services.rb | 14 +- ...weighted_backend_services_header_action.rb | 14 +- ...es_header_action_request_headers_to_add.rb | 8 +- ...s_header_action_response_headers_to_add.rb | 8 +- .../property/urlmap_default_url_redirect.rb | 14 +- .../compute/property/urlmap_header_action.rb | 14 +- ...ap_header_action_request_headers_to_add.rb | 8 +- ...p_header_action_response_headers_to_add.rb | 8 +- .../compute/property/urlmap_host_rules.rb | 8 +- .../compute/property/urlmap_path_matchers.rb | 44 ++-- ...lmap_path_matchers_default_route_action.rb | 34 +-- ...tchers_default_route_action_cors_policy.rb | 18 +- ...ult_route_action_fault_injection_policy.rb | 12 +- ...ute_action_fault_injection_policy_abort.rb | 6 +- ...ute_action_fault_injection_policy_delay.rb | 8 +- ...ault_injection_policy_delay_fixed_delay.rb | 6 +- ...ault_route_action_request_mirror_policy.rb | 4 +- ...chers_default_route_action_retry_policy.rb | 10 +- ...ute_action_retry_policy_per_try_timeout.rb | 6 +- ...h_matchers_default_route_action_timeout.rb | 6 +- ...tchers_default_route_action_url_rewrite.rb | 6 +- ...lmap_path_matchers_default_url_redirect.rb | 14 +- .../urlmap_path_matchers_header_action.rb | 14 +- ...rs_header_action_request_headers_to_add.rb | 8 +- ...s_header_action_response_headers_to_add.rb | 8 +- .../google/compute/property/urlmap_tests.rb | 10 +- .../compute/property/vpngateway_labels.rb | 4 +- .../property/vpngateway_vpn_interfaces.rb | 8 +- .../compute/property/zone_deprecated.rb | 12 +- .../property/cluster_addons_config.rb | 22 +- ...g_gce_persistent_disk_csi_driver_config.rb | 4 +- ...ddons_config_horizontal_pod_autoscaling.rb | 4 +- ...uster_addons_config_http_load_balancing.rb | 4 +- ...ster_addons_config_kubernetes_dashboard.rb | 4 +- ...ter_addons_config_network_policy_config.rb | 4 +- .../property/cluster_binary_authorization.rb | 4 +- .../container/property/cluster_conditions.rb | 6 +- .../property/cluster_database_encryption.rb | 6 +- .../cluster_default_max_pods_constraint.rb | 4 +- .../property/cluster_ip_allocation_policy.rb | 20 +- .../container/property/cluster_legacy_abac.rb | 4 +- .../container/property/cluster_master_auth.rb | 16 +- ...r_master_auth_client_certificate_config.rb | 4 +- ...uster_master_authorized_networks_config.rb | 8 +- ..._authorized_networks_config_cidr_blocks.rb | 6 +- .../property/cluster_network_config.rb | 10 +- .../property/cluster_network_policy.rb | 6 +- .../container/property/cluster_node_config.rb | 38 ++-- .../cluster_node_config_accelerators.rb | 6 +- ...er_node_config_shielded_instance_config.rb | 6 +- .../property/cluster_node_config_taints.rb | 8 +- .../container/property/cluster_node_pools.rb | 4 +- .../cluster_pod_security_policy_config.rb | 4 +- .../cluster_private_cluster_config.rb | 12 +- .../property/cluster_release_channel.rb | 4 +- .../property/cluster_shielded_nodes.rb | 4 +- .../property/nodepool_autoscaling.rb | 8 +- .../container/property/nodepool_conditions.rb | 4 +- .../container/property/nodepool_config.rb | 42 ++-- .../property/nodepool_config_accelerators.rb | 6 +- ...odepool_config_shielded_instance_config.rb | 6 +- .../property/nodepool_config_taints.rb | 8 +- .../nodepool_config_workload_meta_config.rb | 4 +- .../container/property/nodepool_management.rb | 10 +- .../nodepool_management_upgrade_options.rb | 6 +- .../property/nodepool_max_pods_constraint.rb | 4 +- .../property/serverconfig_channels.rb | 8 +- .../dataproc/property/cluster_config.rb | 50 ++--- .../cluster_config_encryption_config.rb | 4 +- .../cluster_config_gce_cluster_config.rb | 16 +- .../cluster_config_initialization_actions.rb | 6 +- .../property/cluster_config_master_config.rb | 20 +- ...luster_config_master_config_disk_config.rb | 8 +- ...nfig_master_config_managed_group_config.rb | 6 +- .../cluster_config_secondary_worker_config.rb | 20 +- ...fig_secondary_worker_config_disk_config.rb | 8 +- ...dary_worker_config_managed_group_config.rb | 6 +- .../cluster_config_security_config.rb | 6 +- ..._config_security_config_kerberos_config.rb | 28 +-- .../cluster_config_software_config.rb | 8 +- .../property/cluster_config_worker_config.rb | 20 +- ...luster_config_worker_config_disk_config.rb | 8 +- ...nfig_worker_config_managed_group_config.rb | 6 +- libraries/google/dlp/property/dt_config.rb | 8 +- .../dlp/property/dt_config_info_type_tf.rb | 6 +- .../dlp/property/dt_config_info_type_tf_tf.rb | 50 ++--- .../dt_config_info_type_tf_tf_info_types.rb | 4 +- .../dt_config_info_type_tf_tf_primitive_tf.rb | 52 ++--- ...f_tf_primitive_tf_character_mask_config.rb | 12 +- ...racter_mask_config_characters_to_ignore.rb | 6 +- ...rimitive_tf_crypto_deterministic_config.rb | 20 +- ..._tf_crypto_deterministic_config_context.rb | 4 +- ..._crypto_deterministic_config_crypto_key.rb | 14 +- ...rministic_config_crypto_key_kms_wrapped.rb | 6 +- ...terministic_config_crypto_key_transient.rb | 4 +- ...terministic_config_crypto_key_unwrapped.rb | 4 +- ...eterministic_config_surrogate_info_type.rb | 4 +- ...mitive_tf_crypto_replace_ffx_fpe_config.rb | 26 +-- ...f_crypto_replace_ffx_fpe_config_context.rb | 4 +- ...rypto_replace_ffx_fpe_config_crypto_key.rb | 14 +- ...e_ffx_fpe_config_crypto_key_kms_wrapped.rb | 6 +- ...ace_ffx_fpe_config_crypto_key_transient.rb | 4 +- ...ace_ffx_fpe_config_crypto_key_unwrapped.rb | 4 +- ...lace_ffx_fpe_config_surrogate_info_type.rb | 4 +- ..._type_tf_tf_primitive_tf_replace_config.rb | 10 +- ...f_primitive_tf_replace_config_new_value.rb | 22 +- ..._tf_replace_config_new_value_date_value.rb | 8 +- ..._tf_replace_config_new_value_time_value.rb | 10 +- .../inspecttemplate_inspect_config.rb | 28 +-- ...mplate_inspect_config_custom_info_types.rb | 26 +-- ...ect_config_custom_info_types_dictionary.rb | 10 +- ...nfo_types_dictionary_cloud_storage_path.rb | 4 +- ..._custom_info_types_dictionary_word_list.rb | 4 +- ...pect_config_custom_info_types_info_type.rb | 4 +- ..._inspect_config_custom_info_types_regex.rb | 6 +- ...ct_config_custom_info_types_stored_type.rb | 4 +- ...specttemplate_inspect_config_info_types.rb | 4 +- .../inspecttemplate_inspect_config_limits.rb | 10 +- ...onfig_limits_max_findings_per_info_type.rb | 8 +- ...ts_max_findings_per_info_type_info_type.rb | 4 +- ...inspecttemplate_inspect_config_rule_set.rb | 10 +- ...late_inspect_config_rule_set_info_types.rb | 4 +- ...ttemplate_inspect_config_rule_set_rules.rb | 28 +-- ...ct_config_rule_set_rules_exclusion_rule.rb | 22 +- ...ule_set_rules_exclusion_rule_dictionary.rb | 10 +- ...sion_rule_dictionary_cloud_storage_path.rb | 4 +- ...les_exclusion_rule_dictionary_word_list.rb | 4 +- ...rules_exclusion_rule_exclude_info_types.rb | 6 +- ...sion_rule_exclude_info_types_info_types.rb | 4 +- ...fig_rule_set_rules_exclusion_rule_regex.rb | 6 +- ...pect_config_rule_set_rules_hotword_rule.rb | 14 +- ...le_set_rules_hotword_rule_hotword_regex.rb | 6 +- ...ules_hotword_rule_likelihood_adjustment.rb | 6 +- ...g_rule_set_rules_hotword_rule_proximity.rb | 6 +- libraries/google/dlp/property/job_act_det.rb | 50 ++--- .../property/job_act_det_deidentify_stats.rb | 8 +- ..._det_deidentify_stats_requested_options.rb | 10 +- ...dentify_stats_requested_options_details.rb | 6 +- .../google/dlp/property/job_act_det_dt_det.rb | 42 ++-- .../property/job_act_det_dt_det_de_stats.rb | 8 +- .../property/job_act_det_dt_det_req_opt.rb | 40 ++-- ...det_dt_det_req_opt_snapshot_di_template.rb | 16 +- ...det_req_opt_snapshot_di_template_config.rb | 4 +- .../job_act_det_dt_det_req_opt_snapshot_dt.rb | 16 +- ...t_det_dt_det_req_opt_snapshot_dt_config.rb | 4 +- ..._act_det_dt_det_req_opt_snapshot_img_rt.rb | 36 ++-- ...t_dt_det_req_opt_snapshot_img_rt_dt_con.rb | 30 +-- ...req_opt_snapshot_img_rt_dt_con_image_tf.rb | 18 +- ...t_img_rt_dt_con_image_tf_all_info_types.rb | 4 +- ...napshot_img_rt_dt_con_image_tf_all_text.rb | 8 +- ..._img_rt_dt_con_image_tf_redaction_color.rb | 8 +- ..._rt_dt_con_image_tf_selected_info_types.rb | 4 +- ...opt_snapshot_img_rt_dt_con_info_type_tf.rb | 6 +- ..._snapshot_img_rt_dt_con_info_type_tf_tf.rb | 6 +- ...mg_rt_dt_con_info_type_tf_tf_info_types.rb | 10 +- ...type_tf_tf_info_types_sensitivity_score.rb | 4 +- ...t_req_opt_snapshot_img_rt_dt_con_rec_tf.rb | 10 +- ..._snapshot_img_rt_dt_con_rec_tf_field_tf.rb | 16 +- ...pshot_img_rt_dt_con_rec_tf_field_tf_con.rb | 10 +- ..._img_rt_dt_con_rec_tf_field_tf_con_exps.rb | 10 +- ..._rt_dt_con_rec_tf_field_tf_con_exps_con.rb | 6 +- ...t_con_rec_tf_field_tf_con_exps_con_cond.rb | 16 +- ...rec_tf_field_tf_con_exps_con_cond_field.rb | 4 +- ...c_tf_field_tf_con_exps_con_cond_new_val.rb | 22 +- ...d_tf_con_exps_con_cond_new_val_date_val.rb | 8 +- ...d_tf_con_exps_con_cond_new_val_time_val.rb | 10 +- ...ot_img_rt_dt_con_rec_tf_field_tf_fields.rb | 4 +- ...t_snapshot_img_rt_dt_con_rec_tf_rec_sup.rb | 12 +- ...apshot_img_rt_dt_con_rec_tf_rec_sup_con.rb | 10 +- ...ot_img_rt_dt_con_rec_tf_rec_sup_con_exp.rb | 10 +- ...mg_rt_dt_con_rec_tf_rec_sup_con_exp_con.rb | 6 +- ...t_dt_con_rec_tf_rec_sup_con_exp_con_con.rb | 16 +- ...on_rec_tf_rec_sup_con_exp_con_con_field.rb | 4 +- ..._rec_tf_rec_sup_con_exp_con_con_new_val.rb | 22 +- ...ec_sup_con_exp_con_con_new_val_date_val.rb | 8 +- ...ec_sup_con_exp_con_con_new_val_time_val.rb | 10 +- ...t_dt_det_req_opt_snapshot_structured_dt.rb | 16 +- ...napshot_structured_dt_deidentify_config.rb | 4 +- libraries/google/dlp/property/job_errors.rb | 10 +- .../google/dlp/property/job_errors_details.rb | 8 +- .../dlp/property/job_errors_details_status.rb | 10 +- .../job_errors_details_status_details.rb | 6 +- .../dlp/property/jobtrigger_inspect_job.rb | 32 +-- .../jobtrigger_inspect_job_actions.rb | 10 +- ...igger_inspect_job_actions_save_findings.rb | 8 +- ...job_actions_save_findings_output_config.rb | 8 +- ...tions_save_findings_output_config_table.rb | 8 +- .../jobtrigger_inspect_job_storage_config.rb | 30 +-- ...ct_job_storage_config_big_query_options.rb | 6 +- ...onfig_big_query_options_table_reference.rb | 8 +- ...ob_storage_config_cloud_storage_options.rb | 18 +- ...e_config_cloud_storage_options_file_set.rb | 8 +- ...storage_options_file_set_regex_file_set.rb | 8 +- ...ct_job_storage_config_datastore_options.rb | 10 +- ...b_storage_config_datastore_options_kind.rb | 4 +- ...e_config_datastore_options_partition_id.rb | 6 +- ...pect_job_storage_config_timespan_config.rb | 12 +- ..._config_timespan_config_timestamp_field.rb | 4 +- .../dlp/property/jobtrigger_triggers.rb | 6 +- .../property/jobtrigger_triggers_schedule.rb | 4 +- .../dlp/property/storedinfotype_dictionary.rb | 10 +- ...dinfotype_dictionary_cloud_storage_path.rb | 4 +- .../storedinfotype_dictionary_word_list.rb | 4 +- .../storedinfotype_large_custom_dictionary.rb | 18 +- ...large_custom_dictionary_big_query_field.rb | 10 +- ...custom_dictionary_big_query_field_field.rb | 4 +- ...custom_dictionary_big_query_field_table.rb | 8 +- ...ustom_dictionary_cloud_storage_file_set.rb | 4 +- ...ype_large_custom_dictionary_output_path.rb | 4 +- .../dlp/property/storedinfotype_regex.rb | 6 +- .../dns/property/managedzone_dnssec_config.rb | 12 +- ...gedzone_dnssec_config_default_key_specs.rb | 10 +- .../property/managedzone_forwarding_config.rb | 6 +- ...e_forwarding_config_target_name_servers.rb | 6 +- .../property/managedzone_peering_config.rb | 6 +- ...nagedzone_peering_config_target_network.rb | 4 +- .../managedzone_private_visibility_config.rb | 6 +- ...zone_private_visibility_config_networks.rb | 4 +- .../managedzone_service_directory_config.rb | 6 +- ...zone_service_directory_config_namespace.rb | 4 +- .../property/instance_file_shares.rb | 10 +- ...instance_file_shares_nfs_export_options.rb | 12 +- .../filestore/property/instance_networks.rb | 10 +- .../iam/property/iam_binding_condition.rb | 8 +- .../iam/property/iam_policy_audit_configs.rb | 8 +- ..._policy_audit_configs_audit_log_configs.rb | 6 +- .../iam/property/iam_policy_bindings.rb | 10 +- .../property/cryptokey_version_template.rb | 6 +- .../ekmconnection_service_resolvers.rb | 12 +- ...n_service_resolvers_server_certificates.rb | 20 +- .../property/keyringimportjob_attestation.rb | 6 +- .../property/keyringimportjob_public_key.rb | 4 +- .../logging/property/metric_bucket_options.rb | 14 +- .../metric_bucket_options_explicit_buckets.rb | 4 +- ...tric_bucket_options_exponential_buckets.rb | 8 +- .../metric_bucket_options_linear_buckets.rb | 8 +- .../property/metric_metric_descriptor.rb | 16 +- .../metric_metric_descriptor_labels.rb | 8 +- .../property/instance_memcache_nodes.rb | 12 +- .../property/instance_memcache_parameters.rb | 6 +- .../memcache/property/instance_node_config.rb | 6 +- .../memcache/property/instance_parameters.rb | 6 +- .../property/model_default_version.rb | 4 +- .../property/alertpolicy_conditions.rb | 30 +-- ...alertpolicy_conditions_condition_absent.rb | 14 +- ...onditions_condition_absent_aggregations.rb | 10 +- ...icy_conditions_condition_absent_trigger.rb | 6 +- ...ons_condition_monitoring_query_language.rb | 10 +- ...ition_monitoring_query_language_trigger.rb | 6 +- ...rtpolicy_conditions_condition_threshold.rb | 24 +-- ...itions_condition_threshold_aggregations.rb | 10 +- ...tion_threshold_denominator_aggregations.rb | 10 +- ..._conditions_condition_threshold_trigger.rb | 6 +- .../property/alertpolicy_creation_record.rb | 6 +- .../property/alertpolicy_documentation.rb | 6 +- .../subscription_dead_letter_policy.rb | 6 +- .../subscription_expiration_policy.rb | 4 +- .../property/subscription_push_config.rb | 10 +- .../subscription_push_config_oidc_token.rb | 6 +- .../property/subscription_retry_policy.rb | 6 +- .../property/topic_message_storage_policy.rb | 4 +- .../property/instance_server_ca_certs.rb | 12 +- .../property/organization_owner.rb | 4 +- .../property/project_parent.rb | 6 +- .../serviceusage/property/service_config.rb | 10 +- .../property/service_config_apis.rb | 6 +- .../property/repository_pubsub_configs.rb | 6 +- .../sql/property/connect_ip_addresses.rb | 8 +- .../sql/property/connect_server_ca_cert.rb | 16 +- ...einstance_disk_encryption_configuration.rb | 4 +- ...databaseinstance_disk_encryption_status.rb | 4 +- .../databaseinstance_failover_replica.rb | 6 +- .../property/databaseinstance_ip_addresses.rb | 8 +- .../databaseinstance_replica_configuration.rb | 12 +- ...nfiguration_mysql_replica_configuration.rb | 22 +- .../databaseinstance_server_ca_cert.rb | 14 +- .../sql/property/databaseinstance_settings.rb | 40 ++-- ...einstance_settings_backup_configuration.rb | 8 +- ...atabaseinstance_settings_database_flags.rb | 6 +- ...abaseinstance_settings_ip_configuration.rb | 10 +- ...gs_ip_configuration_authorized_networks.rb | 8 +- .../google/storage/property/bucket_acl.rb | 20 +- .../property/bucket_acl_project_team.rb | 6 +- .../google/storage/property/bucket_cors.rb | 10 +- .../property/bucket_default_object_acl.rb | 24 +-- .../bucket_default_object_acl_project_team.rb | 6 +- .../storage/property/bucket_encryption.rb | 4 +- .../storage/property/bucket_lifecycle.rb | 6 +- .../storage/property/bucket_lifecycle_rule.rb | 10 +- .../property/bucket_lifecycle_rule_action.rb | 6 +- .../bucket_lifecycle_rule_condition.rb | 12 +- .../google/storage/property/bucket_logging.rb | 6 +- .../google/storage/property/bucket_owner.rb | 6 +- .../property/bucket_retention_policy.rb | 8 +- .../storage/property/bucket_versioning.rb | 4 +- .../google/storage/property/bucket_website.rb | 6 +- .../property/bucketacl_project_team.rb | 6 +- .../property/defaultobjectacl_project_team.rb | 6 +- .../property/objectacl_project_team.rb | 6 +- .../batchpredictionjob_completion_stats.rb | 10 +- .../batchpredictionjob_dedicated_resources.rb | 10 +- ...ionjob_dedicated_resources_machine_spec.rb | 8 +- .../batchpredictionjob_encryption_spec.rb | 4 +- .../property/batchpredictionjob_error.rb | 8 +- .../batchpredictionjob_explanation_spec.rb | 44 ++-- ...predictionjob_explanation_spec_metadata.rb | 14 +- ...ionjob_explanation_spec_metadata_inputs.rb | 4 +- ...onjob_explanation_spec_metadata_outputs.rb | 4 +- ...edictionjob_explanation_spec_parameters.rb | 44 ++-- ...ob_explanation_spec_parameters_examples.rb | 16 +- ..._parameters_examples_example_gcs_source.rb | 8 +- ..._examples_example_gcs_source_gcs_source.rb | 4 +- ...nation_spec_parameters_examples_presets.rb | 6 +- ...meters_integrated_gradients_attribution.rb | 16 +- ...dients_attribution_blur_baseline_config.rb | 4 +- ...radients_attribution_smooth_grad_config.rb | 12 +- ..._smooth_grad_config_feature_noise_sigma.rb | 6 +- ..._config_feature_noise_sigma_noise_sigma.rb | 6 +- ..._parameters_sampled_shapley_attribution.rb | 4 +- ...nation_spec_parameters_xrai_attribution.rb | 16 +- ...s_xrai_attribution_blur_baseline_config.rb | 4 +- ...ers_xrai_attribution_smooth_grad_config.rb | 12 +- ..._smooth_grad_config_feature_noise_sigma.rb | 6 +- ..._config_feature_noise_sigma_noise_sigma.rb | 6 +- .../batchpredictionjob_input_config.rb | 12 +- ...dictionjob_input_config_bigquery_source.rb | 4 +- ...chpredictionjob_input_config_gcs_source.rb | 4 +- .../batchpredictionjob_instance_config.rb | 10 +- .../property/batchpredictionjob_labels.rb | 4 +- ...ctionjob_manual_batch_tuning_parameters.rb | 4 +- .../batchpredictionjob_output_config.rb | 12 +- ...njob_output_config_bigquery_destination.rb | 4 +- ...ictionjob_output_config_gcs_destination.rb | 4 +- .../batchpredictionjob_output_info.rb | 8 +- .../batchpredictionjob_partial_failures.rb | 8 +- .../batchpredictionjob_resources_consumed.rb | 4 +- ...predictionjob_unmanaged_container_model.rb | 16 +- ...nmanaged_container_model_container_spec.rb | 20 +- ...aged_container_model_container_spec_env.rb | 6 +- ...ed_container_model_container_spec_ports.rb | 4 +- ...anaged_container_model_predict_schemata.rb | 8 +- .../property/customjob_encryption_spec.rb | 4 +- .../vertexai/property/customjob_error.rb | 8 +- .../vertexai/property/customjob_job_spec.rb | 30 +-- ...ustomjob_job_spec_base_output_directory.rb | 4 +- .../property/customjob_job_spec_scheduling.rb | 8 +- .../customjob_job_spec_worker_pool_specs.rb | 28 +-- ...b_spec_worker_pool_specs_container_spec.rb | 12 +- ...ec_worker_pool_specs_container_spec_env.rb | 6 +- ...ob_job_spec_worker_pool_specs_disk_spec.rb | 6 +- ...job_spec_worker_pool_specs_machine_spec.rb | 8 +- ...b_job_spec_worker_pool_specs_nfs_mounts.rb | 8 +- ...c_worker_pool_specs_python_package_spec.rb | 14 +- ...rker_pool_specs_python_package_spec_env.rb | 6 +- .../vertexai/property/customjob_labels.rb | 4 +- .../property/customjob_web_access_uris.rb | 4 +- .../property/dataset_encryption_spec.rb | 4 +- .../vertexai/property/dataset_labels.rb | 4 +- .../property/dataset_saved_queries.rb | 22 +- .../datasetdataitemannotation_labels.rb | 4 +- .../property/datasetsdataitem_labels.rb | 4 +- .../property/endpoint_deployed_models.rb | 76 +++---- ...int_deployed_models_automatic_resources.rb | 6 +- ...int_deployed_models_dedicated_resources.rb | 14 +- ...ated_resources_autoscaling_metric_specs.rb | 6 +- ...models_dedicated_resources_machine_spec.rb | 8 +- ...dpoint_deployed_models_explanation_spec.rb | 44 ++-- ...ployed_models_explanation_spec_metadata.rb | 14 +- ...models_explanation_spec_metadata_inputs.rb | 4 +- ...odels_explanation_spec_metadata_outputs.rb | 4 +- ...oyed_models_explanation_spec_parameters.rb | 44 ++-- ...ls_explanation_spec_parameters_examples.rb | 16 +- ..._parameters_examples_example_gcs_source.rb | 8 +- ..._examples_example_gcs_source_gcs_source.rb | 4 +- ...nation_spec_parameters_examples_presets.rb | 6 +- ...meters_integrated_gradients_attribution.rb | 16 +- ...dients_attribution_blur_baseline_config.rb | 4 +- ...radients_attribution_smooth_grad_config.rb | 12 +- ..._smooth_grad_config_feature_noise_sigma.rb | 6 +- ..._config_feature_noise_sigma_noise_sigma.rb | 6 +- ..._parameters_sampled_shapley_attribution.rb | 4 +- ...nation_spec_parameters_xrai_attribution.rb | 16 +- ...s_xrai_attribution_blur_baseline_config.rb | 4 +- ...ers_xrai_attribution_smooth_grad_config.rb | 12 +- ..._smooth_grad_config_feature_noise_sigma.rb | 6 +- ..._config_feature_noise_sigma_noise_sigma.rb | 6 +- ...point_deployed_models_private_endpoints.rb | 10 +- .../property/endpoint_encryption_spec.rb | 4 +- .../vertexai/property/endpoint_labels.rb | 4 +- ...predict_request_response_logging_config.rb | 10 +- ...nse_logging_config_bigquery_destination.rb | 4 +- .../property/endpoint_traffic_split.rb | 4 +- .../property/featurestore_encryption_spec.rb | 4 +- .../vertexai/property/featurestore_labels.rb | 4 +- .../featurestore_online_serving_config.rb | 8 +- ...turestore_online_serving_config_scaling.rb | 8 +- .../featurestoreentitytypefeature_labels.rb | 4 +- .../featurestoresentitytype_labels.rb | 4 +- ...aturestoresentitytype_monitoring_config.rb | 18 +- ...ing_config_categorical_threshold_config.rb | 4 +- ...itoring_config_import_features_analysis.rb | 6 +- ...oring_config_numerical_threshold_config.rb | 4 +- ...ype_monitoring_config_snapshot_analysis.rb | 8 +- .../hyperparametertuningjob_labels.rb | 4 +- .../google/vertexai/property/index_labels.rb | 4 +- .../indexendpoint_deployed_indexes.rb | 40 ++-- ...nt_deployed_indexes_automatic_resources.rb | 6 +- ...nt_deployed_indexes_dedicated_resources.rb | 14 +- ...ated_resources_autoscaling_metric_specs.rb | 6 +- ...ndexes_dedicated_resources_machine_spec.rb | 8 +- ...oyed_indexes_deployed_index_auth_config.rb | 6 +- ...eployed_index_auth_config_auth_provider.rb | 6 +- ...oint_deployed_indexes_private_endpoints.rb | 6 +- .../vertexai/property/indexendpoint_labels.rb | 4 +- ...endpoint_private_service_connect_config.rb | 6 +- .../property/metadatastore_encryption_spec.rb | 4 +- .../vertexai/property/metadatastore_state.rb | 4 +- .../property/metadatastoresartifact_labels.rb | 4 +- .../metadatastoresartifact_metadata.rb | 4 +- .../property/metadatastorescontext_labels.rb | 4 +- .../metadatastorescontext_metadata.rb | 4 +- .../metadatastoresexecution_labels.rb | 4 +- .../metadatastoresexecution_metadata.rb | 4 +- .../vertexai/property/model_container_spec.rb | 20 +- .../property/model_container_spec_env.rb | 6 +- .../property/model_container_spec_ports.rb | 4 +- .../property/model_deployed_models.rb | 6 +- .../property/model_encryption_spec.rb | 4 +- .../property/model_explanation_spec.rb | 44 ++-- .../model_explanation_spec_metadata.rb | 14 +- .../model_explanation_spec_metadata_inputs.rb | 4 +- ...model_explanation_spec_metadata_outputs.rb | 4 +- .../model_explanation_spec_parameters.rb | 44 ++-- ...el_explanation_spec_parameters_examples.rb | 16 +- ..._parameters_examples_example_gcs_source.rb | 8 +- ..._examples_example_gcs_source_gcs_source.rb | 4 +- ...nation_spec_parameters_examples_presets.rb | 6 +- ...meters_integrated_gradients_attribution.rb | 16 +- ...dients_attribution_blur_baseline_config.rb | 4 +- ...radients_attribution_smooth_grad_config.rb | 12 +- ..._smooth_grad_config_feature_noise_sigma.rb | 6 +- ..._config_feature_noise_sigma_noise_sigma.rb | 6 +- ..._parameters_sampled_shapley_attribution.rb | 4 +- ...nation_spec_parameters_xrai_attribution.rb | 16 +- ...s_xrai_attribution_blur_baseline_config.rb | 4 +- ...ers_xrai_attribution_smooth_grad_config.rb | 12 +- ..._smooth_grad_config_feature_noise_sigma.rb | 6 +- ..._config_feature_noise_sigma_noise_sigma.rb | 6 +- .../google/vertexai/property/model_labels.rb | 4 +- .../property/model_model_source_info.rb | 6 +- .../property/model_original_model_info.rb | 4 +- .../property/model_predict_schemata.rb | 8 +- .../model_supported_export_formats.rb | 6 +- ...deploymentmonitoringjob_bigquery_tables.rb | 8 +- ...deploymentmonitoringjob_encryption_spec.rb | 4 +- .../modeldeploymentmonitoringjob_error.rb | 8 +- .../modeldeploymentmonitoringjob_labels.rb | 4 +- ...job_latest_monitoring_pipeline_metadata.rb | 8 +- ...est_monitoring_pipeline_metadata_status.rb | 8 +- ...monitoringjob_logging_sampling_strategy.rb | 6 +- ..._sampling_strategy_random_sample_config.rb | 4 +- ...deployment_monitoring_objective_configs.rb | 42 ++-- ...ring_objective_configs_objective_config.rb | 44 ++-- ...igs_objective_config_explanation_config.rb | 12 +- ...explanation_config_explanation_baseline.rb | 12 +- ...on_config_explanation_baseline_bigquery.rb | 4 +- ...anation_config_explanation_baseline_gcs.rb | 4 +- ...onfig_prediction_drift_detection_config.rb | 14 +- ...nfig_attribution_score_drift_thresholds.rb | 4 +- ...etection_config_default_drift_threshold.rb | 4 +- ...drift_detection_config_drift_thresholds.rb | 4 +- ...nfigs_objective_config_training_dataset.rb | 22 +- ...config_training_dataset_bigquery_source.rb | 4 +- ...tive_config_training_dataset_gcs_source.rb | 4 +- ...ining_dataset_logging_sampling_strategy.rb | 6 +- ..._sampling_strategy_random_sample_config.rb | 4 +- ...aining_prediction_skew_detection_config.rb | 14 +- ...onfig_attribution_score_skew_thresholds.rb | 4 +- ...detection_config_default_skew_threshold.rb | 4 +- ...n_skew_detection_config_skew_thresholds.rb | 4 +- ...l_deployment_monitoring_schedule_config.rb | 6 +- ...toringjob_model_monitoring_alert_config.rb | 8 +- ...itoring_alert_config_email_alert_config.rb | 4 +- ...oringjob_stats_anomalies_base_directory.rb | 4 +- .../modelevaluationslice_model_explanation.rb | 6 +- ...ice_model_explanation_mean_attributions.rb | 16 +- .../property/modelevaluationslice_slice.rb | 12 +- .../modelevaluationslice_slice_slice_spec.rb | 6 +- ...valuationslice_slice_slice_spec_configs.rb | 4 +- .../modelsevaluation_explanation_specs.rb | 46 ++-- ...tion_explanation_specs_explanation_spec.rb | 44 ++-- ...anation_specs_explanation_spec_metadata.rb | 14 +- ..._specs_explanation_spec_metadata_inputs.rb | 4 +- ...specs_explanation_spec_metadata_outputs.rb | 4 +- ...ation_specs_explanation_spec_parameters.rb | 44 ++-- ...cs_explanation_spec_parameters_examples.rb | 16 +- ..._parameters_examples_example_gcs_source.rb | 8 +- ..._examples_example_gcs_source_gcs_source.rb | 4 +- ...nation_spec_parameters_examples_presets.rb | 6 +- ...meters_integrated_gradients_attribution.rb | 16 +- ...dients_attribution_blur_baseline_config.rb | 4 +- ...radients_attribution_smooth_grad_config.rb | 12 +- ..._smooth_grad_config_feature_noise_sigma.rb | 6 +- ..._config_feature_noise_sigma_noise_sigma.rb | 6 +- ..._parameters_sampled_shapley_attribution.rb | 4 +- ...nation_spec_parameters_xrai_attribution.rb | 16 +- ...s_xrai_attribution_blur_baseline_config.rb | 4 +- ...ers_xrai_attribution_smooth_grad_config.rb | 12 +- ..._smooth_grad_config_feature_noise_sigma.rb | 6 +- ..._config_feature_noise_sigma_noise_sigma.rb | 6 +- .../modelsevaluation_model_explanation.rb | 6 +- ...ion_model_explanation_mean_attributions.rb | 16 +- .../property/nasjob_encryption_spec.rb | 4 +- .../google/vertexai/property/nasjob_error.rb | 8 +- .../google/vertexai/property/nasjob_labels.rb | 4 +- .../property/nasjob_nas_job_output.rb | 10 +- ...b_nas_job_output_multi_trial_job_output.rb | 10 +- ...ut_multi_trial_job_output_search_trials.rb | 16 +- ..._output_search_trials_final_measurement.rb | 10 +- ...search_trials_final_measurement_metrics.rb | 6 +- ...put_multi_trial_job_output_train_trials.rb | 16 +- ...b_output_train_trials_final_measurement.rb | 10 +- ..._train_trials_final_measurement_metrics.rb | 6 +- .../vertexai/property/nasjob_nas_job_spec.rb | 32 +-- ...nas_job_spec_multi_trial_algorithm_spec.rb | 32 +-- ..._spec_multi_trial_algorithm_spec_metric.rb | 6 +- ..._trial_algorithm_spec_search_trial_spec.rb | 18 +- ...search_trial_spec_search_trial_job_spec.rb | 30 +-- ...ch_trial_job_spec_base_output_directory.rb | 4 +- ...l_spec_search_trial_job_spec_scheduling.rb | 8 +- ...search_trial_job_spec_worker_pool_specs.rb | 28 +-- ...b_spec_worker_pool_specs_container_spec.rb | 12 +- ...ec_worker_pool_specs_container_spec_env.rb | 6 +- ...al_job_spec_worker_pool_specs_disk_spec.rb | 6 +- ...job_spec_worker_pool_specs_machine_spec.rb | 8 +- ...l_job_spec_worker_pool_specs_nfs_mounts.rb | 8 +- ...c_worker_pool_specs_python_package_spec.rb | 14 +- ...rker_pool_specs_python_package_spec_env.rb | 6 +- ...i_trial_algorithm_spec_train_trial_spec.rb | 16 +- ...c_train_trial_spec_train_trial_job_spec.rb | 30 +-- ...in_trial_job_spec_base_output_directory.rb | 4 +- ...al_spec_train_trial_job_spec_scheduling.rb | 8 +- ..._train_trial_job_spec_worker_pool_specs.rb | 28 +-- ...b_spec_worker_pool_specs_container_spec.rb | 12 +- ...ec_worker_pool_specs_container_spec_env.rb | 6 +- ...al_job_spec_worker_pool_specs_disk_spec.rb | 6 +- ...job_spec_worker_pool_specs_machine_spec.rb | 8 +- ...l_job_spec_worker_pool_specs_nfs_mounts.rb | 8 +- ...c_worker_pool_specs_python_package_spec.rb | 14 +- ...rker_pool_specs_python_package_spec_env.rb | 6 +- .../nasjobsnastrialdetail_search_trial.rb | 16 +- ...aldetail_search_trial_final_measurement.rb | 10 +- ..._search_trial_final_measurement_metrics.rb | 6 +- .../nasjobsnastrialdetail_train_trial.rb | 16 +- ...ialdetail_train_trial_final_measurement.rb | 10 +- ...l_train_trial_final_measurement_metrics.rb | 6 +- .../property/pipelinejob_encryption_spec.rb | 4 +- .../vertexai/property/pipelinejob_error.rb | 8 +- .../property/pipelinejob_job_detail.rb | 22 +- ...pipelinejob_job_detail_pipeline_context.rb | 28 +-- ...ejob_job_detail_pipeline_context_labels.rb | 4 +- ...ob_job_detail_pipeline_context_metadata.rb | 4 +- ...linejob_job_detail_pipeline_run_context.rb | 28 +-- ..._job_detail_pipeline_run_context_labels.rb | 4 +- ...ob_detail_pipeline_run_context_metadata.rb | 4 +- .../pipelinejob_job_detail_task_details.rb | 48 ++--- ...pelinejob_job_detail_task_details_error.rb | 8 +- ...nejob_job_detail_task_details_execution.rb | 28 +-- ...ob_detail_task_details_execution_labels.rb | 4 +- ..._detail_task_details_execution_metadata.rb | 4 +- ...job_detail_task_details_executor_detail.rb | 10 +- ...etails_executor_detail_container_detail.rb | 10 +- ...tails_executor_detail_custom_job_detail.rb | 6 +- ...elinejob_job_detail_task_details_inputs.rb | 4 +- ...linejob_job_detail_task_details_outputs.rb | 4 +- ...etail_task_details_pipeline_task_status.rb | 10 +- ...task_details_pipeline_task_status_error.rb | 8 +- .../vertexai/property/pipelinejob_labels.rb | 4 +- .../property/pipelinejob_pipeline_spec.rb | 4 +- .../property/pipelinejob_runtime_config.rb | 18 +- ...elinejob_runtime_config_input_artifacts.rb | 4 +- ...linejob_runtime_config_parameter_values.rb | 4 +- .../pipelinejob_runtime_config_parameters.rb | 4 +- .../property/pipelinejob_template_metadata.rb | 4 +- .../schedule_create_pipeline_job_request.rb | 44 ++-- ...reate_pipeline_job_request_pipeline_job.rb | 74 +++---- ...ob_request_pipeline_job_encryption_spec.rb | 4 +- ...pipeline_job_request_pipeline_job_error.rb | 8 +- ...ine_job_request_pipeline_job_job_detail.rb | 22 +- ...ipeline_job_job_detail_pipeline_context.rb | 28 +-- ..._job_job_detail_pipeline_context_labels.rb | 4 +- ...ob_job_detail_pipeline_context_metadata.rb | 4 +- ...ine_job_job_detail_pipeline_run_context.rb | 28 +-- ..._job_detail_pipeline_run_context_labels.rb | 4 +- ...ob_detail_pipeline_run_context_metadata.rb | 4 +- ...st_pipeline_job_job_detail_task_details.rb | 48 ++--- ...eline_job_job_detail_task_details_error.rb | 8 +- ...e_job_job_detail_task_details_execution.rb | 28 +-- ...ob_detail_task_details_execution_labels.rb | 4 +- ..._detail_task_details_execution_metadata.rb | 4 +- ...job_detail_task_details_executor_detail.rb | 10 +- ...etails_executor_detail_container_detail.rb | 10 +- ...tails_executor_detail_custom_job_detail.rb | 6 +- ...line_job_job_detail_task_details_inputs.rb | 4 +- ...ine_job_job_detail_task_details_outputs.rb | 4 +- ...etail_task_details_pipeline_task_status.rb | 10 +- ...task_details_pipeline_task_status_error.rb | 8 +- ...ipeline_job_request_pipeline_job_labels.rb | 4 +- ..._job_request_pipeline_job_pipeline_spec.rb | 4 +- ...job_request_pipeline_job_runtime_config.rb | 18 +- ...line_job_runtime_config_input_artifacts.rb | 4 +- ...ine_job_runtime_config_parameter_values.rb | 4 +- ..._pipeline_job_runtime_config_parameters.rb | 4 +- ..._request_pipeline_job_template_metadata.rb | 4 +- .../schedule_last_scheduled_run_response.rb | 6 +- .../studiestrial_final_measurement.rb | 10 +- .../studiestrial_final_measurement_metrics.rb | 6 +- .../property/studiestrial_measurements.rb | 10 +- .../studiestrial_measurements_metrics.rb | 6 +- .../property/studiestrial_parameters.rb | 6 +- .../property/studiestrial_web_access_uris.rb | 4 +- .../property/tensorboard_encryption_spec.rb | 4 +- .../vertexai/property/tensorboard_labels.rb | 4 +- .../tensorboardexperimentrun_labels.rb | 4 +- .../property/tensorboardsexperiment_labels.rb | 4 +- .../trainingpipeline_encryption_spec.rb | 4 +- .../property/trainingpipeline_error.rb | 8 +- .../trainingpipeline_input_data_config.rb | 40 ++-- ..._input_data_config_bigquery_destination.rb | 4 +- ...pipeline_input_data_config_filter_split.rb | 8 +- ...peline_input_data_config_fraction_split.rb | 8 +- ...eline_input_data_config_gcs_destination.rb | 4 +- ...line_input_data_config_predefined_split.rb | 4 +- ...line_input_data_config_stratified_split.rb | 10 +- ...eline_input_data_config_timestamp_split.rb | 10 +- .../property/trainingpipeline_labels.rb | 4 +- .../trainingpipeline_model_to_upload.rb | 120 +++++------ ...pipeline_model_to_upload_container_spec.rb | 20 +- ...line_model_to_upload_container_spec_env.rb | 6 +- ...ne_model_to_upload_container_spec_ports.rb | 4 +- ...ipeline_model_to_upload_deployed_models.rb | 6 +- ...ipeline_model_to_upload_encryption_spec.rb | 4 +- ...peline_model_to_upload_explanation_spec.rb | 44 ++-- ...del_to_upload_explanation_spec_metadata.rb | 14 +- ...upload_explanation_spec_metadata_inputs.rb | 4 +- ...pload_explanation_spec_metadata_outputs.rb | 4 +- ...l_to_upload_explanation_spec_parameters.rb | 44 ++-- ...ad_explanation_spec_parameters_examples.rb | 16 +- ..._parameters_examples_example_gcs_source.rb | 8 +- ..._examples_example_gcs_source_gcs_source.rb | 4 +- ...nation_spec_parameters_examples_presets.rb | 6 +- ...meters_integrated_gradients_attribution.rb | 16 +- ...dients_attribution_blur_baseline_config.rb | 4 +- ...radients_attribution_smooth_grad_config.rb | 12 +- ..._smooth_grad_config_feature_noise_sigma.rb | 6 +- ..._config_feature_noise_sigma_noise_sigma.rb | 6 +- ..._parameters_sampled_shapley_attribution.rb | 4 +- ...nation_spec_parameters_xrai_attribution.rb | 16 +- ...s_xrai_attribution_blur_baseline_config.rb | 4 +- ...ers_xrai_attribution_smooth_grad_config.rb | 12 +- ..._smooth_grad_config_feature_noise_sigma.rb | 6 +- ..._config_feature_noise_sigma_noise_sigma.rb | 6 +- ...trainingpipeline_model_to_upload_labels.rb | 4 +- ...eline_model_to_upload_model_source_info.rb | 6 +- ...ine_model_to_upload_original_model_info.rb | 4 +- ...peline_model_to_upload_predict_schemata.rb | 8 +- ...odel_to_upload_supported_export_formats.rb | 6 +- ...gle_access_context_manager_access_level.rb | 36 ++-- ...le_access_context_manager_access_levels.rb | 30 +-- ..._access_context_manager_access_policies.rb | 28 +-- ...le_access_context_manager_access_policy.rb | 26 +-- ...ccess_context_manager_service_perimeter.rb | 44 ++-- ...cess_context_manager_service_perimeters.rb | 38 ++-- libraries/google_apigee_organization.rb | 90 ++++---- .../google_apigee_organization_envgroup.rb | 26 +-- ...apigee_organization_envgroup_attachment.rb | 24 +-- ...pigee_organization_envgroup_attachments.rb | 26 +-- .../google_apigee_organization_envgroups.rb | 28 +-- libraries/google_apigee_organizations.rb | 74 +++---- .../google_appengine_standard_app_version.rb | 46 ++-- .../google_appengine_standard_app_versions.rb | 38 ++-- ...tregistry_project_location_repositories.rb | 50 ++--- ...actregistry_project_location_repository.rb | 82 ++++---- libraries/google_bigquery_dataset.rb | 48 ++--- libraries/google_bigquery_datasets.rb | 34 +-- libraries/google_bigquery_table.rb | 92 ++++---- libraries/google_bigquery_tables.rb | 60 +++--- .../google_billing_project_billing_info.rb | 22 +- libraries/google_cloud_scheduler_job.rb | 52 ++--- libraries/google_cloud_scheduler_jobs.rb | 40 ++-- libraries/google_cloudbuild_trigger.rb | 72 +++---- libraries/google_cloudbuild_triggers.rb | 44 ++-- .../google_cloudfunctions_cloud_function.rb | 58 ++--- .../google_cloudfunctions_cloud_functions.rb | 54 ++--- ...e_composer_project_location_environment.rb | 88 ++++---- ..._composer_project_location_environments.rb | 36 ++-- ...omposer_project_location_image_versions.rb | 22 +- libraries/google_compute_accelerator_type.rb | 30 +-- libraries/google_compute_accelerator_types.rb | 30 +-- libraries/google_compute_address.rb | 48 ++--- libraries/google_compute_addresses.rb | 48 ++--- libraries/google_compute_autoscaler.rb | 50 ++--- libraries/google_compute_autoscalers.rb | 34 +-- libraries/google_compute_backend_bucket.rb | 38 ++-- libraries/google_compute_backend_buckets.rb | 36 ++-- libraries/google_compute_backend_service.rb | 98 ++++----- libraries/google_compute_backend_services.rb | 70 +++---- libraries/google_compute_disk.rb | 72 +++---- libraries/google_compute_disk_type.rb | 34 +-- libraries/google_compute_disk_types.rb | 34 +-- libraries/google_compute_disks.rb | 68 +++--- .../google_compute_external_vpn_gateway.rb | 36 ++-- .../google_compute_external_vpn_gateways.rb | 36 ++-- libraries/google_compute_firewall.rb | 132 ++++++------ libraries/google_compute_firewalls.rb | 54 ++--- libraries/google_compute_forwarding_rule.rb | 62 +++--- libraries/google_compute_forwarding_rules.rb | 64 +++--- libraries/google_compute_global_address.rb | 44 ++-- libraries/google_compute_global_addresses.rb | 46 ++-- .../google_compute_global_forwarding_rule.rb | 48 ++--- .../google_compute_global_forwarding_rules.rb | 48 ++--- ...e_compute_global_network_endpoint_group.rb | 26 +-- ..._compute_global_network_endpoint_groups.rb | 28 +-- libraries/google_compute_global_operation.rb | 44 ++-- libraries/google_compute_global_operations.rb | 46 ++-- libraries/google_compute_health_check.rb | 64 +++--- .../google_compute_health_check_service.rb | 36 ++-- .../google_compute_health_check_services.rb | 38 ++-- libraries/google_compute_health_checks.rb | 52 ++--- libraries/google_compute_http_health_check.rb | 40 ++-- .../google_compute_http_health_checks.rb | 42 ++-- .../google_compute_https_health_check.rb | 40 ++-- .../google_compute_https_health_checks.rb | 42 ++-- libraries/google_compute_image.rb | 74 +++---- libraries/google_compute_image_family_view.rb | 38 ++-- libraries/google_compute_instance.rb | 114 +++++----- libraries/google_compute_instance_group.rb | 38 ++-- .../google_compute_instance_group_manager.rb | 48 ++--- .../google_compute_instance_group_managers.rb | 46 ++-- libraries/google_compute_instance_groups.rb | 38 ++-- libraries/google_compute_instance_template.rb | 42 ++-- .../google_compute_instance_templates.rb | 30 +-- libraries/google_compute_instances.rb | 64 +++--- libraries/google_compute_interconnect.rb | 62 +++--- .../google_compute_interconnect_location.rb | 34 +-- .../google_compute_interconnect_locations.rb | 36 ++-- libraries/google_compute_interconnects.rb | 60 +++--- libraries/google_compute_license_code.rb | 32 +-- libraries/google_compute_network.rb | 42 ++-- .../google_compute_network_endpoint_group.rb | 36 ++-- .../google_compute_network_endpoint_groups.rb | 38 ++-- libraries/google_compute_networks.rb | 40 ++-- libraries/google_compute_node_group.rb | 36 ++-- libraries/google_compute_node_groups.rb | 36 ++-- libraries/google_compute_node_template.rb | 40 ++-- libraries/google_compute_node_templates.rb | 38 ++-- libraries/google_compute_project_info.rb | 42 ++-- .../google_compute_public_delegated_prefix.rb | 34 +-- ...oogle_compute_public_delegated_prefixes.rb | 36 ++-- libraries/google_compute_region.rb | 42 ++-- .../google_compute_region_backend_service.rb | 96 ++++----- .../google_compute_region_backend_services.rb | 68 +++--- .../google_compute_region_health_check.rb | 64 +++--- .../google_compute_region_health_checks.rb | 52 ++--- .../google_compute_region_instance_group.rb | 38 ++-- ...e_compute_region_instance_group_manager.rb | 50 ++--- ..._compute_region_instance_group_managers.rb | 46 ++-- .../google_compute_region_instance_groups.rb | 38 ++-- libraries/google_compute_region_operation.rb | 40 ++-- libraries/google_compute_region_operations.rb | 42 ++-- ...google_compute_region_security_policies.rb | 50 ++--- .../google_compute_region_security_policy.rb | 66 +++--- libraries/google_compute_regional_disk.rb | 68 +++--- libraries/google_compute_regional_disks.rb | 68 +++--- libraries/google_compute_regions.rb | 36 ++-- libraries/google_compute_route.rb | 42 ++-- libraries/google_compute_router.rb | 36 ++-- libraries/google_compute_router_nat.rb | 54 ++--- libraries/google_compute_router_nats.rb | 50 ++--- libraries/google_compute_routers.rb | 34 +-- libraries/google_compute_routes.rb | 44 ++-- libraries/google_compute_security_policies.rb | 26 +-- libraries/google_compute_security_policy.rb | 26 +-- .../google_compute_service_attachment.rb | 60 +++--- .../google_compute_service_attachments.rb | 56 ++--- libraries/google_compute_snapshot.rb | 50 ++--- libraries/google_compute_snapshots.rb | 48 ++--- libraries/google_compute_ssl_certificate.rb | 30 +-- libraries/google_compute_ssl_certificates.rb | 32 +-- libraries/google_compute_ssl_policies.rb | 40 ++-- libraries/google_compute_ssl_policy.rb | 40 ++-- libraries/google_compute_subnetwork.rb | 50 ++--- .../google_compute_subnetwork_iam_binding.rb | 20 +- .../google_compute_subnetwork_iam_policy.rb | 24 +-- libraries/google_compute_subnetworks.rb | 48 ++--- .../google_compute_target_http_proxies.rb | 30 +-- libraries/google_compute_target_http_proxy.rb | 28 +-- .../google_compute_target_https_proxies.rb | 36 ++-- .../google_compute_target_https_proxy.rb | 34 +-- libraries/google_compute_target_pool.rb | 38 ++-- libraries/google_compute_target_pools.rb | 40 ++-- .../google_compute_target_tcp_proxies.rb | 32 +-- libraries/google_compute_target_tcp_proxy.rb | 30 +-- libraries/google_compute_url_map.rb | 80 +++---- libraries/google_compute_url_maps.rb | 44 ++-- libraries/google_compute_vpn_gateway.rb | 44 ++-- libraries/google_compute_vpn_gateways.rb | 42 ++-- libraries/google_compute_vpn_tunnel.rb | 58 ++--- libraries/google_compute_vpn_tunnels.rb | 60 +++--- libraries/google_compute_zone.rb | 40 ++-- libraries/google_compute_zone_operation.rb | 42 ++-- libraries/google_compute_zone_operations.rb | 44 ++-- libraries/google_compute_zones.rb | 36 ++-- libraries/google_container_cluster.rb | 154 +++++++------- libraries/google_container_clusters.rb | 102 ++++----- libraries/google_container_node_pool.rb | 64 +++--- libraries/google_container_node_pools.rb | 46 ++-- libraries/google_container_server_config.rb | 32 +-- libraries/google_dataproc_cluster.rb | 70 +++---- libraries/google_dataproc_clusters.rb | 40 ++-- libraries/google_dlp_dt.rb | 32 +-- libraries/google_dlp_dts.rb | 28 +-- libraries/google_dlp_inspect_template.rb | 38 ++-- libraries/google_dlp_inspect_templates.rb | 28 +-- libraries/google_dlp_job.rb | 44 ++-- libraries/google_dlp_job_trigger.rb | 60 +++--- libraries/google_dlp_job_triggers.rb | 34 +-- libraries/google_dlp_jobs.rb | 42 ++-- libraries/google_dlp_stored_info_type.rb | 50 ++--- libraries/google_dlp_stored_info_types.rb | 32 +-- libraries/google_dns_managed_zone.rb | 72 +++---- libraries/google_dns_managed_zones.rb | 52 ++--- libraries/google_dns_resource_record_set.rb | 30 +-- libraries/google_dns_resource_record_sets.rb | 30 +-- libraries/google_filestore_instance.rb | 40 ++-- libraries/google_filestore_instances.rb | 38 ++-- .../google_iam_organization_custom_role.rb | 28 +-- .../google_iam_organization_custom_roles.rb | 30 +-- libraries/google_kms_crypto_key.rb | 38 ++-- .../google_kms_crypto_key_iam_binding.rb | 20 +- .../google_kms_crypto_key_iam_bindings.rb | 8 +- libraries/google_kms_crypto_key_iam_policy.rb | 24 +-- libraries/google_kms_crypto_keys.rb | 36 ++-- libraries/google_kms_ekm_connection.rb | 28 +-- libraries/google_kms_ekm_connections.rb | 26 +-- libraries/google_kms_key_ring.rb | 22 +- libraries/google_kms_key_ring_iam_binding.rb | 20 +- libraries/google_kms_key_ring_iam_bindings.rb | 12 +- libraries/google_kms_key_ring_iam_policy.rb | 24 +-- libraries/google_kms_key_ring_import_job.rb | 44 ++-- libraries/google_kms_key_ring_import_jobs.rb | 42 ++-- libraries/google_kms_key_rings.rb | 26 +-- libraries/google_kms_location.rb | 24 +-- libraries/google_kms_locations.rb | 26 +-- libraries/google_logging_folder_exclusion.rb | 26 +-- libraries/google_logging_folder_exclusions.rb | 28 +-- libraries/google_logging_folder_log_sink.rb | 28 +-- libraries/google_logging_folder_log_sinks.rb | 30 +-- .../google_logging_organization_log_sink.rb | 28 +-- .../google_logging_organization_log_sinks.rb | 30 +-- libraries/google_logging_project_exclusion.rb | 26 +-- .../google_logging_project_exclusions.rb | 28 +-- libraries/google_logging_project_sink.rb | 28 +-- libraries/google_logging_project_sinks.rb | 30 +-- libraries/google_memcache_instance.rb | 50 ++--- libraries/google_memcache_instances.rb | 46 ++-- libraries/google_ml_engine_model.rb | 32 +-- libraries/google_ml_engine_models.rb | 32 +-- libraries/google_organization.rb | 28 +-- libraries/google_organization_iam_binding.rb | 20 +- libraries/google_organization_iam_policy.rb | 24 +-- libraries/google_organization_policy.rb | 8 +- libraries/google_organizations.rb | 28 +-- libraries/google_project.rb | 32 +-- libraries/google_project_alert_policies.rb | 36 ++-- libraries/google_project_alert_policy.rb | 40 ++-- .../google_project_alert_policy_condition.rb | 10 +- libraries/google_project_iam_binding.rb | 8 +- libraries/google_project_iam_bindings.rb | 8 +- libraries/google_project_iam_custom_role.rb | 28 +-- libraries/google_project_iam_custom_roles.rb | 30 +-- libraries/google_project_iam_policy.rb | 24 +-- .../google_project_logging_audit_config.rb | 10 +- libraries/google_project_metric.rb | 42 ++-- libraries/google_project_metrics.rb | 34 +-- libraries/google_project_service.rb | 32 +-- libraries/google_project_services.rb | 30 +-- libraries/google_projects.rb | 32 +-- libraries/google_pubsub_subscription.rb | 50 ++--- .../google_pubsub_subscription_iam_binding.rb | 20 +- .../google_pubsub_subscription_iam_policy.rb | 24 +-- libraries/google_pubsub_subscriptions.rb | 42 ++-- libraries/google_pubsub_topic.rb | 26 +-- libraries/google_pubsub_topic_iam_binding.rb | 20 +- libraries/google_pubsub_topic_iam_policy.rb | 24 +-- libraries/google_pubsub_topics.rb | 26 +-- libraries/google_redis_instance.rb | 62 +++--- libraries/google_redis_instances.rb | 62 +++--- libraries/google_resourcemanager_folder.rb | 26 +-- ...ogle_resourcemanager_folder_iam_binding.rb | 20 +- ...oogle_resourcemanager_folder_iam_policy.rb | 24 +-- libraries/google_resourcemanager_folders.rb | 28 +-- libraries/google_runtime_config_config.rb | 20 +- ...oogle_runtime_config_config_iam_binding.rb | 20 +- ...google_runtime_config_config_iam_policy.rb | 24 +-- libraries/google_runtime_config_configs.rb | 22 +- libraries/google_runtime_config_variable.rb | 24 +-- libraries/google_runtime_config_variables.rb | 26 +-- libraries/google_service_account.rb | 28 +-- libraries/google_service_account_key.rb | 36 ++-- libraries/google_service_account_keys.rb | 38 ++-- libraries/google_service_accounts.rb | 30 +-- libraries/google_sourcerepo_repositories.rb | 26 +-- libraries/google_sourcerepo_repository.rb | 26 +-- libraries/google_spanner_database.rb | 20 +- libraries/google_spanner_databases.rb | 22 +- libraries/google_spanner_instance.rb | 26 +-- .../google_spanner_instance_iam_binding.rb | 20 +- .../google_spanner_instance_iam_policy.rb | 24 +-- libraries/google_spanner_instances.rb | 28 +-- libraries/google_sql_connect.rb | 32 +-- libraries/google_sql_database.rb | 24 +-- libraries/google_sql_database_instance.rb | 82 ++++---- libraries/google_sql_database_instances.rb | 56 ++--- libraries/google_sql_databases.rb | 26 +-- libraries/google_sql_flags.rb | 32 +-- libraries/google_sql_operation.rb | 26 +-- libraries/google_sql_operations.rb | 28 +-- libraries/google_sql_ssl_cert.rb | 30 +-- libraries/google_sql_ssl_certs.rb | 32 +-- libraries/google_sql_user.rb | 26 +-- libraries/google_sql_users.rb | 26 +-- libraries/google_storage_bucket.rb | 82 ++++---- libraries/google_storage_bucket_acl.rb | 32 +-- .../google_storage_bucket_iam_binding.rb | 20 +- .../google_storage_bucket_iam_bindings.rb | 8 +- libraries/google_storage_bucket_iam_policy.rb | 24 +-- libraries/google_storage_bucket_object.rb | 50 ++--- libraries/google_storage_bucket_objects.rb | 52 ++--- libraries/google_storage_buckets.rb | 62 +++--- .../google_storage_default_object_acl.rb | 36 ++-- libraries/google_storage_object_acl.rb | 36 ++-- libraries/google_user.rb | 10 +- libraries/google_users.rb | 14 +- .../google_vertex_ai_batch_prediction_job.rb | 154 +++++++------- .../google_vertex_ai_batch_prediction_jobs.rb | 72 +++---- libraries/google_vertex_ai_custom_job.rb | 56 ++--- libraries/google_vertex_ai_custom_jobs.rb | 42 ++-- libraries/google_vertex_ai_dataset.rb | 48 ++--- ...vertex_ai_dataset_data_item_annotations.rb | 34 +-- libraries/google_vertex_ai_datasets.rb | 44 ++-- ...ogle_vertex_ai_datasets_annotation_spec.rb | 26 +-- .../google_vertex_ai_datasets_data_items.rb | 30 +-- ...google_vertex_ai_datasets_saved_queries.rb | 38 ++-- libraries/google_vertex_ai_endpoint.rb | 56 ++--- libraries/google_vertex_ai_endpoints.rb | 46 ++-- libraries/google_vertex_ai_featurestore.rb | 42 ++-- ...tex_ai_featurestore_entity_type_feature.rb | 36 ++-- ...ex_ai_featurestore_entity_type_features.rb | 36 ++-- libraries/google_vertex_ai_featurestores.rb | 36 ++-- ...gle_vertex_ai_featurestores_entity_type.rb | 44 ++-- ...le_vertex_ai_featurestores_entity_types.rb | 34 +-- ...gle_vertex_ai_hyperparameter_tuning_job.rb | 50 ++--- ...le_vertex_ai_hyperparameter_tuning_jobs.rb | 50 ++--- libraries/google_vertex_ai_index.rb | 42 ++-- libraries/google_vertex_ai_index_endpoint.rb | 48 ++--- libraries/google_vertex_ai_index_endpoints.rb | 44 ++-- libraries/google_vertex_ai_indices.rb | 42 ++-- libraries/google_vertex_ai_metadata_store.rb | 32 +-- libraries/google_vertex_ai_metadata_stores.rb | 30 +-- ...ogle_vertex_ai_metadata_stores_artifact.rb | 44 ++-- ...gle_vertex_ai_metadata_stores_artifacts.rb | 42 ++-- ...oogle_vertex_ai_metadata_stores_context.rb | 42 ++-- ...ogle_vertex_ai_metadata_stores_contexts.rb | 40 ++-- ...gle_vertex_ai_metadata_stores_execution.rb | 42 ++-- ...le_vertex_ai_metadata_stores_executions.rb | 40 ++-- ...rtex_ai_metadata_stores_metadata_schema.rb | 28 +-- ...tex_ai_metadata_stores_metadata_schemas.rb | 30 +-- libraries/google_vertex_ai_model.rb | 134 ++++++------ ...rtex_ai_model_deployment_monitoring_job.rb | 88 ++++---- ...tex_ai_model_deployment_monitoring_jobs.rb | 64 +++--- ...google_vertex_ai_model_evaluation_slice.rb | 38 ++-- ...oogle_vertex_ai_model_evaluation_slices.rb | 30 +-- libraries/google_vertex_ai_models.rb | 76 +++---- .../google_vertex_ai_models_evaluation.rb | 44 ++-- .../google_vertex_ai_models_evaluations.rb | 40 ++-- libraries/google_vertex_ai_nas_job.rb | 82 ++++---- libraries/google_vertex_ai_nas_jobs.rb | 44 ++-- ...gle_vertex_ai_nas_jobs_nas_trial_detail.rb | 36 ++-- ...le_vertex_ai_nas_jobs_nas_trial_details.rb | 26 +-- libraries/google_vertex_ai_pipeline_job.rb | 88 ++++---- libraries/google_vertex_ai_pipeline_jobs.rb | 56 ++--- libraries/google_vertex_ai_schedule.rb | 92 ++++---- libraries/google_vertex_ai_schedules.rb | 54 ++--- libraries/google_vertex_ai_studies.rb | 30 +-- libraries/google_vertex_ai_studies_trial.rb | 50 ++--- libraries/google_vertex_ai_studies_trials.rb | 42 ++-- libraries/google_vertex_ai_study.rb | 28 +-- libraries/google_vertex_ai_tensorboard.rb | 42 ++-- ...le_vertex_ai_tensorboard_experiment_run.rb | 32 +-- ...ard_experiment_run_time_series_resource.rb | 36 ++-- ...rd_experiment_run_time_series_resources.rb | 38 ++-- ...e_vertex_ai_tensorboard_experiment_runs.rb | 32 +-- libraries/google_vertex_ai_tensorboards.rb | 40 ++-- ...oogle_vertex_ai_tensorboards_experiment.rb | 34 +-- ...ogle_vertex_ai_tensorboards_experiments.rb | 34 +-- .../google_vertex_ai_training_pipeline.rb | 134 ++++++------ .../google_vertex_ai_training_pipelines.rb | 52 ++--- 1654 files changed, 17327 insertions(+), 17327 deletions(-) diff --git a/generate/gen-controls/bigquery_dataset.rb b/generate/gen-controls/bigquery_dataset.rb index 80513efb3..2c34abc6e 100644 --- a/generate/gen-controls/bigquery_dataset.rb +++ b/generate/gen-controls/bigquery_dataset.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_bigquery_dataset resource.' +require "yaml" +require "logger" + +title "Test GCP google_bigquery_dataset resource." # rubocop:disable Metrics/BlockLength -control 'google_bigquery_dataset-1.0' do +control "google_bigquery_dataset-1.0" do impact 1.0 - title 'google_bigquery_dataset resource test' + title "google_bigquery_dataset resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_bigquery_dataset') + logger.warn("Generating tests for google_bigquery_dataset") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_bigquery_dataset.yaml') + file_name = File.join(config_folder, "google_bigquery_dataset.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/Dataset_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/bigquery_table.rb b/generate/gen-controls/bigquery_table.rb index 8a5d2f15f..60c254a0d 100644 --- a/generate/gen-controls/bigquery_table.rb +++ b/generate/gen-controls/bigquery_table.rb @@ -1,52 +1,52 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_bigquery_table resource.' +require "yaml" +require "logger" + +title "Test GCP google_bigquery_table resource." # rubocop:disable Metrics/BlockLength -control 'google_bigquery_table-1.0' do +control "google_bigquery_table-1.0" do impact 1.0 - title 'google_bigquery_table resource test' + title "google_bigquery_table resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_bigquery_table') + logger.warn("Generating tests for google_bigquery_table") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_bigquery_table.yaml') + file_name = File.join(config_folder, "google_bigquery_table.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] dataset_ids = google_bigquery_datasets(project: project_name).ids dataset_ids.each do |dataset_id| plural_identifiers.each do |plural_identifier| - next_identifiers.push(plural_identifier.merge({ dataset: dataset_id.split(':').last })) + next_identifiers.push(plural_identifier.merge({ dataset: dataset_id.split(":").last })) end end plural_identifiers = next_identifiers @@ -69,7 +69,7 @@ output = "Writing #{File.expand_path(output_folder)}/Table_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/cloudfunctions_cloud_function.rb b/generate/gen-controls/cloudfunctions_cloud_function.rb index e09e15eb1..e60383906 100644 --- a/generate/gen-controls/cloudfunctions_cloud_function.rb +++ b/generate/gen-controls/cloudfunctions_cloud_function.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_cloudfunctions_cloud_function resource.' +require "yaml" +require "logger" + +title "Test GCP google_cloudfunctions_cloud_function resource." # rubocop:disable Metrics/BlockLength -control 'google_cloudfunctions_cloud_function-1.0' do +control "google_cloudfunctions_cloud_function-1.0" do impact 1.0 - title 'google_cloudfunctions_cloud_function resource test' + title "google_cloudfunctions_cloud_function resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_cloudfunctions_cloud_function') + logger.warn("Generating tests for google_cloudfunctions_cloud_function") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_cloudfunctions_cloud_function.yaml') + file_name = File.join(config_folder, "google_cloudfunctions_cloud_function.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] @@ -69,7 +69,7 @@ output = "Writing #{File.expand_path(output_folder)}/CloudFunction_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_autoscaler.rb b/generate/gen-controls/compute_autoscaler.rb index 258806cd7..d614b3564 100644 --- a/generate/gen-controls/compute_autoscaler.rb +++ b/generate/gen-controls/compute_autoscaler.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_autoscaler resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_autoscaler resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_autoscaler-1.0' do +control "google_compute_autoscaler-1.0" do impact 1.0 - title 'google_compute_autoscaler resource test' + title "google_compute_autoscaler resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_autoscaler') + logger.warn("Generating tests for google_compute_autoscaler") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_autoscaler.yaml') + file_name = File.join(config_folder, "google_compute_autoscaler.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] @@ -69,7 +69,7 @@ output = "Writing #{File.expand_path(output_folder)}/Autoscaler_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_backend_bucket.rb b/generate/gen-controls/compute_backend_bucket.rb index 70fc5280a..1d6745829 100644 --- a/generate/gen-controls/compute_backend_bucket.rb +++ b/generate/gen-controls/compute_backend_bucket.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_backend_bucket resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_backend_bucket resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_backend_bucket-1.0' do +control "google_compute_backend_bucket-1.0" do impact 1.0 - title 'google_compute_backend_bucket resource test' + title "google_compute_backend_bucket resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_backend_bucket') + logger.warn("Generating tests for google_compute_backend_bucket") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_backend_bucket.yaml') + file_name = File.join(config_folder, "google_compute_backend_bucket.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/BackendBucket_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_backend_service.rb b/generate/gen-controls/compute_backend_service.rb index 836fd53aa..efd020e41 100644 --- a/generate/gen-controls/compute_backend_service.rb +++ b/generate/gen-controls/compute_backend_service.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_backend_service resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_backend_service resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_backend_service-1.0' do +control "google_compute_backend_service-1.0" do impact 1.0 - title 'google_compute_backend_service resource test' + title "google_compute_backend_service resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_backend_service') + logger.warn("Generating tests for google_compute_backend_service") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_backend_service.yaml') + file_name = File.join(config_folder, "google_compute_backend_service.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/BackendService_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_disk.rb b/generate/gen-controls/compute_disk.rb index cc09c8c65..adb424755 100644 --- a/generate/gen-controls/compute_disk.rb +++ b/generate/gen-controls/compute_disk.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_disk resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_disk resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_disk-1.0' do +control "google_compute_disk-1.0" do impact 1.0 - title 'google_compute_disk resource test' + title "google_compute_disk resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_disk') + logger.warn("Generating tests for google_compute_disk") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_disk.yaml') + file_name = File.join(config_folder, "google_compute_disk.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] @@ -69,7 +69,7 @@ output = "Writing #{File.expand_path(output_folder)}/Disk_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_firewall.rb b/generate/gen-controls/compute_firewall.rb index 99e385764..c54cdac40 100644 --- a/generate/gen-controls/compute_firewall.rb +++ b/generate/gen-controls/compute_firewall.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_firewall resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_firewall resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_firewall-1.0' do +control "google_compute_firewall-1.0" do impact 1.0 - title 'google_compute_firewall resource test' + title "google_compute_firewall resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_firewall') + logger.warn("Generating tests for google_compute_firewall") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_firewall.yaml') + file_name = File.join(config_folder, "google_compute_firewall.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/Firewall_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_global_address.rb b/generate/gen-controls/compute_global_address.rb index 2fc026543..0069ef41e 100644 --- a/generate/gen-controls/compute_global_address.rb +++ b/generate/gen-controls/compute_global_address.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_global_address resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_global_address resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_global_address-1.0' do +control "google_compute_global_address-1.0" do impact 1.0 - title 'google_compute_global_address resource test' + title "google_compute_global_address resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_global_address') + logger.warn("Generating tests for google_compute_global_address") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_global_address.yaml') + file_name = File.join(config_folder, "google_compute_global_address.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/GlobalAddress_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_global_forwarding_rule.rb b/generate/gen-controls/compute_global_forwarding_rule.rb index 11f40d1a4..50c164319 100644 --- a/generate/gen-controls/compute_global_forwarding_rule.rb +++ b/generate/gen-controls/compute_global_forwarding_rule.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_global_forwarding_rule resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_global_forwarding_rule resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_global_forwarding_rule-1.0' do +control "google_compute_global_forwarding_rule-1.0" do impact 1.0 - title 'google_compute_global_forwarding_rule resource test' + title "google_compute_global_forwarding_rule resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_global_forwarding_rule') + logger.warn("Generating tests for google_compute_global_forwarding_rule") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_global_forwarding_rule.yaml') + file_name = File.join(config_folder, "google_compute_global_forwarding_rule.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/GlobalForwardingRule_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_health_check.rb b/generate/gen-controls/compute_health_check.rb index aacc6a657..d63483146 100644 --- a/generate/gen-controls/compute_health_check.rb +++ b/generate/gen-controls/compute_health_check.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_health_check resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_health_check resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_health_check-1.0' do +control "google_compute_health_check-1.0" do impact 1.0 - title 'google_compute_health_check resource test' + title "google_compute_health_check resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_health_check') + logger.warn("Generating tests for google_compute_health_check") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_health_check.yaml') + file_name = File.join(config_folder, "google_compute_health_check.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/HealthCheck_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_http_health_check.rb b/generate/gen-controls/compute_http_health_check.rb index 35648b808..641205e0a 100644 --- a/generate/gen-controls/compute_http_health_check.rb +++ b/generate/gen-controls/compute_http_health_check.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_http_health_check resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_http_health_check resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_http_health_check-1.0' do +control "google_compute_http_health_check-1.0" do impact 1.0 - title 'google_compute_http_health_check resource test' + title "google_compute_http_health_check resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_http_health_check') + logger.warn("Generating tests for google_compute_http_health_check") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_http_health_check.yaml') + file_name = File.join(config_folder, "google_compute_http_health_check.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/HttpHealthCheck_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_https_health_check.rb b/generate/gen-controls/compute_https_health_check.rb index 746fee8e0..9351ff672 100644 --- a/generate/gen-controls/compute_https_health_check.rb +++ b/generate/gen-controls/compute_https_health_check.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_https_health_check resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_https_health_check resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_https_health_check-1.0' do +control "google_compute_https_health_check-1.0" do impact 1.0 - title 'google_compute_https_health_check resource test' + title "google_compute_https_health_check resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_https_health_check') + logger.warn("Generating tests for google_compute_https_health_check") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_https_health_check.yaml') + file_name = File.join(config_folder, "google_compute_https_health_check.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/HttpsHealthCheck_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_instance.rb b/generate/gen-controls/compute_instance.rb index 11c837a3c..3a1fd120b 100644 --- a/generate/gen-controls/compute_instance.rb +++ b/generate/gen-controls/compute_instance.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_instance resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_instance resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_instance-1.0' do +control "google_compute_instance-1.0" do impact 1.0 - title 'google_compute_instance resource test' + title "google_compute_instance resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_instance') + logger.warn("Generating tests for google_compute_instance") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_instance.yaml') + file_name = File.join(config_folder, "google_compute_instance.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] @@ -69,7 +69,7 @@ output = "Writing #{File.expand_path(output_folder)}/Instance_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_instance_group_manager.rb b/generate/gen-controls/compute_instance_group_manager.rb index 8c92a5f9c..506f2c34c 100644 --- a/generate/gen-controls/compute_instance_group_manager.rb +++ b/generate/gen-controls/compute_instance_group_manager.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_instance_group_manager resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_instance_group_manager resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_instance_group_manager-1.0' do +control "google_compute_instance_group_manager-1.0" do impact 1.0 - title 'google_compute_instance_group_manager resource test' + title "google_compute_instance_group_manager resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_instance_group_manager') + logger.warn("Generating tests for google_compute_instance_group_manager") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_instance_group_manager.yaml') + file_name = File.join(config_folder, "google_compute_instance_group_manager.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] @@ -69,7 +69,7 @@ output = "Writing #{File.expand_path(output_folder)}/InstanceGroupManager_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_instance_template.rb b/generate/gen-controls/compute_instance_template.rb index db7a5ec8f..b43339e6c 100644 --- a/generate/gen-controls/compute_instance_template.rb +++ b/generate/gen-controls/compute_instance_template.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_instance_template resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_instance_template resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_instance_template-1.0' do +control "google_compute_instance_template-1.0" do impact 1.0 - title 'google_compute_instance_template resource test' + title "google_compute_instance_template resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_instance_template') + logger.warn("Generating tests for google_compute_instance_template") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_instance_template.yaml') + file_name = File.join(config_folder, "google_compute_instance_template.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/InstanceTemplate_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_network.rb b/generate/gen-controls/compute_network.rb index 64be7a124..f26612a37 100644 --- a/generate/gen-controls/compute_network.rb +++ b/generate/gen-controls/compute_network.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_network resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_network resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_network-1.0' do +control "google_compute_network-1.0" do impact 1.0 - title 'google_compute_network resource test' + title "google_compute_network resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_network') + logger.warn("Generating tests for google_compute_network") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_network.yaml') + file_name = File.join(config_folder, "google_compute_network.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/Network_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_network_endpoint_group.rb b/generate/gen-controls/compute_network_endpoint_group.rb index df1b830a1..221eff671 100644 --- a/generate/gen-controls/compute_network_endpoint_group.rb +++ b/generate/gen-controls/compute_network_endpoint_group.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_network_endpoint_group resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_network_endpoint_group resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_network_endpoint_group-1.0' do +control "google_compute_network_endpoint_group-1.0" do impact 1.0 - title 'google_compute_network_endpoint_group resource test' + title "google_compute_network_endpoint_group resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_network_endpoint_group') + logger.warn("Generating tests for google_compute_network_endpoint_group") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_network_endpoint_group.yaml') + file_name = File.join(config_folder, "google_compute_network_endpoint_group.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] @@ -69,7 +69,7 @@ output = "Writing #{File.expand_path(output_folder)}/NetworkEndpointGroup_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_node_group.rb b/generate/gen-controls/compute_node_group.rb index a3b3ea018..f871d60af 100644 --- a/generate/gen-controls/compute_node_group.rb +++ b/generate/gen-controls/compute_node_group.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_node_group resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_node_group resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_node_group-1.0' do +control "google_compute_node_group-1.0" do impact 1.0 - title 'google_compute_node_group resource test' + title "google_compute_node_group resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_node_group') + logger.warn("Generating tests for google_compute_node_group") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_node_group.yaml') + file_name = File.join(config_folder, "google_compute_node_group.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] @@ -69,7 +69,7 @@ output = "Writing #{File.expand_path(output_folder)}/NodeGroup_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_node_template.rb b/generate/gen-controls/compute_node_template.rb index 862e8ca3a..8a0ece6d0 100644 --- a/generate/gen-controls/compute_node_template.rb +++ b/generate/gen-controls/compute_node_template.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_node_template resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_node_template resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_node_template-1.0' do +control "google_compute_node_template-1.0" do impact 1.0 - title 'google_compute_node_template resource test' + title "google_compute_node_template resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_node_template') + logger.warn("Generating tests for google_compute_node_template") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_node_template.yaml') + file_name = File.join(config_folder, "google_compute_node_template.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] @@ -69,7 +69,7 @@ output = "Writing #{File.expand_path(output_folder)}/NodeTemplate_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_region_backend_service.rb b/generate/gen-controls/compute_region_backend_service.rb index e231081b2..1e6819e8c 100644 --- a/generate/gen-controls/compute_region_backend_service.rb +++ b/generate/gen-controls/compute_region_backend_service.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_region_backend_service resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_region_backend_service resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_region_backend_service-1.0' do +control "google_compute_region_backend_service-1.0" do impact 1.0 - title 'google_compute_region_backend_service resource test' + title "google_compute_region_backend_service resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_region_backend_service') + logger.warn("Generating tests for google_compute_region_backend_service") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_region_backend_service.yaml') + file_name = File.join(config_folder, "google_compute_region_backend_service.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] @@ -69,7 +69,7 @@ output = "Writing #{File.expand_path(output_folder)}/RegionBackendService_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_route.rb b/generate/gen-controls/compute_route.rb index 1e5e039d6..a2b4f5f22 100644 --- a/generate/gen-controls/compute_route.rb +++ b/generate/gen-controls/compute_route.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_route resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_route resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_route-1.0' do +control "google_compute_route-1.0" do impact 1.0 - title 'google_compute_route resource test' + title "google_compute_route resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_route') + logger.warn("Generating tests for google_compute_route") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_route.yaml') + file_name = File.join(config_folder, "google_compute_route.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/Route_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_router.rb b/generate/gen-controls/compute_router.rb index 9a38fcab1..69a214e51 100644 --- a/generate/gen-controls/compute_router.rb +++ b/generate/gen-controls/compute_router.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_router resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_router resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_router-1.0' do +control "google_compute_router-1.0" do impact 1.0 - title 'google_compute_router resource test' + title "google_compute_router resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_router') + logger.warn("Generating tests for google_compute_router") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_router.yaml') + file_name = File.join(config_folder, "google_compute_router.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] @@ -69,7 +69,7 @@ output = "Writing #{File.expand_path(output_folder)}/Router_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_snapshot.rb b/generate/gen-controls/compute_snapshot.rb index 1e37f6b67..e0c0b7ff4 100644 --- a/generate/gen-controls/compute_snapshot.rb +++ b/generate/gen-controls/compute_snapshot.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_snapshot resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_snapshot resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_snapshot-1.0' do +control "google_compute_snapshot-1.0" do impact 1.0 - title 'google_compute_snapshot resource test' + title "google_compute_snapshot resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_snapshot') + logger.warn("Generating tests for google_compute_snapshot") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_snapshot.yaml') + file_name = File.join(config_folder, "google_compute_snapshot.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/Snapshot_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_ssl_certificate.rb b/generate/gen-controls/compute_ssl_certificate.rb index b7cc93266..461f71a00 100644 --- a/generate/gen-controls/compute_ssl_certificate.rb +++ b/generate/gen-controls/compute_ssl_certificate.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_ssl_certificate resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_ssl_certificate resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_ssl_certificate-1.0' do +control "google_compute_ssl_certificate-1.0" do impact 1.0 - title 'google_compute_ssl_certificate resource test' + title "google_compute_ssl_certificate resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_ssl_certificate') + logger.warn("Generating tests for google_compute_ssl_certificate") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_ssl_certificate.yaml') + file_name = File.join(config_folder, "google_compute_ssl_certificate.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/SslCertificate_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_ssl_policy.rb b/generate/gen-controls/compute_ssl_policy.rb index ba650812d..4d0772e13 100644 --- a/generate/gen-controls/compute_ssl_policy.rb +++ b/generate/gen-controls/compute_ssl_policy.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_ssl_policy resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_ssl_policy resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_ssl_policy-1.0' do +control "google_compute_ssl_policy-1.0" do impact 1.0 - title 'google_compute_ssl_policy resource test' + title "google_compute_ssl_policy resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_ssl_policy') + logger.warn("Generating tests for google_compute_ssl_policy") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_ssl_policy.yaml') + file_name = File.join(config_folder, "google_compute_ssl_policy.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/SslPolicy_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_subnetwork.rb b/generate/gen-controls/compute_subnetwork.rb index 729736fe0..70512d855 100644 --- a/generate/gen-controls/compute_subnetwork.rb +++ b/generate/gen-controls/compute_subnetwork.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_subnetwork resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_subnetwork resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_subnetwork-1.0' do +control "google_compute_subnetwork-1.0" do impact 1.0 - title 'google_compute_subnetwork resource test' + title "google_compute_subnetwork resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_subnetwork') + logger.warn("Generating tests for google_compute_subnetwork") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_subnetwork.yaml') + file_name = File.join(config_folder, "google_compute_subnetwork.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] @@ -69,7 +69,7 @@ output = "Writing #{File.expand_path(output_folder)}/Subnetwork_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_target_http_proxy.rb b/generate/gen-controls/compute_target_http_proxy.rb index 2dd9bb116..c1d434746 100644 --- a/generate/gen-controls/compute_target_http_proxy.rb +++ b/generate/gen-controls/compute_target_http_proxy.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_target_http_proxy resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_target_http_proxy resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_target_http_proxy-1.0' do +control "google_compute_target_http_proxy-1.0" do impact 1.0 - title 'google_compute_target_http_proxy resource test' + title "google_compute_target_http_proxy resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_target_http_proxy') + logger.warn("Generating tests for google_compute_target_http_proxy") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_target_http_proxy.yaml') + file_name = File.join(config_folder, "google_compute_target_http_proxy.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/TargetHttpProxy_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_target_https_proxy.rb b/generate/gen-controls/compute_target_https_proxy.rb index 76d188cb4..34df3d4de 100644 --- a/generate/gen-controls/compute_target_https_proxy.rb +++ b/generate/gen-controls/compute_target_https_proxy.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_target_https_proxy resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_target_https_proxy resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_target_https_proxy-1.0' do +control "google_compute_target_https_proxy-1.0" do impact 1.0 - title 'google_compute_target_https_proxy resource test' + title "google_compute_target_https_proxy resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_target_https_proxy') + logger.warn("Generating tests for google_compute_target_https_proxy") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_target_https_proxy.yaml') + file_name = File.join(config_folder, "google_compute_target_https_proxy.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/TargetHttpsProxy_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_target_pool.rb b/generate/gen-controls/compute_target_pool.rb index 11b2ae87d..1b2e3bd3c 100644 --- a/generate/gen-controls/compute_target_pool.rb +++ b/generate/gen-controls/compute_target_pool.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_target_pool resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_target_pool resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_target_pool-1.0' do +control "google_compute_target_pool-1.0" do impact 1.0 - title 'google_compute_target_pool resource test' + title "google_compute_target_pool resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_target_pool') + logger.warn("Generating tests for google_compute_target_pool") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_target_pool.yaml') + file_name = File.join(config_folder, "google_compute_target_pool.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] @@ -69,7 +69,7 @@ output = "Writing #{File.expand_path(output_folder)}/TargetPool_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_target_tcp_proxy.rb b/generate/gen-controls/compute_target_tcp_proxy.rb index f4d979a5d..9755fc0af 100644 --- a/generate/gen-controls/compute_target_tcp_proxy.rb +++ b/generate/gen-controls/compute_target_tcp_proxy.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_target_tcp_proxy resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_target_tcp_proxy resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_target_tcp_proxy-1.0' do +control "google_compute_target_tcp_proxy-1.0" do impact 1.0 - title 'google_compute_target_tcp_proxy resource test' + title "google_compute_target_tcp_proxy resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_target_tcp_proxy') + logger.warn("Generating tests for google_compute_target_tcp_proxy") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_target_tcp_proxy.yaml') + file_name = File.join(config_folder, "google_compute_target_tcp_proxy.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/TargetTcpProxy_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/compute_url_map.rb b/generate/gen-controls/compute_url_map.rb index 5e8ec064c..e28f5ddc2 100644 --- a/generate/gen-controls/compute_url_map.rb +++ b/generate/gen-controls/compute_url_map.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_compute_url_map resource.' +require "yaml" +require "logger" + +title "Test GCP google_compute_url_map resource." # rubocop:disable Metrics/BlockLength -control 'google_compute_url_map-1.0' do +control "google_compute_url_map-1.0" do impact 1.0 - title 'google_compute_url_map resource test' + title "google_compute_url_map resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_compute_url_map') + logger.warn("Generating tests for google_compute_url_map") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_compute_url_map.yaml') + file_name = File.join(config_folder, "google_compute_url_map.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/UrlMap_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/dataproc_cluster.rb b/generate/gen-controls/dataproc_cluster.rb index 42d0c2148..1fdd57afa 100644 --- a/generate/gen-controls/dataproc_cluster.rb +++ b/generate/gen-controls/dataproc_cluster.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_dataproc_cluster resource.' +require "yaml" +require "logger" + +title "Test GCP google_dataproc_cluster resource." # rubocop:disable Metrics/BlockLength -control 'google_dataproc_cluster-1.0' do +control "google_dataproc_cluster-1.0" do impact 1.0 - title 'google_dataproc_cluster resource test' + title "google_dataproc_cluster resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_dataproc_cluster') + logger.warn("Generating tests for google_dataproc_cluster") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_dataproc_cluster.yaml') + file_name = File.join(config_folder, "google_dataproc_cluster.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] @@ -69,7 +69,7 @@ output = "Writing #{File.expand_path(output_folder)}/Cluster_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/dns_resource_record_set.rb b/generate/gen-controls/dns_resource_record_set.rb index 2b9900445..d39875a27 100644 --- a/generate/gen-controls/dns_resource_record_set.rb +++ b/generate/gen-controls/dns_resource_record_set.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_dns_resource_record_set resource.' +require "yaml" +require "logger" + +title "Test GCP google_dns_resource_record_set resource." # rubocop:disable Metrics/BlockLength -control 'google_dns_resource_record_set-1.0' do +control "google_dns_resource_record_set-1.0" do impact 1.0 - title 'google_dns_resource_record_set resource test' + title "google_dns_resource_record_set resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_dns_resource_record_set') + logger.warn("Generating tests for google_dns_resource_record_set") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_dns_resource_record_set.yaml') + file_name = File.join(config_folder, "google_dns_resource_record_set.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] @@ -69,7 +69,7 @@ output = "Writing #{File.expand_path(output_folder)}/ResourceRecordSet_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/filestore_instance.rb b/generate/gen-controls/filestore_instance.rb index 85fc59499..35fc43cf5 100644 --- a/generate/gen-controls/filestore_instance.rb +++ b/generate/gen-controls/filestore_instance.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_filestore_instance resource.' +require "yaml" +require "logger" + +title "Test GCP google_filestore_instance resource." # rubocop:disable Metrics/BlockLength -control 'google_filestore_instance-1.0' do +control "google_filestore_instance-1.0" do impact 1.0 - title 'google_filestore_instance resource test' + title "google_filestore_instance resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_filestore_instance') + logger.warn("Generating tests for google_filestore_instance") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_filestore_instance.yaml') + file_name = File.join(config_folder, "google_filestore_instance.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] @@ -69,7 +69,7 @@ output = "Writing #{File.expand_path(output_folder)}/Instance_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/mlengine_model.rb b/generate/gen-controls/mlengine_model.rb index 5251459c0..fba066583 100644 --- a/generate/gen-controls/mlengine_model.rb +++ b/generate/gen-controls/mlengine_model.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_ml_engine_model resource.' +require "yaml" +require "logger" + +title "Test GCP google_ml_engine_model resource." # rubocop:disable Metrics/BlockLength -control 'google_ml_engine_model-1.0' do +control "google_ml_engine_model-1.0" do impact 1.0 - title 'google_ml_engine_model resource test' + title "google_ml_engine_model resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_ml_engine_model') + logger.warn("Generating tests for google_ml_engine_model") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_ml_engine_model.yaml') + file_name = File.join(config_folder, "google_ml_engine_model.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/Model_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/pubsub_subscription.rb b/generate/gen-controls/pubsub_subscription.rb index cf02d3526..c9339a604 100644 --- a/generate/gen-controls/pubsub_subscription.rb +++ b/generate/gen-controls/pubsub_subscription.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_pubsub_subscription resource.' +require "yaml" +require "logger" + +title "Test GCP google_pubsub_subscription resource." # rubocop:disable Metrics/BlockLength -control 'google_pubsub_subscription-1.0' do +control "google_pubsub_subscription-1.0" do impact 1.0 - title 'google_pubsub_subscription resource test' + title "google_pubsub_subscription resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_pubsub_subscription') + logger.warn("Generating tests for google_pubsub_subscription") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_pubsub_subscription.yaml') + file_name = File.join(config_folder, "google_pubsub_subscription.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/Subscription_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/pubsub_topic.rb b/generate/gen-controls/pubsub_topic.rb index 9d7362130..f3f26a5ff 100644 --- a/generate/gen-controls/pubsub_topic.rb +++ b/generate/gen-controls/pubsub_topic.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_pubsub_topic resource.' +require "yaml" +require "logger" + +title "Test GCP google_pubsub_topic resource." # rubocop:disable Metrics/BlockLength -control 'google_pubsub_topic-1.0' do +control "google_pubsub_topic-1.0" do impact 1.0 - title 'google_pubsub_topic resource test' + title "google_pubsub_topic resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_pubsub_topic') + logger.warn("Generating tests for google_pubsub_topic") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_pubsub_topic.yaml') + file_name = File.join(config_folder, "google_pubsub_topic.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] all_identifiers = [] @@ -60,7 +60,7 @@ output = "Writing #{File.expand_path(output_folder)}/Topic_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/gen-controls/redis_instance.rb b/generate/gen-controls/redis_instance.rb index 880f76fd2..9e00ca0fb 100644 --- a/generate/gen-controls/redis_instance.rb +++ b/generate/gen-controls/redis_instance.rb @@ -1,45 +1,45 @@ -# frozen_string_literal: true -require 'yaml' -require 'logger' -title 'Test GCP google_redis_instance resource.' +require "yaml" +require "logger" + +title "Test GCP google_redis_instance resource." # rubocop:disable Metrics/BlockLength -control 'google_redis_instance-1.0' do +control "google_redis_instance-1.0" do impact 1.0 - title 'google_redis_instance resource test' + title "google_redis_instance resource test" logger = Logger.new(STDOUT) logger.level = Logger::WARN - logger.warn('Generating tests for google_redis_instance') + logger.warn("Generating tests for google_redis_instance") filters = [] ignored_fields = [] - output_folder = ENV['OUTPUT_PATH'] + output_folder = ENV["OUTPUT_PATH"] if output_folder.nil? - output_folder = File.join(File.dirname(__FILE__), '../../generated_tests') + output_folder = File.join(File.dirname(__FILE__), "../../generated_tests") logger.warn("Undefined output folder path at variable OUTPUT_PATH. Defaulting to #{File.expand_path(output_folder)}") end Dir.mkdir(output_folder) unless File.exist?(output_folder) - template_path = File.join(File.dirname(__FILE__), '../../generated_test_template.erb') - config_folder = ENV['CNF_PATH'] - logger.warn('Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files') + template_path = File.join(File.dirname(__FILE__), "../../generated_test_template.erb") + config_folder = ENV["CNF_PATH"] + logger.warn("Undefined configuration folder path at variable CNF_PATH. Ignoring configuration files") unless config_folder.nil? - file_name = File.join(config_folder, 'google_redis_instance.yaml') + file_name = File.join(config_folder, "google_redis_instance.yaml") if File.file?(file_name) config = YAML.load_file(file_name) - config_filters = config['filters'] + config_filters = config["filters"] config_filters.each do # This is not currently implemented - logger.warn('Filters are not currently supported, ignoring') + logger.warn("Filters are not currently supported, ignoring") end - config_ignored = config['ignore_fields'] + config_ignored = config["ignore_fields"] ignored_fields += config_ignored end end - project_name = ENV['GCP_PROJECT_NAME'] - raise 'Undefined project name, please set the GCP_PROJECT_NAME variable' if project_name.nil? + project_name = ENV["GCP_PROJECT_NAME"] + raise "Undefined project name, please set the GCP_PROJECT_NAME variable" if project_name.nil? plural_identifiers = [{ project: project_name }] next_identifiers = [] @@ -69,7 +69,7 @@ output = "Writing #{File.expand_path(output_folder)}/Instance_#{i}.rb" describe output do # Prints pretty message when writing controls to files - its('length') { should be >= 0 } + its("length") { should be >= 0 } end i += 1 end diff --git a/generate/libraries/gcp_backend.rb b/generate/libraries/gcp_backend.rb index 6425622fe..71e8d44b6 100644 --- a/generate/libraries/gcp_backend.rb +++ b/generate/libraries/gcp_backend.rb @@ -1,13 +1,13 @@ -# frozen_string_literal: true + # GCP Inspec Backend Classes # # Based on the Azure Inspec classes by Russell Seymour # -require 'json' -require 'net/http' -require 'googleauth' +require "json" +require "net/http" +require "googleauth" # Base class for GCP resources - depends on train GCP transport for connection # @@ -35,7 +35,7 @@ def catch_gcp_errors # create custom messages as needed rescue Google::Apis::ClientError => e error = JSON.parse(e.body) - fail_resource error['error']['message'] + fail_resource error["error"]["message"] @failed_resource = true nil end @@ -46,7 +46,7 @@ def create_resource_methods(object) end def name_from_self_link(property) - property&.split('/')&.last + property&.split("/")&.last end end # end @@ -68,11 +68,11 @@ def create_methods(object, data) when /Google::Apis::.*/ # iterate around the instance variables data.instance_variables.each do |var| - create_method(object, var.to_s.delete('@'), data.instance_variable_get(var)) + create_method(object, var.to_s.delete("@"), data.instance_variable_get(var)) end # When the data is a Hash object iterate around each of the key value pairs and # craete a method for each one. - when 'Hash' + when "Hash" data.each do |key, value| create_method(object, key, value) end @@ -90,12 +90,12 @@ def create_method(object, name, value) # Create the necessary method based on the var that has been passed # Test the value for its type so that the method can be setup correctly case value.class.to_s - when 'String', 'Integer', 'TrueClass', 'FalseClass', 'Fixnum' + when "String", "Integer", "TrueClass", "FalseClass", "Fixnum" object.define_singleton_method name do value end - when 'Hash' - value.count.zero? ? return_value = value : return_value = GcpResourceProbe.new(value) + when "Hash" + value.count == 0 ? return_value = value : return_value = GcpResourceProbe.new(value) object.define_singleton_method name do return_value end @@ -107,7 +107,7 @@ def create_method(object, name, value) end GcpResourceProbe.new(value) end - when 'Array' + when "Array" # Some things are just string or integer arrays # Check this by seeing if the first element is a string / integer / boolean or # a hashtable @@ -115,7 +115,7 @@ def create_method(object, name, value) # the quickest test # p value[0].class.to_s case value[0].class.to_s - when 'String', 'Integer', 'TrueClass', 'FalseClass', 'Fixnum' + when "String", "Integer", "TrueClass", "FalseClass", "Fixnum" probes = value else probes = [] @@ -182,7 +182,7 @@ def include?(key) # # @return string def camel_case(data) - camel_case_data = data.split('_').inject([]) { |buffer, e| buffer.push(buffer.empty? ? e : e.capitalize) }.join + camel_case_data = data.split("_").inject([]) { |buffer, e| buffer.push(buffer.empty? ? e : e.capitalize) }.join # Ensure that gb (as in gigabytes) is uppercased camel_case_data.gsub(/[gb]/, &:upcase) @@ -191,14 +191,14 @@ def camel_case(data) class GcpApiConnection def initialize - @google_application_credentials = ENV['GOOGLE_APPLICATION_CREDENTIALS'] + @google_application_credentials = ENV["GOOGLE_APPLICATION_CREDENTIALS"] end def fetch_auth unless @service_account_file.nil? return Network::Authorization.new.for!( [ - 'https://www.googleapis.com/auth/cloud-platform', + "https://www.googleapis.com/auth/cloud-platform", ], ).from_google_credentials_json!( @google_application_credentials, @@ -207,7 +207,7 @@ def fetch_auth Network::Authorization.new.from_application_default! end - def fetch(base_url, template, var_data, request_type = 'Get') + def fetch(base_url, template, var_data, request_type = "Get") get_request = Network::Base.new( build_uri(base_url, template, var_data), fetch_auth, @@ -216,14 +216,14 @@ def fetch(base_url, template, var_data, request_type = 'Get') return_if_object get_request.send end - def fetch_all(base_url, template, var_data, request_type = 'Get') + def fetch_all(base_url, template, var_data, request_type = "Get") next_page(build_uri(base_url, template, var_data), request_type) end def next_page(uri, request_type, token = nil) next_hash = {} - next_hash['pageToken'] = token unless token.nil? - current_params = Hash[URI.decode_www_form(uri.query || '')].merge(next_hash) + next_hash["pageToken"] = token unless token.nil? + current_params = Hash[URI.decode_www_form(uri.query || "")].merge(next_hash) uri.query = URI.encode_www_form(current_params) get_request = Network::Base.new( uri, @@ -231,7 +231,7 @@ def next_page(uri, request_type, token = nil) request_type, ) result = JSON.parse(get_request.send.body) - next_page_token = result['nextPageToken'] + next_page_token = result["nextPageToken"] return [result] if next_page_token.nil? [result] + next_page(uri, request_type, next_page_token) @@ -245,7 +245,7 @@ def return_if_object(response) return if response.is_a?(Net::HTTPNotFound) return if response.is_a?(Net::HTTPNoContent) result = JSON.parse(response.body) - raise_if_errors result, %w{error errors}, 'message' + raise_if_errors result, %w{error errors}, "message" raise "Bad response: #{response}" unless response.is_a?(Net::HTTPOK) result end @@ -256,8 +256,8 @@ def raise_if_errors(response, err_path, msg_field) end def raise_error(errors, msg_field) - raise IOError, ['Operation failed:', - errors.map { |e| e[msg_field] }.join(', ')].join(' ') + raise IOError, ["Operation failed:", + errors.map { |e| e[msg_field] }.join(", ")].join(" ") end def build_uri(base_url, template, var_data) @@ -279,7 +279,7 @@ def self.navigate(source, path, default = nil) def extract_variables(template) template.scan(/{{[^}]*}}/).map { |v| v.gsub(/{{([^}]*)}}/, '\1') } - .map(&:to_sym) + .map(&:to_sym) end def expand_variables(template, var_data) @@ -308,11 +308,11 @@ def builder def send request = @cred.authorize(builder.new(@link)) - request['User-Agent'] = generate_user_agent + request["User-Agent"] = generate_user_agent response = transport(request).request(request) - unless ENV['GOOGLE_HTTP_VERBOSE'].nil? + unless ENV["GOOGLE_HTTP_VERBOSE"].nil? puts ["network(#{request}: [#{response.code}]", - response.body.split("\n").map(&:strip).join(' ')].join(' ') + response.body.split("\n").map(&:strip).join(" ")].join(" ") end response end @@ -320,19 +320,19 @@ def send def transport(request) uri = request.uri puts "network(#{request}: #{uri})" \ - unless ENV['GOOGLE_HTTP_VERBOSE'].nil? + unless ENV["GOOGLE_HTTP_VERBOSE"].nil? transport = Net::HTTP.new(uri.host, uri.port) transport.use_ssl = uri.is_a?(URI::HTTPS) transport.verify_mode = OpenSSL::SSL::VERIFY_PEER transport.set_debug_output $stderr \ - unless ENV['GOOGLE_HTTP_DEBUG'].nil? + unless ENV["GOOGLE_HTTP_DEBUG"].nil? transport end private def generate_user_agent - 'inspec-google/1.0.0' + "inspec-google/1.0.0" end end @@ -344,7 +344,7 @@ def initialize end def authorize(obj) - raise ArgumentError, 'A from_* method needs to be called before' \ + raise ArgumentError, "A from_* method needs to be called before" \ unless @authorization if obj.class <= URI::HTTPS || obj.class <= URI::HTTP @@ -363,7 +363,7 @@ def for!(*scopes) end def from_google_credentials_json!(credentials_file) - raise 'Missing argument for scopes' if @scopes.empty? + raise "Missing argument for scopes" if @scopes.empty? @authorization = ::Google::Auth::DefaultCredentials.make_creds( json_key_io: File.open(credentials_file), scope: @scopes, @@ -389,8 +389,8 @@ def authorize_http(req) req.extend TokenProperty auth = {} @authorization.apply!(auth) - req['Authorization'] = auth[:authorization] - req.token = auth[:authorization].split(' ')[1] + req["Authorization"] = auth[:authorization] + req.token = auth[:authorization].split(" ")[1] req end end diff --git a/generate/libraries/google/bigquery/property/dataset_access.rb b/generate/libraries/google/bigquery/property/dataset_access.rb index 9a01ef670..3a757d5aa 100644 --- a/generate/libraries/google/bigquery/property/dataset_access.rb +++ b/generate/libraries/google/bigquery/property/dataset_access.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/bigquery/property/dataset_access_view' +require "google/bigquery/property/dataset_access_view" module GoogleInSpec module BigQuery module Property @@ -36,12 +36,12 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @domain = arguments['domain'] - @group_by_email = arguments['groupByEmail'] - @role = arguments['role'] - @special_group = arguments['specialGroup'] - @user_by_email = arguments['userByEmail'] - @view = GoogleInSpec::BigQuery::Property::DatasetAccessView.new(arguments['view'], to_s) + @domain = arguments["domain"] + @group_by_email = arguments["groupByEmail"] + @role = arguments["role"] + @special_group = arguments["specialGroup"] + @user_by_email = arguments["userByEmail"] + @view = GoogleInSpec::BigQuery::Property::DatasetAccessView.new(arguments["view"], to_s) end def to_s @@ -51,12 +51,12 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'domain' => ->(x, path) { x.nil? ? [] : ["its('#{path}.domain') { should cmp #{x.inspect} }"] }, - 'group_by_email' => ->(x, path) { x.nil? ? [] : ["its('#{path}.group_by_email') { should cmp #{x.inspect} }"] }, - 'role' => ->(x, path) { x.nil? ? [] : ["its('#{path}.role') { should cmp #{x.inspect} }"] }, - 'special_group' => ->(x, path) { x.nil? ? [] : ["its('#{path}.special_group') { should cmp #{x.inspect} }"] }, - 'user_by_email' => ->(x, path) { x.nil? ? [] : ["its('#{path}.user_by_email') { should cmp #{x.inspect} }"] }, - 'view' => ->(x, path) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::DatasetAccessView.un_parse(x, "#{path}.view") }, + "domain" => ->(x, path) { x.nil? ? [] : ["its('#{path}.domain') { should cmp #{x.inspect} }"] }, + "group_by_email" => ->(x, path) { x.nil? ? [] : ["its('#{path}.group_by_email') { should cmp #{x.inspect} }"] }, + "role" => ->(x, path) { x.nil? ? [] : ["its('#{path}.role') { should cmp #{x.inspect} }"] }, + "special_group" => ->(x, path) { x.nil? ? [] : ["its('#{path}.special_group') { should cmp #{x.inspect} }"] }, + "user_by_email" => ->(x, path) { x.nil? ? [] : ["its('#{path}.user_by_email') { should cmp #{x.inspect} }"] }, + "view" => ->(x, path) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::DatasetAccessView.un_parse(x, "#{path}.view") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/dataset_access_view.rb b/generate/libraries/google/bigquery/property/dataset_access_view.rb index f241b01d7..ace959a11 100644 --- a/generate/libraries/google/bigquery/property/dataset_access_view.rb +++ b/generate/libraries/google/bigquery/property/dataset_access_view.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @dataset_id = arguments['datasetId'] - @project_id = arguments['projectId'] - @table_id = arguments['tableId'] + @dataset_id = arguments["datasetId"] + @project_id = arguments["projectId"] + @table_id = arguments["tableId"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'dataset_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.dataset_id') { should cmp #{x.inspect} }"] }, - 'project_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.project_id') { should cmp #{x.inspect} }"] }, - 'table_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.table_id') { should cmp #{x.inspect} }"] }, + "dataset_id" => ->(x, path) { x.nil? ? [] : ["its('#{path}.dataset_id') { should cmp #{x.inspect} }"] }, + "project_id" => ->(x, path) { x.nil? ? [] : ["its('#{path}.project_id') { should cmp #{x.inspect} }"] }, + "table_id" => ->(x, path) { x.nil? ? [] : ["its('#{path}.table_id') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/dataset_dataset_reference.rb b/generate/libraries/google/bigquery/property/dataset_dataset_reference.rb index 86c60f012..8e1e130d9 100644 --- a/generate/libraries/google/bigquery/property/dataset_dataset_reference.rb +++ b/generate/libraries/google/bigquery/property/dataset_dataset_reference.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @dataset_id = arguments['datasetId'] - @project_id = arguments['projectId'] + @dataset_id = arguments["datasetId"] + @project_id = arguments["projectId"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'dataset_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.dataset_id') { should cmp #{x.inspect} }"] }, - 'project_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.project_id') { should cmp #{x.inspect} }"] }, + "dataset_id" => ->(x, path) { x.nil? ? [] : ["its('#{path}.dataset_id') { should cmp #{x.inspect} }"] }, + "project_id" => ->(x, path) { x.nil? ? [] : ["its('#{path}.project_id') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/dataset_default_encryption_configuration.rb b/generate/libraries/google/bigquery/property/dataset_default_encryption_configuration.rb index c63c7ba72..17c5e8699 100644 --- a/generate/libraries/google/bigquery/property/dataset_default_encryption_configuration.rb +++ b/generate/libraries/google/bigquery/property/dataset_default_encryption_configuration.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @kms_key_name = arguments['kmsKeyName'] + @kms_key_name = arguments["kmsKeyName"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'kms_key_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, + "kms_key_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/table_encryption_configuration.rb b/generate/libraries/google/bigquery/property/table_encryption_configuration.rb index f7bc5cd85..c6eba2110 100644 --- a/generate/libraries/google/bigquery/property/table_encryption_configuration.rb +++ b/generate/libraries/google/bigquery/property/table_encryption_configuration.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @kms_key_name = arguments['kmsKeyName'] + @kms_key_name = arguments["kmsKeyName"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'kms_key_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, + "kms_key_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/table_external_data_configuration.rb b/generate/libraries/google/bigquery/property/table_external_data_configuration.rb index a36cf64d8..aa071d4cc 100644 --- a/generate/libraries/google/bigquery/property/table_external_data_configuration.rb +++ b/generate/libraries/google/bigquery/property/table_external_data_configuration.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,12 +13,12 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/bigquery/property/table_external_data_configuration_bigtable_options' -require 'google/bigquery/property/table_external_data_configuration_bigtable_options_column_families' -require 'google/bigquery/property/table_external_data_configuration_csv_options' -require 'google/bigquery/property/table_external_data_configuration_google_sheets_options' -require 'google/bigquery/property/table_external_data_configuration_schema' -require 'google/bigquery/property/table_external_data_configuration_schema_fields' +require "google/bigquery/property/table_external_data_configuration_bigtable_options" +require "google/bigquery/property/table_external_data_configuration_bigtable_options_column_families" +require "google/bigquery/property/table_external_data_configuration_csv_options" +require "google/bigquery/property/table_external_data_configuration_google_sheets_options" +require "google/bigquery/property/table_external_data_configuration_schema" +require "google/bigquery/property/table_external_data_configuration_schema_fields" module GoogleInSpec module BigQuery module Property @@ -49,16 +49,16 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @autodetect = arguments['autodetect'] - @compression = arguments['compression'] - @ignore_unknown_values = arguments['ignoreUnknownValues'] - @max_bad_records = arguments['maxBadRecords'] - @source_format = arguments['sourceFormat'] - @source_uris = arguments['sourceUris'] - @schema = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationSchema.new(arguments['schema'], to_s) - @google_sheets_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationGoogleSheetsOptions.new(arguments['googleSheetsOptions'], to_s) - @csv_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationCsvOptions.new(arguments['csvOptions'], to_s) - @bigtable_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptions.new(arguments['bigtableOptions'], to_s) + @autodetect = arguments["autodetect"] + @compression = arguments["compression"] + @ignore_unknown_values = arguments["ignoreUnknownValues"] + @max_bad_records = arguments["maxBadRecords"] + @source_format = arguments["sourceFormat"] + @source_uris = arguments["sourceUris"] + @schema = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationSchema.new(arguments["schema"], to_s) + @google_sheets_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationGoogleSheetsOptions.new(arguments["googleSheetsOptions"], to_s) + @csv_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationCsvOptions.new(arguments["csvOptions"], to_s) + @bigtable_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptions.new(arguments["bigtableOptions"], to_s) end def to_s @@ -68,16 +68,16 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'autodetect' => ->(x, path) { x.nil? ? [] : ["its('#{path}.autodetect') { should cmp #{x.inspect} }"] }, - 'compression' => ->(x, path) { x.nil? ? [] : ["its('#{path}.compression') { should cmp #{x.inspect} }"] }, - 'ignore_unknown_values' => ->(x, path) { x.nil? ? [] : ["its('#{path}.ignore_unknown_values') { should cmp #{x.inspect} }"] }, - 'max_bad_records' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_bad_records') { should cmp #{x.inspect} }"] }, - 'source_format' => ->(x, path) { x.nil? ? [] : ["its('#{path}.source_format') { should cmp #{x.inspect} }"] }, - 'source_uris' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.source_uris') { should include #{single.inspect} }" } }, - 'schema' => ->(x, path) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationSchema.un_parse(x, "#{path}.schema") }, - 'google_sheets_options' => ->(x, path) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationGoogleSheetsOptions.un_parse(x, "#{path}.google_sheets_options") }, - 'csv_options' => ->(x, path) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationCsvOptions.un_parse(x, "#{path}.csv_options") }, - 'bigtable_options' => ->(x, path) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptions.un_parse(x, "#{path}.bigtable_options") }, + "autodetect" => ->(x, path) { x.nil? ? [] : ["its('#{path}.autodetect') { should cmp #{x.inspect} }"] }, + "compression" => ->(x, path) { x.nil? ? [] : ["its('#{path}.compression') { should cmp #{x.inspect} }"] }, + "ignore_unknown_values" => ->(x, path) { x.nil? ? [] : ["its('#{path}.ignore_unknown_values') { should cmp #{x.inspect} }"] }, + "max_bad_records" => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_bad_records') { should cmp #{x.inspect} }"] }, + "source_format" => ->(x, path) { x.nil? ? [] : ["its('#{path}.source_format') { should cmp #{x.inspect} }"] }, + "source_uris" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.source_uris') { should include #{single.inspect} }" } }, + "schema" => ->(x, path) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationSchema.un_parse(x, "#{path}.schema") }, + "google_sheets_options" => ->(x, path) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationGoogleSheetsOptions.un_parse(x, "#{path}.google_sheets_options") }, + "csv_options" => ->(x, path) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationCsvOptions.un_parse(x, "#{path}.csv_options") }, + "bigtable_options" => ->(x, path) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptions.un_parse(x, "#{path}.bigtable_options") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options.rb b/generate/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options.rb index 5d3b4e8da..fd49af3a4 100644 --- a/generate/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options.rb +++ b/generate/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/bigquery/property/table_external_data_configuration_bigtable_options_column_families' +require "google/bigquery/property/table_external_data_configuration_bigtable_options_column_families" module GoogleInSpec module BigQuery module Property @@ -30,9 +30,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @ignore_unspecified_column_families = arguments['ignoreUnspecifiedColumnFamilies'] - @read_rowkey_as_string = arguments['readRowkeyAsString'] - @column_families = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptionsColumnFamiliesArray.parse(arguments['columnFamilies'], to_s) + @ignore_unspecified_column_families = arguments["ignoreUnspecifiedColumnFamilies"] + @read_rowkey_as_string = arguments["readRowkeyAsString"] + @column_families = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptionsColumnFamiliesArray.parse(arguments["columnFamilies"], to_s) end def to_s @@ -42,9 +42,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'ignore_unspecified_column_families' => ->(x, path) { x.nil? ? [] : ["its('#{path}.ignore_unspecified_column_families') { should cmp #{x.inspect} }"] }, - 'read_rowkey_as_string' => ->(x, path) { x.nil? ? [] : ["its('#{path}.read_rowkey_as_string') { should cmp #{x.inspect} }"] }, - 'column_families' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.column_families') { should include '#{single.to_json}' }" } }, + "ignore_unspecified_column_families" => ->(x, path) { x.nil? ? [] : ["its('#{path}.ignore_unspecified_column_families') { should cmp #{x.inspect} }"] }, + "read_rowkey_as_string" => ->(x, path) { x.nil? ? [] : ["its('#{path}.read_rowkey_as_string') { should cmp #{x.inspect} }"] }, + "column_families" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.column_families') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families.rb b/generate/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families.rb index cc257475d..315ff78c8 100644 --- a/generate/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families.rb +++ b/generate/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/bigquery/property/table_external_data_configuration_bigtable_options_column_families_columns' +require "google/bigquery/property/table_external_data_configuration_bigtable_options_column_families_columns" module GoogleInSpec module BigQuery module Property @@ -34,11 +34,11 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @columns = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptionsColumnFamiliesColumnsArray.parse(arguments['columns'], to_s) - @encoding = arguments['encoding'] - @family_id = arguments['familyId'] - @only_read_latest = arguments['onlyReadLatest'] - @type = arguments['type'] + @columns = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptionsColumnFamiliesColumnsArray.parse(arguments["columns"], to_s) + @encoding = arguments["encoding"] + @family_id = arguments["familyId"] + @only_read_latest = arguments["onlyReadLatest"] + @type = arguments["type"] end def to_s @@ -48,11 +48,11 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'columns' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.columns') { should include '#{single.to_json}' }" } }, - 'encoding' => ->(x, path) { x.nil? ? [] : ["its('#{path}.encoding') { should cmp #{x.inspect} }"] }, - 'family_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.family_id') { should cmp #{x.inspect} }"] }, - 'only_read_latest' => ->(x, path) { x.nil? ? [] : ["its('#{path}.only_read_latest') { should cmp #{x.inspect} }"] }, - 'type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, + "columns" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.columns') { should include '#{single.to_json}' }" } }, + "encoding" => ->(x, path) { x.nil? ? [] : ["its('#{path}.encoding') { should cmp #{x.inspect} }"] }, + "family_id" => ->(x, path) { x.nil? ? [] : ["its('#{path}.family_id') { should cmp #{x.inspect} }"] }, + "only_read_latest" => ->(x, path) { x.nil? ? [] : ["its('#{path}.only_read_latest') { should cmp #{x.inspect} }"] }, + "type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families_columns.rb b/generate/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families_columns.rb index 86bbff7e6..376d6af3f 100644 --- a/generate/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families_columns.rb +++ b/generate/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families_columns.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -33,11 +33,11 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @encoding = arguments['encoding'] - @field_name = arguments['fieldName'] - @only_read_latest = arguments['onlyReadLatest'] - @qualifier_string = arguments['qualifierString'] - @type = arguments['type'] + @encoding = arguments["encoding"] + @field_name = arguments["fieldName"] + @only_read_latest = arguments["onlyReadLatest"] + @qualifier_string = arguments["qualifierString"] + @type = arguments["type"] end def to_s @@ -47,11 +47,11 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'encoding' => ->(x, path) { x.nil? ? [] : ["its('#{path}.encoding') { should cmp #{x.inspect} }"] }, - 'field_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.field_name') { should cmp #{x.inspect} }"] }, - 'only_read_latest' => ->(x, path) { x.nil? ? [] : ["its('#{path}.only_read_latest') { should cmp #{x.inspect} }"] }, - 'qualifier_string' => ->(x, path) { x.nil? ? [] : ["its('#{path}.qualifier_string') { should cmp #{x.inspect} }"] }, - 'type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, + "encoding" => ->(x, path) { x.nil? ? [] : ["its('#{path}.encoding') { should cmp #{x.inspect} }"] }, + "field_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.field_name') { should cmp #{x.inspect} }"] }, + "only_read_latest" => ->(x, path) { x.nil? ? [] : ["its('#{path}.only_read_latest') { should cmp #{x.inspect} }"] }, + "qualifier_string" => ->(x, path) { x.nil? ? [] : ["its('#{path}.qualifier_string') { should cmp #{x.inspect} }"] }, + "type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/table_external_data_configuration_csv_options.rb b/generate/libraries/google/bigquery/property/table_external_data_configuration_csv_options.rb index 6518c48c9..5ac311f2b 100644 --- a/generate/libraries/google/bigquery/property/table_external_data_configuration_csv_options.rb +++ b/generate/libraries/google/bigquery/property/table_external_data_configuration_csv_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -35,12 +35,12 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @allow_jagged_rows = arguments['allowJaggedRows'] - @allow_quoted_newlines = arguments['allowQuotedNewlines'] - @encoding = arguments['encoding'] - @field_delimiter = arguments['fieldDelimiter'] - @quote = arguments['quote'] - @skip_leading_rows = arguments['skipLeadingRows'] + @allow_jagged_rows = arguments["allowJaggedRows"] + @allow_quoted_newlines = arguments["allowQuotedNewlines"] + @encoding = arguments["encoding"] + @field_delimiter = arguments["fieldDelimiter"] + @quote = arguments["quote"] + @skip_leading_rows = arguments["skipLeadingRows"] end def to_s @@ -50,12 +50,12 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'allow_jagged_rows' => ->(x, path) { x.nil? ? [] : ["its('#{path}.allow_jagged_rows') { should cmp #{x.inspect} }"] }, - 'allow_quoted_newlines' => ->(x, path) { x.nil? ? [] : ["its('#{path}.allow_quoted_newlines') { should cmp #{x.inspect} }"] }, - 'encoding' => ->(x, path) { x.nil? ? [] : ["its('#{path}.encoding') { should cmp #{x.inspect} }"] }, - 'field_delimiter' => ->(x, path) { x.nil? ? [] : ["its('#{path}.field_delimiter') { should cmp #{x.inspect} }"] }, - 'quote' => ->(x, path) { x.nil? ? [] : ["its('#{path}.quote') { should cmp #{x.inspect} }"] }, - 'skip_leading_rows' => ->(x, path) { x.nil? ? [] : ["its('#{path}.skip_leading_rows') { should cmp #{x.inspect} }"] }, + "allow_jagged_rows" => ->(x, path) { x.nil? ? [] : ["its('#{path}.allow_jagged_rows') { should cmp #{x.inspect} }"] }, + "allow_quoted_newlines" => ->(x, path) { x.nil? ? [] : ["its('#{path}.allow_quoted_newlines') { should cmp #{x.inspect} }"] }, + "encoding" => ->(x, path) { x.nil? ? [] : ["its('#{path}.encoding') { should cmp #{x.inspect} }"] }, + "field_delimiter" => ->(x, path) { x.nil? ? [] : ["its('#{path}.field_delimiter') { should cmp #{x.inspect} }"] }, + "quote" => ->(x, path) { x.nil? ? [] : ["its('#{path}.quote') { should cmp #{x.inspect} }"] }, + "skip_leading_rows" => ->(x, path) { x.nil? ? [] : ["its('#{path}.skip_leading_rows') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/table_external_data_configuration_google_sheets_options.rb b/generate/libraries/google/bigquery/property/table_external_data_configuration_google_sheets_options.rb index 73a7e858e..a594b8fda 100644 --- a/generate/libraries/google/bigquery/property/table_external_data_configuration_google_sheets_options.rb +++ b/generate/libraries/google/bigquery/property/table_external_data_configuration_google_sheets_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @skip_leading_rows = arguments['skipLeadingRows'] + @skip_leading_rows = arguments["skipLeadingRows"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'skip_leading_rows' => ->(x, path) { x.nil? ? [] : ["its('#{path}.skip_leading_rows') { should cmp #{x.inspect} }"] }, + "skip_leading_rows" => ->(x, path) { x.nil? ? [] : ["its('#{path}.skip_leading_rows') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/table_external_data_configuration_schema.rb b/generate/libraries/google/bigquery/property/table_external_data_configuration_schema.rb index eaf447ed1..c4bd06c4a 100644 --- a/generate/libraries/google/bigquery/property/table_external_data_configuration_schema.rb +++ b/generate/libraries/google/bigquery/property/table_external_data_configuration_schema.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/bigquery/property/table_external_data_configuration_schema_fields' +require "google/bigquery/property/table_external_data_configuration_schema_fields" module GoogleInSpec module BigQuery module Property @@ -26,7 +26,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @fields = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationSchemaFieldsArray.parse(arguments['fields'], to_s) + @fields = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationSchemaFieldsArray.parse(arguments["fields"], to_s) end def to_s @@ -36,7 +36,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'fields' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.fields') { should include '#{single.to_json}' }" } }, + "fields" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.fields') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/table_external_data_configuration_schema_fields.rb b/generate/libraries/google/bigquery/property/table_external_data_configuration_schema_fields.rb index ed6a4e040..4eb7ebc70 100644 --- a/generate/libraries/google/bigquery/property/table_external_data_configuration_schema_fields.rb +++ b/generate/libraries/google/bigquery/property/table_external_data_configuration_schema_fields.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -33,11 +33,11 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @description = arguments['description'] - @fields = arguments['fields'] - @mode = arguments['mode'] - @name = arguments['name'] - @type = arguments['type'] + @description = arguments["description"] + @fields = arguments["fields"] + @mode = arguments["mode"] + @name = arguments["name"] + @type = arguments["type"] end def to_s @@ -47,11 +47,11 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, - 'fields' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.fields') { should include #{single.inspect} }" } }, - 'mode' => ->(x, path) { x.nil? ? [] : ["its('#{path}.mode') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, - 'type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, + "description" => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, + "fields" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.fields') { should include #{single.inspect} }" } }, + "mode" => ->(x, path) { x.nil? ? [] : ["its('#{path}.mode') { should cmp #{x.inspect} }"] }, + "name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, + "type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/table_schema.rb b/generate/libraries/google/bigquery/property/table_schema.rb index b15230f7f..7fa2ebce5 100644 --- a/generate/libraries/google/bigquery/property/table_schema.rb +++ b/generate/libraries/google/bigquery/property/table_schema.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/bigquery/property/table_schema_fields' +require "google/bigquery/property/table_schema_fields" module GoogleInSpec module BigQuery module Property @@ -26,7 +26,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @fields = GoogleInSpec::BigQuery::Property::TableSchemaFieldsArray.parse(arguments['fields'], to_s) + @fields = GoogleInSpec::BigQuery::Property::TableSchemaFieldsArray.parse(arguments["fields"], to_s) end def to_s @@ -36,7 +36,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'fields' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.fields') { should include '#{single.to_json}' }" } }, + "fields" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.fields') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/table_schema_fields.rb b/generate/libraries/google/bigquery/property/table_schema_fields.rb index dd028d08e..f6f3e70e9 100644 --- a/generate/libraries/google/bigquery/property/table_schema_fields.rb +++ b/generate/libraries/google/bigquery/property/table_schema_fields.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -33,11 +33,11 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @description = arguments['description'] - @fields = arguments['fields'] - @mode = arguments['mode'] - @name = arguments['name'] - @type = arguments['type'] + @description = arguments["description"] + @fields = arguments["fields"] + @mode = arguments["mode"] + @name = arguments["name"] + @type = arguments["type"] end def to_s @@ -47,11 +47,11 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, - 'fields' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.fields') { should include #{single.inspect} }" } }, - 'mode' => ->(x, path) { x.nil? ? [] : ["its('#{path}.mode') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, - 'type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, + "description" => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, + "fields" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.fields') { should include #{single.inspect} }" } }, + "mode" => ->(x, path) { x.nil? ? [] : ["its('#{path}.mode') { should cmp #{x.inspect} }"] }, + "name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, + "type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/table_streaming_buffer.rb b/generate/libraries/google/bigquery/property/table_streaming_buffer.rb index 0842955af..61fe0e89e 100644 --- a/generate/libraries/google/bigquery/property/table_streaming_buffer.rb +++ b/generate/libraries/google/bigquery/property/table_streaming_buffer.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @estimated_bytes = arguments['estimatedBytes'] - @estimated_rows = arguments['estimatedRows'] - @oldest_entry_time = arguments['oldestEntryTime'] + @estimated_bytes = arguments["estimatedBytes"] + @estimated_rows = arguments["estimatedRows"] + @oldest_entry_time = arguments["oldestEntryTime"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'estimated_bytes' => ->(x, path) { x.nil? ? [] : ["its('#{path}.estimated_bytes') { should cmp #{x.inspect} }"] }, - 'estimated_rows' => ->(x, path) { x.nil? ? [] : ["its('#{path}.estimated_rows') { should cmp #{x.inspect} }"] }, - 'oldest_entry_time' => ->(x, path) { x.nil? ? [] : ["its('#{path}.oldest_entry_time') { should cmp #{x.inspect} }"] }, + "estimated_bytes" => ->(x, path) { x.nil? ? [] : ["its('#{path}.estimated_bytes') { should cmp #{x.inspect} }"] }, + "estimated_rows" => ->(x, path) { x.nil? ? [] : ["its('#{path}.estimated_rows') { should cmp #{x.inspect} }"] }, + "oldest_entry_time" => ->(x, path) { x.nil? ? [] : ["its('#{path}.oldest_entry_time') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/table_table_reference.rb b/generate/libraries/google/bigquery/property/table_table_reference.rb index 21c50c5f4..59eefae9b 100644 --- a/generate/libraries/google/bigquery/property/table_table_reference.rb +++ b/generate/libraries/google/bigquery/property/table_table_reference.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @dataset_id = arguments['datasetId'] - @project_id = arguments['projectId'] - @table_id = arguments['tableId'] + @dataset_id = arguments["datasetId"] + @project_id = arguments["projectId"] + @table_id = arguments["tableId"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'dataset_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.dataset_id') { should cmp #{x.inspect} }"] }, - 'project_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.project_id') { should cmp #{x.inspect} }"] }, - 'table_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.table_id') { should cmp #{x.inspect} }"] }, + "dataset_id" => ->(x, path) { x.nil? ? [] : ["its('#{path}.dataset_id') { should cmp #{x.inspect} }"] }, + "project_id" => ->(x, path) { x.nil? ? [] : ["its('#{path}.project_id') { should cmp #{x.inspect} }"] }, + "table_id" => ->(x, path) { x.nil? ? [] : ["its('#{path}.table_id') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/table_time_partitioning.rb b/generate/libraries/google/bigquery/property/table_time_partitioning.rb index f33bcf16e..01d52749c 100644 --- a/generate/libraries/google/bigquery/property/table_time_partitioning.rb +++ b/generate/libraries/google/bigquery/property/table_time_partitioning.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @expiration_ms = arguments['expirationMs'] - @field = arguments['field'] - @type = arguments['type'] + @expiration_ms = arguments["expirationMs"] + @field = arguments["field"] + @type = arguments["type"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'expiration_ms' => ->(x, path) { x.nil? ? [] : ["its('#{path}.expiration_ms') { should cmp #{x.inspect} }"] }, - 'field' => ->(x, path) { x.nil? ? [] : ["its('#{path}.field') { should cmp #{x.inspect} }"] }, - 'type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, + "expiration_ms" => ->(x, path) { x.nil? ? [] : ["its('#{path}.expiration_ms') { should cmp #{x.inspect} }"] }, + "field" => ->(x, path) { x.nil? ? [] : ["its('#{path}.field') { should cmp #{x.inspect} }"] }, + "type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/table_view.rb b/generate/libraries/google/bigquery/property/table_view.rb index 8341581ba..7891718ff 100644 --- a/generate/libraries/google/bigquery/property/table_view.rb +++ b/generate/libraries/google/bigquery/property/table_view.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/bigquery/property/table_view_user_defined_function_resources' +require "google/bigquery/property/table_view_user_defined_function_resources" module GoogleInSpec module BigQuery module Property @@ -28,8 +28,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @use_legacy_sql = arguments['useLegacySql'] - @user_defined_function_resources = GoogleInSpec::BigQuery::Property::TableViewUserDefinedFunctionResourcesArray.parse(arguments['userDefinedFunctionResources'], to_s) + @use_legacy_sql = arguments["useLegacySql"] + @user_defined_function_resources = GoogleInSpec::BigQuery::Property::TableViewUserDefinedFunctionResourcesArray.parse(arguments["userDefinedFunctionResources"], to_s) end def to_s @@ -39,8 +39,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'use_legacy_sql' => ->(x, path) { x.nil? ? [] : ["its('#{path}.use_legacy_sql') { should cmp #{x.inspect} }"] }, - 'user_defined_function_resources' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.user_defined_function_resources') { should include '#{single.to_json}' }" } }, + "use_legacy_sql" => ->(x, path) { x.nil? ? [] : ["its('#{path}.use_legacy_sql') { should cmp #{x.inspect} }"] }, + "user_defined_function_resources" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.user_defined_function_resources') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/bigquery/property/table_view_user_defined_function_resources.rb b/generate/libraries/google/bigquery/property/table_view_user_defined_function_resources.rb index f6f02b526..26a14c07c 100644 --- a/generate/libraries/google/bigquery/property/table_view_user_defined_function_resources.rb +++ b/generate/libraries/google/bigquery/property/table_view_user_defined_function_resources.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @inline_code = arguments['inlineCode'] - @resource_uri = arguments['resourceUri'] + @inline_code = arguments["inlineCode"] + @resource_uri = arguments["resourceUri"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'inline_code' => ->(x, path) { x.nil? ? [] : ["its('#{path}.inline_code') { should cmp #{x.inspect} }"] }, - 'resource_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.resource_uri') { should cmp #{x.inspect} }"] }, + "inline_code" => ->(x, path) { x.nil? ? [] : ["its('#{path}.inline_code') { should cmp #{x.inspect} }"] }, + "resource_uri" => ->(x, path) { x.nil? ? [] : ["its('#{path}.resource_uri') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/cloudbuild/property/trigger_build.rb b/generate/libraries/google/cloudbuild/property/trigger_build.rb index b58d2523f..865672a88 100644 --- a/generate/libraries/google/cloudbuild/property/trigger_build.rb +++ b/generate/libraries/google/cloudbuild/property/trigger_build.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/cloudbuild/property/trigger_build_steps' +require "google/cloudbuild/property/trigger_build_steps" module GoogleInSpec module CloudBuild module Property @@ -30,9 +30,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @tags = arguments['tags'] - @images = arguments['images'] - @steps = GoogleInSpec::CloudBuild::Property::TriggerBuildStepsArray.parse(arguments['steps'], to_s) + @tags = arguments["tags"] + @images = arguments["images"] + @steps = GoogleInSpec::CloudBuild::Property::TriggerBuildStepsArray.parse(arguments["steps"], to_s) end def to_s @@ -42,9 +42,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'tags' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.tags') { should include #{single.inspect} }" } }, - 'images' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.images') { should include #{single.inspect} }" } }, - 'steps' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.steps') { should include '#{single.to_json}' }" } }, + "tags" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.tags') { should include #{single.inspect} }" } }, + "images" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.images') { should include #{single.inspect} }" } }, + "steps" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.steps') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/cloudbuild/property/trigger_build_steps.rb b/generate/libraries/google/cloudbuild/property/trigger_build_steps.rb index 80a55230b..c44ddd878 100644 --- a/generate/libraries/google/cloudbuild/property/trigger_build_steps.rb +++ b/generate/libraries/google/cloudbuild/property/trigger_build_steps.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/cloudbuild/property/trigger_build_steps_volumes' +require "google/cloudbuild/property/trigger_build_steps_volumes" module GoogleInSpec module CloudBuild module Property @@ -46,17 +46,17 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @name = arguments['name'] - @args = arguments['args'] - @env = arguments['env'] - @id = arguments['id'] - @entrypoint = arguments['entrypoint'] - @dir = arguments['dir'] - @secret_env = arguments['secretEnv'] - @timeout = arguments['timeout'] - @timing = arguments['timing'] - @volumes = GoogleInSpec::CloudBuild::Property::TriggerBuildStepsVolumesArray.parse(arguments['volumes'], to_s) - @wait_for = arguments['waitFor'] + @name = arguments["name"] + @args = arguments["args"] + @env = arguments["env"] + @id = arguments["id"] + @entrypoint = arguments["entrypoint"] + @dir = arguments["dir"] + @secret_env = arguments["secretEnv"] + @timeout = arguments["timeout"] + @timing = arguments["timing"] + @volumes = GoogleInSpec::CloudBuild::Property::TriggerBuildStepsVolumesArray.parse(arguments["volumes"], to_s) + @wait_for = arguments["waitFor"] end def to_s @@ -66,17 +66,17 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, - 'args' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.args') { should include #{single.inspect} }" } }, - 'env' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.env') { should include #{single.inspect} }" } }, - 'id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.id') { should cmp #{x.inspect} }"] }, - 'entrypoint' => ->(x, path) { x.nil? ? [] : ["its('#{path}.entrypoint') { should cmp #{x.inspect} }"] }, - 'dir' => ->(x, path) { x.nil? ? [] : ["its('#{path}.dir') { should cmp #{x.inspect} }"] }, - 'secret_env' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.secret_env') { should include #{single.inspect} }" } }, - 'timeout' => ->(x, path) { x.nil? ? [] : ["its('#{path}.timeout') { should cmp #{x.inspect} }"] }, - 'timing' => ->(x, path) { x.nil? ? [] : ["its('#{path}.timing') { should cmp #{x.inspect} }"] }, - 'volumes' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.volumes') { should include '#{single.to_json}' }" } }, - 'wait_for' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.wait_for') { should include #{single.inspect} }" } }, + "name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, + "args" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.args') { should include #{single.inspect} }" } }, + "env" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.env') { should include #{single.inspect} }" } }, + "id" => ->(x, path) { x.nil? ? [] : ["its('#{path}.id') { should cmp #{x.inspect} }"] }, + "entrypoint" => ->(x, path) { x.nil? ? [] : ["its('#{path}.entrypoint') { should cmp #{x.inspect} }"] }, + "dir" => ->(x, path) { x.nil? ? [] : ["its('#{path}.dir') { should cmp #{x.inspect} }"] }, + "secret_env" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.secret_env') { should include #{single.inspect} }" } }, + "timeout" => ->(x, path) { x.nil? ? [] : ["its('#{path}.timeout') { should cmp #{x.inspect} }"] }, + "timing" => ->(x, path) { x.nil? ? [] : ["its('#{path}.timing') { should cmp #{x.inspect} }"] }, + "volumes" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.volumes') { should include '#{single.to_json}' }" } }, + "wait_for" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.wait_for') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/cloudbuild/property/trigger_build_steps_volumes.rb b/generate/libraries/google/cloudbuild/property/trigger_build_steps_volumes.rb index 12c4af342..4e4b7f43c 100644 --- a/generate/libraries/google/cloudbuild/property/trigger_build_steps_volumes.rb +++ b/generate/libraries/google/cloudbuild/property/trigger_build_steps_volumes.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @name = arguments['name'] - @path = arguments['path'] + @name = arguments["name"] + @path = arguments["path"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, - 'path' => ->(x, path) { x.nil? ? [] : ["its('#{path}.path') { should cmp #{x.inspect} }"] }, + "name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, + "path" => ->(x, path) { x.nil? ? [] : ["its('#{path}.path') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/cloudbuild/property/trigger_trigger_template.rb b/generate/libraries/google/cloudbuild/property/trigger_trigger_template.rb index 7438b9946..de93f0d12 100644 --- a/generate/libraries/google/cloudbuild/property/trigger_trigger_template.rb +++ b/generate/libraries/google/cloudbuild/property/trigger_trigger_template.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -35,12 +35,12 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @project_id = arguments['projectId'] - @repo_name = arguments['repoName'] - @dir = arguments['dir'] - @branch_name = arguments['branchName'] - @tag_name = arguments['tagName'] - @commit_sha = arguments['commitSha'] + @project_id = arguments["projectId"] + @repo_name = arguments["repoName"] + @dir = arguments["dir"] + @branch_name = arguments["branchName"] + @tag_name = arguments["tagName"] + @commit_sha = arguments["commitSha"] end def to_s @@ -50,12 +50,12 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'project_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.project_id') { should cmp #{x.inspect} }"] }, - 'repo_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.repo_name') { should cmp #{x.inspect} }"] }, - 'dir' => ->(x, path) { x.nil? ? [] : ["its('#{path}.dir') { should cmp #{x.inspect} }"] }, - 'branch_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.branch_name') { should cmp #{x.inspect} }"] }, - 'tag_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.tag_name') { should cmp #{x.inspect} }"] }, - 'commit_sha' => ->(x, path) { x.nil? ? [] : ["its('#{path}.commit_sha') { should cmp #{x.inspect} }"] }, + "project_id" => ->(x, path) { x.nil? ? [] : ["its('#{path}.project_id') { should cmp #{x.inspect} }"] }, + "repo_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.repo_name') { should cmp #{x.inspect} }"] }, + "dir" => ->(x, path) { x.nil? ? [] : ["its('#{path}.dir') { should cmp #{x.inspect} }"] }, + "branch_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.branch_name') { should cmp #{x.inspect} }"] }, + "tag_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.tag_name') { should cmp #{x.inspect} }"] }, + "commit_sha" => ->(x, path) { x.nil? ? [] : ["its('#{path}.commit_sha') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/cloudfunctions/property/cloudfunction_event_trigger.rb b/generate/libraries/google/cloudfunctions/property/cloudfunction_event_trigger.rb index d69700c66..ec62cc810 100644 --- a/generate/libraries/google/cloudfunctions/property/cloudfunction_event_trigger.rb +++ b/generate/libraries/google/cloudfunctions/property/cloudfunction_event_trigger.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @event_type = arguments['eventType'] - @resource = arguments['resource'] - @service = arguments['service'] + @event_type = arguments["eventType"] + @resource = arguments["resource"] + @service = arguments["service"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'event_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.event_type') { should cmp #{x.inspect} }"] }, - 'resource' => ->(x, path) { x.nil? ? [] : ["its('#{path}.resource') { should cmp #{x.inspect} }"] }, - 'service' => ->(x, path) { x.nil? ? [] : ["its('#{path}.service') { should cmp #{x.inspect} }"] }, + "event_type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.event_type') { should cmp #{x.inspect} }"] }, + "resource" => ->(x, path) { x.nil? ? [] : ["its('#{path}.resource') { should cmp #{x.inspect} }"] }, + "service" => ->(x, path) { x.nil? ? [] : ["its('#{path}.service') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/cloudfunctions/property/cloudfunction_https_trigger.rb b/generate/libraries/google/cloudfunctions/property/cloudfunction_https_trigger.rb index 8259a955c..f7f4cf4d4 100644 --- a/generate/libraries/google/cloudfunctions/property/cloudfunction_https_trigger.rb +++ b/generate/libraries/google/cloudfunctions/property/cloudfunction_https_trigger.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @url = arguments['url'] + @url = arguments["url"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'url' => ->(x, path) { x.nil? ? [] : ["its('#{path}.url') { should cmp #{x.inspect} }"] }, + "url" => ->(x, path) { x.nil? ? [] : ["its('#{path}.url') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/cloudfunctions/property/cloudfunction_source_repository.rb b/generate/libraries/google/cloudfunctions/property/cloudfunction_source_repository.rb index 8b31f4da1..54f7d8a53 100644 --- a/generate/libraries/google/cloudfunctions/property/cloudfunction_source_repository.rb +++ b/generate/libraries/google/cloudfunctions/property/cloudfunction_source_repository.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @url = arguments['url'] - @deployed_url = arguments['deployedUrl'] + @url = arguments["url"] + @deployed_url = arguments["deployedUrl"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'url' => ->(x, path) { x.nil? ? [] : ["its('#{path}.url') { should cmp #{x.inspect} }"] }, - 'deployed_url' => ->(x, path) { x.nil? ? [] : ["its('#{path}.deployed_url') { should cmp #{x.inspect} }"] }, + "url" => ->(x, path) { x.nil? ? [] : ["its('#{path}.url') { should cmp #{x.inspect} }"] }, + "deployed_url" => ->(x, path) { x.nil? ? [] : ["its('#{path}.deployed_url') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/autoscaler_autoscaling_policy.rb b/generate/libraries/google/compute/property/autoscaler_autoscaling_policy.rb index 6473b56fc..6c2772d99 100644 --- a/generate/libraries/google/compute/property/autoscaler_autoscaling_policy.rb +++ b/generate/libraries/google/compute/property/autoscaler_autoscaling_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/autoscaler_autoscaling_policy_cpu_utilization' -require 'google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations' -require 'google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization' +require "google/compute/property/autoscaler_autoscaling_policy_cpu_utilization" +require "google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations" +require "google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization" module GoogleInSpec module Compute module Property @@ -38,12 +38,12 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @min_num_replicas = arguments['minNumReplicas'] - @max_num_replicas = arguments['maxNumReplicas'] - @cool_down_period_sec = arguments['coolDownPeriodSec'] - @cpu_utilization = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyCpuUtilization.new(arguments['cpuUtilization'], to_s) - @custom_metric_utilizations = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyCustomMetricUtilizationsArray.parse(arguments['customMetricUtilizations'], to_s) - @load_balancing_utilization = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyLoadBalancingUtilization.new(arguments['loadBalancingUtilization'], to_s) + @min_num_replicas = arguments["minNumReplicas"] + @max_num_replicas = arguments["maxNumReplicas"] + @cool_down_period_sec = arguments["coolDownPeriodSec"] + @cpu_utilization = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyCpuUtilization.new(arguments["cpuUtilization"], to_s) + @custom_metric_utilizations = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyCustomMetricUtilizationsArray.parse(arguments["customMetricUtilizations"], to_s) + @load_balancing_utilization = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyLoadBalancingUtilization.new(arguments["loadBalancingUtilization"], to_s) end def to_s @@ -53,12 +53,12 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'min_num_replicas' => ->(x, path) { x.nil? ? [] : ["its('#{path}.min_num_replicas') { should cmp #{x.inspect} }"] }, - 'max_num_replicas' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_num_replicas') { should cmp #{x.inspect} }"] }, - 'cool_down_period_sec' => ->(x, path) { x.nil? ? [] : ["its('#{path}.cool_down_period_sec') { should cmp #{x.inspect} }"] }, - 'cpu_utilization' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyCpuUtilization.un_parse(x, "#{path}.cpu_utilization") }, - 'custom_metric_utilizations' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.custom_metric_utilizations') { should include '#{single.to_json}' }" } }, - 'load_balancing_utilization' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyLoadBalancingUtilization.un_parse(x, "#{path}.load_balancing_utilization") }, + "min_num_replicas" => ->(x, path) { x.nil? ? [] : ["its('#{path}.min_num_replicas') { should cmp #{x.inspect} }"] }, + "max_num_replicas" => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_num_replicas') { should cmp #{x.inspect} }"] }, + "cool_down_period_sec" => ->(x, path) { x.nil? ? [] : ["its('#{path}.cool_down_period_sec') { should cmp #{x.inspect} }"] }, + "cpu_utilization" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyCpuUtilization.un_parse(x, "#{path}.cpu_utilization") }, + "custom_metric_utilizations" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.custom_metric_utilizations') { should include '#{single.to_json}' }" } }, + "load_balancing_utilization" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyLoadBalancingUtilization.un_parse(x, "#{path}.load_balancing_utilization") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/autoscaler_autoscaling_policy_cpu_utilization.rb b/generate/libraries/google/compute/property/autoscaler_autoscaling_policy_cpu_utilization.rb index 6be918f67..bed8e0767 100644 --- a/generate/libraries/google/compute/property/autoscaler_autoscaling_policy_cpu_utilization.rb +++ b/generate/libraries/google/compute/property/autoscaler_autoscaling_policy_cpu_utilization.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @utilization_target = arguments['utilizationTarget'] + @utilization_target = arguments["utilizationTarget"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'utilization_target' => ->(x, path) { x.nil? ? [] : ["its('#{path}.utilization_target') { should cmp #{x.inspect} }"] }, + "utilization_target" => ->(x, path) { x.nil? ? [] : ["its('#{path}.utilization_target') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations.rb b/generate/libraries/google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations.rb index 11bb1c540..25c0d0bd4 100644 --- a/generate/libraries/google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations.rb +++ b/generate/libraries/google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @metric = arguments['metric'] - @utilization_target = arguments['utilizationTarget'] - @utilization_target_type = arguments['utilizationTargetType'] + @metric = arguments["metric"] + @utilization_target = arguments["utilizationTarget"] + @utilization_target_type = arguments["utilizationTargetType"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'metric' => ->(x, path) { x.nil? ? [] : ["its('#{path}.metric') { should cmp #{x.inspect} }"] }, - 'utilization_target' => ->(x, path) { x.nil? ? [] : ["its('#{path}.utilization_target') { should cmp #{x.inspect} }"] }, - 'utilization_target_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.utilization_target_type') { should cmp #{x.inspect} }"] }, + "metric" => ->(x, path) { x.nil? ? [] : ["its('#{path}.metric') { should cmp #{x.inspect} }"] }, + "utilization_target" => ->(x, path) { x.nil? ? [] : ["its('#{path}.utilization_target') { should cmp #{x.inspect} }"] }, + "utilization_target_type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.utilization_target_type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization.rb b/generate/libraries/google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization.rb index 5c6a0519b..78630b00c 100644 --- a/generate/libraries/google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization.rb +++ b/generate/libraries/google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @utilization_target = arguments['utilizationTarget'] + @utilization_target = arguments["utilizationTarget"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'utilization_target' => ->(x, path) { x.nil? ? [] : ["its('#{path}.utilization_target') { should cmp #{x.inspect} }"] }, + "utilization_target" => ->(x, path) { x.nil? ? [] : ["its('#{path}.utilization_target') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/backendbucket_cdn_policy.rb b/generate/libraries/google/compute/property/backendbucket_cdn_policy.rb index 8ec94e441..6f9ca0acb 100644 --- a/generate/libraries/google/compute/property/backendbucket_cdn_policy.rb +++ b/generate/libraries/google/compute/property/backendbucket_cdn_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @signed_url_cache_max_age_sec = arguments['signedUrlCacheMaxAgeSec'] + @signed_url_cache_max_age_sec = arguments["signedUrlCacheMaxAgeSec"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'signed_url_cache_max_age_sec' => ->(x, path) { x.nil? ? [] : ["its('#{path}.signed_url_cache_max_age_sec') { should cmp #{x.inspect} }"] }, + "signed_url_cache_max_age_sec" => ->(x, path) { x.nil? ? [] : ["its('#{path}.signed_url_cache_max_age_sec') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/backendservice_backends.rb b/generate/libraries/google/compute/property/backendservice_backends.rb index 51c0b45cb..dfee13008 100644 --- a/generate/libraries/google/compute/property/backendservice_backends.rb +++ b/generate/libraries/google/compute/property/backendservice_backends.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -45,17 +45,17 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @balancing_mode = arguments['balancingMode'] - @capacity_scaler = arguments['capacityScaler'] - @description = arguments['description'] - @group = arguments['group'] - @max_connections = arguments['maxConnections'] - @max_connections_per_instance = arguments['maxConnectionsPerInstance'] - @max_connections_per_endpoint = arguments['maxConnectionsPerEndpoint'] - @max_rate = arguments['maxRate'] - @max_rate_per_instance = arguments['maxRatePerInstance'] - @max_rate_per_endpoint = arguments['maxRatePerEndpoint'] - @max_utilization = arguments['maxUtilization'] + @balancing_mode = arguments["balancingMode"] + @capacity_scaler = arguments["capacityScaler"] + @description = arguments["description"] + @group = arguments["group"] + @max_connections = arguments["maxConnections"] + @max_connections_per_instance = arguments["maxConnectionsPerInstance"] + @max_connections_per_endpoint = arguments["maxConnectionsPerEndpoint"] + @max_rate = arguments["maxRate"] + @max_rate_per_instance = arguments["maxRatePerInstance"] + @max_rate_per_endpoint = arguments["maxRatePerEndpoint"] + @max_utilization = arguments["maxUtilization"] end def to_s @@ -65,17 +65,17 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'balancing_mode' => ->(x, path) { x.nil? ? [] : ["its('#{path}.balancing_mode') { should cmp #{x.inspect} }"] }, - 'capacity_scaler' => ->(x, path) { x.nil? ? [] : ["its('#{path}.capacity_scaler') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, - 'group' => ->(x, path) { x.nil? ? [] : ["its('#{path}.group') { should cmp #{x.inspect} }"] }, - 'max_connections' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_connections') { should cmp #{x.inspect} }"] }, - 'max_connections_per_instance' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_connections_per_instance') { should cmp #{x.inspect} }"] }, - 'max_connections_per_endpoint' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_connections_per_endpoint') { should cmp #{x.inspect} }"] }, - 'max_rate' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_rate') { should cmp #{x.inspect} }"] }, - 'max_rate_per_instance' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_rate_per_instance') { should cmp #{x.inspect} }"] }, - 'max_rate_per_endpoint' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_rate_per_endpoint') { should cmp #{x.inspect} }"] }, - 'max_utilization' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_utilization') { should cmp #{x.inspect} }"] }, + "balancing_mode" => ->(x, path) { x.nil? ? [] : ["its('#{path}.balancing_mode') { should cmp #{x.inspect} }"] }, + "capacity_scaler" => ->(x, path) { x.nil? ? [] : ["its('#{path}.capacity_scaler') { should cmp #{x.inspect} }"] }, + "description" => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, + "group" => ->(x, path) { x.nil? ? [] : ["its('#{path}.group') { should cmp #{x.inspect} }"] }, + "max_connections" => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_connections') { should cmp #{x.inspect} }"] }, + "max_connections_per_instance" => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_connections_per_instance') { should cmp #{x.inspect} }"] }, + "max_connections_per_endpoint" => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_connections_per_endpoint') { should cmp #{x.inspect} }"] }, + "max_rate" => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_rate') { should cmp #{x.inspect} }"] }, + "max_rate_per_instance" => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_rate_per_instance') { should cmp #{x.inspect} }"] }, + "max_rate_per_endpoint" => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_rate_per_endpoint') { should cmp #{x.inspect} }"] }, + "max_utilization" => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_utilization') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/backendservice_cdn_policy.rb b/generate/libraries/google/compute/property/backendservice_cdn_policy.rb index 88b05d350..61186a9e2 100644 --- a/generate/libraries/google/compute/property/backendservice_cdn_policy.rb +++ b/generate/libraries/google/compute/property/backendservice_cdn_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/backendservice_cdn_policy_cache_key_policy' +require "google/compute/property/backendservice_cdn_policy_cache_key_policy" module GoogleInSpec module Compute module Property @@ -28,8 +28,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @cache_key_policy = GoogleInSpec::Compute::Property::BackendServiceCdnPolicyCacheKeyPolicy.new(arguments['cacheKeyPolicy'], to_s) - @signed_url_cache_max_age_sec = arguments['signedUrlCacheMaxAgeSec'] + @cache_key_policy = GoogleInSpec::Compute::Property::BackendServiceCdnPolicyCacheKeyPolicy.new(arguments["cacheKeyPolicy"], to_s) + @signed_url_cache_max_age_sec = arguments["signedUrlCacheMaxAgeSec"] end def to_s @@ -39,8 +39,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'cache_key_policy' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::BackendServiceCdnPolicyCacheKeyPolicy.un_parse(x, "#{path}.cache_key_policy") }, - 'signed_url_cache_max_age_sec' => ->(x, path) { x.nil? ? [] : ["its('#{path}.signed_url_cache_max_age_sec') { should cmp #{x.inspect} }"] }, + "cache_key_policy" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::BackendServiceCdnPolicyCacheKeyPolicy.un_parse(x, "#{path}.cache_key_policy") }, + "signed_url_cache_max_age_sec" => ->(x, path) { x.nil? ? [] : ["its('#{path}.signed_url_cache_max_age_sec') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/backendservice_cdn_policy_cache_key_policy.rb b/generate/libraries/google/compute/property/backendservice_cdn_policy_cache_key_policy.rb index d20627b08..8b016c6f6 100644 --- a/generate/libraries/google/compute/property/backendservice_cdn_policy_cache_key_policy.rb +++ b/generate/libraries/google/compute/property/backendservice_cdn_policy_cache_key_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -33,11 +33,11 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @include_host = arguments['includeHost'] - @include_protocol = arguments['includeProtocol'] - @include_query_string = arguments['includeQueryString'] - @query_string_blacklist = arguments['queryStringBlacklist'] - @query_string_whitelist = arguments['queryStringWhitelist'] + @include_host = arguments["includeHost"] + @include_protocol = arguments["includeProtocol"] + @include_query_string = arguments["includeQueryString"] + @query_string_blacklist = arguments["queryStringBlacklist"] + @query_string_whitelist = arguments["queryStringWhitelist"] end def to_s @@ -47,11 +47,11 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'include_host' => ->(x, path) { x.nil? ? [] : ["its('#{path}.include_host') { should cmp #{x.inspect} }"] }, - 'include_protocol' => ->(x, path) { x.nil? ? [] : ["its('#{path}.include_protocol') { should cmp #{x.inspect} }"] }, - 'include_query_string' => ->(x, path) { x.nil? ? [] : ["its('#{path}.include_query_string') { should cmp #{x.inspect} }"] }, - 'query_string_blacklist' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.query_string_blacklist') { should include #{single.inspect} }" } }, - 'query_string_whitelist' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.query_string_whitelist') { should include #{single.inspect} }" } }, + "include_host" => ->(x, path) { x.nil? ? [] : ["its('#{path}.include_host') { should cmp #{x.inspect} }"] }, + "include_protocol" => ->(x, path) { x.nil? ? [] : ["its('#{path}.include_protocol') { should cmp #{x.inspect} }"] }, + "include_query_string" => ->(x, path) { x.nil? ? [] : ["its('#{path}.include_query_string') { should cmp #{x.inspect} }"] }, + "query_string_blacklist" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.query_string_blacklist') { should include #{single.inspect} }" } }, + "query_string_whitelist" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.query_string_whitelist') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/backendservice_connection_draining.rb b/generate/libraries/google/compute/property/backendservice_connection_draining.rb index 98e01ea2e..f154e2b1a 100644 --- a/generate/libraries/google/compute/property/backendservice_connection_draining.rb +++ b/generate/libraries/google/compute/property/backendservice_connection_draining.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @draining_timeout_sec = arguments['drainingTimeoutSec'] + @draining_timeout_sec = arguments["drainingTimeoutSec"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'draining_timeout_sec' => ->(x, path) { x.nil? ? [] : ["its('#{path}.draining_timeout_sec') { should cmp #{x.inspect} }"] }, + "draining_timeout_sec" => ->(x, path) { x.nil? ? [] : ["its('#{path}.draining_timeout_sec') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/backendservice_iap.rb b/generate/libraries/google/compute/property/backendservice_iap.rb index c7398b4d2..159863b1c 100644 --- a/generate/libraries/google/compute/property/backendservice_iap.rb +++ b/generate/libraries/google/compute/property/backendservice_iap.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -31,10 +31,10 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @enabled = arguments['enabled'] - @oauth2_client_id = arguments['oauth2ClientId'] - @oauth2_client_secret = arguments['oauth2ClientSecret'] - @oauth2_client_secret_sha256 = arguments['oauth2ClientSecretSha256'] + @enabled = arguments["enabled"] + @oauth2_client_id = arguments["oauth2ClientId"] + @oauth2_client_secret = arguments["oauth2ClientSecret"] + @oauth2_client_secret_sha256 = arguments["oauth2ClientSecretSha256"] end def to_s @@ -44,10 +44,10 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'enabled' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enabled') { should cmp #{x.inspect} }"] }, - 'oauth2_client_id' => ->(x, path) { x.nil? ? [] : ["its('#{path}.oauth2_client_id') { should cmp #{x.inspect} }"] }, - 'oauth2_client_secret' => ->(x, path) { x.nil? ? [] : ["its('#{path}.oauth2_client_secret') { should cmp #{x.inspect} }"] }, - 'oauth2_client_secret_sha256' => ->(x, path) { x.nil? ? [] : ["its('#{path}.oauth2_client_secret_sha256') { should cmp #{x.inspect} }"] }, + "enabled" => ->(x, path) { x.nil? ? [] : ["its('#{path}.enabled') { should cmp #{x.inspect} }"] }, + "oauth2_client_id" => ->(x, path) { x.nil? ? [] : ["its('#{path}.oauth2_client_id') { should cmp #{x.inspect} }"] }, + "oauth2_client_secret" => ->(x, path) { x.nil? ? [] : ["its('#{path}.oauth2_client_secret') { should cmp #{x.inspect} }"] }, + "oauth2_client_secret_sha256" => ->(x, path) { x.nil? ? [] : ["its('#{path}.oauth2_client_secret_sha256') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/disk_disk_encryption_key.rb b/generate/libraries/google/compute/property/disk_disk_encryption_key.rb index 64f909575..b99fcf6ba 100644 --- a/generate/libraries/google/compute/property/disk_disk_encryption_key.rb +++ b/generate/libraries/google/compute/property/disk_disk_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @raw_key = arguments['rawKey'] - @sha256 = arguments['sha256'] - @kms_key_name = arguments['kmsKeyName'] + @raw_key = arguments["rawKey"] + @sha256 = arguments["sha256"] + @kms_key_name = arguments["kmsKeyName"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'raw_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, - 'sha256' => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, - 'kms_key_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, + "raw_key" => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, + "sha256" => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, + "kms_key_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/disk_source_image_encryption_key.rb b/generate/libraries/google/compute/property/disk_source_image_encryption_key.rb index 7ffd02f1b..9e79d6a03 100644 --- a/generate/libraries/google/compute/property/disk_source_image_encryption_key.rb +++ b/generate/libraries/google/compute/property/disk_source_image_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @raw_key = arguments['rawKey'] - @sha256 = arguments['sha256'] - @kms_key_name = arguments['kmsKeyName'] + @raw_key = arguments["rawKey"] + @sha256 = arguments["sha256"] + @kms_key_name = arguments["kmsKeyName"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'raw_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, - 'sha256' => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, - 'kms_key_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, + "raw_key" => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, + "sha256" => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, + "kms_key_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/disk_source_snapshot_encryption_key.rb b/generate/libraries/google/compute/property/disk_source_snapshot_encryption_key.rb index 060660bb1..1688443ce 100644 --- a/generate/libraries/google/compute/property/disk_source_snapshot_encryption_key.rb +++ b/generate/libraries/google/compute/property/disk_source_snapshot_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @raw_key = arguments['rawKey'] - @kms_key_name = arguments['kmsKeyName'] - @sha256 = arguments['sha256'] + @raw_key = arguments["rawKey"] + @kms_key_name = arguments["kmsKeyName"] + @sha256 = arguments["sha256"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'raw_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, - 'kms_key_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, - 'sha256' => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, + "raw_key" => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, + "kms_key_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, + "sha256" => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/firewall_allowed.rb b/generate/libraries/google/compute/property/firewall_allowed.rb index 17d30ff42..340cf9f7e 100644 --- a/generate/libraries/google/compute/property/firewall_allowed.rb +++ b/generate/libraries/google/compute/property/firewall_allowed.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @ip_protocol = arguments['IPProtocol'] - @ports = arguments['ports'] + @ip_protocol = arguments["IPProtocol"] + @ports = arguments["ports"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'ip_protocol' => ->(x, path) { x.nil? ? [] : ["its('#{path}.ip_protocol') { should cmp #{x.inspect} }"] }, - 'ports' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.ports') { should include #{single.inspect} }" } }, + "ip_protocol" => ->(x, path) { x.nil? ? [] : ["its('#{path}.ip_protocol') { should cmp #{x.inspect} }"] }, + "ports" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.ports') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/firewall_denied.rb b/generate/libraries/google/compute/property/firewall_denied.rb index bc8ad3fc3..1f6e191bb 100644 --- a/generate/libraries/google/compute/property/firewall_denied.rb +++ b/generate/libraries/google/compute/property/firewall_denied.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @ip_protocol = arguments['IPProtocol'] - @ports = arguments['ports'] + @ip_protocol = arguments["IPProtocol"] + @ports = arguments["ports"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'ip_protocol' => ->(x, path) { x.nil? ? [] : ["its('#{path}.ip_protocol') { should cmp #{x.inspect} }"] }, - 'ports' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.ports') { should include #{single.inspect} }" } }, + "ip_protocol" => ->(x, path) { x.nil? ? [] : ["its('#{path}.ip_protocol') { should cmp #{x.inspect} }"] }, + "ports" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.ports') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/globalforwardingrule_metadata_filters.rb b/generate/libraries/google/compute/property/globalforwardingrule_metadata_filters.rb index 99f5d3f89..d8643ef05 100644 --- a/generate/libraries/google/compute/property/globalforwardingrule_metadata_filters.rb +++ b/generate/libraries/google/compute/property/globalforwardingrule_metadata_filters.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/globalforwardingrule_metadata_filters_filter_labels' +require "google/compute/property/globalforwardingrule_metadata_filters_filter_labels" module GoogleInSpec module Compute module Property @@ -28,8 +28,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @filter_match_criteria = arguments['filterMatchCriteria'] - @filter_labels = GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersFilterLabelsArray.parse(arguments['filterLabels'], to_s) + @filter_match_criteria = arguments["filterMatchCriteria"] + @filter_labels = GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersFilterLabelsArray.parse(arguments["filterLabels"], to_s) end def to_s @@ -39,8 +39,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'filter_match_criteria' => ->(x, path) { x.nil? ? [] : ["its('#{path}.filter_match_criteria') { should cmp #{x.inspect} }"] }, - 'filter_labels' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.filter_labels') { should include '#{single.to_json}' }" } }, + "filter_match_criteria" => ->(x, path) { x.nil? ? [] : ["its('#{path}.filter_match_criteria') { should cmp #{x.inspect} }"] }, + "filter_labels" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.filter_labels') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/globalforwardingrule_metadata_filters_filter_labels.rb b/generate/libraries/google/compute/property/globalforwardingrule_metadata_filters_filter_labels.rb index a4cf5a78f..69fa6a94f 100644 --- a/generate/libraries/google/compute/property/globalforwardingrule_metadata_filters_filter_labels.rb +++ b/generate/libraries/google/compute/property/globalforwardingrule_metadata_filters_filter_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @name = arguments['name'] - @value = arguments['value'] + @name = arguments["name"] + @value = arguments["value"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, - 'value' => ->(x, path) { x.nil? ? [] : ["its('#{path}.value') { should cmp #{x.inspect} }"] }, + "name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, + "value" => ->(x, path) { x.nil? ? [] : ["its('#{path}.value') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/healthcheck_http2_health_check.rb b/generate/libraries/google/compute/property/healthcheck_http2_health_check.rb index 5e3ceb06c..ed98d7040 100644 --- a/generate/libraries/google/compute/property/healthcheck_http2_health_check.rb +++ b/generate/libraries/google/compute/property/healthcheck_http2_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -37,13 +37,13 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @host = arguments['host'] - @request_path = arguments['requestPath'] - @response = arguments['response'] - @port = arguments['port'] - @port_name = arguments['portName'] - @proxy_header = arguments['proxyHeader'] - @port_specification = arguments['portSpecification'] + @host = arguments["host"] + @request_path = arguments["requestPath"] + @response = arguments["response"] + @port = arguments["port"] + @port_name = arguments["portName"] + @proxy_header = arguments["proxyHeader"] + @port_specification = arguments["portSpecification"] end def to_s @@ -53,13 +53,13 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'host' => ->(x, path) { x.nil? ? [] : ["its('#{path}.host') { should cmp #{x.inspect} }"] }, - 'request_path' => ->(x, path) { x.nil? ? [] : ["its('#{path}.request_path') { should cmp #{x.inspect} }"] }, - 'response' => ->(x, path) { x.nil? ? [] : ["its('#{path}.response') { should cmp #{x.inspect} }"] }, - 'port' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port') { should cmp #{x.inspect} }"] }, - 'port_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_name') { should cmp #{x.inspect} }"] }, - 'proxy_header' => ->(x, path) { x.nil? ? [] : ["its('#{path}.proxy_header') { should cmp #{x.inspect} }"] }, - 'port_specification' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_specification') { should cmp #{x.inspect} }"] }, + "host" => ->(x, path) { x.nil? ? [] : ["its('#{path}.host') { should cmp #{x.inspect} }"] }, + "request_path" => ->(x, path) { x.nil? ? [] : ["its('#{path}.request_path') { should cmp #{x.inspect} }"] }, + "response" => ->(x, path) { x.nil? ? [] : ["its('#{path}.response') { should cmp #{x.inspect} }"] }, + "port" => ->(x, path) { x.nil? ? [] : ["its('#{path}.port') { should cmp #{x.inspect} }"] }, + "port_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_name') { should cmp #{x.inspect} }"] }, + "proxy_header" => ->(x, path) { x.nil? ? [] : ["its('#{path}.proxy_header') { should cmp #{x.inspect} }"] }, + "port_specification" => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_specification') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/healthcheck_http_health_check.rb b/generate/libraries/google/compute/property/healthcheck_http_health_check.rb index 3df6da50a..22f4c424b 100644 --- a/generate/libraries/google/compute/property/healthcheck_http_health_check.rb +++ b/generate/libraries/google/compute/property/healthcheck_http_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -37,13 +37,13 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @host = arguments['host'] - @request_path = arguments['requestPath'] - @response = arguments['response'] - @port = arguments['port'] - @port_name = arguments['portName'] - @proxy_header = arguments['proxyHeader'] - @port_specification = arguments['portSpecification'] + @host = arguments["host"] + @request_path = arguments["requestPath"] + @response = arguments["response"] + @port = arguments["port"] + @port_name = arguments["portName"] + @proxy_header = arguments["proxyHeader"] + @port_specification = arguments["portSpecification"] end def to_s @@ -53,13 +53,13 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'host' => ->(x, path) { x.nil? ? [] : ["its('#{path}.host') { should cmp #{x.inspect} }"] }, - 'request_path' => ->(x, path) { x.nil? ? [] : ["its('#{path}.request_path') { should cmp #{x.inspect} }"] }, - 'response' => ->(x, path) { x.nil? ? [] : ["its('#{path}.response') { should cmp #{x.inspect} }"] }, - 'port' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port') { should cmp #{x.inspect} }"] }, - 'port_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_name') { should cmp #{x.inspect} }"] }, - 'proxy_header' => ->(x, path) { x.nil? ? [] : ["its('#{path}.proxy_header') { should cmp #{x.inspect} }"] }, - 'port_specification' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_specification') { should cmp #{x.inspect} }"] }, + "host" => ->(x, path) { x.nil? ? [] : ["its('#{path}.host') { should cmp #{x.inspect} }"] }, + "request_path" => ->(x, path) { x.nil? ? [] : ["its('#{path}.request_path') { should cmp #{x.inspect} }"] }, + "response" => ->(x, path) { x.nil? ? [] : ["its('#{path}.response') { should cmp #{x.inspect} }"] }, + "port" => ->(x, path) { x.nil? ? [] : ["its('#{path}.port') { should cmp #{x.inspect} }"] }, + "port_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_name') { should cmp #{x.inspect} }"] }, + "proxy_header" => ->(x, path) { x.nil? ? [] : ["its('#{path}.proxy_header') { should cmp #{x.inspect} }"] }, + "port_specification" => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_specification') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/healthcheck_https_health_check.rb b/generate/libraries/google/compute/property/healthcheck_https_health_check.rb index 23b44ac34..62d9c3c41 100644 --- a/generate/libraries/google/compute/property/healthcheck_https_health_check.rb +++ b/generate/libraries/google/compute/property/healthcheck_https_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -37,13 +37,13 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @host = arguments['host'] - @request_path = arguments['requestPath'] - @response = arguments['response'] - @port = arguments['port'] - @port_name = arguments['portName'] - @proxy_header = arguments['proxyHeader'] - @port_specification = arguments['portSpecification'] + @host = arguments["host"] + @request_path = arguments["requestPath"] + @response = arguments["response"] + @port = arguments["port"] + @port_name = arguments["portName"] + @proxy_header = arguments["proxyHeader"] + @port_specification = arguments["portSpecification"] end def to_s @@ -53,13 +53,13 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'host' => ->(x, path) { x.nil? ? [] : ["its('#{path}.host') { should cmp #{x.inspect} }"] }, - 'request_path' => ->(x, path) { x.nil? ? [] : ["its('#{path}.request_path') { should cmp #{x.inspect} }"] }, - 'response' => ->(x, path) { x.nil? ? [] : ["its('#{path}.response') { should cmp #{x.inspect} }"] }, - 'port' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port') { should cmp #{x.inspect} }"] }, - 'port_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_name') { should cmp #{x.inspect} }"] }, - 'proxy_header' => ->(x, path) { x.nil? ? [] : ["its('#{path}.proxy_header') { should cmp #{x.inspect} }"] }, - 'port_specification' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_specification') { should cmp #{x.inspect} }"] }, + "host" => ->(x, path) { x.nil? ? [] : ["its('#{path}.host') { should cmp #{x.inspect} }"] }, + "request_path" => ->(x, path) { x.nil? ? [] : ["its('#{path}.request_path') { should cmp #{x.inspect} }"] }, + "response" => ->(x, path) { x.nil? ? [] : ["its('#{path}.response') { should cmp #{x.inspect} }"] }, + "port" => ->(x, path) { x.nil? ? [] : ["its('#{path}.port') { should cmp #{x.inspect} }"] }, + "port_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_name') { should cmp #{x.inspect} }"] }, + "proxy_header" => ->(x, path) { x.nil? ? [] : ["its('#{path}.proxy_header') { should cmp #{x.inspect} }"] }, + "port_specification" => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_specification') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/healthcheck_ssl_health_check.rb b/generate/libraries/google/compute/property/healthcheck_ssl_health_check.rb index 626368b1f..d12b5b17f 100644 --- a/generate/libraries/google/compute/property/healthcheck_ssl_health_check.rb +++ b/generate/libraries/google/compute/property/healthcheck_ssl_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -35,12 +35,12 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @request = arguments['request'] - @response = arguments['response'] - @port = arguments['port'] - @port_name = arguments['portName'] - @proxy_header = arguments['proxyHeader'] - @port_specification = arguments['portSpecification'] + @request = arguments["request"] + @response = arguments["response"] + @port = arguments["port"] + @port_name = arguments["portName"] + @proxy_header = arguments["proxyHeader"] + @port_specification = arguments["portSpecification"] end def to_s @@ -50,12 +50,12 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'request' => ->(x, path) { x.nil? ? [] : ["its('#{path}.request') { should cmp #{x.inspect} }"] }, - 'response' => ->(x, path) { x.nil? ? [] : ["its('#{path}.response') { should cmp #{x.inspect} }"] }, - 'port' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port') { should cmp #{x.inspect} }"] }, - 'port_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_name') { should cmp #{x.inspect} }"] }, - 'proxy_header' => ->(x, path) { x.nil? ? [] : ["its('#{path}.proxy_header') { should cmp #{x.inspect} }"] }, - 'port_specification' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_specification') { should cmp #{x.inspect} }"] }, + "request" => ->(x, path) { x.nil? ? [] : ["its('#{path}.request') { should cmp #{x.inspect} }"] }, + "response" => ->(x, path) { x.nil? ? [] : ["its('#{path}.response') { should cmp #{x.inspect} }"] }, + "port" => ->(x, path) { x.nil? ? [] : ["its('#{path}.port') { should cmp #{x.inspect} }"] }, + "port_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_name') { should cmp #{x.inspect} }"] }, + "proxy_header" => ->(x, path) { x.nil? ? [] : ["its('#{path}.proxy_header') { should cmp #{x.inspect} }"] }, + "port_specification" => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_specification') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/healthcheck_tcp_health_check.rb b/generate/libraries/google/compute/property/healthcheck_tcp_health_check.rb index a64c97658..37f5788df 100644 --- a/generate/libraries/google/compute/property/healthcheck_tcp_health_check.rb +++ b/generate/libraries/google/compute/property/healthcheck_tcp_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -35,12 +35,12 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @request = arguments['request'] - @response = arguments['response'] - @port = arguments['port'] - @port_name = arguments['portName'] - @proxy_header = arguments['proxyHeader'] - @port_specification = arguments['portSpecification'] + @request = arguments["request"] + @response = arguments["response"] + @port = arguments["port"] + @port_name = arguments["portName"] + @proxy_header = arguments["proxyHeader"] + @port_specification = arguments["portSpecification"] end def to_s @@ -50,12 +50,12 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'request' => ->(x, path) { x.nil? ? [] : ["its('#{path}.request') { should cmp #{x.inspect} }"] }, - 'response' => ->(x, path) { x.nil? ? [] : ["its('#{path}.response') { should cmp #{x.inspect} }"] }, - 'port' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port') { should cmp #{x.inspect} }"] }, - 'port_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_name') { should cmp #{x.inspect} }"] }, - 'proxy_header' => ->(x, path) { x.nil? ? [] : ["its('#{path}.proxy_header') { should cmp #{x.inspect} }"] }, - 'port_specification' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_specification') { should cmp #{x.inspect} }"] }, + "request" => ->(x, path) { x.nil? ? [] : ["its('#{path}.request') { should cmp #{x.inspect} }"] }, + "response" => ->(x, path) { x.nil? ? [] : ["its('#{path}.response') { should cmp #{x.inspect} }"] }, + "port" => ->(x, path) { x.nil? ? [] : ["its('#{path}.port') { should cmp #{x.inspect} }"] }, + "port_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_name') { should cmp #{x.inspect} }"] }, + "proxy_header" => ->(x, path) { x.nil? ? [] : ["its('#{path}.proxy_header') { should cmp #{x.inspect} }"] }, + "port_specification" => ->(x, path) { x.nil? ? [] : ["its('#{path}.port_specification') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instance_disks.rb b/generate/libraries/google/compute/property/instance_disks.rb index 23facf944..0420a8f14 100644 --- a/generate/libraries/google/compute/property/instance_disks.rb +++ b/generate/libraries/google/compute/property/instance_disks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/instance_disks_disk_encryption_key' -require 'google/compute/property/instance_disks_initialize_params' -require 'google/compute/property/instance_disks_initialize_params_source_image_encryption_key' +require "google/compute/property/instance_disks_disk_encryption_key" +require "google/compute/property/instance_disks_initialize_params" +require "google/compute/property/instance_disks_initialize_params_source_image_encryption_key" module GoogleInSpec module Compute module Property @@ -46,16 +46,16 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @auto_delete = arguments['autoDelete'] - @boot = arguments['boot'] - @device_name = arguments['deviceName'] - @disk_encryption_key = GoogleInSpec::Compute::Property::InstanceDisksDiskEncryptionKey.new(arguments['diskEncryptionKey'], to_s) - @index = arguments['index'] - @initialize_params = GoogleInSpec::Compute::Property::InstanceDisksInitializeParams.new(arguments['initializeParams'], to_s) - @interface = arguments['interface'] - @mode = arguments['mode'] - @source = arguments['source'] - @type = arguments['type'] + @auto_delete = arguments["autoDelete"] + @boot = arguments["boot"] + @device_name = arguments["deviceName"] + @disk_encryption_key = GoogleInSpec::Compute::Property::InstanceDisksDiskEncryptionKey.new(arguments["diskEncryptionKey"], to_s) + @index = arguments["index"] + @initialize_params = GoogleInSpec::Compute::Property::InstanceDisksInitializeParams.new(arguments["initializeParams"], to_s) + @interface = arguments["interface"] + @mode = arguments["mode"] + @source = arguments["source"] + @type = arguments["type"] end def to_s @@ -65,16 +65,16 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'auto_delete' => ->(x, path) { x.nil? ? [] : ["its('#{path}.auto_delete') { should cmp #{x.inspect} }"] }, - 'boot' => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot') { should cmp #{x.inspect} }"] }, - 'device_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.device_name') { should cmp #{x.inspect} }"] }, - 'disk_encryption_key' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceDisksDiskEncryptionKey.un_parse(x, "#{path}.disk_encryption_key") }, - 'index' => ->(x, path) { x.nil? ? [] : ["its('#{path}.index') { should cmp #{x.inspect} }"] }, - 'initialize_params' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceDisksInitializeParams.un_parse(x, "#{path}.initialize_params") }, - 'interface' => ->(x, path) { x.nil? ? [] : ["its('#{path}.interface') { should cmp #{x.inspect} }"] }, - 'mode' => ->(x, path) { x.nil? ? [] : ["its('#{path}.mode') { should cmp #{x.inspect} }"] }, - 'source' => ->(x, path) { x.nil? ? [] : ["its('#{path}.source') { should cmp #{x.inspect} }"] }, - 'type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, + "auto_delete" => ->(x, path) { x.nil? ? [] : ["its('#{path}.auto_delete') { should cmp #{x.inspect} }"] }, + "boot" => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot') { should cmp #{x.inspect} }"] }, + "device_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.device_name') { should cmp #{x.inspect} }"] }, + "disk_encryption_key" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceDisksDiskEncryptionKey.un_parse(x, "#{path}.disk_encryption_key") }, + "index" => ->(x, path) { x.nil? ? [] : ["its('#{path}.index') { should cmp #{x.inspect} }"] }, + "initialize_params" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceDisksInitializeParams.un_parse(x, "#{path}.initialize_params") }, + "interface" => ->(x, path) { x.nil? ? [] : ["its('#{path}.interface') { should cmp #{x.inspect} }"] }, + "mode" => ->(x, path) { x.nil? ? [] : ["its('#{path}.mode') { should cmp #{x.inspect} }"] }, + "source" => ->(x, path) { x.nil? ? [] : ["its('#{path}.source') { should cmp #{x.inspect} }"] }, + "type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instance_disks_disk_encryption_key.rb b/generate/libraries/google/compute/property/instance_disks_disk_encryption_key.rb index 4d1d9aa95..243e28f3f 100644 --- a/generate/libraries/google/compute/property/instance_disks_disk_encryption_key.rb +++ b/generate/libraries/google/compute/property/instance_disks_disk_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @raw_key = arguments['rawKey'] - @rsa_encrypted_key = arguments['rsaEncryptedKey'] - @sha256 = arguments['sha256'] + @raw_key = arguments["rawKey"] + @rsa_encrypted_key = arguments["rsaEncryptedKey"] + @sha256 = arguments["sha256"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'raw_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, - 'rsa_encrypted_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.rsa_encrypted_key') { should cmp #{x.inspect} }"] }, - 'sha256' => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, + "raw_key" => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, + "rsa_encrypted_key" => ->(x, path) { x.nil? ? [] : ["its('#{path}.rsa_encrypted_key') { should cmp #{x.inspect} }"] }, + "sha256" => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instance_disks_initialize_params.rb b/generate/libraries/google/compute/property/instance_disks_initialize_params.rb index 511b177d5..5a35a3be1 100644 --- a/generate/libraries/google/compute/property/instance_disks_initialize_params.rb +++ b/generate/libraries/google/compute/property/instance_disks_initialize_params.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/instance_disks_initialize_params_source_image_encryption_key' +require "google/compute/property/instance_disks_initialize_params_source_image_encryption_key" module GoogleInSpec module Compute module Property @@ -34,11 +34,11 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @disk_name = arguments['diskName'] - @disk_size_gb = arguments['diskSizeGb'] - @disk_type = arguments['diskType'] - @source_image = arguments['sourceImage'] - @source_image_encryption_key = GoogleInSpec::Compute::Property::InstanceDisksInitializeParamsSourceImageEncryptionKey.new(arguments['sourceImageEncryptionKey'], to_s) + @disk_name = arguments["diskName"] + @disk_size_gb = arguments["diskSizeGb"] + @disk_type = arguments["diskType"] + @source_image = arguments["sourceImage"] + @source_image_encryption_key = GoogleInSpec::Compute::Property::InstanceDisksInitializeParamsSourceImageEncryptionKey.new(arguments["sourceImageEncryptionKey"], to_s) end def to_s @@ -48,11 +48,11 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'disk_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_name') { should cmp #{x.inspect} }"] }, - 'disk_size_gb' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_size_gb') { should cmp #{x.inspect} }"] }, - 'disk_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_type') { should cmp #{x.inspect} }"] }, - 'source_image' => ->(x, path) { x.nil? ? [] : ["its('#{path}.source_image') { should cmp #{x.inspect} }"] }, - 'source_image_encryption_key' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceDisksInitializeParamsSourceImageEncryptionKey.un_parse(x, "#{path}.source_image_encryption_key") }, + "disk_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_name') { should cmp #{x.inspect} }"] }, + "disk_size_gb" => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_size_gb') { should cmp #{x.inspect} }"] }, + "disk_type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_type') { should cmp #{x.inspect} }"] }, + "source_image" => ->(x, path) { x.nil? ? [] : ["its('#{path}.source_image') { should cmp #{x.inspect} }"] }, + "source_image_encryption_key" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceDisksInitializeParamsSourceImageEncryptionKey.un_parse(x, "#{path}.source_image_encryption_key") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instance_disks_initialize_params_source_image_encryption_key.rb b/generate/libraries/google/compute/property/instance_disks_initialize_params_source_image_encryption_key.rb index c50446e9a..2c3dd3c17 100644 --- a/generate/libraries/google/compute/property/instance_disks_initialize_params_source_image_encryption_key.rb +++ b/generate/libraries/google/compute/property/instance_disks_initialize_params_source_image_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @raw_key = arguments['rawKey'] - @sha256 = arguments['sha256'] + @raw_key = arguments["rawKey"] + @sha256 = arguments["sha256"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'raw_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, - 'sha256' => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, + "raw_key" => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, + "sha256" => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instance_guest_accelerators.rb b/generate/libraries/google/compute/property/instance_guest_accelerators.rb index 0d90cc7b7..3dc435ed7 100644 --- a/generate/libraries/google/compute/property/instance_guest_accelerators.rb +++ b/generate/libraries/google/compute/property/instance_guest_accelerators.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @accelerator_count = arguments['acceleratorCount'] - @accelerator_type = arguments['acceleratorType'] + @accelerator_count = arguments["acceleratorCount"] + @accelerator_type = arguments["acceleratorType"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'accelerator_count' => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_count') { should cmp #{x.inspect} }"] }, - 'accelerator_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_type') { should cmp #{x.inspect} }"] }, + "accelerator_count" => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_count') { should cmp #{x.inspect} }"] }, + "accelerator_type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instance_network_interfaces.rb b/generate/libraries/google/compute/property/instance_network_interfaces.rb index fe4fc871c..60a4be527 100644 --- a/generate/libraries/google/compute/property/instance_network_interfaces.rb +++ b/generate/libraries/google/compute/property/instance_network_interfaces.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/instance_network_interfaces_access_configs' -require 'google/compute/property/instance_network_interfaces_alias_ip_ranges' +require "google/compute/property/instance_network_interfaces_access_configs" +require "google/compute/property/instance_network_interfaces_alias_ip_ranges" module GoogleInSpec module Compute module Property @@ -37,12 +37,12 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @access_configs = GoogleInSpec::Compute::Property::InstanceNetworkInterfacesAccessConfigsArray.parse(arguments['accessConfigs'], to_s) - @alias_ip_ranges = GoogleInSpec::Compute::Property::InstanceNetworkInterfacesAliasIpRangesArray.parse(arguments['aliasIpRanges'], to_s) - @name = arguments['name'] - @network = arguments['network'] - @network_ip = arguments['networkIP'] - @subnetwork = arguments['subnetwork'] + @access_configs = GoogleInSpec::Compute::Property::InstanceNetworkInterfacesAccessConfigsArray.parse(arguments["accessConfigs"], to_s) + @alias_ip_ranges = GoogleInSpec::Compute::Property::InstanceNetworkInterfacesAliasIpRangesArray.parse(arguments["aliasIpRanges"], to_s) + @name = arguments["name"] + @network = arguments["network"] + @network_ip = arguments["networkIP"] + @subnetwork = arguments["subnetwork"] end def to_s @@ -52,12 +52,12 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'access_configs' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.access_configs') { should include '#{single.to_json}' }" } }, - 'alias_ip_ranges' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.alias_ip_ranges') { should include '#{single.to_json}' }" } }, - 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, - 'network' => ->(x, path) { x.nil? ? [] : ["its('#{path}.network') { should cmp #{x.inspect} }"] }, - 'network_ip' => ->(x, path) { x.nil? ? [] : ["its('#{path}.network_ip') { should cmp #{x.inspect} }"] }, - 'subnetwork' => ->(x, path) { x.nil? ? [] : ["its('#{path}.subnetwork') { should cmp #{x.inspect} }"] }, + "access_configs" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.access_configs') { should include '#{single.to_json}' }" } }, + "alias_ip_ranges" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.alias_ip_ranges') { should include '#{single.to_json}' }" } }, + "name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, + "network" => ->(x, path) { x.nil? ? [] : ["its('#{path}.network') { should cmp #{x.inspect} }"] }, + "network_ip" => ->(x, path) { x.nil? ? [] : ["its('#{path}.network_ip') { should cmp #{x.inspect} }"] }, + "subnetwork" => ->(x, path) { x.nil? ? [] : ["its('#{path}.subnetwork') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instance_network_interfaces_access_configs.rb b/generate/libraries/google/compute/property/instance_network_interfaces_access_configs.rb index 98034af49..3d7a9c2df 100644 --- a/generate/libraries/google/compute/property/instance_network_interfaces_access_configs.rb +++ b/generate/libraries/google/compute/property/instance_network_interfaces_access_configs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @name = arguments['name'] - @nat_ip = arguments['natIP'] - @type = arguments['type'] + @name = arguments["name"] + @nat_ip = arguments["natIP"] + @type = arguments["type"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, - 'nat_ip' => ->(x, path) { x.nil? ? [] : ["its('#{path}.nat_ip') { should cmp #{x.inspect} }"] }, - 'type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, + "name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, + "nat_ip" => ->(x, path) { x.nil? ? [] : ["its('#{path}.nat_ip') { should cmp #{x.inspect} }"] }, + "type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instance_network_interfaces_alias_ip_ranges.rb b/generate/libraries/google/compute/property/instance_network_interfaces_alias_ip_ranges.rb index 0cc14defe..a42c67c1a 100644 --- a/generate/libraries/google/compute/property/instance_network_interfaces_alias_ip_ranges.rb +++ b/generate/libraries/google/compute/property/instance_network_interfaces_alias_ip_ranges.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @ip_cidr_range = arguments['ipCidrRange'] - @subnetwork_range_name = arguments['subnetworkRangeName'] + @ip_cidr_range = arguments["ipCidrRange"] + @subnetwork_range_name = arguments["subnetworkRangeName"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'ip_cidr_range' => ->(x, path) { x.nil? ? [] : ["its('#{path}.ip_cidr_range') { should cmp #{x.inspect} }"] }, - 'subnetwork_range_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.subnetwork_range_name') { should cmp #{x.inspect} }"] }, + "ip_cidr_range" => ->(x, path) { x.nil? ? [] : ["its('#{path}.ip_cidr_range') { should cmp #{x.inspect} }"] }, + "subnetwork_range_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.subnetwork_range_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instance_scheduling.rb b/generate/libraries/google/compute/property/instance_scheduling.rb index 10c153eb7..173b50b83 100644 --- a/generate/libraries/google/compute/property/instance_scheduling.rb +++ b/generate/libraries/google/compute/property/instance_scheduling.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @automatic_restart = arguments['automaticRestart'] - @on_host_maintenance = arguments['onHostMaintenance'] - @preemptible = arguments['preemptible'] + @automatic_restart = arguments["automaticRestart"] + @on_host_maintenance = arguments["onHostMaintenance"] + @preemptible = arguments["preemptible"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'automatic_restart' => ->(x, path) { x.nil? ? [] : ["its('#{path}.automatic_restart') { should cmp #{x.inspect} }"] }, - 'on_host_maintenance' => ->(x, path) { x.nil? ? [] : ["its('#{path}.on_host_maintenance') { should cmp #{x.inspect} }"] }, - 'preemptible' => ->(x, path) { x.nil? ? [] : ["its('#{path}.preemptible') { should cmp #{x.inspect} }"] }, + "automatic_restart" => ->(x, path) { x.nil? ? [] : ["its('#{path}.automatic_restart') { should cmp #{x.inspect} }"] }, + "on_host_maintenance" => ->(x, path) { x.nil? ? [] : ["its('#{path}.on_host_maintenance') { should cmp #{x.inspect} }"] }, + "preemptible" => ->(x, path) { x.nil? ? [] : ["its('#{path}.preemptible') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instance_service_accounts.rb b/generate/libraries/google/compute/property/instance_service_accounts.rb index abb64d442..d7d7c90fe 100644 --- a/generate/libraries/google/compute/property/instance_service_accounts.rb +++ b/generate/libraries/google/compute/property/instance_service_accounts.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @email = arguments['email'] - @scopes = arguments['scopes'] + @email = arguments["email"] + @scopes = arguments["scopes"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'email' => ->(x, path) { x.nil? ? [] : ["its('#{path}.email') { should cmp #{x.inspect} }"] }, - 'scopes' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.scopes') { should include #{single.inspect} }" } }, + "email" => ->(x, path) { x.nil? ? [] : ["its('#{path}.email') { should cmp #{x.inspect} }"] }, + "scopes" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.scopes') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instance_shielded_instance_config.rb b/generate/libraries/google/compute/property/instance_shielded_instance_config.rb index 7c656fc29..502d2140c 100644 --- a/generate/libraries/google/compute/property/instance_shielded_instance_config.rb +++ b/generate/libraries/google/compute/property/instance_shielded_instance_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @enable_secure_boot = arguments['enableSecureBoot'] - @enable_vtpm = arguments['enableVtpm'] - @enable_integrity_monitoring = arguments['enableIntegrityMonitoring'] + @enable_secure_boot = arguments["enableSecureBoot"] + @enable_vtpm = arguments["enableVtpm"] + @enable_integrity_monitoring = arguments["enableIntegrityMonitoring"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'enable_secure_boot' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enable_secure_boot') { should cmp #{x.inspect} }"] }, - 'enable_vtpm' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enable_vtpm') { should cmp #{x.inspect} }"] }, - 'enable_integrity_monitoring' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enable_integrity_monitoring') { should cmp #{x.inspect} }"] }, + "enable_secure_boot" => ->(x, path) { x.nil? ? [] : ["its('#{path}.enable_secure_boot') { should cmp #{x.inspect} }"] }, + "enable_vtpm" => ->(x, path) { x.nil? ? [] : ["its('#{path}.enable_vtpm') { should cmp #{x.inspect} }"] }, + "enable_integrity_monitoring" => ->(x, path) { x.nil? ? [] : ["its('#{path}.enable_integrity_monitoring') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instance_tags.rb b/generate/libraries/google/compute/property/instance_tags.rb index 7d51a9ef8..f805c416c 100644 --- a/generate/libraries/google/compute/property/instance_tags.rb +++ b/generate/libraries/google/compute/property/instance_tags.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @fingerprint = arguments['fingerprint'] - @items = arguments['items'] + @fingerprint = arguments["fingerprint"] + @items = arguments["items"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'fingerprint' => ->(x, path) { x.nil? ? [] : ["its('#{path}.fingerprint') { should cmp #{x.inspect} }"] }, - 'items' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.items') { should include #{single.inspect} }" } }, + "fingerprint" => ->(x, path) { x.nil? ? [] : ["its('#{path}.fingerprint') { should cmp #{x.inspect} }"] }, + "items" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.items') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instancegroupmanager_current_actions.rb b/generate/libraries/google/compute/property/instancegroupmanager_current_actions.rb index b351ac16f..243c65fd2 100644 --- a/generate/libraries/google/compute/property/instancegroupmanager_current_actions.rb +++ b/generate/libraries/google/compute/property/instancegroupmanager_current_actions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -39,14 +39,14 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @abandoning = arguments['abandoning'] - @creating = arguments['creating'] - @creating_without_retries = arguments['creatingWithoutRetries'] - @deleting = arguments['deleting'] - @none = arguments['none'] - @recreating = arguments['recreating'] - @refreshing = arguments['refreshing'] - @restarting = arguments['restarting'] + @abandoning = arguments["abandoning"] + @creating = arguments["creating"] + @creating_without_retries = arguments["creatingWithoutRetries"] + @deleting = arguments["deleting"] + @none = arguments["none"] + @recreating = arguments["recreating"] + @refreshing = arguments["refreshing"] + @restarting = arguments["restarting"] end def to_s @@ -56,14 +56,14 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'abandoning' => ->(x, path) { x.nil? ? [] : ["its('#{path}.abandoning') { should cmp #{x.inspect} }"] }, - 'creating' => ->(x, path) { x.nil? ? [] : ["its('#{path}.creating') { should cmp #{x.inspect} }"] }, - 'creating_without_retries' => ->(x, path) { x.nil? ? [] : ["its('#{path}.creating_without_retries') { should cmp #{x.inspect} }"] }, - 'deleting' => ->(x, path) { x.nil? ? [] : ["its('#{path}.deleting') { should cmp #{x.inspect} }"] }, - 'none' => ->(x, path) { x.nil? ? [] : ["its('#{path}.none') { should cmp #{x.inspect} }"] }, - 'recreating' => ->(x, path) { x.nil? ? [] : ["its('#{path}.recreating') { should cmp #{x.inspect} }"] }, - 'refreshing' => ->(x, path) { x.nil? ? [] : ["its('#{path}.refreshing') { should cmp #{x.inspect} }"] }, - 'restarting' => ->(x, path) { x.nil? ? [] : ["its('#{path}.restarting') { should cmp #{x.inspect} }"] }, + "abandoning" => ->(x, path) { x.nil? ? [] : ["its('#{path}.abandoning') { should cmp #{x.inspect} }"] }, + "creating" => ->(x, path) { x.nil? ? [] : ["its('#{path}.creating') { should cmp #{x.inspect} }"] }, + "creating_without_retries" => ->(x, path) { x.nil? ? [] : ["its('#{path}.creating_without_retries') { should cmp #{x.inspect} }"] }, + "deleting" => ->(x, path) { x.nil? ? [] : ["its('#{path}.deleting') { should cmp #{x.inspect} }"] }, + "none" => ->(x, path) { x.nil? ? [] : ["its('#{path}.none') { should cmp #{x.inspect} }"] }, + "recreating" => ->(x, path) { x.nil? ? [] : ["its('#{path}.recreating') { should cmp #{x.inspect} }"] }, + "refreshing" => ->(x, path) { x.nil? ? [] : ["its('#{path}.refreshing') { should cmp #{x.inspect} }"] }, + "restarting" => ->(x, path) { x.nil? ? [] : ["its('#{path}.restarting') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instancegroupmanager_named_ports.rb b/generate/libraries/google/compute/property/instancegroupmanager_named_ports.rb index f8325ca87..feb78a04f 100644 --- a/generate/libraries/google/compute/property/instancegroupmanager_named_ports.rb +++ b/generate/libraries/google/compute/property/instancegroupmanager_named_ports.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @name = arguments['name'] - @port = arguments['port'] + @name = arguments["name"] + @port = arguments["port"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, - 'port' => ->(x, path) { x.nil? ? [] : ["its('#{path}.port') { should cmp #{x.inspect} }"] }, + "name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, + "port" => ->(x, path) { x.nil? ? [] : ["its('#{path}.port') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instancetemplate_properties.rb b/generate/libraries/google/compute/property/instancetemplate_properties.rb index 684181d6d..a9e5c3e8f 100644 --- a/generate/libraries/google/compute/property/instancetemplate_properties.rb +++ b/generate/libraries/google/compute/property/instancetemplate_properties.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,12 +13,12 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/instancetemplate_properties_disks' -require 'google/compute/property/instancetemplate_properties_guest_accelerators' -require 'google/compute/property/instancetemplate_properties_network_interfaces' -require 'google/compute/property/instancetemplate_properties_scheduling' -require 'google/compute/property/instancetemplate_properties_service_accounts' -require 'google/compute/property/instancetemplate_properties_tags' +require "google/compute/property/instancetemplate_properties_disks" +require "google/compute/property/instancetemplate_properties_guest_accelerators" +require "google/compute/property/instancetemplate_properties_network_interfaces" +require "google/compute/property/instancetemplate_properties_scheduling" +require "google/compute/property/instancetemplate_properties_service_accounts" +require "google/compute/property/instancetemplate_properties_tags" module GoogleInSpec module Compute module Property @@ -53,18 +53,18 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @can_ip_forward = arguments['canIpForward'] - @description = arguments['description'] - @disks = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksArray.parse(arguments['disks'], to_s) - @labels = arguments['labels'] - @machine_type = arguments['machineType'] - @min_cpu_platform = arguments['minCpuPlatform'] - @metadata = arguments['metadata'] - @guest_accelerators = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesGuestAcceleratorsArray.parse(arguments['guestAccelerators'], to_s) - @network_interfaces = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesNetworkInterfacesArray.parse(arguments['networkInterfaces'], to_s) - @scheduling = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesScheduling.new(arguments['scheduling'], to_s) - @service_accounts = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesServiceAccountsArray.parse(arguments['serviceAccounts'], to_s) - @tags = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesTags.new(arguments['tags'], to_s) + @can_ip_forward = arguments["canIpForward"] + @description = arguments["description"] + @disks = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksArray.parse(arguments["disks"], to_s) + @labels = arguments["labels"] + @machine_type = arguments["machineType"] + @min_cpu_platform = arguments["minCpuPlatform"] + @metadata = arguments["metadata"] + @guest_accelerators = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesGuestAcceleratorsArray.parse(arguments["guestAccelerators"], to_s) + @network_interfaces = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesNetworkInterfacesArray.parse(arguments["networkInterfaces"], to_s) + @scheduling = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesScheduling.new(arguments["scheduling"], to_s) + @service_accounts = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesServiceAccountsArray.parse(arguments["serviceAccounts"], to_s) + @tags = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesTags.new(arguments["tags"], to_s) end def to_s @@ -74,18 +74,18 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'can_ip_forward' => ->(x, path) { x.nil? ? [] : ["its('#{path}.can_ip_forward') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, - 'disks' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.disks') { should include '#{single.to_json}' }" } }, - 'labels' => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'machine_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.machine_type') { should cmp #{x.inspect} }"] }, - 'min_cpu_platform' => ->(x, path) { x.nil? ? [] : ["its('#{path}.min_cpu_platform') { should cmp #{x.inspect} }"] }, - 'metadata' => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.metadata') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'guest_accelerators' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.guest_accelerators') { should include '#{single.to_json}' }" } }, - 'network_interfaces' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.network_interfaces') { should include '#{single.to_json}' }" } }, - 'scheduling' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTemplatePropertiesScheduling.un_parse(x, "#{path}.scheduling") }, - 'service_accounts' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.service_accounts') { should include '#{single.to_json}' }" } }, - 'tags' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTemplatePropertiesTags.un_parse(x, "#{path}.tags") }, + "can_ip_forward" => ->(x, path) { x.nil? ? [] : ["its('#{path}.can_ip_forward') { should cmp #{x.inspect} }"] }, + "description" => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, + "disks" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.disks') { should include '#{single.to_json}' }" } }, + "labels" => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "machine_type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.machine_type') { should cmp #{x.inspect} }"] }, + "min_cpu_platform" => ->(x, path) { x.nil? ? [] : ["its('#{path}.min_cpu_platform') { should cmp #{x.inspect} }"] }, + "metadata" => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.metadata') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "guest_accelerators" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.guest_accelerators') { should include '#{single.to_json}' }" } }, + "network_interfaces" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.network_interfaces') { should include '#{single.to_json}' }" } }, + "scheduling" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTemplatePropertiesScheduling.un_parse(x, "#{path}.scheduling") }, + "service_accounts" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.service_accounts') { should include '#{single.to_json}' }" } }, + "tags" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTemplatePropertiesTags.un_parse(x, "#{path}.tags") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instancetemplate_properties_disks.rb b/generate/libraries/google/compute/property/instancetemplate_properties_disks.rb index d58004342..ab33ee866 100644 --- a/generate/libraries/google/compute/property/instancetemplate_properties_disks.rb +++ b/generate/libraries/google/compute/property/instancetemplate_properties_disks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/instancetemplate_properties_disks_disk_encryption_key' -require 'google/compute/property/instancetemplate_properties_disks_initialize_params' -require 'google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key' +require "google/compute/property/instancetemplate_properties_disks_disk_encryption_key" +require "google/compute/property/instancetemplate_properties_disks_initialize_params" +require "google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key" module GoogleInSpec module Compute module Property @@ -46,16 +46,16 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @auto_delete = arguments['autoDelete'] - @boot = arguments['boot'] - @device_name = arguments['deviceName'] - @disk_encryption_key = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksDiskEncryptionKey.new(arguments['diskEncryptionKey'], to_s) - @index = arguments['index'] - @initialize_params = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksInitializeParams.new(arguments['initializeParams'], to_s) - @interface = arguments['interface'] - @mode = arguments['mode'] - @source = arguments['source'] - @type = arguments['type'] + @auto_delete = arguments["autoDelete"] + @boot = arguments["boot"] + @device_name = arguments["deviceName"] + @disk_encryption_key = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksDiskEncryptionKey.new(arguments["diskEncryptionKey"], to_s) + @index = arguments["index"] + @initialize_params = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksInitializeParams.new(arguments["initializeParams"], to_s) + @interface = arguments["interface"] + @mode = arguments["mode"] + @source = arguments["source"] + @type = arguments["type"] end def to_s @@ -65,16 +65,16 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'auto_delete' => ->(x, path) { x.nil? ? [] : ["its('#{path}.auto_delete') { should cmp #{x.inspect} }"] }, - 'boot' => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot') { should cmp #{x.inspect} }"] }, - 'device_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.device_name') { should cmp #{x.inspect} }"] }, - 'disk_encryption_key' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksDiskEncryptionKey.un_parse(x, "#{path}.disk_encryption_key") }, - 'index' => ->(x, path) { x.nil? ? [] : ["its('#{path}.index') { should cmp #{x.inspect} }"] }, - 'initialize_params' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksInitializeParams.un_parse(x, "#{path}.initialize_params") }, - 'interface' => ->(x, path) { x.nil? ? [] : ["its('#{path}.interface') { should cmp #{x.inspect} }"] }, - 'mode' => ->(x, path) { x.nil? ? [] : ["its('#{path}.mode') { should cmp #{x.inspect} }"] }, - 'source' => ->(x, path) { x.nil? ? [] : ["its('#{path}.source') { should cmp #{x.inspect} }"] }, - 'type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, + "auto_delete" => ->(x, path) { x.nil? ? [] : ["its('#{path}.auto_delete') { should cmp #{x.inspect} }"] }, + "boot" => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot') { should cmp #{x.inspect} }"] }, + "device_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.device_name') { should cmp #{x.inspect} }"] }, + "disk_encryption_key" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksDiskEncryptionKey.un_parse(x, "#{path}.disk_encryption_key") }, + "index" => ->(x, path) { x.nil? ? [] : ["its('#{path}.index') { should cmp #{x.inspect} }"] }, + "initialize_params" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksInitializeParams.un_parse(x, "#{path}.initialize_params") }, + "interface" => ->(x, path) { x.nil? ? [] : ["its('#{path}.interface') { should cmp #{x.inspect} }"] }, + "mode" => ->(x, path) { x.nil? ? [] : ["its('#{path}.mode') { should cmp #{x.inspect} }"] }, + "source" => ->(x, path) { x.nil? ? [] : ["its('#{path}.source') { should cmp #{x.inspect} }"] }, + "type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instancetemplate_properties_disks_disk_encryption_key.rb b/generate/libraries/google/compute/property/instancetemplate_properties_disks_disk_encryption_key.rb index 494beeea2..c9c24900d 100644 --- a/generate/libraries/google/compute/property/instancetemplate_properties_disks_disk_encryption_key.rb +++ b/generate/libraries/google/compute/property/instancetemplate_properties_disks_disk_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @raw_key = arguments['rawKey'] - @rsa_encrypted_key = arguments['rsaEncryptedKey'] - @sha256 = arguments['sha256'] + @raw_key = arguments["rawKey"] + @rsa_encrypted_key = arguments["rsaEncryptedKey"] + @sha256 = arguments["sha256"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'raw_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, - 'rsa_encrypted_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.rsa_encrypted_key') { should cmp #{x.inspect} }"] }, - 'sha256' => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, + "raw_key" => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, + "rsa_encrypted_key" => ->(x, path) { x.nil? ? [] : ["its('#{path}.rsa_encrypted_key') { should cmp #{x.inspect} }"] }, + "sha256" => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instancetemplate_properties_disks_initialize_params.rb b/generate/libraries/google/compute/property/instancetemplate_properties_disks_initialize_params.rb index a77be59b7..a2532c41f 100644 --- a/generate/libraries/google/compute/property/instancetemplate_properties_disks_initialize_params.rb +++ b/generate/libraries/google/compute/property/instancetemplate_properties_disks_initialize_params.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key' +require "google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key" module GoogleInSpec module Compute module Property @@ -34,11 +34,11 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @disk_name = arguments['diskName'] - @disk_size_gb = arguments['diskSizeGb'] - @disk_type = arguments['diskType'] - @source_image = arguments['sourceImage'] - @source_image_encryption_key = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksInitializeParamsSourceImageEncryptionKey.new(arguments['sourceImageEncryptionKey'], to_s) + @disk_name = arguments["diskName"] + @disk_size_gb = arguments["diskSizeGb"] + @disk_type = arguments["diskType"] + @source_image = arguments["sourceImage"] + @source_image_encryption_key = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksInitializeParamsSourceImageEncryptionKey.new(arguments["sourceImageEncryptionKey"], to_s) end def to_s @@ -48,11 +48,11 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'disk_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_name') { should cmp #{x.inspect} }"] }, - 'disk_size_gb' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_size_gb') { should cmp #{x.inspect} }"] }, - 'disk_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_type') { should cmp #{x.inspect} }"] }, - 'source_image' => ->(x, path) { x.nil? ? [] : ["its('#{path}.source_image') { should cmp #{x.inspect} }"] }, - 'source_image_encryption_key' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksInitializeParamsSourceImageEncryptionKey.un_parse(x, "#{path}.source_image_encryption_key") }, + "disk_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_name') { should cmp #{x.inspect} }"] }, + "disk_size_gb" => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_size_gb') { should cmp #{x.inspect} }"] }, + "disk_type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_type') { should cmp #{x.inspect} }"] }, + "source_image" => ->(x, path) { x.nil? ? [] : ["its('#{path}.source_image') { should cmp #{x.inspect} }"] }, + "source_image_encryption_key" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksInitializeParamsSourceImageEncryptionKey.un_parse(x, "#{path}.source_image_encryption_key") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key.rb b/generate/libraries/google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key.rb index 6cb68d553..7db536308 100644 --- a/generate/libraries/google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key.rb +++ b/generate/libraries/google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @raw_key = arguments['rawKey'] - @sha256 = arguments['sha256'] + @raw_key = arguments["rawKey"] + @sha256 = arguments["sha256"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'raw_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, - 'sha256' => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, + "raw_key" => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, + "sha256" => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instancetemplate_properties_guest_accelerators.rb b/generate/libraries/google/compute/property/instancetemplate_properties_guest_accelerators.rb index bde87b8fb..fb9292d87 100644 --- a/generate/libraries/google/compute/property/instancetemplate_properties_guest_accelerators.rb +++ b/generate/libraries/google/compute/property/instancetemplate_properties_guest_accelerators.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @accelerator_count = arguments['acceleratorCount'] - @accelerator_type = arguments['acceleratorType'] + @accelerator_count = arguments["acceleratorCount"] + @accelerator_type = arguments["acceleratorType"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'accelerator_count' => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_count') { should cmp #{x.inspect} }"] }, - 'accelerator_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_type') { should cmp #{x.inspect} }"] }, + "accelerator_count" => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_count') { should cmp #{x.inspect} }"] }, + "accelerator_type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instancetemplate_properties_network_interfaces.rb b/generate/libraries/google/compute/property/instancetemplate_properties_network_interfaces.rb index 2b7675158..0b22ec034 100644 --- a/generate/libraries/google/compute/property/instancetemplate_properties_network_interfaces.rb +++ b/generate/libraries/google/compute/property/instancetemplate_properties_network_interfaces.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/instancetemplate_properties_network_interfaces_access_configs' -require 'google/compute/property/instancetemplate_properties_network_interfaces_alias_ip_ranges' +require "google/compute/property/instancetemplate_properties_network_interfaces_access_configs" +require "google/compute/property/instancetemplate_properties_network_interfaces_alias_ip_ranges" module GoogleInSpec module Compute module Property @@ -37,12 +37,12 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @access_configs = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesNetworkInterfacesAccessConfigsArray.parse(arguments['accessConfigs'], to_s) - @alias_ip_ranges = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesNetworkInterfacesAliasIpRangesArray.parse(arguments['aliasIpRanges'], to_s) - @name = arguments['name'] - @network = arguments['network'] - @network_ip = arguments['networkIP'] - @subnetwork = arguments['subnetwork'] + @access_configs = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesNetworkInterfacesAccessConfigsArray.parse(arguments["accessConfigs"], to_s) + @alias_ip_ranges = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesNetworkInterfacesAliasIpRangesArray.parse(arguments["aliasIpRanges"], to_s) + @name = arguments["name"] + @network = arguments["network"] + @network_ip = arguments["networkIP"] + @subnetwork = arguments["subnetwork"] end def to_s @@ -52,12 +52,12 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'access_configs' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.access_configs') { should include '#{single.to_json}' }" } }, - 'alias_ip_ranges' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.alias_ip_ranges') { should include '#{single.to_json}' }" } }, - 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, - 'network' => ->(x, path) { x.nil? ? [] : ["its('#{path}.network') { should cmp #{x.inspect} }"] }, - 'network_ip' => ->(x, path) { x.nil? ? [] : ["its('#{path}.network_ip') { should cmp #{x.inspect} }"] }, - 'subnetwork' => ->(x, path) { x.nil? ? [] : ["its('#{path}.subnetwork') { should cmp #{x.inspect} }"] }, + "access_configs" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.access_configs') { should include '#{single.to_json}' }" } }, + "alias_ip_ranges" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.alias_ip_ranges') { should include '#{single.to_json}' }" } }, + "name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, + "network" => ->(x, path) { x.nil? ? [] : ["its('#{path}.network') { should cmp #{x.inspect} }"] }, + "network_ip" => ->(x, path) { x.nil? ? [] : ["its('#{path}.network_ip') { should cmp #{x.inspect} }"] }, + "subnetwork" => ->(x, path) { x.nil? ? [] : ["its('#{path}.subnetwork') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instancetemplate_properties_network_interfaces_access_configs.rb b/generate/libraries/google/compute/property/instancetemplate_properties_network_interfaces_access_configs.rb index 348ad85b8..0db9e7aaf 100644 --- a/generate/libraries/google/compute/property/instancetemplate_properties_network_interfaces_access_configs.rb +++ b/generate/libraries/google/compute/property/instancetemplate_properties_network_interfaces_access_configs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @name = arguments['name'] - @nat_ip = arguments['natIP'] - @type = arguments['type'] + @name = arguments["name"] + @nat_ip = arguments["natIP"] + @type = arguments["type"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, - 'nat_ip' => ->(x, path) { x.nil? ? [] : ["its('#{path}.nat_ip') { should cmp #{x.inspect} }"] }, - 'type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, + "name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, + "nat_ip" => ->(x, path) { x.nil? ? [] : ["its('#{path}.nat_ip') { should cmp #{x.inspect} }"] }, + "type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instancetemplate_properties_network_interfaces_alias_ip_ranges.rb b/generate/libraries/google/compute/property/instancetemplate_properties_network_interfaces_alias_ip_ranges.rb index 7b03c69f0..116ac5cd8 100644 --- a/generate/libraries/google/compute/property/instancetemplate_properties_network_interfaces_alias_ip_ranges.rb +++ b/generate/libraries/google/compute/property/instancetemplate_properties_network_interfaces_alias_ip_ranges.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @ip_cidr_range = arguments['ipCidrRange'] - @subnetwork_range_name = arguments['subnetworkRangeName'] + @ip_cidr_range = arguments["ipCidrRange"] + @subnetwork_range_name = arguments["subnetworkRangeName"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'ip_cidr_range' => ->(x, path) { x.nil? ? [] : ["its('#{path}.ip_cidr_range') { should cmp #{x.inspect} }"] }, - 'subnetwork_range_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.subnetwork_range_name') { should cmp #{x.inspect} }"] }, + "ip_cidr_range" => ->(x, path) { x.nil? ? [] : ["its('#{path}.ip_cidr_range') { should cmp #{x.inspect} }"] }, + "subnetwork_range_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.subnetwork_range_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instancetemplate_properties_scheduling.rb b/generate/libraries/google/compute/property/instancetemplate_properties_scheduling.rb index 5b68a51f2..80e9fb0f9 100644 --- a/generate/libraries/google/compute/property/instancetemplate_properties_scheduling.rb +++ b/generate/libraries/google/compute/property/instancetemplate_properties_scheduling.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @automatic_restart = arguments['automaticRestart'] - @on_host_maintenance = arguments['onHostMaintenance'] - @preemptible = arguments['preemptible'] + @automatic_restart = arguments["automaticRestart"] + @on_host_maintenance = arguments["onHostMaintenance"] + @preemptible = arguments["preemptible"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'automatic_restart' => ->(x, path) { x.nil? ? [] : ["its('#{path}.automatic_restart') { should cmp #{x.inspect} }"] }, - 'on_host_maintenance' => ->(x, path) { x.nil? ? [] : ["its('#{path}.on_host_maintenance') { should cmp #{x.inspect} }"] }, - 'preemptible' => ->(x, path) { x.nil? ? [] : ["its('#{path}.preemptible') { should cmp #{x.inspect} }"] }, + "automatic_restart" => ->(x, path) { x.nil? ? [] : ["its('#{path}.automatic_restart') { should cmp #{x.inspect} }"] }, + "on_host_maintenance" => ->(x, path) { x.nil? ? [] : ["its('#{path}.on_host_maintenance') { should cmp #{x.inspect} }"] }, + "preemptible" => ->(x, path) { x.nil? ? [] : ["its('#{path}.preemptible') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instancetemplate_properties_service_accounts.rb b/generate/libraries/google/compute/property/instancetemplate_properties_service_accounts.rb index 20a384684..13be7bba6 100644 --- a/generate/libraries/google/compute/property/instancetemplate_properties_service_accounts.rb +++ b/generate/libraries/google/compute/property/instancetemplate_properties_service_accounts.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @email = arguments['email'] - @scopes = arguments['scopes'] + @email = arguments["email"] + @scopes = arguments["scopes"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'email' => ->(x, path) { x.nil? ? [] : ["its('#{path}.email') { should cmp #{x.inspect} }"] }, - 'scopes' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.scopes') { should include #{single.inspect} }" } }, + "email" => ->(x, path) { x.nil? ? [] : ["its('#{path}.email') { should cmp #{x.inspect} }"] }, + "scopes" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.scopes') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/instancetemplate_properties_tags.rb b/generate/libraries/google/compute/property/instancetemplate_properties_tags.rb index 73b6e4d54..b6845424f 100644 --- a/generate/libraries/google/compute/property/instancetemplate_properties_tags.rb +++ b/generate/libraries/google/compute/property/instancetemplate_properties_tags.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @fingerprint = arguments['fingerprint'] - @items = arguments['items'] + @fingerprint = arguments["fingerprint"] + @items = arguments["items"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'fingerprint' => ->(x, path) { x.nil? ? [] : ["its('#{path}.fingerprint') { should cmp #{x.inspect} }"] }, - 'items' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.items') { should include #{single.inspect} }" } }, + "fingerprint" => ->(x, path) { x.nil? ? [] : ["its('#{path}.fingerprint') { should cmp #{x.inspect} }"] }, + "items" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.items') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/nodetemplate_node_type_flexibility.rb b/generate/libraries/google/compute/property/nodetemplate_node_type_flexibility.rb index fa2382670..bf496b3f0 100644 --- a/generate/libraries/google/compute/property/nodetemplate_node_type_flexibility.rb +++ b/generate/libraries/google/compute/property/nodetemplate_node_type_flexibility.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @cpus = arguments['cpus'] - @memory = arguments['memory'] - @local_ssd = arguments['localSsd'] + @cpus = arguments["cpus"] + @memory = arguments["memory"] + @local_ssd = arguments["localSsd"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'cpus' => ->(x, path) { x.nil? ? [] : ["its('#{path}.cpus') { should cmp #{x.inspect} }"] }, - 'memory' => ->(x, path) { x.nil? ? [] : ["its('#{path}.memory') { should cmp #{x.inspect} }"] }, - 'local_ssd' => ->(x, path) { x.nil? ? [] : ["its('#{path}.local_ssd') { should cmp #{x.inspect} }"] }, + "cpus" => ->(x, path) { x.nil? ? [] : ["its('#{path}.cpus') { should cmp #{x.inspect} }"] }, + "memory" => ->(x, path) { x.nil? ? [] : ["its('#{path}.memory') { should cmp #{x.inspect} }"] }, + "local_ssd" => ->(x, path) { x.nil? ? [] : ["its('#{path}.local_ssd') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/region_deprecated.rb b/generate/libraries/google/compute/property/region_deprecated.rb index d2832b9b8..b133f1c4d 100644 --- a/generate/libraries/google/compute/property/region_deprecated.rb +++ b/generate/libraries/google/compute/property/region_deprecated.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -33,11 +33,11 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @deleted = parse_time_string(arguments['deleted']) - @deprecated = parse_time_string(arguments['deprecated']) - @obsolete = parse_time_string(arguments['obsolete']) - @replacement = arguments['replacement'] - @state = arguments['state'] + @deleted = parse_time_string(arguments["deleted"]) + @deprecated = parse_time_string(arguments["deprecated"]) + @obsolete = parse_time_string(arguments["obsolete"]) + @replacement = arguments["replacement"] + @state = arguments["state"] end def to_s @@ -47,11 +47,11 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'deleted' => ->(x, path) { x.nil? ? [] : ["its('#{path}.deleted.to_s') { should cmp '#{x.inspect}' }"] }, - 'deprecated' => ->(x, path) { x.nil? ? [] : ["its('#{path}.deprecated.to_s') { should cmp '#{x.inspect}' }"] }, - 'obsolete' => ->(x, path) { x.nil? ? [] : ["its('#{path}.obsolete.to_s') { should cmp '#{x.inspect}' }"] }, - 'replacement' => ->(x, path) { x.nil? ? [] : ["its('#{path}.replacement') { should cmp #{x.inspect} }"] }, - 'state' => ->(x, path) { x.nil? ? [] : ["its('#{path}.state') { should cmp #{x.inspect} }"] }, + "deleted" => ->(x, path) { x.nil? ? [] : ["its('#{path}.deleted.to_s') { should cmp '#{x.inspect}' }"] }, + "deprecated" => ->(x, path) { x.nil? ? [] : ["its('#{path}.deprecated.to_s') { should cmp '#{x.inspect}' }"] }, + "obsolete" => ->(x, path) { x.nil? ? [] : ["its('#{path}.obsolete.to_s') { should cmp '#{x.inspect}' }"] }, + "replacement" => ->(x, path) { x.nil? ? [] : ["its('#{path}.replacement') { should cmp #{x.inspect} }"] }, + "state" => ->(x, path) { x.nil? ? [] : ["its('#{path}.state') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/region_quotas.rb b/generate/libraries/google/compute/property/region_quotas.rb index 829f932ac..b4a45c202 100644 --- a/generate/libraries/google/compute/property/region_quotas.rb +++ b/generate/libraries/google/compute/property/region_quotas.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -31,10 +31,10 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @metric = arguments['metric'] - @limit = arguments['limit'] - @usage = arguments['usage'] - @owner = arguments['owner'] + @metric = arguments["metric"] + @limit = arguments["limit"] + @usage = arguments["usage"] + @owner = arguments["owner"] end def to_s @@ -44,10 +44,10 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'metric' => ->(x, path) { x.nil? ? [] : ["its('#{path}.metric') { should cmp #{x.inspect} }"] }, - 'limit' => ->(x, path) { x.nil? ? [] : ["its('#{path}.limit') { should cmp #{x.inspect} }"] }, - 'usage' => ->(x, path) { x.nil? ? [] : ["its('#{path}.usage') { should cmp #{x.inspect} }"] }, - 'owner' => ->(x, path) { x.nil? ? [] : ["its('#{path}.owner') { should cmp #{x.inspect} }"] }, + "metric" => ->(x, path) { x.nil? ? [] : ["its('#{path}.metric') { should cmp #{x.inspect} }"] }, + "limit" => ->(x, path) { x.nil? ? [] : ["its('#{path}.limit') { should cmp #{x.inspect} }"] }, + "usage" => ->(x, path) { x.nil? ? [] : ["its('#{path}.usage') { should cmp #{x.inspect} }"] }, + "owner" => ->(x, path) { x.nil? ? [] : ["its('#{path}.owner') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/regionbackendservice_backends.rb b/generate/libraries/google/compute/property/regionbackendservice_backends.rb index a820aed28..534fa3416 100644 --- a/generate/libraries/google/compute/property/regionbackendservice_backends.rb +++ b/generate/libraries/google/compute/property/regionbackendservice_backends.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @description = arguments['description'] - @group = arguments['group'] + @description = arguments["description"] + @group = arguments["group"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, - 'group' => ->(x, path) { x.nil? ? [] : ["its('#{path}.group') { should cmp #{x.inspect} }"] }, + "description" => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, + "group" => ->(x, path) { x.nil? ? [] : ["its('#{path}.group') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/regionbackendservice_connection_draining.rb b/generate/libraries/google/compute/property/regionbackendservice_connection_draining.rb index a60b1ccb1..ceb68749a 100644 --- a/generate/libraries/google/compute/property/regionbackendservice_connection_draining.rb +++ b/generate/libraries/google/compute/property/regionbackendservice_connection_draining.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @draining_timeout_sec = arguments['drainingTimeoutSec'] + @draining_timeout_sec = arguments["drainingTimeoutSec"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'draining_timeout_sec' => ->(x, path) { x.nil? ? [] : ["its('#{path}.draining_timeout_sec') { should cmp #{x.inspect} }"] }, + "draining_timeout_sec" => ->(x, path) { x.nil? ? [] : ["its('#{path}.draining_timeout_sec') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/router_bgp.rb b/generate/libraries/google/compute/property/router_bgp.rb index 62eb765c2..9a706db10 100644 --- a/generate/libraries/google/compute/property/router_bgp.rb +++ b/generate/libraries/google/compute/property/router_bgp.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/router_bgp_advertised_ip_ranges' +require "google/compute/property/router_bgp_advertised_ip_ranges" module GoogleInSpec module Compute module Property @@ -32,10 +32,10 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @asn = arguments['asn'] - @advertise_mode = arguments['advertiseMode'] - @advertised_groups = arguments['advertisedGroups'] - @advertised_ip_ranges = GoogleInSpec::Compute::Property::RouterBgpAdvertisedIpRangesArray.parse(arguments['advertisedIpRanges'], to_s) + @asn = arguments["asn"] + @advertise_mode = arguments["advertiseMode"] + @advertised_groups = arguments["advertisedGroups"] + @advertised_ip_ranges = GoogleInSpec::Compute::Property::RouterBgpAdvertisedIpRangesArray.parse(arguments["advertisedIpRanges"], to_s) end def to_s @@ -45,10 +45,10 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'asn' => ->(x, path) { x.nil? ? [] : ["its('#{path}.asn') { should cmp #{x.inspect} }"] }, - 'advertise_mode' => ->(x, path) { x.nil? ? [] : ["its('#{path}.advertise_mode') { should cmp #{x.inspect} }"] }, - 'advertised_groups' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.advertised_groups') { should include #{single.inspect} }" } }, - 'advertised_ip_ranges' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.advertised_ip_ranges') { should include '#{single.to_json}' }" } }, + "asn" => ->(x, path) { x.nil? ? [] : ["its('#{path}.asn') { should cmp #{x.inspect} }"] }, + "advertise_mode" => ->(x, path) { x.nil? ? [] : ["its('#{path}.advertise_mode') { should cmp #{x.inspect} }"] }, + "advertised_groups" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.advertised_groups') { should include #{single.inspect} }" } }, + "advertised_ip_ranges" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.advertised_ip_ranges') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/router_bgp_advertised_ip_ranges.rb b/generate/libraries/google/compute/property/router_bgp_advertised_ip_ranges.rb index ea91fedb3..8f514ddaa 100644 --- a/generate/libraries/google/compute/property/router_bgp_advertised_ip_ranges.rb +++ b/generate/libraries/google/compute/property/router_bgp_advertised_ip_ranges.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @range = arguments['range'] - @description = arguments['description'] + @range = arguments["range"] + @description = arguments["description"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'range' => ->(x, path) { x.nil? ? [] : ["its('#{path}.range') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, + "range" => ->(x, path) { x.nil? ? [] : ["its('#{path}.range') { should cmp #{x.inspect} }"] }, + "description" => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/snapshot_snapshot_encryption_key.rb b/generate/libraries/google/compute/property/snapshot_snapshot_encryption_key.rb index f9a14d344..189fca59e 100644 --- a/generate/libraries/google/compute/property/snapshot_snapshot_encryption_key.rb +++ b/generate/libraries/google/compute/property/snapshot_snapshot_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @raw_key = arguments['rawKey'] - @sha256 = arguments['sha256'] - @kms_key_name = arguments['kmsKeyName'] + @raw_key = arguments["rawKey"] + @sha256 = arguments["sha256"] + @kms_key_name = arguments["kmsKeyName"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'raw_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, - 'sha256' => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, - 'kms_key_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, + "raw_key" => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, + "sha256" => ->(x, path) { x.nil? ? [] : ["its('#{path}.sha256') { should cmp #{x.inspect} }"] }, + "kms_key_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/snapshot_source_disk_encryption_key.rb b/generate/libraries/google/compute/property/snapshot_source_disk_encryption_key.rb index f2e0d9ba6..28d11b655 100644 --- a/generate/libraries/google/compute/property/snapshot_source_disk_encryption_key.rb +++ b/generate/libraries/google/compute/property/snapshot_source_disk_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @raw_key = arguments['rawKey'] - @kms_key_name = arguments['kmsKeyName'] + @raw_key = arguments["rawKey"] + @kms_key_name = arguments["kmsKeyName"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'raw_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, - 'kms_key_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, + "raw_key" => ->(x, path) { x.nil? ? [] : ["its('#{path}.raw_key') { should cmp #{x.inspect} }"] }, + "kms_key_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/sslpolicy_warnings.rb b/generate/libraries/google/compute/property/sslpolicy_warnings.rb index 0263fd9eb..59749ccf2 100644 --- a/generate/libraries/google/compute/property/sslpolicy_warnings.rb +++ b/generate/libraries/google/compute/property/sslpolicy_warnings.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @code = arguments['code'] - @message = arguments['message'] + @code = arguments["code"] + @message = arguments["message"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'code' => ->(x, path) { x.nil? ? [] : ["its('#{path}.code') { should cmp #{x.inspect} }"] }, - 'message' => ->(x, path) { x.nil? ? [] : ["its('#{path}.message') { should cmp #{x.inspect} }"] }, + "code" => ->(x, path) { x.nil? ? [] : ["its('#{path}.code') { should cmp #{x.inspect} }"] }, + "message" => ->(x, path) { x.nil? ? [] : ["its('#{path}.message') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/urlmap_host_rules.rb b/generate/libraries/google/compute/property/urlmap_host_rules.rb index 816bf7a4d..05a386013 100644 --- a/generate/libraries/google/compute/property/urlmap_host_rules.rb +++ b/generate/libraries/google/compute/property/urlmap_host_rules.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @description = arguments['description'] - @hosts = arguments['hosts'] - @path_matcher = arguments['pathMatcher'] + @description = arguments["description"] + @hosts = arguments["hosts"] + @path_matcher = arguments["pathMatcher"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, - 'hosts' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.hosts') { should include #{single.inspect} }" } }, - 'path_matcher' => ->(x, path) { x.nil? ? [] : ["its('#{path}.path_matcher') { should cmp #{x.inspect} }"] }, + "description" => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, + "hosts" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.hosts') { should include #{single.inspect} }" } }, + "path_matcher" => ->(x, path) { x.nil? ? [] : ["its('#{path}.path_matcher') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/urlmap_path_matchers.rb b/generate/libraries/google/compute/property/urlmap_path_matchers.rb index 352ae1d5d..daa1a2b32 100644 --- a/generate/libraries/google/compute/property/urlmap_path_matchers.rb +++ b/generate/libraries/google/compute/property/urlmap_path_matchers.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/urlmap_path_matchers_path_rules' +require "google/compute/property/urlmap_path_matchers_path_rules" module GoogleInSpec module Compute module Property @@ -32,10 +32,10 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @default_service = arguments['defaultService'] - @description = arguments['description'] - @name = arguments['name'] - @path_rules = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesArray.parse(arguments['pathRules'], to_s) + @default_service = arguments["defaultService"] + @description = arguments["description"] + @name = arguments["name"] + @path_rules = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesArray.parse(arguments["pathRules"], to_s) end def to_s @@ -45,10 +45,10 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'default_service' => ->(x, path) { x.nil? ? [] : ["its('#{path}.default_service') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, - 'path_rules' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.path_rules') { should include '#{single.to_json}' }" } }, + "default_service" => ->(x, path) { x.nil? ? [] : ["its('#{path}.default_service') { should cmp #{x.inspect} }"] }, + "description" => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, + "name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, + "path_rules" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.path_rules') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/urlmap_path_matchers_path_rules.rb b/generate/libraries/google/compute/property/urlmap_path_matchers_path_rules.rb index 44af4322f..6ede9b825 100644 --- a/generate/libraries/google/compute/property/urlmap_path_matchers_path_rules.rb +++ b/generate/libraries/google/compute/property/urlmap_path_matchers_path_rules.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @paths = arguments['paths'] - @service = arguments['service'] + @paths = arguments["paths"] + @service = arguments["service"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'paths' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.paths') { should include #{single.inspect} }" } }, - 'service' => ->(x, path) { x.nil? ? [] : ["its('#{path}.service') { should cmp #{x.inspect} }"] }, + "paths" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.paths') { should include #{single.inspect} }" } }, + "service" => ->(x, path) { x.nil? ? [] : ["its('#{path}.service') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/compute/property/urlmap_tests.rb b/generate/libraries/google/compute/property/urlmap_tests.rb index 4359a433b..cb0275724 100644 --- a/generate/libraries/google/compute/property/urlmap_tests.rb +++ b/generate/libraries/google/compute/property/urlmap_tests.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -31,10 +31,10 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @description = arguments['description'] - @host = arguments['host'] - @path = arguments['path'] - @service = arguments['service'] + @description = arguments["description"] + @host = arguments["host"] + @path = arguments["path"] + @service = arguments["service"] end def to_s @@ -44,10 +44,10 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, - 'host' => ->(x, path) { x.nil? ? [] : ["its('#{path}.host') { should cmp #{x.inspect} }"] }, - 'path' => ->(x, path) { x.nil? ? [] : ["its('#{path}.path') { should cmp #{x.inspect} }"] }, - 'service' => ->(x, path) { x.nil? ? [] : ["its('#{path}.service') { should cmp #{x.inspect} }"] }, + "description" => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, + "host" => ->(x, path) { x.nil? ? [] : ["its('#{path}.host') { should cmp #{x.inspect} }"] }, + "path" => ->(x, path) { x.nil? ? [] : ["its('#{path}.path') { should cmp #{x.inspect} }"] }, + "service" => ->(x, path) { x.nil? ? [] : ["its('#{path}.service') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalcluster_addons_config.rb b/generate/libraries/google/container/property/regionalcluster_addons_config.rb index e67fbbc40..d330dd275 100644 --- a/generate/libraries/google/container/property/regionalcluster_addons_config.rb +++ b/generate/libraries/google/container/property/regionalcluster_addons_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/container/property/regionalcluster_addons_config_horizontal_pod_autoscaling' -require 'google/container/property/regionalcluster_addons_config_http_load_balancing' -require 'google/container/property/regionalcluster_addons_config_kubernetes_dashboard' -require 'google/container/property/regionalcluster_addons_config_network_policy_config' +require "google/container/property/regionalcluster_addons_config_horizontal_pod_autoscaling" +require "google/container/property/regionalcluster_addons_config_http_load_balancing" +require "google/container/property/regionalcluster_addons_config_kubernetes_dashboard" +require "google/container/property/regionalcluster_addons_config_network_policy_config" module GoogleInSpec module Container module Property @@ -35,10 +35,10 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @http_load_balancing = GoogleInSpec::Container::Property::RegionalClusterAddonsConfigHttpLoadBalancing.new(arguments['httpLoadBalancing'], to_s) - @horizontal_pod_autoscaling = GoogleInSpec::Container::Property::RegionalClusterAddonsConfigHorizontalPodAutoscaling.new(arguments['horizontalPodAutoscaling'], to_s) - @kubernetes_dashboard = GoogleInSpec::Container::Property::RegionalClusterAddonsConfigKubernetesDashboard.new(arguments['kubernetesDashboard'], to_s) - @network_policy_config = GoogleInSpec::Container::Property::RegionalClusterAddonsConfigNetworkPolicyConfig.new(arguments['networkPolicyConfig'], to_s) + @http_load_balancing = GoogleInSpec::Container::Property::RegionalClusterAddonsConfigHttpLoadBalancing.new(arguments["httpLoadBalancing"], to_s) + @horizontal_pod_autoscaling = GoogleInSpec::Container::Property::RegionalClusterAddonsConfigHorizontalPodAutoscaling.new(arguments["horizontalPodAutoscaling"], to_s) + @kubernetes_dashboard = GoogleInSpec::Container::Property::RegionalClusterAddonsConfigKubernetesDashboard.new(arguments["kubernetesDashboard"], to_s) + @network_policy_config = GoogleInSpec::Container::Property::RegionalClusterAddonsConfigNetworkPolicyConfig.new(arguments["networkPolicyConfig"], to_s) end def to_s @@ -48,10 +48,10 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'http_load_balancing' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterAddonsConfigHttpLoadBalancing.un_parse(x, "#{path}.http_load_balancing") }, - 'horizontal_pod_autoscaling' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterAddonsConfigHorizontalPodAutoscaling.un_parse(x, "#{path}.horizontal_pod_autoscaling") }, - 'kubernetes_dashboard' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterAddonsConfigKubernetesDashboard.un_parse(x, "#{path}.kubernetes_dashboard") }, - 'network_policy_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterAddonsConfigNetworkPolicyConfig.un_parse(x, "#{path}.network_policy_config") }, + "http_load_balancing" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterAddonsConfigHttpLoadBalancing.un_parse(x, "#{path}.http_load_balancing") }, + "horizontal_pod_autoscaling" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterAddonsConfigHorizontalPodAutoscaling.un_parse(x, "#{path}.horizontal_pod_autoscaling") }, + "kubernetes_dashboard" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterAddonsConfigKubernetesDashboard.un_parse(x, "#{path}.kubernetes_dashboard") }, + "network_policy_config" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterAddonsConfigNetworkPolicyConfig.un_parse(x, "#{path}.network_policy_config") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalcluster_addons_config_horizontal_pod_autoscaling.rb b/generate/libraries/google/container/property/regionalcluster_addons_config_horizontal_pod_autoscaling.rb index 607f47c21..95588a5b1 100644 --- a/generate/libraries/google/container/property/regionalcluster_addons_config_horizontal_pod_autoscaling.rb +++ b/generate/libraries/google/container/property/regionalcluster_addons_config_horizontal_pod_autoscaling.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @disabled = arguments['disabled'] + @disabled = arguments["disabled"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'disabled' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disabled') { should cmp #{x.inspect} }"] }, + "disabled" => ->(x, path) { x.nil? ? [] : ["its('#{path}.disabled') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalcluster_addons_config_http_load_balancing.rb b/generate/libraries/google/container/property/regionalcluster_addons_config_http_load_balancing.rb index e399d7931..ca25190de 100644 --- a/generate/libraries/google/container/property/regionalcluster_addons_config_http_load_balancing.rb +++ b/generate/libraries/google/container/property/regionalcluster_addons_config_http_load_balancing.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @disabled = arguments['disabled'] + @disabled = arguments["disabled"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'disabled' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disabled') { should cmp #{x.inspect} }"] }, + "disabled" => ->(x, path) { x.nil? ? [] : ["its('#{path}.disabled') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalcluster_addons_config_kubernetes_dashboard.rb b/generate/libraries/google/container/property/regionalcluster_addons_config_kubernetes_dashboard.rb index a4da9bedc..e8fab14e0 100644 --- a/generate/libraries/google/container/property/regionalcluster_addons_config_kubernetes_dashboard.rb +++ b/generate/libraries/google/container/property/regionalcluster_addons_config_kubernetes_dashboard.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @disabled = arguments['disabled'] + @disabled = arguments["disabled"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'disabled' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disabled') { should cmp #{x.inspect} }"] }, + "disabled" => ->(x, path) { x.nil? ? [] : ["its('#{path}.disabled') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalcluster_addons_config_network_policy_config.rb b/generate/libraries/google/container/property/regionalcluster_addons_config_network_policy_config.rb index 19c6db807..a55f7f7a0 100644 --- a/generate/libraries/google/container/property/regionalcluster_addons_config_network_policy_config.rb +++ b/generate/libraries/google/container/property/regionalcluster_addons_config_network_policy_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @disabled = arguments['disabled'] + @disabled = arguments["disabled"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'disabled' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disabled') { should cmp #{x.inspect} }"] }, + "disabled" => ->(x, path) { x.nil? ? [] : ["its('#{path}.disabled') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalcluster_conditions.rb b/generate/libraries/google/container/property/regionalcluster_conditions.rb index fd61c1f2b..e52dab3a2 100644 --- a/generate/libraries/google/container/property/regionalcluster_conditions.rb +++ b/generate/libraries/google/container/property/regionalcluster_conditions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @code = arguments['code'] - @message = arguments['message'] + @code = arguments["code"] + @message = arguments["message"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'code' => ->(x, path) { x.nil? ? [] : ["its('#{path}.code') { should cmp #{x.inspect} }"] }, - 'message' => ->(x, path) { x.nil? ? [] : ["its('#{path}.message') { should cmp #{x.inspect} }"] }, + "code" => ->(x, path) { x.nil? ? [] : ["its('#{path}.code') { should cmp #{x.inspect} }"] }, + "message" => ->(x, path) { x.nil? ? [] : ["its('#{path}.message') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalcluster_default_max_pods_constraint.rb b/generate/libraries/google/container/property/regionalcluster_default_max_pods_constraint.rb index e27b866b9..d115fd2a1 100644 --- a/generate/libraries/google/container/property/regionalcluster_default_max_pods_constraint.rb +++ b/generate/libraries/google/container/property/regionalcluster_default_max_pods_constraint.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @max_pods_per_node = arguments['maxPodsPerNode'] + @max_pods_per_node = arguments["maxPodsPerNode"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'max_pods_per_node' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_pods_per_node') { should cmp #{x.inspect} }"] }, + "max_pods_per_node" => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_pods_per_node') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalcluster_ip_allocation_policy.rb b/generate/libraries/google/container/property/regionalcluster_ip_allocation_policy.rb index 81b35e8df..a565f7dea 100644 --- a/generate/libraries/google/container/property/regionalcluster_ip_allocation_policy.rb +++ b/generate/libraries/google/container/property/regionalcluster_ip_allocation_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -41,15 +41,15 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @use_ip_aliases = arguments['useIpAliases'] - @create_subnetwork = arguments['createSubnetwork'] - @subnetwork_name = arguments['subnetworkName'] - @cluster_secondary_range_name = arguments['clusterSecondaryRangeName'] - @services_secondary_range_name = arguments['servicesSecondaryRangeName'] - @cluster_ipv4_cidr_block = arguments['clusterIpv4CidrBlock'] - @node_ipv4_cidr_block = arguments['nodeIpv4CidrBlock'] - @services_ipv4_cidr_block = arguments['servicesIpv4CidrBlock'] - @tpu_ipv4_cidr_block = arguments['tpuIpv4CidrBlock'] + @use_ip_aliases = arguments["useIpAliases"] + @create_subnetwork = arguments["createSubnetwork"] + @subnetwork_name = arguments["subnetworkName"] + @cluster_secondary_range_name = arguments["clusterSecondaryRangeName"] + @services_secondary_range_name = arguments["servicesSecondaryRangeName"] + @cluster_ipv4_cidr_block = arguments["clusterIpv4CidrBlock"] + @node_ipv4_cidr_block = arguments["nodeIpv4CidrBlock"] + @services_ipv4_cidr_block = arguments["servicesIpv4CidrBlock"] + @tpu_ipv4_cidr_block = arguments["tpuIpv4CidrBlock"] end def to_s @@ -59,15 +59,15 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'use_ip_aliases' => ->(x, path) { x.nil? ? [] : ["its('#{path}.use_ip_aliases') { should cmp #{x.inspect} }"] }, - 'create_subnetwork' => ->(x, path) { x.nil? ? [] : ["its('#{path}.create_subnetwork') { should cmp #{x.inspect} }"] }, - 'subnetwork_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.subnetwork_name') { should cmp #{x.inspect} }"] }, - 'cluster_secondary_range_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.cluster_secondary_range_name') { should cmp #{x.inspect} }"] }, - 'services_secondary_range_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.services_secondary_range_name') { should cmp #{x.inspect} }"] }, - 'cluster_ipv4_cidr_block' => ->(x, path) { x.nil? ? [] : ["its('#{path}.cluster_ipv4_cidr_block') { should cmp #{x.inspect} }"] }, - 'node_ipv4_cidr_block' => ->(x, path) { x.nil? ? [] : ["its('#{path}.node_ipv4_cidr_block') { should cmp #{x.inspect} }"] }, - 'services_ipv4_cidr_block' => ->(x, path) { x.nil? ? [] : ["its('#{path}.services_ipv4_cidr_block') { should cmp #{x.inspect} }"] }, - 'tpu_ipv4_cidr_block' => ->(x, path) { x.nil? ? [] : ["its('#{path}.tpu_ipv4_cidr_block') { should cmp #{x.inspect} }"] }, + "use_ip_aliases" => ->(x, path) { x.nil? ? [] : ["its('#{path}.use_ip_aliases') { should cmp #{x.inspect} }"] }, + "create_subnetwork" => ->(x, path) { x.nil? ? [] : ["its('#{path}.create_subnetwork') { should cmp #{x.inspect} }"] }, + "subnetwork_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.subnetwork_name') { should cmp #{x.inspect} }"] }, + "cluster_secondary_range_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.cluster_secondary_range_name') { should cmp #{x.inspect} }"] }, + "services_secondary_range_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.services_secondary_range_name') { should cmp #{x.inspect} }"] }, + "cluster_ipv4_cidr_block" => ->(x, path) { x.nil? ? [] : ["its('#{path}.cluster_ipv4_cidr_block') { should cmp #{x.inspect} }"] }, + "node_ipv4_cidr_block" => ->(x, path) { x.nil? ? [] : ["its('#{path}.node_ipv4_cidr_block') { should cmp #{x.inspect} }"] }, + "services_ipv4_cidr_block" => ->(x, path) { x.nil? ? [] : ["its('#{path}.services_ipv4_cidr_block') { should cmp #{x.inspect} }"] }, + "tpu_ipv4_cidr_block" => ->(x, path) { x.nil? ? [] : ["its('#{path}.tpu_ipv4_cidr_block') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalcluster_legacy_abac.rb b/generate/libraries/google/container/property/regionalcluster_legacy_abac.rb index 7bfe17ca1..dac3ed4f9 100644 --- a/generate/libraries/google/container/property/regionalcluster_legacy_abac.rb +++ b/generate/libraries/google/container/property/regionalcluster_legacy_abac.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @enabled = arguments['enabled'] + @enabled = arguments["enabled"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'enabled' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enabled') { should cmp #{x.inspect} }"] }, + "enabled" => ->(x, path) { x.nil? ? [] : ["its('#{path}.enabled') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalcluster_master_auth.rb b/generate/libraries/google/container/property/regionalcluster_master_auth.rb index f7ca8e5a1..440e2fb94 100644 --- a/generate/libraries/google/container/property/regionalcluster_master_auth.rb +++ b/generate/libraries/google/container/property/regionalcluster_master_auth.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/container/property/regionalcluster_master_auth_client_certificate_config' +require "google/container/property/regionalcluster_master_auth_client_certificate_config" module GoogleInSpec module Container module Property @@ -36,12 +36,12 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @username = arguments['username'] - @password = arguments['password'] - @client_certificate_config = GoogleInSpec::Container::Property::RegionalClusterMasterAuthClientCertificateConfig.new(arguments['clientCertificateConfig'], to_s) - @cluster_ca_certificate = arguments['clusterCaCertificate'] - @client_certificate = arguments['clientCertificate'] - @client_key = arguments['clientKey'] + @username = arguments["username"] + @password = arguments["password"] + @client_certificate_config = GoogleInSpec::Container::Property::RegionalClusterMasterAuthClientCertificateConfig.new(arguments["clientCertificateConfig"], to_s) + @cluster_ca_certificate = arguments["clusterCaCertificate"] + @client_certificate = arguments["clientCertificate"] + @client_key = arguments["clientKey"] end def to_s @@ -51,12 +51,12 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'username' => ->(x, path) { x.nil? ? [] : ["its('#{path}.username') { should cmp #{x.inspect} }"] }, - 'password' => ->(x, path) { x.nil? ? [] : ["its('#{path}.password') { should cmp #{x.inspect} }"] }, - 'client_certificate_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterMasterAuthClientCertificateConfig.un_parse(x, "#{path}.client_certificate_config") }, - 'cluster_ca_certificate' => ->(x, path) { x.nil? ? [] : ["its('#{path}.cluster_ca_certificate') { should cmp #{x.inspect} }"] }, - 'client_certificate' => ->(x, path) { x.nil? ? [] : ["its('#{path}.client_certificate') { should cmp #{x.inspect} }"] }, - 'client_key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.client_key') { should cmp #{x.inspect} }"] }, + "username" => ->(x, path) { x.nil? ? [] : ["its('#{path}.username') { should cmp #{x.inspect} }"] }, + "password" => ->(x, path) { x.nil? ? [] : ["its('#{path}.password') { should cmp #{x.inspect} }"] }, + "client_certificate_config" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterMasterAuthClientCertificateConfig.un_parse(x, "#{path}.client_certificate_config") }, + "cluster_ca_certificate" => ->(x, path) { x.nil? ? [] : ["its('#{path}.cluster_ca_certificate') { should cmp #{x.inspect} }"] }, + "client_certificate" => ->(x, path) { x.nil? ? [] : ["its('#{path}.client_certificate') { should cmp #{x.inspect} }"] }, + "client_key" => ->(x, path) { x.nil? ? [] : ["its('#{path}.client_key') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalcluster_master_auth_client_certificate_config.rb b/generate/libraries/google/container/property/regionalcluster_master_auth_client_certificate_config.rb index e16764a94..8c0a1f6b6 100644 --- a/generate/libraries/google/container/property/regionalcluster_master_auth_client_certificate_config.rb +++ b/generate/libraries/google/container/property/regionalcluster_master_auth_client_certificate_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @issue_client_certificate = arguments['issueClientCertificate'] + @issue_client_certificate = arguments["issueClientCertificate"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'issue_client_certificate' => ->(x, path) { x.nil? ? [] : ["its('#{path}.issue_client_certificate') { should cmp #{x.inspect} }"] }, + "issue_client_certificate" => ->(x, path) { x.nil? ? [] : ["its('#{path}.issue_client_certificate') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalcluster_master_authorized_networks_config.rb b/generate/libraries/google/container/property/regionalcluster_master_authorized_networks_config.rb index c4e431d13..b2dbe10bd 100644 --- a/generate/libraries/google/container/property/regionalcluster_master_authorized_networks_config.rb +++ b/generate/libraries/google/container/property/regionalcluster_master_authorized_networks_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/container/property/regionalcluster_master_authorized_networks_config_cidr_blocks' +require "google/container/property/regionalcluster_master_authorized_networks_config_cidr_blocks" module GoogleInSpec module Container module Property @@ -28,8 +28,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @enabled = arguments['enabled'] - @cidr_blocks = GoogleInSpec::Container::Property::RegionalClusterMasterAuthorizedNetworksConfigCidrBlocksArray.parse(arguments['cidrBlocks'], to_s) + @enabled = arguments["enabled"] + @cidr_blocks = GoogleInSpec::Container::Property::RegionalClusterMasterAuthorizedNetworksConfigCidrBlocksArray.parse(arguments["cidrBlocks"], to_s) end def to_s @@ -39,8 +39,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'enabled' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enabled') { should cmp #{x.inspect} }"] }, - 'cidr_blocks' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.cidr_blocks') { should include '#{single.to_json}' }" } }, + "enabled" => ->(x, path) { x.nil? ? [] : ["its('#{path}.enabled') { should cmp #{x.inspect} }"] }, + "cidr_blocks" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.cidr_blocks') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalcluster_master_authorized_networks_config_cidr_blocks.rb b/generate/libraries/google/container/property/regionalcluster_master_authorized_networks_config_cidr_blocks.rb index 0d5df70e4..9fc669aa4 100644 --- a/generate/libraries/google/container/property/regionalcluster_master_authorized_networks_config_cidr_blocks.rb +++ b/generate/libraries/google/container/property/regionalcluster_master_authorized_networks_config_cidr_blocks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @display_name = arguments['displayName'] - @cidr_block = arguments['cidrBlock'] + @display_name = arguments["displayName"] + @cidr_block = arguments["cidrBlock"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'display_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.display_name') { should cmp #{x.inspect} }"] }, - 'cidr_block' => ->(x, path) { x.nil? ? [] : ["its('#{path}.cidr_block') { should cmp #{x.inspect} }"] }, + "display_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.display_name') { should cmp #{x.inspect} }"] }, + "cidr_block" => ->(x, path) { x.nil? ? [] : ["its('#{path}.cidr_block') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalcluster_network_policy.rb b/generate/libraries/google/container/property/regionalcluster_network_policy.rb index 3b2e5e00e..e42567acd 100644 --- a/generate/libraries/google/container/property/regionalcluster_network_policy.rb +++ b/generate/libraries/google/container/property/regionalcluster_network_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @provider = arguments['provider'] - @enabled = arguments['enabled'] + @provider = arguments["provider"] + @enabled = arguments["enabled"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'provider' => ->(x, path) { x.nil? ? [] : ["its('#{path}.provider') { should cmp #{x.inspect} }"] }, - 'enabled' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enabled') { should cmp #{x.inspect} }"] }, + "provider" => ->(x, path) { x.nil? ? [] : ["its('#{path}.provider') { should cmp #{x.inspect} }"] }, + "enabled" => ->(x, path) { x.nil? ? [] : ["its('#{path}.enabled') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalcluster_node_config.rb b/generate/libraries/google/container/property/regionalcluster_node_config.rb index 96854c160..077b2cd86 100644 --- a/generate/libraries/google/container/property/regionalcluster_node_config.rb +++ b/generate/libraries/google/container/property/regionalcluster_node_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/container/property/regionalcluster_node_config_accelerators' -require 'google/container/property/regionalcluster_node_config_taints' +require "google/container/property/regionalcluster_node_config_accelerators" +require "google/container/property/regionalcluster_node_config_taints" module GoogleInSpec module Container module Property @@ -53,20 +53,20 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @machine_type = arguments['machineType'] - @disk_size_gb = arguments['diskSizeGb'] - @oauth_scopes = arguments['oauthScopes'] - @service_account = arguments['serviceAccount'] - @metadata = arguments['metadata'] - @image_type = arguments['imageType'] - @labels = arguments['labels'] - @local_ssd_count = arguments['localSsdCount'] - @tags = arguments['tags'] - @preemptible = arguments['preemptible'] - @accelerators = GoogleInSpec::Container::Property::RegionalClusterNodeConfigAcceleratorsArray.parse(arguments['accelerators'], to_s) - @disk_type = arguments['diskType'] - @min_cpu_platform = arguments['minCpuPlatform'] - @taints = GoogleInSpec::Container::Property::RegionalClusterNodeConfigTaintsArray.parse(arguments['taints'], to_s) + @machine_type = arguments["machineType"] + @disk_size_gb = arguments["diskSizeGb"] + @oauth_scopes = arguments["oauthScopes"] + @service_account = arguments["serviceAccount"] + @metadata = arguments["metadata"] + @image_type = arguments["imageType"] + @labels = arguments["labels"] + @local_ssd_count = arguments["localSsdCount"] + @tags = arguments["tags"] + @preemptible = arguments["preemptible"] + @accelerators = GoogleInSpec::Container::Property::RegionalClusterNodeConfigAcceleratorsArray.parse(arguments["accelerators"], to_s) + @disk_type = arguments["diskType"] + @min_cpu_platform = arguments["minCpuPlatform"] + @taints = GoogleInSpec::Container::Property::RegionalClusterNodeConfigTaintsArray.parse(arguments["taints"], to_s) end def to_s @@ -76,20 +76,20 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'machine_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.machine_type') { should cmp #{x.inspect} }"] }, - 'disk_size_gb' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_size_gb') { should cmp #{x.inspect} }"] }, - 'oauth_scopes' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.oauth_scopes') { should include #{single.inspect} }" } }, - 'service_account' => ->(x, path) { x.nil? ? [] : ["its('#{path}.service_account') { should cmp #{x.inspect} }"] }, - 'metadata' => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.metadata') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'image_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.image_type') { should cmp #{x.inspect} }"] }, - 'labels' => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'local_ssd_count' => ->(x, path) { x.nil? ? [] : ["its('#{path}.local_ssd_count') { should cmp #{x.inspect} }"] }, - 'tags' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.tags') { should include #{single.inspect} }" } }, - 'preemptible' => ->(x, path) { x.nil? ? [] : ["its('#{path}.preemptible') { should cmp #{x.inspect} }"] }, - 'accelerators' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.accelerators') { should include '#{single.to_json}' }" } }, - 'disk_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_type') { should cmp #{x.inspect} }"] }, - 'min_cpu_platform' => ->(x, path) { x.nil? ? [] : ["its('#{path}.min_cpu_platform') { should cmp #{x.inspect} }"] }, - 'taints' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.taints') { should include '#{single.to_json}' }" } }, + "machine_type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.machine_type') { should cmp #{x.inspect} }"] }, + "disk_size_gb" => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_size_gb') { should cmp #{x.inspect} }"] }, + "oauth_scopes" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.oauth_scopes') { should include #{single.inspect} }" } }, + "service_account" => ->(x, path) { x.nil? ? [] : ["its('#{path}.service_account') { should cmp #{x.inspect} }"] }, + "metadata" => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.metadata') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "image_type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.image_type') { should cmp #{x.inspect} }"] }, + "labels" => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "local_ssd_count" => ->(x, path) { x.nil? ? [] : ["its('#{path}.local_ssd_count') { should cmp #{x.inspect} }"] }, + "tags" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.tags') { should include #{single.inspect} }" } }, + "preemptible" => ->(x, path) { x.nil? ? [] : ["its('#{path}.preemptible') { should cmp #{x.inspect} }"] }, + "accelerators" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.accelerators') { should include '#{single.to_json}' }" } }, + "disk_type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_type') { should cmp #{x.inspect} }"] }, + "min_cpu_platform" => ->(x, path) { x.nil? ? [] : ["its('#{path}.min_cpu_platform') { should cmp #{x.inspect} }"] }, + "taints" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.taints') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalcluster_node_config_accelerators.rb b/generate/libraries/google/container/property/regionalcluster_node_config_accelerators.rb index 4e574bef9..0d509824f 100644 --- a/generate/libraries/google/container/property/regionalcluster_node_config_accelerators.rb +++ b/generate/libraries/google/container/property/regionalcluster_node_config_accelerators.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @accelerator_count = arguments['acceleratorCount'] - @accelerator_type = arguments['acceleratorType'] + @accelerator_count = arguments["acceleratorCount"] + @accelerator_type = arguments["acceleratorType"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'accelerator_count' => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_count') { should cmp #{x.inspect} }"] }, - 'accelerator_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_type') { should cmp #{x.inspect} }"] }, + "accelerator_count" => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_count') { should cmp #{x.inspect} }"] }, + "accelerator_type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalcluster_node_config_taints.rb b/generate/libraries/google/container/property/regionalcluster_node_config_taints.rb index 84d36caed..0b9d2cca5 100644 --- a/generate/libraries/google/container/property/regionalcluster_node_config_taints.rb +++ b/generate/libraries/google/container/property/regionalcluster_node_config_taints.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @key = arguments['key'] - @value = arguments['value'] - @effect = arguments['effect'] + @key = arguments["key"] + @value = arguments["value"] + @effect = arguments["effect"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.key') { should cmp #{x.inspect} }"] }, - 'value' => ->(x, path) { x.nil? ? [] : ["its('#{path}.value') { should cmp #{x.inspect} }"] }, - 'effect' => ->(x, path) { x.nil? ? [] : ["its('#{path}.effect') { should cmp #{x.inspect} }"] }, + "key" => ->(x, path) { x.nil? ? [] : ["its('#{path}.key') { should cmp #{x.inspect} }"] }, + "value" => ->(x, path) { x.nil? ? [] : ["its('#{path}.value') { should cmp #{x.inspect} }"] }, + "effect" => ->(x, path) { x.nil? ? [] : ["its('#{path}.effect') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalcluster_private_cluster_config.rb b/generate/libraries/google/container/property/regionalcluster_private_cluster_config.rb index 30a88d5ab..47fdd822f 100644 --- a/generate/libraries/google/container/property/regionalcluster_private_cluster_config.rb +++ b/generate/libraries/google/container/property/regionalcluster_private_cluster_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -33,11 +33,11 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @enable_private_nodes = arguments['enablePrivateNodes'] - @enable_private_endpoint = arguments['enablePrivateEndpoint'] - @master_ipv4_cidr_block = arguments['masterIpv4CidrBlock'] - @private_endpoint = arguments['privateEndpoint'] - @public_endpoint = arguments['publicEndpoint'] + @enable_private_nodes = arguments["enablePrivateNodes"] + @enable_private_endpoint = arguments["enablePrivateEndpoint"] + @master_ipv4_cidr_block = arguments["masterIpv4CidrBlock"] + @private_endpoint = arguments["privateEndpoint"] + @public_endpoint = arguments["publicEndpoint"] end def to_s @@ -47,11 +47,11 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'enable_private_nodes' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enable_private_nodes') { should cmp #{x.inspect} }"] }, - 'enable_private_endpoint' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enable_private_endpoint') { should cmp #{x.inspect} }"] }, - 'master_ipv4_cidr_block' => ->(x, path) { x.nil? ? [] : ["its('#{path}.master_ipv4_cidr_block') { should cmp #{x.inspect} }"] }, - 'private_endpoint' => ->(x, path) { x.nil? ? [] : ["its('#{path}.private_endpoint') { should cmp #{x.inspect} }"] }, - 'public_endpoint' => ->(x, path) { x.nil? ? [] : ["its('#{path}.public_endpoint') { should cmp #{x.inspect} }"] }, + "enable_private_nodes" => ->(x, path) { x.nil? ? [] : ["its('#{path}.enable_private_nodes') { should cmp #{x.inspect} }"] }, + "enable_private_endpoint" => ->(x, path) { x.nil? ? [] : ["its('#{path}.enable_private_endpoint') { should cmp #{x.inspect} }"] }, + "master_ipv4_cidr_block" => ->(x, path) { x.nil? ? [] : ["its('#{path}.master_ipv4_cidr_block') { should cmp #{x.inspect} }"] }, + "private_endpoint" => ->(x, path) { x.nil? ? [] : ["its('#{path}.private_endpoint') { should cmp #{x.inspect} }"] }, + "public_endpoint" => ->(x, path) { x.nil? ? [] : ["its('#{path}.public_endpoint') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalnodepool_autoscaling.rb b/generate/libraries/google/container/property/regionalnodepool_autoscaling.rb index de6699ce2..4282bceae 100644 --- a/generate/libraries/google/container/property/regionalnodepool_autoscaling.rb +++ b/generate/libraries/google/container/property/regionalnodepool_autoscaling.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @enabled = arguments['enabled'] - @min_node_count = arguments['minNodeCount'] - @max_node_count = arguments['maxNodeCount'] + @enabled = arguments["enabled"] + @min_node_count = arguments["minNodeCount"] + @max_node_count = arguments["maxNodeCount"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'enabled' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enabled') { should cmp #{x.inspect} }"] }, - 'min_node_count' => ->(x, path) { x.nil? ? [] : ["its('#{path}.min_node_count') { should cmp #{x.inspect} }"] }, - 'max_node_count' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_node_count') { should cmp #{x.inspect} }"] }, + "enabled" => ->(x, path) { x.nil? ? [] : ["its('#{path}.enabled') { should cmp #{x.inspect} }"] }, + "min_node_count" => ->(x, path) { x.nil? ? [] : ["its('#{path}.min_node_count') { should cmp #{x.inspect} }"] }, + "max_node_count" => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_node_count') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalnodepool_conditions.rb b/generate/libraries/google/container/property/regionalnodepool_conditions.rb index 47fb991cd..f0b69a810 100644 --- a/generate/libraries/google/container/property/regionalnodepool_conditions.rb +++ b/generate/libraries/google/container/property/regionalnodepool_conditions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @code = arguments['code'] + @code = arguments["code"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'code' => ->(x, path) { x.nil? ? [] : ["its('#{path}.code') { should cmp #{x.inspect} }"] }, + "code" => ->(x, path) { x.nil? ? [] : ["its('#{path}.code') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalnodepool_config.rb b/generate/libraries/google/container/property/regionalnodepool_config.rb index e78f6dd64..3d7439fc6 100644 --- a/generate/libraries/google/container/property/regionalnodepool_config.rb +++ b/generate/libraries/google/container/property/regionalnodepool_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/container/property/regionalnodepool_config_accelerators' -require 'google/container/property/regionalnodepool_config_taints' +require "google/container/property/regionalnodepool_config_accelerators" +require "google/container/property/regionalnodepool_config_taints" module GoogleInSpec module Container module Property @@ -53,20 +53,20 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @machine_type = arguments['machineType'] - @disk_size_gb = arguments['diskSizeGb'] - @oauth_scopes = arguments['oauthScopes'] - @service_account = arguments['serviceAccount'] - @metadata = arguments['metadata'] - @image_type = arguments['imageType'] - @labels = arguments['labels'] - @local_ssd_count = arguments['localSsdCount'] - @tags = arguments['tags'] - @preemptible = arguments['preemptible'] - @accelerators = GoogleInSpec::Container::Property::RegionalNodePoolConfigAcceleratorsArray.parse(arguments['accelerators'], to_s) - @disk_type = arguments['diskType'] - @min_cpu_platform = arguments['minCpuPlatform'] - @taints = GoogleInSpec::Container::Property::RegionalNodePoolConfigTaintsArray.parse(arguments['taints'], to_s) + @machine_type = arguments["machineType"] + @disk_size_gb = arguments["diskSizeGb"] + @oauth_scopes = arguments["oauthScopes"] + @service_account = arguments["serviceAccount"] + @metadata = arguments["metadata"] + @image_type = arguments["imageType"] + @labels = arguments["labels"] + @local_ssd_count = arguments["localSsdCount"] + @tags = arguments["tags"] + @preemptible = arguments["preemptible"] + @accelerators = GoogleInSpec::Container::Property::RegionalNodePoolConfigAcceleratorsArray.parse(arguments["accelerators"], to_s) + @disk_type = arguments["diskType"] + @min_cpu_platform = arguments["minCpuPlatform"] + @taints = GoogleInSpec::Container::Property::RegionalNodePoolConfigTaintsArray.parse(arguments["taints"], to_s) end def to_s @@ -76,20 +76,20 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'machine_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.machine_type') { should cmp #{x.inspect} }"] }, - 'disk_size_gb' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_size_gb') { should cmp #{x.inspect} }"] }, - 'oauth_scopes' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.oauth_scopes') { should include #{single.inspect} }" } }, - 'service_account' => ->(x, path) { x.nil? ? [] : ["its('#{path}.service_account') { should cmp #{x.inspect} }"] }, - 'metadata' => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.metadata') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'image_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.image_type') { should cmp #{x.inspect} }"] }, - 'labels' => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'local_ssd_count' => ->(x, path) { x.nil? ? [] : ["its('#{path}.local_ssd_count') { should cmp #{x.inspect} }"] }, - 'tags' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.tags') { should include #{single.inspect} }" } }, - 'preemptible' => ->(x, path) { x.nil? ? [] : ["its('#{path}.preemptible') { should cmp #{x.inspect} }"] }, - 'accelerators' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.accelerators') { should include '#{single.to_json}' }" } }, - 'disk_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_type') { should cmp #{x.inspect} }"] }, - 'min_cpu_platform' => ->(x, path) { x.nil? ? [] : ["its('#{path}.min_cpu_platform') { should cmp #{x.inspect} }"] }, - 'taints' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.taints') { should include '#{single.to_json}' }" } }, + "machine_type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.machine_type') { should cmp #{x.inspect} }"] }, + "disk_size_gb" => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_size_gb') { should cmp #{x.inspect} }"] }, + "oauth_scopes" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.oauth_scopes') { should include #{single.inspect} }" } }, + "service_account" => ->(x, path) { x.nil? ? [] : ["its('#{path}.service_account') { should cmp #{x.inspect} }"] }, + "metadata" => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.metadata') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "image_type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.image_type') { should cmp #{x.inspect} }"] }, + "labels" => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "local_ssd_count" => ->(x, path) { x.nil? ? [] : ["its('#{path}.local_ssd_count') { should cmp #{x.inspect} }"] }, + "tags" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.tags') { should include #{single.inspect} }" } }, + "preemptible" => ->(x, path) { x.nil? ? [] : ["its('#{path}.preemptible') { should cmp #{x.inspect} }"] }, + "accelerators" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.accelerators') { should include '#{single.to_json}' }" } }, + "disk_type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.disk_type') { should cmp #{x.inspect} }"] }, + "min_cpu_platform" => ->(x, path) { x.nil? ? [] : ["its('#{path}.min_cpu_platform') { should cmp #{x.inspect} }"] }, + "taints" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.taints') { should include '#{single.to_json}' }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalnodepool_config_accelerators.rb b/generate/libraries/google/container/property/regionalnodepool_config_accelerators.rb index 1018fbce7..3175faaaa 100644 --- a/generate/libraries/google/container/property/regionalnodepool_config_accelerators.rb +++ b/generate/libraries/google/container/property/regionalnodepool_config_accelerators.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @accelerator_count = arguments['acceleratorCount'] - @accelerator_type = arguments['acceleratorType'] + @accelerator_count = arguments["acceleratorCount"] + @accelerator_type = arguments["acceleratorType"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'accelerator_count' => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_count') { should cmp #{x.inspect} }"] }, - 'accelerator_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_type') { should cmp #{x.inspect} }"] }, + "accelerator_count" => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_count') { should cmp #{x.inspect} }"] }, + "accelerator_type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.accelerator_type') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalnodepool_config_taints.rb b/generate/libraries/google/container/property/regionalnodepool_config_taints.rb index 46c007514..360e7c5b9 100644 --- a/generate/libraries/google/container/property/regionalnodepool_config_taints.rb +++ b/generate/libraries/google/container/property/regionalnodepool_config_taints.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @key = arguments['key'] - @value = arguments['value'] - @effect = arguments['effect'] + @key = arguments["key"] + @value = arguments["value"] + @effect = arguments["effect"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'key' => ->(x, path) { x.nil? ? [] : ["its('#{path}.key') { should cmp #{x.inspect} }"] }, - 'value' => ->(x, path) { x.nil? ? [] : ["its('#{path}.value') { should cmp #{x.inspect} }"] }, - 'effect' => ->(x, path) { x.nil? ? [] : ["its('#{path}.effect') { should cmp #{x.inspect} }"] }, + "key" => ->(x, path) { x.nil? ? [] : ["its('#{path}.key') { should cmp #{x.inspect} }"] }, + "value" => ->(x, path) { x.nil? ? [] : ["its('#{path}.value') { should cmp #{x.inspect} }"] }, + "effect" => ->(x, path) { x.nil? ? [] : ["its('#{path}.effect') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalnodepool_management.rb b/generate/libraries/google/container/property/regionalnodepool_management.rb index d23687959..ae41ea83e 100644 --- a/generate/libraries/google/container/property/regionalnodepool_management.rb +++ b/generate/libraries/google/container/property/regionalnodepool_management.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/container/property/regionalnodepool_management_upgrade_options' +require "google/container/property/regionalnodepool_management_upgrade_options" module GoogleInSpec module Container module Property @@ -30,9 +30,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @auto_upgrade = arguments['autoUpgrade'] - @auto_repair = arguments['autoRepair'] - @upgrade_options = GoogleInSpec::Container::Property::RegionalNodePoolManagementUpgradeOptions.new(arguments['upgradeOptions'], to_s) + @auto_upgrade = arguments["autoUpgrade"] + @auto_repair = arguments["autoRepair"] + @upgrade_options = GoogleInSpec::Container::Property::RegionalNodePoolManagementUpgradeOptions.new(arguments["upgradeOptions"], to_s) end def to_s @@ -42,9 +42,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'auto_upgrade' => ->(x, path) { x.nil? ? [] : ["its('#{path}.auto_upgrade') { should cmp #{x.inspect} }"] }, - 'auto_repair' => ->(x, path) { x.nil? ? [] : ["its('#{path}.auto_repair') { should cmp #{x.inspect} }"] }, - 'upgrade_options' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalNodePoolManagementUpgradeOptions.un_parse(x, "#{path}.upgrade_options") }, + "auto_upgrade" => ->(x, path) { x.nil? ? [] : ["its('#{path}.auto_upgrade') { should cmp #{x.inspect} }"] }, + "auto_repair" => ->(x, path) { x.nil? ? [] : ["its('#{path}.auto_repair') { should cmp #{x.inspect} }"] }, + "upgrade_options" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalNodePoolManagementUpgradeOptions.un_parse(x, "#{path}.upgrade_options") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalnodepool_management_upgrade_options.rb b/generate/libraries/google/container/property/regionalnodepool_management_upgrade_options.rb index 23b8d01ed..c27a6de07 100644 --- a/generate/libraries/google/container/property/regionalnodepool_management_upgrade_options.rb +++ b/generate/libraries/google/container/property/regionalnodepool_management_upgrade_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @auto_upgrade_start_time = parse_time_string(arguments['autoUpgradeStartTime']) - @description = arguments['description'] + @auto_upgrade_start_time = parse_time_string(arguments["autoUpgradeStartTime"]) + @description = arguments["description"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'auto_upgrade_start_time' => ->(x, path) { x.nil? ? [] : ["its('#{path}.auto_upgrade_start_time.to_s') { should cmp '#{x.inspect}' }"] }, - 'description' => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, + "auto_upgrade_start_time" => ->(x, path) { x.nil? ? [] : ["its('#{path}.auto_upgrade_start_time.to_s') { should cmp '#{x.inspect}' }"] }, + "description" => ->(x, path) { x.nil? ? [] : ["its('#{path}.description') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/container/property/regionalnodepool_max_pods_constraint.rb b/generate/libraries/google/container/property/regionalnodepool_max_pods_constraint.rb index bce2c09ec..26d1470b7 100644 --- a/generate/libraries/google/container/property/regionalnodepool_max_pods_constraint.rb +++ b/generate/libraries/google/container/property/regionalnodepool_max_pods_constraint.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @max_pods_per_node = arguments['maxPodsPerNode'] + @max_pods_per_node = arguments["maxPodsPerNode"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'max_pods_per_node' => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_pods_per_node') { should cmp #{x.inspect} }"] }, + "max_pods_per_node" => ->(x, path) { x.nil? ? [] : ["its('#{path}.max_pods_per_node') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/dataproc/property/cluster_config.rb b/generate/libraries/google/dataproc/property/cluster_config.rb index c7498e0ec..9022b7dc8 100644 --- a/generate/libraries/google/dataproc/property/cluster_config.rb +++ b/generate/libraries/google/dataproc/property/cluster_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,21 +13,21 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataproc/property/cluster_config_encryption_config' -require 'google/dataproc/property/cluster_config_gce_cluster_config' -require 'google/dataproc/property/cluster_config_initialization_actions' -require 'google/dataproc/property/cluster_config_master_config' -require 'google/dataproc/property/cluster_config_master_config_disk_config' -require 'google/dataproc/property/cluster_config_master_config_managed_group_config' -require 'google/dataproc/property/cluster_config_secondary_worker_config' -require 'google/dataproc/property/cluster_config_secondary_worker_config_disk_config' -require 'google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config' -require 'google/dataproc/property/cluster_config_security_config' -require 'google/dataproc/property/cluster_config_security_config_kerberos_config' -require 'google/dataproc/property/cluster_config_software_config' -require 'google/dataproc/property/cluster_config_worker_config' -require 'google/dataproc/property/cluster_config_worker_config_disk_config' -require 'google/dataproc/property/cluster_config_worker_config_managed_group_config' +require "google/dataproc/property/cluster_config_encryption_config" +require "google/dataproc/property/cluster_config_gce_cluster_config" +require "google/dataproc/property/cluster_config_initialization_actions" +require "google/dataproc/property/cluster_config_master_config" +require "google/dataproc/property/cluster_config_master_config_disk_config" +require "google/dataproc/property/cluster_config_master_config_managed_group_config" +require "google/dataproc/property/cluster_config_secondary_worker_config" +require "google/dataproc/property/cluster_config_secondary_worker_config_disk_config" +require "google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config" +require "google/dataproc/property/cluster_config_security_config" +require "google/dataproc/property/cluster_config_security_config_kerberos_config" +require "google/dataproc/property/cluster_config_software_config" +require "google/dataproc/property/cluster_config_worker_config" +require "google/dataproc/property/cluster_config_worker_config_disk_config" +require "google/dataproc/property/cluster_config_worker_config_managed_group_config" module GoogleInSpec module Dataproc module Property @@ -56,15 +56,15 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @config_bucket = arguments['configBucket'] - @gce_cluster_config = GoogleInSpec::Dataproc::Property::ClusterConfigGceClusterConfig.new(arguments['gceClusterConfig'], to_s) - @master_config = GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfig.new(arguments['masterConfig'], to_s) - @worker_config = GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfig.new(arguments['workerConfig'], to_s) - @secondary_worker_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfig.new(arguments['secondaryWorkerConfig'], to_s) - @software_config = GoogleInSpec::Dataproc::Property::ClusterConfigSoftwareConfig.new(arguments['softwareConfig'], to_s) - @initialization_actions = GoogleInSpec::Dataproc::Property::ClusterConfigInitializationActionsArray.parse(arguments['initializationActions'], to_s) - @encryption_config = GoogleInSpec::Dataproc::Property::ClusterConfigEncryptionConfig.new(arguments['encryptionConfig'], to_s) - @security_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecurityConfig.new(arguments['securityConfig'], to_s) + @config_bucket = arguments["configBucket"] + @gce_cluster_config = GoogleInSpec::Dataproc::Property::ClusterConfigGceClusterConfig.new(arguments["gceClusterConfig"], to_s) + @master_config = GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfig.new(arguments["masterConfig"], to_s) + @worker_config = GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfig.new(arguments["workerConfig"], to_s) + @secondary_worker_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfig.new(arguments["secondaryWorkerConfig"], to_s) + @software_config = GoogleInSpec::Dataproc::Property::ClusterConfigSoftwareConfig.new(arguments["softwareConfig"], to_s) + @initialization_actions = GoogleInSpec::Dataproc::Property::ClusterConfigInitializationActionsArray.parse(arguments["initializationActions"], to_s) + @encryption_config = GoogleInSpec::Dataproc::Property::ClusterConfigEncryptionConfig.new(arguments["encryptionConfig"], to_s) + @security_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecurityConfig.new(arguments["securityConfig"], to_s) end def to_s @@ -74,15 +74,15 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'config_bucket' => ->(x, path) { x.nil? ? [] : ["its('#{path}.config_bucket') { should cmp #{x.inspect} }"] }, - 'gce_cluster_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigGceClusterConfig.un_parse(x, "#{path}.gce_cluster_config") }, - 'master_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfig.un_parse(x, "#{path}.master_config") }, - 'worker_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfig.un_parse(x, "#{path}.worker_config") }, - 'secondary_worker_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfig.un_parse(x, "#{path}.secondary_worker_config") }, - 'software_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigSoftwareConfig.un_parse(x, "#{path}.software_config") }, - 'initialization_actions' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.initialization_actions') { should include '#{single.to_json}' }" } }, - 'encryption_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigEncryptionConfig.un_parse(x, "#{path}.encryption_config") }, - 'security_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigSecurityConfig.un_parse(x, "#{path}.security_config") }, + "config_bucket" => ->(x, path) { x.nil? ? [] : ["its('#{path}.config_bucket') { should cmp #{x.inspect} }"] }, + "gce_cluster_config" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigGceClusterConfig.un_parse(x, "#{path}.gce_cluster_config") }, + "master_config" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfig.un_parse(x, "#{path}.master_config") }, + "worker_config" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfig.un_parse(x, "#{path}.worker_config") }, + "secondary_worker_config" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfig.un_parse(x, "#{path}.secondary_worker_config") }, + "software_config" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigSoftwareConfig.un_parse(x, "#{path}.software_config") }, + "initialization_actions" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.initialization_actions') { should include '#{single.to_json}' }" } }, + "encryption_config" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigEncryptionConfig.un_parse(x, "#{path}.encryption_config") }, + "security_config" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigSecurityConfig.un_parse(x, "#{path}.security_config") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/dataproc/property/cluster_config_encryption_config.rb b/generate/libraries/google/dataproc/property/cluster_config_encryption_config.rb index b0e718412..872be7c47 100644 --- a/generate/libraries/google/dataproc/property/cluster_config_encryption_config.rb +++ b/generate/libraries/google/dataproc/property/cluster_config_encryption_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @gce_pd_kms_key_name = arguments['gcePdKmsKeyName'] + @gce_pd_kms_key_name = arguments["gcePdKmsKeyName"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'gce_pd_kms_key_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.gce_pd_kms_key_name') { should cmp #{x.inspect} }"] }, + "gce_pd_kms_key_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.gce_pd_kms_key_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/dataproc/property/cluster_config_gce_cluster_config.rb b/generate/libraries/google/dataproc/property/cluster_config_gce_cluster_config.rb index 0610d9333..dbd7ef9ea 100644 --- a/generate/libraries/google/dataproc/property/cluster_config_gce_cluster_config.rb +++ b/generate/libraries/google/dataproc/property/cluster_config_gce_cluster_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -37,13 +37,13 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @zone_uri = arguments['zoneUri'] - @network_uri = arguments['networkUri'] - @subnetwork_uri = arguments['subnetworkUri'] - @internal_ip_only = arguments['internalIpOnly'] - @service_account_scopes = arguments['serviceAccountScopes'] - @tags = arguments['tags'] - @metadata = arguments['metadata'] + @zone_uri = arguments["zoneUri"] + @network_uri = arguments["networkUri"] + @subnetwork_uri = arguments["subnetworkUri"] + @internal_ip_only = arguments["internalIpOnly"] + @service_account_scopes = arguments["serviceAccountScopes"] + @tags = arguments["tags"] + @metadata = arguments["metadata"] end def to_s @@ -53,13 +53,13 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'zone_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.zone_uri') { should cmp #{x.inspect} }"] }, - 'network_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.network_uri') { should cmp #{x.inspect} }"] }, - 'subnetwork_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.subnetwork_uri') { should cmp #{x.inspect} }"] }, - 'internal_ip_only' => ->(x, path) { x.nil? ? [] : ["its('#{path}.internal_ip_only') { should cmp #{x.inspect} }"] }, - 'service_account_scopes' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.service_account_scopes') { should include #{single.inspect} }" } }, - 'tags' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.tags') { should include #{single.inspect} }" } }, - 'metadata' => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.metadata') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "zone_uri" => ->(x, path) { x.nil? ? [] : ["its('#{path}.zone_uri') { should cmp #{x.inspect} }"] }, + "network_uri" => ->(x, path) { x.nil? ? [] : ["its('#{path}.network_uri') { should cmp #{x.inspect} }"] }, + "subnetwork_uri" => ->(x, path) { x.nil? ? [] : ["its('#{path}.subnetwork_uri') { should cmp #{x.inspect} }"] }, + "internal_ip_only" => ->(x, path) { x.nil? ? [] : ["its('#{path}.internal_ip_only') { should cmp #{x.inspect} }"] }, + "service_account_scopes" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.service_account_scopes') { should include #{single.inspect} }" } }, + "tags" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.tags') { should include #{single.inspect} }" } }, + "metadata" => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.metadata') { should include(#{k.inspect} => #{v.inspect}) }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/dataproc/property/cluster_config_initialization_actions.rb b/generate/libraries/google/dataproc/property/cluster_config_initialization_actions.rb index 8a1792d5b..8f4323df0 100644 --- a/generate/libraries/google/dataproc/property/cluster_config_initialization_actions.rb +++ b/generate/libraries/google/dataproc/property/cluster_config_initialization_actions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @executable_file = arguments['executableFile'] - @execution_timeout = arguments['executionTimeout'] + @executable_file = arguments["executableFile"] + @execution_timeout = arguments["executionTimeout"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'executable_file' => ->(x, path) { x.nil? ? [] : ["its('#{path}.executable_file') { should cmp #{x.inspect} }"] }, - 'execution_timeout' => ->(x, path) { x.nil? ? [] : ["its('#{path}.execution_timeout') { should cmp #{x.inspect} }"] }, + "executable_file" => ->(x, path) { x.nil? ? [] : ["its('#{path}.executable_file') { should cmp #{x.inspect} }"] }, + "execution_timeout" => ->(x, path) { x.nil? ? [] : ["its('#{path}.execution_timeout') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/dataproc/property/cluster_config_master_config.rb b/generate/libraries/google/dataproc/property/cluster_config_master_config.rb index da8bc494e..68b38cd6d 100644 --- a/generate/libraries/google/dataproc/property/cluster_config_master_config.rb +++ b/generate/libraries/google/dataproc/property/cluster_config_master_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataproc/property/cluster_config_master_config_disk_config' -require 'google/dataproc/property/cluster_config_master_config_managed_group_config' +require "google/dataproc/property/cluster_config_master_config_disk_config" +require "google/dataproc/property/cluster_config_master_config_managed_group_config" module GoogleInSpec module Dataproc module Property @@ -39,13 +39,13 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @num_instances = arguments['numInstances'] - @instance_names = arguments['instanceNames'] - @image_uri = arguments['imageUri'] - @machine_type_uri = arguments['machineTypeUri'] - @disk_config = GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfigDiskConfig.new(arguments['diskConfig'], to_s) - @is_preemptible = arguments['isPreemptible'] - @managed_group_config = GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfigManagedGroupConfig.new(arguments['managedGroupConfig'], to_s) + @num_instances = arguments["numInstances"] + @instance_names = arguments["instanceNames"] + @image_uri = arguments["imageUri"] + @machine_type_uri = arguments["machineTypeUri"] + @disk_config = GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfigDiskConfig.new(arguments["diskConfig"], to_s) + @is_preemptible = arguments["isPreemptible"] + @managed_group_config = GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfigManagedGroupConfig.new(arguments["managedGroupConfig"], to_s) end def to_s @@ -55,13 +55,13 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'num_instances' => ->(x, path) { x.nil? ? [] : ["its('#{path}.num_instances') { should cmp #{x.inspect} }"] }, - 'instance_names' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.instance_names') { should include #{single.inspect} }" } }, - 'image_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.image_uri') { should cmp #{x.inspect} }"] }, - 'machine_type_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.machine_type_uri') { should cmp #{x.inspect} }"] }, - 'disk_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfigDiskConfig.un_parse(x, "#{path}.disk_config") }, - 'is_preemptible' => ->(x, path) { x.nil? ? [] : ["its('#{path}.is_preemptible') { should cmp #{x.inspect} }"] }, - 'managed_group_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfigManagedGroupConfig.un_parse(x, "#{path}.managed_group_config") }, + "num_instances" => ->(x, path) { x.nil? ? [] : ["its('#{path}.num_instances') { should cmp #{x.inspect} }"] }, + "instance_names" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.instance_names') { should include #{single.inspect} }" } }, + "image_uri" => ->(x, path) { x.nil? ? [] : ["its('#{path}.image_uri') { should cmp #{x.inspect} }"] }, + "machine_type_uri" => ->(x, path) { x.nil? ? [] : ["its('#{path}.machine_type_uri') { should cmp #{x.inspect} }"] }, + "disk_config" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfigDiskConfig.un_parse(x, "#{path}.disk_config") }, + "is_preemptible" => ->(x, path) { x.nil? ? [] : ["its('#{path}.is_preemptible') { should cmp #{x.inspect} }"] }, + "managed_group_config" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfigManagedGroupConfig.un_parse(x, "#{path}.managed_group_config") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/dataproc/property/cluster_config_master_config_disk_config.rb b/generate/libraries/google/dataproc/property/cluster_config_master_config_disk_config.rb index eec4ba68d..cefb9882d 100644 --- a/generate/libraries/google/dataproc/property/cluster_config_master_config_disk_config.rb +++ b/generate/libraries/google/dataproc/property/cluster_config_master_config_disk_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @boot_disk_type = arguments['bootDiskType'] - @boot_disk_size_gb = arguments['bootDiskSizeGb'] - @num_local_ssds = arguments['numLocalSsds'] + @boot_disk_type = arguments["bootDiskType"] + @boot_disk_size_gb = arguments["bootDiskSizeGb"] + @num_local_ssds = arguments["numLocalSsds"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'boot_disk_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot_disk_type') { should cmp #{x.inspect} }"] }, - 'boot_disk_size_gb' => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot_disk_size_gb') { should cmp #{x.inspect} }"] }, - 'num_local_ssds' => ->(x, path) { x.nil? ? [] : ["its('#{path}.num_local_ssds') { should cmp #{x.inspect} }"] }, + "boot_disk_type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot_disk_type') { should cmp #{x.inspect} }"] }, + "boot_disk_size_gb" => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot_disk_size_gb') { should cmp #{x.inspect} }"] }, + "num_local_ssds" => ->(x, path) { x.nil? ? [] : ["its('#{path}.num_local_ssds') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/dataproc/property/cluster_config_master_config_managed_group_config.rb b/generate/libraries/google/dataproc/property/cluster_config_master_config_managed_group_config.rb index 10b03eb6d..174dc1114 100644 --- a/generate/libraries/google/dataproc/property/cluster_config_master_config_managed_group_config.rb +++ b/generate/libraries/google/dataproc/property/cluster_config_master_config_managed_group_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @instance_template_name = arguments['instanceTemplateName'] - @instance_group_manager_name = arguments['instanceGroupManagerName'] + @instance_template_name = arguments["instanceTemplateName"] + @instance_group_manager_name = arguments["instanceGroupManagerName"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'instance_template_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.instance_template_name') { should cmp #{x.inspect} }"] }, - 'instance_group_manager_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.instance_group_manager_name') { should cmp #{x.inspect} }"] }, + "instance_template_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.instance_template_name') { should cmp #{x.inspect} }"] }, + "instance_group_manager_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.instance_group_manager_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/dataproc/property/cluster_config_secondary_worker_config.rb b/generate/libraries/google/dataproc/property/cluster_config_secondary_worker_config.rb index 1d5b35b6d..c426ec063 100644 --- a/generate/libraries/google/dataproc/property/cluster_config_secondary_worker_config.rb +++ b/generate/libraries/google/dataproc/property/cluster_config_secondary_worker_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataproc/property/cluster_config_secondary_worker_config_disk_config' -require 'google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config' +require "google/dataproc/property/cluster_config_secondary_worker_config_disk_config" +require "google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config" module GoogleInSpec module Dataproc module Property @@ -39,13 +39,13 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @num_instances = arguments['numInstances'] - @instance_names = arguments['instanceNames'] - @image_uri = arguments['imageUri'] - @machine_type_uri = arguments['machineTypeUri'] - @disk_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfigDiskConfig.new(arguments['diskConfig'], to_s) - @is_preemptible = arguments['isPreemptible'] - @managed_group_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfigManagedGroupConfig.new(arguments['managedGroupConfig'], to_s) + @num_instances = arguments["numInstances"] + @instance_names = arguments["instanceNames"] + @image_uri = arguments["imageUri"] + @machine_type_uri = arguments["machineTypeUri"] + @disk_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfigDiskConfig.new(arguments["diskConfig"], to_s) + @is_preemptible = arguments["isPreemptible"] + @managed_group_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfigManagedGroupConfig.new(arguments["managedGroupConfig"], to_s) end def to_s @@ -55,13 +55,13 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'num_instances' => ->(x, path) { x.nil? ? [] : ["its('#{path}.num_instances') { should cmp #{x.inspect} }"] }, - 'instance_names' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.instance_names') { should include #{single.inspect} }" } }, - 'image_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.image_uri') { should cmp #{x.inspect} }"] }, - 'machine_type_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.machine_type_uri') { should cmp #{x.inspect} }"] }, - 'disk_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfigDiskConfig.un_parse(x, "#{path}.disk_config") }, - 'is_preemptible' => ->(x, path) { x.nil? ? [] : ["its('#{path}.is_preemptible') { should cmp #{x.inspect} }"] }, - 'managed_group_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfigManagedGroupConfig.un_parse(x, "#{path}.managed_group_config") }, + "num_instances" => ->(x, path) { x.nil? ? [] : ["its('#{path}.num_instances') { should cmp #{x.inspect} }"] }, + "instance_names" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.instance_names') { should include #{single.inspect} }" } }, + "image_uri" => ->(x, path) { x.nil? ? [] : ["its('#{path}.image_uri') { should cmp #{x.inspect} }"] }, + "machine_type_uri" => ->(x, path) { x.nil? ? [] : ["its('#{path}.machine_type_uri') { should cmp #{x.inspect} }"] }, + "disk_config" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfigDiskConfig.un_parse(x, "#{path}.disk_config") }, + "is_preemptible" => ->(x, path) { x.nil? ? [] : ["its('#{path}.is_preemptible') { should cmp #{x.inspect} }"] }, + "managed_group_config" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfigManagedGroupConfig.un_parse(x, "#{path}.managed_group_config") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/dataproc/property/cluster_config_secondary_worker_config_disk_config.rb b/generate/libraries/google/dataproc/property/cluster_config_secondary_worker_config_disk_config.rb index 6fd90b842..bd190d486 100644 --- a/generate/libraries/google/dataproc/property/cluster_config_secondary_worker_config_disk_config.rb +++ b/generate/libraries/google/dataproc/property/cluster_config_secondary_worker_config_disk_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @boot_disk_type = arguments['bootDiskType'] - @boot_disk_size_gb = arguments['bootDiskSizeGb'] - @num_local_ssds = arguments['numLocalSsds'] + @boot_disk_type = arguments["bootDiskType"] + @boot_disk_size_gb = arguments["bootDiskSizeGb"] + @num_local_ssds = arguments["numLocalSsds"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'boot_disk_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot_disk_type') { should cmp #{x.inspect} }"] }, - 'boot_disk_size_gb' => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot_disk_size_gb') { should cmp #{x.inspect} }"] }, - 'num_local_ssds' => ->(x, path) { x.nil? ? [] : ["its('#{path}.num_local_ssds') { should cmp #{x.inspect} }"] }, + "boot_disk_type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot_disk_type') { should cmp #{x.inspect} }"] }, + "boot_disk_size_gb" => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot_disk_size_gb') { should cmp #{x.inspect} }"] }, + "num_local_ssds" => ->(x, path) { x.nil? ? [] : ["its('#{path}.num_local_ssds') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config.rb b/generate/libraries/google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config.rb index 349b9c700..c9d9b7767 100644 --- a/generate/libraries/google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config.rb +++ b/generate/libraries/google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @instance_template_name = arguments['instanceTemplateName'] - @instance_group_manager_name = arguments['instanceGroupManagerName'] + @instance_template_name = arguments["instanceTemplateName"] + @instance_group_manager_name = arguments["instanceGroupManagerName"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'instance_template_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.instance_template_name') { should cmp #{x.inspect} }"] }, - 'instance_group_manager_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.instance_group_manager_name') { should cmp #{x.inspect} }"] }, + "instance_template_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.instance_template_name') { should cmp #{x.inspect} }"] }, + "instance_group_manager_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.instance_group_manager_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/dataproc/property/cluster_config_security_config.rb b/generate/libraries/google/dataproc/property/cluster_config_security_config.rb index 07ddb57a0..b3470dcfb 100644 --- a/generate/libraries/google/dataproc/property/cluster_config_security_config.rb +++ b/generate/libraries/google/dataproc/property/cluster_config_security_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataproc/property/cluster_config_security_config_kerberos_config' +require "google/dataproc/property/cluster_config_security_config_kerberos_config" module GoogleInSpec module Dataproc module Property @@ -26,7 +26,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @kerberos_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecurityConfigKerberosConfig.new(arguments['kerberosConfig'], to_s) + @kerberos_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecurityConfigKerberosConfig.new(arguments["kerberosConfig"], to_s) end def to_s @@ -36,7 +36,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'kerberos_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigSecurityConfigKerberosConfig.un_parse(x, "#{path}.kerberos_config") }, + "kerberos_config" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigSecurityConfigKerberosConfig.un_parse(x, "#{path}.kerberos_config") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/dataproc/property/cluster_config_security_config_kerberos_config.rb b/generate/libraries/google/dataproc/property/cluster_config_security_config_kerberos_config.rb index 647c604c7..bf45cc0c7 100644 --- a/generate/libraries/google/dataproc/property/cluster_config_security_config_kerberos_config.rb +++ b/generate/libraries/google/dataproc/property/cluster_config_security_config_kerberos_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -49,19 +49,19 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @enable_kerberos = arguments['enableKerberos'] - @rootprincipal_password_uri = arguments['rootprincipalPasswordUri'] - @kms_key_uri = arguments['kmsKeyUri'] - @keystore_uri = arguments['keystoreUri'] - @truststore_uri = arguments['truststoreUri'] - @key_password_uri = arguments['keyPasswordUri'] - @truststore_password_uri = arguments['truststorePasswordUri'] - @cross_realm_trust_realm = arguments['crossRealmTrustRealm'] - @cross_realm_trust_admin_server = arguments['crossRealmTrustAdminServer'] - @cross_realm_trust_shared_password_uri = arguments['crossRealmTrustSharedPasswordUri'] - @kdc_db_key_uri = arguments['kdcDbKeyUri'] - @tgt_lifetime_hours = arguments['tgtLifetimeHours'] - @realm = arguments['realm'] + @enable_kerberos = arguments["enableKerberos"] + @rootprincipal_password_uri = arguments["rootprincipalPasswordUri"] + @kms_key_uri = arguments["kmsKeyUri"] + @keystore_uri = arguments["keystoreUri"] + @truststore_uri = arguments["truststoreUri"] + @key_password_uri = arguments["keyPasswordUri"] + @truststore_password_uri = arguments["truststorePasswordUri"] + @cross_realm_trust_realm = arguments["crossRealmTrustRealm"] + @cross_realm_trust_admin_server = arguments["crossRealmTrustAdminServer"] + @cross_realm_trust_shared_password_uri = arguments["crossRealmTrustSharedPasswordUri"] + @kdc_db_key_uri = arguments["kdcDbKeyUri"] + @tgt_lifetime_hours = arguments["tgtLifetimeHours"] + @realm = arguments["realm"] end def to_s @@ -71,19 +71,19 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'enable_kerberos' => ->(x, path) { x.nil? ? [] : ["its('#{path}.enable_kerberos') { should cmp #{x.inspect} }"] }, - 'rootprincipal_password_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.rootprincipal_password_uri') { should cmp #{x.inspect} }"] }, - 'kms_key_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_uri') { should cmp #{x.inspect} }"] }, - 'keystore_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.keystore_uri') { should cmp #{x.inspect} }"] }, - 'truststore_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.truststore_uri') { should cmp #{x.inspect} }"] }, - 'key_password_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.key_password_uri') { should cmp #{x.inspect} }"] }, - 'truststore_password_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.truststore_password_uri') { should cmp #{x.inspect} }"] }, - 'cross_realm_trust_realm' => ->(x, path) { x.nil? ? [] : ["its('#{path}.cross_realm_trust_realm') { should cmp #{x.inspect} }"] }, - 'cross_realm_trust_admin_server' => ->(x, path) { x.nil? ? [] : ["its('#{path}.cross_realm_trust_admin_server') { should cmp #{x.inspect} }"] }, - 'cross_realm_trust_shared_password_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.cross_realm_trust_shared_password_uri') { should cmp #{x.inspect} }"] }, - 'kdc_db_key_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.kdc_db_key_uri') { should cmp #{x.inspect} }"] }, - 'tgt_lifetime_hours' => ->(x, path) { x.nil? ? [] : ["its('#{path}.tgt_lifetime_hours') { should cmp #{x.inspect} }"] }, - 'realm' => ->(x, path) { x.nil? ? [] : ["its('#{path}.realm') { should cmp #{x.inspect} }"] }, + "enable_kerberos" => ->(x, path) { x.nil? ? [] : ["its('#{path}.enable_kerberos') { should cmp #{x.inspect} }"] }, + "rootprincipal_password_uri" => ->(x, path) { x.nil? ? [] : ["its('#{path}.rootprincipal_password_uri') { should cmp #{x.inspect} }"] }, + "kms_key_uri" => ->(x, path) { x.nil? ? [] : ["its('#{path}.kms_key_uri') { should cmp #{x.inspect} }"] }, + "keystore_uri" => ->(x, path) { x.nil? ? [] : ["its('#{path}.keystore_uri') { should cmp #{x.inspect} }"] }, + "truststore_uri" => ->(x, path) { x.nil? ? [] : ["its('#{path}.truststore_uri') { should cmp #{x.inspect} }"] }, + "key_password_uri" => ->(x, path) { x.nil? ? [] : ["its('#{path}.key_password_uri') { should cmp #{x.inspect} }"] }, + "truststore_password_uri" => ->(x, path) { x.nil? ? [] : ["its('#{path}.truststore_password_uri') { should cmp #{x.inspect} }"] }, + "cross_realm_trust_realm" => ->(x, path) { x.nil? ? [] : ["its('#{path}.cross_realm_trust_realm') { should cmp #{x.inspect} }"] }, + "cross_realm_trust_admin_server" => ->(x, path) { x.nil? ? [] : ["its('#{path}.cross_realm_trust_admin_server') { should cmp #{x.inspect} }"] }, + "cross_realm_trust_shared_password_uri" => ->(x, path) { x.nil? ? [] : ["its('#{path}.cross_realm_trust_shared_password_uri') { should cmp #{x.inspect} }"] }, + "kdc_db_key_uri" => ->(x, path) { x.nil? ? [] : ["its('#{path}.kdc_db_key_uri') { should cmp #{x.inspect} }"] }, + "tgt_lifetime_hours" => ->(x, path) { x.nil? ? [] : ["its('#{path}.tgt_lifetime_hours') { should cmp #{x.inspect} }"] }, + "realm" => ->(x, path) { x.nil? ? [] : ["its('#{path}.realm') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/dataproc/property/cluster_config_software_config.rb b/generate/libraries/google/dataproc/property/cluster_config_software_config.rb index a89adca80..8c6e22f60 100644 --- a/generate/libraries/google/dataproc/property/cluster_config_software_config.rb +++ b/generate/libraries/google/dataproc/property/cluster_config_software_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @image_version = arguments['imageVersion'] - @properties = arguments['properties'] - @optional_components = arguments['optionalComponents'] + @image_version = arguments["imageVersion"] + @properties = arguments["properties"] + @optional_components = arguments["optionalComponents"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'image_version' => ->(x, path) { x.nil? ? [] : ["its('#{path}.image_version') { should cmp #{x.inspect} }"] }, - 'properties' => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.properties') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'optional_components' => ->(x, path) { x.nil? ? [] : ["its('#{path}.optional_components') { should cmp #{x.inspect} }"] }, + "image_version" => ->(x, path) { x.nil? ? [] : ["its('#{path}.image_version') { should cmp #{x.inspect} }"] }, + "properties" => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.properties') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "optional_components" => ->(x, path) { x.nil? ? [] : ["its('#{path}.optional_components') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/dataproc/property/cluster_config_worker_config.rb b/generate/libraries/google/dataproc/property/cluster_config_worker_config.rb index 6751a020a..e09572904 100644 --- a/generate/libraries/google/dataproc/property/cluster_config_worker_config.rb +++ b/generate/libraries/google/dataproc/property/cluster_config_worker_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataproc/property/cluster_config_worker_config_disk_config' -require 'google/dataproc/property/cluster_config_worker_config_managed_group_config' +require "google/dataproc/property/cluster_config_worker_config_disk_config" +require "google/dataproc/property/cluster_config_worker_config_managed_group_config" module GoogleInSpec module Dataproc module Property @@ -39,13 +39,13 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @num_instances = arguments['numInstances'] - @instance_names = arguments['instanceNames'] - @image_uri = arguments['imageUri'] - @machine_type_uri = arguments['machineTypeUri'] - @disk_config = GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfigDiskConfig.new(arguments['diskConfig'], to_s) - @is_preemptible = arguments['isPreemptible'] - @managed_group_config = GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfigManagedGroupConfig.new(arguments['managedGroupConfig'], to_s) + @num_instances = arguments["numInstances"] + @instance_names = arguments["instanceNames"] + @image_uri = arguments["imageUri"] + @machine_type_uri = arguments["machineTypeUri"] + @disk_config = GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfigDiskConfig.new(arguments["diskConfig"], to_s) + @is_preemptible = arguments["isPreemptible"] + @managed_group_config = GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfigManagedGroupConfig.new(arguments["managedGroupConfig"], to_s) end def to_s @@ -55,13 +55,13 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'num_instances' => ->(x, path) { x.nil? ? [] : ["its('#{path}.num_instances') { should cmp #{x.inspect} }"] }, - 'instance_names' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.instance_names') { should include #{single.inspect} }" } }, - 'image_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.image_uri') { should cmp #{x.inspect} }"] }, - 'machine_type_uri' => ->(x, path) { x.nil? ? [] : ["its('#{path}.machine_type_uri') { should cmp #{x.inspect} }"] }, - 'disk_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfigDiskConfig.un_parse(x, "#{path}.disk_config") }, - 'is_preemptible' => ->(x, path) { x.nil? ? [] : ["its('#{path}.is_preemptible') { should cmp #{x.inspect} }"] }, - 'managed_group_config' => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfigManagedGroupConfig.un_parse(x, "#{path}.managed_group_config") }, + "num_instances" => ->(x, path) { x.nil? ? [] : ["its('#{path}.num_instances') { should cmp #{x.inspect} }"] }, + "instance_names" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.instance_names') { should include #{single.inspect} }" } }, + "image_uri" => ->(x, path) { x.nil? ? [] : ["its('#{path}.image_uri') { should cmp #{x.inspect} }"] }, + "machine_type_uri" => ->(x, path) { x.nil? ? [] : ["its('#{path}.machine_type_uri') { should cmp #{x.inspect} }"] }, + "disk_config" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfigDiskConfig.un_parse(x, "#{path}.disk_config") }, + "is_preemptible" => ->(x, path) { x.nil? ? [] : ["its('#{path}.is_preemptible') { should cmp #{x.inspect} }"] }, + "managed_group_config" => ->(x, path) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfigManagedGroupConfig.un_parse(x, "#{path}.managed_group_config") }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/dataproc/property/cluster_config_worker_config_disk_config.rb b/generate/libraries/google/dataproc/property/cluster_config_worker_config_disk_config.rb index aebdce2a0..c8577fc5b 100644 --- a/generate/libraries/google/dataproc/property/cluster_config_worker_config_disk_config.rb +++ b/generate/libraries/google/dataproc/property/cluster_config_worker_config_disk_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -29,9 +29,9 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @boot_disk_type = arguments['bootDiskType'] - @boot_disk_size_gb = arguments['bootDiskSizeGb'] - @num_local_ssds = arguments['numLocalSsds'] + @boot_disk_type = arguments["bootDiskType"] + @boot_disk_size_gb = arguments["bootDiskSizeGb"] + @num_local_ssds = arguments["numLocalSsds"] end def to_s @@ -41,9 +41,9 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'boot_disk_type' => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot_disk_type') { should cmp #{x.inspect} }"] }, - 'boot_disk_size_gb' => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot_disk_size_gb') { should cmp #{x.inspect} }"] }, - 'num_local_ssds' => ->(x, path) { x.nil? ? [] : ["its('#{path}.num_local_ssds') { should cmp #{x.inspect} }"] }, + "boot_disk_type" => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot_disk_type') { should cmp #{x.inspect} }"] }, + "boot_disk_size_gb" => ->(x, path) { x.nil? ? [] : ["its('#{path}.boot_disk_size_gb') { should cmp #{x.inspect} }"] }, + "num_local_ssds" => ->(x, path) { x.nil? ? [] : ["its('#{path}.num_local_ssds') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/dataproc/property/cluster_config_worker_config_managed_group_config.rb b/generate/libraries/google/dataproc/property/cluster_config_worker_config_managed_group_config.rb index 5cec511fb..fa9694fba 100644 --- a/generate/libraries/google/dataproc/property/cluster_config_worker_config_managed_group_config.rb +++ b/generate/libraries/google/dataproc/property/cluster_config_worker_config_managed_group_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @instance_template_name = arguments['instanceTemplateName'] - @instance_group_manager_name = arguments['instanceGroupManagerName'] + @instance_template_name = arguments["instanceTemplateName"] + @instance_group_manager_name = arguments["instanceGroupManagerName"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'instance_template_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.instance_template_name') { should cmp #{x.inspect} }"] }, - 'instance_group_manager_name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.instance_group_manager_name') { should cmp #{x.inspect} }"] }, + "instance_template_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.instance_template_name') { should cmp #{x.inspect} }"] }, + "instance_group_manager_name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.instance_group_manager_name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/filestore/property/instance_file_shares.rb b/generate/libraries/google/filestore/property/instance_file_shares.rb index dfaf5e014..70a98e0b8 100644 --- a/generate/libraries/google/filestore/property/instance_file_shares.rb +++ b/generate/libraries/google/filestore/property/instance_file_shares.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @name = arguments['name'] - @capacity_gb = arguments['capacityGb'] + @name = arguments["name"] + @capacity_gb = arguments["capacityGb"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, - 'capacity_gb' => ->(x, path) { x.nil? ? [] : ["its('#{path}.capacity_gb') { should cmp #{x.inspect} }"] }, + "name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, + "capacity_gb" => ->(x, path) { x.nil? ? [] : ["its('#{path}.capacity_gb') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/filestore/property/instance_networks.rb b/generate/libraries/google/filestore/property/instance_networks.rb index 1410f3230..fe1b3020c 100644 --- a/generate/libraries/google/filestore/property/instance_networks.rb +++ b/generate/libraries/google/filestore/property/instance_networks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -31,10 +31,10 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @network = arguments['network'] - @modes = arguments['modes'] - @reserved_ip_range = arguments['reservedIpRange'] - @ip_addresses = arguments['ipAddresses'] + @network = arguments["network"] + @modes = arguments["modes"] + @reserved_ip_range = arguments["reservedIpRange"] + @ip_addresses = arguments["ipAddresses"] end def to_s @@ -44,10 +44,10 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'network' => ->(x, path) { x.nil? ? [] : ["its('#{path}.network') { should cmp #{x.inspect} }"] }, - 'modes' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.modes') { should include #{single.inspect} }" } }, - 'reserved_ip_range' => ->(x, path) { x.nil? ? [] : ["its('#{path}.reserved_ip_range') { should cmp #{x.inspect} }"] }, - 'ip_addresses' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.ip_addresses') { should include #{single.inspect} }" } }, + "network" => ->(x, path) { x.nil? ? [] : ["its('#{path}.network') { should cmp #{x.inspect} }"] }, + "modes" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.modes') { should include #{single.inspect} }" } }, + "reserved_ip_range" => ->(x, path) { x.nil? ? [] : ["its('#{path}.reserved_ip_range') { should cmp #{x.inspect} }"] }, + "ip_addresses" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.ip_addresses') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/iam/property/iam_policy_audit_configs.rb b/generate/libraries/google/iam/property/iam_policy_audit_configs.rb index e960b9b1f..64455f2a3 100644 --- a/generate/libraries/google/iam/property/iam_policy_audit_configs.rb +++ b/generate/libraries/google/iam/property/iam_policy_audit_configs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require 'google/iam/property/iam_policy_audit_configs_audit_log_configs' +require "google/iam/property/iam_policy_audit_configs_audit_log_configs" module GoogleInSpec module Iam module Property @@ -25,8 +25,8 @@ class IamPolicyAuditConfigs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @service = args['service'] - @audit_log_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsAuditLogConfigsArray.parse(args['auditLogConfigs'], to_s) + @service = args["service"] + @audit_log_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsAuditLogConfigsArray.parse(args["auditLogConfigs"], to_s) end def to_s diff --git a/generate/libraries/google/iam/property/iam_policy_audit_configs_audit_log_configs.rb b/generate/libraries/google/iam/property/iam_policy_audit_configs_audit_log_configs.rb index 371e49b38..d4ed1f48b 100644 --- a/generate/libraries/google/iam/property/iam_policy_audit_configs_audit_log_configs.rb +++ b/generate/libraries/google/iam/property/iam_policy_audit_configs_audit_log_configs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,8 +24,8 @@ class IamPolicyAuditConfigsAuditLogConfigs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @log_type = args['logType'] - @exempted_members = args['exemptedMembers'] + @log_type = args["logType"] + @exempted_members = args["exemptedMembers"] end def to_s diff --git a/generate/libraries/google/iam/property/iam_policy_bindings.rb b/generate/libraries/google/iam/property/iam_policy_bindings.rb index c2dc42449..db4b00992 100644 --- a/generate/libraries/google/iam/property/iam_policy_bindings.rb +++ b/generate/libraries/google/iam/property/iam_policy_bindings.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,8 +24,8 @@ class IamPolicyBindings def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @role = args['role'] - @members = args['members'] + @role = args["role"] + @members = args["members"] end def to_s diff --git a/generate/libraries/google/mlengine/property/model_default_version.rb b/generate/libraries/google/mlengine/property/model_default_version.rb index a6476d0c0..482ce2ae2 100644 --- a/generate/libraries/google/mlengine/property/model_default_version.rb +++ b/generate/libraries/google/mlengine/property/model_default_version.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @name = arguments['name'] + @name = arguments["name"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'name' => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, + "name" => ->(x, path) { x.nil? ? [] : ["its('#{path}.name') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/pubsub/property/subscription_expiration_policy.rb b/generate/libraries/google/pubsub/property/subscription_expiration_policy.rb index a3089d919..0ae484b41 100644 --- a/generate/libraries/google/pubsub/property/subscription_expiration_policy.rb +++ b/generate/libraries/google/pubsub/property/subscription_expiration_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @ttl = arguments['ttl'] + @ttl = arguments["ttl"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'ttl' => ->(x, path) { x.nil? ? [] : ["its('#{path}.ttl') { should cmp #{x.inspect} }"] }, + "ttl" => ->(x, path) { x.nil? ? [] : ["its('#{path}.ttl') { should cmp #{x.inspect} }"] }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/pubsub/property/subscription_push_config.rb b/generate/libraries/google/pubsub/property/subscription_push_config.rb index fb3c8697a..033f4acc7 100644 --- a/generate/libraries/google/pubsub/property/subscription_push_config.rb +++ b/generate/libraries/google/pubsub/property/subscription_push_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -27,8 +27,8 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @push_endpoint = arguments['pushEndpoint'] - @attributes = arguments['attributes'] + @push_endpoint = arguments["pushEndpoint"] + @attributes = arguments["attributes"] end def to_s @@ -38,8 +38,8 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'push_endpoint' => ->(x, path) { x.nil? ? [] : ["its('#{path}.push_endpoint') { should cmp #{x.inspect} }"] }, - 'attributes' => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.attributes') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "push_endpoint" => ->(x, path) { x.nil? ? [] : ["its('#{path}.push_endpoint') { should cmp #{x.inspect} }"] }, + "attributes" => ->(x, path) { x.nil? ? [] : x.map { |k, v| "its('#{path}.attributes') { should include(#{k.inspect} => #{v.inspect}) }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/pubsub/property/topic_message_storage_policy.rb b/generate/libraries/google/pubsub/property/topic_message_storage_policy.rb index b045b8012..75684cdde 100644 --- a/generate/libraries/google/pubsub/property/topic_message_storage_policy.rb +++ b/generate/libraries/google/pubsub/property/topic_message_storage_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -25,7 +25,7 @@ def initialize(arguments = nil, parent_identifier = nil) @arguments = arguments return if arguments.nil? @parent_identifier = parent_identifier - @allowed_persistence_regions = arguments['allowedPersistenceRegions'] + @allowed_persistence_regions = arguments["allowedPersistenceRegions"] end def to_s @@ -35,7 +35,7 @@ def to_s def self.un_parse(item, current_path) return if item.nil? way_to_parse = { - 'allowed_persistence_regions' => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.allowed_persistence_regions') { should include #{single.inspect} }" } }, + "allowed_persistence_regions" => ->(x, path) { x.nil? ? [] : x.map { |single| "its('#{path}.allowed_persistence_regions') { should include #{single.inspect} }" } }, } way_to_parse.map do |k, v| v.call(item.method(k).call, current_path) diff --git a/generate/libraries/google/resourcemanager/property/organizationpolicy_boolean_policy.rb b/generate/libraries/google/resourcemanager/property/organizationpolicy_boolean_policy.rb index b7ac9f105..6936d94d9 100644 --- a/generate/libraries/google/resourcemanager/property/organizationpolicy_boolean_policy.rb +++ b/generate/libraries/google/resourcemanager/property/organizationpolicy_boolean_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class OrganizationPolicyBooleanPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enforced = args['enforced'] + @enforced = args["enforced"] end def to_s diff --git a/generate/libraries/google/resourcemanager/property/organizationpolicy_list_policy.rb b/generate/libraries/google/resourcemanager/property/organizationpolicy_list_policy.rb index e2fda9a89..9cbfe89d5 100644 --- a/generate/libraries/google/resourcemanager/property/organizationpolicy_list_policy.rb +++ b/generate/libraries/google/resourcemanager/property/organizationpolicy_list_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class OrganizationPolicyListPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @allowed_values = args['allowedValues'] - @denied_values = args['deniedValues'] + @allowed_values = args["allowedValues"] + @denied_values = args["deniedValues"] end def to_s diff --git a/generate/libraries/google_appengine_standard_app_version.rb b/generate/libraries/google_appengine_standard_app_version.rb index a24877481..d6d2b02ac 100644 --- a/generate/libraries/google_appengine_standard_app_version.rb +++ b/generate/libraries/google_appengine_standard_app_version.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage App Engine resources. class AppEngineStandardAppVersion < GcpResourceBase - name 'google_appengine_standard_app_version' - desc 'StandardAppVersion' - supports platform: 'gcp' + name "google_appengine_standard_app_version" + desc "StandardAppVersion" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -30,16 +30,16 @@ class AppEngineStandardAppVersion < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @name = @fetched['name'] - @version_id = @fetched['id'] - @runtime = @fetched['runtime'] - @threadsafe = @fetched['threadsafe'] + @name = @fetched["name"] + @version_id = @fetched["id"] + @runtime = @fetched["runtime"] + @threadsafe = @fetched["threadsafe"] end # Handles parsing RFC3339 time string @@ -57,15 +57,15 @@ def to_s def un_parse { - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'version_id' => ->(x, _) { x.nil? ? [] : ["its('version_id') { should cmp #{x.inspect} }"] }, - 'runtime' => ->(x, _) { x.nil? ? [] : ["its('runtime') { should cmp #{x.inspect} }"] }, - 'threadsafe' => ->(x, _) { x.nil? ? [] : ["its('threadsafe') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "version_id" => ->(x, _) { x.nil? ? [] : ["its('version_id') { should cmp #{x.inspect} }"] }, + "runtime" => ->(x, _) { x.nil? ? [] : ["its('runtime') { should cmp #{x.inspect} }"] }, + "threadsafe" => ->(x, _) { x.nil? ? [] : ["its('threadsafe') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'StandardAppVersion' + name = "StandardAppVersion" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -74,11 +74,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_appengine_standard_app_version', + type: "google_appengine_standard_app_version", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -86,10 +86,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://appengine.googleapis.com/v1/' + "https://appengine.googleapis.com/v1/" end def resource_base_url - 'apps/{{project}}/services/{{service}}/versions/{{version_id}}' + "apps/{{project}}/services/{{service}}/versions/{{version_id}}" end end diff --git a/generate/libraries/google_appengine_standard_app_versions.rb b/generate/libraries/google_appengine_standard_app_versions.rb index d998f6c3b..fc70c3285 100644 --- a/generate/libraries/google_appengine_standard_app_versions.rb +++ b/generate/libraries/google_appengine_standard_app_versions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class AppEngineStandardAppVersions < GcpResourceBase - name 'google_appengine_standard_app_versions' - desc 'StandardAppVersion plural resource' - supports platform: 'gcp' + name "google_appengine_standard_app_versions" + desc "StandardAppVersion plural resource" + supports platform: "gcp" attr_reader :table @@ -33,12 +33,12 @@ class AppEngineStandardAppVersions < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('versions') + @table = fetch_wrapped_resource("versions") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -66,10 +66,10 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'id' => ->(obj) { [:version_id, obj['id']] }, - 'runtime' => ->(obj) { [:runtime, obj['runtime']] }, - 'threadsafe' => ->(obj) { [:threadsafe, obj['threadsafe']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "id" => ->(obj) { [:version_id, obj["id"]] }, + "runtime" => ->(obj) { [:runtime, obj["runtime"]] }, + "threadsafe" => ->(obj) { [:threadsafe, obj["threadsafe"]] }, } end @@ -96,10 +96,10 @@ def identifiers private def product_url - 'https://appengine.googleapis.com/v1/' + "https://appengine.googleapis.com/v1/" end def resource_base_url - 'apps/{{project}}/services/{{service}}/versions' + "apps/{{project}}/services/{{service}}/versions" end end diff --git a/generate/libraries/google_bigquery_dataset.rb b/generate/libraries/google_bigquery_dataset.rb index fd19cef7e..268e3abee 100644 --- a/generate/libraries/google_bigquery_dataset.rb +++ b/generate/libraries/google_bigquery_dataset.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/bigquery/property/dataset_access' -require 'google/bigquery/property/dataset_dataset_reference' -require 'google/bigquery/property/dataset_default_encryption_configuration' +require "gcp_backend" +require "google/bigquery/property/dataset_access" +require "google/bigquery/property/dataset_dataset_reference" +require "google/bigquery/property/dataset_default_encryption_configuration" # A provider to manage BigQuery resources. class BigQueryDataset < GcpResourceBase - name 'google_bigquery_dataset' - desc 'Dataset' - supports platform: 'gcp' + name "google_bigquery_dataset" + desc "Dataset" + supports platform: "gcp" attr_reader :params attr_reader :access @@ -42,25 +42,25 @@ class BigQueryDataset < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @access = GoogleInSpec::BigQuery::Property::DatasetAccessArray.parse(@fetched['access'], to_s) - @creation_time = @fetched['creationTime'] - @dataset_reference = GoogleInSpec::BigQuery::Property::DatasetDatasetReference.new(@fetched['datasetReference'], to_s) - @default_table_expiration_ms = @fetched['defaultTableExpirationMs'] - @default_partition_expiration_ms = @fetched['defaultPartitionExpirationMs'] - @description = @fetched['description'] - @etag = @fetched['etag'] - @friendly_name = @fetched['friendlyName'] - @id = @fetched['id'] - @labels = @fetched['labels'] - @last_modified_time = @fetched['lastModifiedTime'] - @location = @fetched['location'] - @default_encryption_configuration = GoogleInSpec::BigQuery::Property::DatasetDefaultEncryptionConfiguration.new(@fetched['defaultEncryptionConfiguration'], to_s) + @access = GoogleInSpec::BigQuery::Property::DatasetAccessArray.parse(@fetched["access"], to_s) + @creation_time = @fetched["creationTime"] + @dataset_reference = GoogleInSpec::BigQuery::Property::DatasetDatasetReference.new(@fetched["datasetReference"], to_s) + @default_table_expiration_ms = @fetched["defaultTableExpirationMs"] + @default_partition_expiration_ms = @fetched["defaultPartitionExpirationMs"] + @description = @fetched["description"] + @etag = @fetched["etag"] + @friendly_name = @fetched["friendlyName"] + @id = @fetched["id"] + @labels = @fetched["labels"] + @last_modified_time = @fetched["lastModifiedTime"] + @location = @fetched["location"] + @default_encryption_configuration = GoogleInSpec::BigQuery::Property::DatasetDefaultEncryptionConfiguration.new(@fetched["defaultEncryptionConfiguration"], to_s) end # Handles parsing RFC3339 time string @@ -78,24 +78,24 @@ def to_s def un_parse { - 'access' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('access') { should include '#{single.to_json}' }" } }, - 'creation_time' => ->(x, _) { x.nil? ? [] : ["its('creation_time') { should cmp #{x.inspect} }"] }, - 'dataset_reference' => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::DatasetDatasetReference.un_parse(x, 'dataset_reference') }, - 'default_table_expiration_ms' => ->(x, _) { x.nil? ? [] : ["its('default_table_expiration_ms') { should cmp #{x.inspect} }"] }, - 'default_partition_expiration_ms' => ->(x, _) { x.nil? ? [] : ["its('default_partition_expiration_ms') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'etag' => ->(x, _) { x.nil? ? [] : ["its('etag') { should cmp #{x.inspect} }"] }, - 'friendly_name' => ->(x, _) { x.nil? ? [] : ["its('friendly_name') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'last_modified_time' => ->(x, _) { x.nil? ? [] : ["its('last_modified_time') { should cmp #{x.inspect} }"] }, - 'location' => ->(x, _) { x.nil? ? [] : ["its('location') { should cmp #{x.inspect} }"] }, - 'default_encryption_configuration' => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::DatasetDefaultEncryptionConfiguration.un_parse(x, 'default_encryption_configuration') }, + "access" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('access') { should include '#{single.to_json}' }" } }, + "creation_time" => ->(x, _) { x.nil? ? [] : ["its('creation_time') { should cmp #{x.inspect} }"] }, + "dataset_reference" => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::DatasetDatasetReference.un_parse(x, "dataset_reference") }, + "default_table_expiration_ms" => ->(x, _) { x.nil? ? [] : ["its('default_table_expiration_ms') { should cmp #{x.inspect} }"] }, + "default_partition_expiration_ms" => ->(x, _) { x.nil? ? [] : ["its('default_partition_expiration_ms') { should cmp #{x.inspect} }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "etag" => ->(x, _) { x.nil? ? [] : ["its('etag') { should cmp #{x.inspect} }"] }, + "friendly_name" => ->(x, _) { x.nil? ? [] : ["its('friendly_name') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "labels" => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "last_modified_time" => ->(x, _) { x.nil? ? [] : ["its('last_modified_time') { should cmp #{x.inspect} }"] }, + "location" => ->(x, _) { x.nil? ? [] : ["its('location') { should cmp #{x.inspect} }"] }, + "default_encryption_configuration" => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::DatasetDefaultEncryptionConfiguration.un_parse(x, "default_encryption_configuration") }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Dataset' + name = "Dataset" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -104,11 +104,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_bigquery_dataset', + type: "google_bigquery_dataset", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -120,10 +120,10 @@ def name private def product_url - 'https://www.googleapis.com/bigquery/v2/' + "https://www.googleapis.com/bigquery/v2/" end def resource_base_url - 'projects/{{project}}/datasets/{{name}}' + "projects/{{project}}/datasets/{{name}}" end end diff --git a/generate/libraries/google_bigquery_datasets.rb b/generate/libraries/google_bigquery_datasets.rb index 7cfab93a9..e75b3eef2 100644 --- a/generate/libraries/google_bigquery_datasets.rb +++ b/generate/libraries/google_bigquery_datasets.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class BigQueryDatasets < GcpResourceBase - name 'google_bigquery_datasets' - desc 'Dataset plural resource' - supports platform: 'gcp' + name "google_bigquery_datasets" + desc "Dataset plural resource" + supports platform: "gcp" attr_reader :table @@ -37,12 +37,12 @@ class BigQueryDatasets < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('datasets') + @table = fetch_wrapped_resource("datasets") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'datasetReference' => ->(obj) { [:dataset_reference, GoogleInSpec::BigQuery::Property::DatasetDatasetReference.new(obj['datasetReference'], to_s)] }, - 'defaultPartitionExpirationMs' => ->(obj) { [:default_partition_expiration_ms, obj['defaultPartitionExpirationMs']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'friendlyName' => ->(obj) { [:friendly_name, obj['friendlyName']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'location' => ->(obj) { [:location, obj['location']] }, - 'defaultEncryptionConfiguration' => ->(obj) { [:default_encryption_configuration, GoogleInSpec::BigQuery::Property::DatasetDefaultEncryptionConfiguration.new(obj['defaultEncryptionConfiguration'], to_s)] }, + "datasetReference" => ->(obj) { [:dataset_reference, GoogleInSpec::BigQuery::Property::DatasetDatasetReference.new(obj["datasetReference"], to_s)] }, + "defaultPartitionExpirationMs" => ->(obj) { [:default_partition_expiration_ms, obj["defaultPartitionExpirationMs"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "friendlyName" => ->(obj) { [:friendly_name, obj["friendlyName"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "location" => ->(obj) { [:location, obj["location"]] }, + "defaultEncryptionConfiguration" => ->(obj) { [:default_encryption_configuration, GoogleInSpec::BigQuery::Property::DatasetDefaultEncryptionConfiguration.new(obj["defaultEncryptionConfiguration"], to_s)] }, } end @@ -94,7 +94,7 @@ def identifiers combo = item.merge(@params) item_identifiers = {} params.each do |param| - if param == 'name' + if param == "name" item_identifiers[param.to_sym] = item[:dataset_reference].dataset_id else item_identifiers[param.to_sym] = combo[param.to_sym] @@ -108,10 +108,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/bigquery/v2/' + "https://www.googleapis.com/bigquery/v2/" end def resource_base_url - 'projects/{{project}}/datasets' + "projects/{{project}}/datasets" end end diff --git a/generate/libraries/google_bigquery_table.rb b/generate/libraries/google_bigquery_table.rb index 06a0b6452..d20017ac2 100644 --- a/generate/libraries/google_bigquery_table.rb +++ b/generate/libraries/google_bigquery_table.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,28 +13,28 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/bigquery/property/table_encryption_configuration' -require 'google/bigquery/property/table_external_data_configuration' -require 'google/bigquery/property/table_external_data_configuration_bigtable_options' -require 'google/bigquery/property/table_external_data_configuration_bigtable_options_column_families' -require 'google/bigquery/property/table_external_data_configuration_csv_options' -require 'google/bigquery/property/table_external_data_configuration_google_sheets_options' -require 'google/bigquery/property/table_external_data_configuration_schema' -require 'google/bigquery/property/table_external_data_configuration_schema_fields' -require 'google/bigquery/property/table_schema' -require 'google/bigquery/property/table_schema_fields' -require 'google/bigquery/property/table_streaming_buffer' -require 'google/bigquery/property/table_table_reference' -require 'google/bigquery/property/table_time_partitioning' -require 'google/bigquery/property/table_view' -require 'google/bigquery/property/table_view_user_defined_function_resources' +require "gcp_backend" +require "google/bigquery/property/table_encryption_configuration" +require "google/bigquery/property/table_external_data_configuration" +require "google/bigquery/property/table_external_data_configuration_bigtable_options" +require "google/bigquery/property/table_external_data_configuration_bigtable_options_column_families" +require "google/bigquery/property/table_external_data_configuration_csv_options" +require "google/bigquery/property/table_external_data_configuration_google_sheets_options" +require "google/bigquery/property/table_external_data_configuration_schema" +require "google/bigquery/property/table_external_data_configuration_schema_fields" +require "google/bigquery/property/table_schema" +require "google/bigquery/property/table_schema_fields" +require "google/bigquery/property/table_streaming_buffer" +require "google/bigquery/property/table_table_reference" +require "google/bigquery/property/table_time_partitioning" +require "google/bigquery/property/table_view" +require "google/bigquery/property/table_view_user_defined_function_resources" # A provider to manage BigQuery resources. class BigQueryTable < GcpResourceBase - name 'google_bigquery_table' - desc 'Table' - supports platform: 'gcp' + name "google_bigquery_table" + desc "Table" + supports platform: "gcp" attr_reader :params attr_reader :table_reference @@ -64,35 +64,35 @@ class BigQueryTable < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @table_reference = GoogleInSpec::BigQuery::Property::TableTableReference.new(@fetched['tableReference'], to_s) - @clustering = @fetched['clustering'] - @creation_time = @fetched['creationTime'] - @description = @fetched['description'] - @friendly_name = @fetched['friendlyName'] - @id = @fetched['id'] - @labels = @fetched['labels'] - @last_modified_time = @fetched['lastModifiedTime'] - @location = @fetched['location'] - @name = @fetched['name'] - @num_bytes = @fetched['numBytes'] - @num_long_term_bytes = @fetched['numLongTermBytes'] - @num_rows = @fetched['numRows'] - @require_partition_filter = @fetched['requirePartitionFilter'] - @type = @fetched['type'] - @view = GoogleInSpec::BigQuery::Property::TableView.new(@fetched['view'], to_s) - @time_partitioning = GoogleInSpec::BigQuery::Property::TableTimePartitioning.new(@fetched['timePartitioning'], to_s) - @streaming_buffer = GoogleInSpec::BigQuery::Property::TableStreamingBuffer.new(@fetched['streamingBuffer'], to_s) - @schema = GoogleInSpec::BigQuery::Property::TableSchema.new(@fetched['schema'], to_s) - @encryption_configuration = GoogleInSpec::BigQuery::Property::TableEncryptionConfiguration.new(@fetched['encryptionConfiguration'], to_s) - @expiration_time = @fetched['expirationTime'] - @external_data_configuration = GoogleInSpec::BigQuery::Property::TableExternalDataConfiguration.new(@fetched['externalDataConfiguration'], to_s) - @dataset = @fetched['dataset'] + @table_reference = GoogleInSpec::BigQuery::Property::TableTableReference.new(@fetched["tableReference"], to_s) + @clustering = @fetched["clustering"] + @creation_time = @fetched["creationTime"] + @description = @fetched["description"] + @friendly_name = @fetched["friendlyName"] + @id = @fetched["id"] + @labels = @fetched["labels"] + @last_modified_time = @fetched["lastModifiedTime"] + @location = @fetched["location"] + @name = @fetched["name"] + @num_bytes = @fetched["numBytes"] + @num_long_term_bytes = @fetched["numLongTermBytes"] + @num_rows = @fetched["numRows"] + @require_partition_filter = @fetched["requirePartitionFilter"] + @type = @fetched["type"] + @view = GoogleInSpec::BigQuery::Property::TableView.new(@fetched["view"], to_s) + @time_partitioning = GoogleInSpec::BigQuery::Property::TableTimePartitioning.new(@fetched["timePartitioning"], to_s) + @streaming_buffer = GoogleInSpec::BigQuery::Property::TableStreamingBuffer.new(@fetched["streamingBuffer"], to_s) + @schema = GoogleInSpec::BigQuery::Property::TableSchema.new(@fetched["schema"], to_s) + @encryption_configuration = GoogleInSpec::BigQuery::Property::TableEncryptionConfiguration.new(@fetched["encryptionConfiguration"], to_s) + @expiration_time = @fetched["expirationTime"] + @external_data_configuration = GoogleInSpec::BigQuery::Property::TableExternalDataConfiguration.new(@fetched["externalDataConfiguration"], to_s) + @dataset = @fetched["dataset"] end # Handles parsing RFC3339 time string @@ -110,34 +110,34 @@ def to_s def un_parse { - 'table_reference' => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableTableReference.un_parse(x, 'table_reference') }, - 'clustering' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('clustering') { should include #{single.inspect} }" } }, - 'creation_time' => ->(x, _) { x.nil? ? [] : ["its('creation_time') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'friendly_name' => ->(x, _) { x.nil? ? [] : ["its('friendly_name') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'last_modified_time' => ->(x, _) { x.nil? ? [] : ["its('last_modified_time') { should cmp #{x.inspect} }"] }, - 'location' => ->(x, _) { x.nil? ? [] : ["its('location') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'num_bytes' => ->(x, _) { x.nil? ? [] : ["its('num_bytes') { should cmp #{x.inspect} }"] }, - 'num_long_term_bytes' => ->(x, _) { x.nil? ? [] : ["its('num_long_term_bytes') { should cmp #{x.inspect} }"] }, - 'num_rows' => ->(x, _) { x.nil? ? [] : ["its('num_rows') { should cmp #{x.inspect} }"] }, - 'require_partition_filter' => ->(x, _) { x.nil? ? [] : ["its('require_partition_filter') { should cmp #{x.inspect} }"] }, - 'type' => ->(x, _) { x.nil? ? [] : ["its('type') { should cmp #{x.inspect} }"] }, - 'view' => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableView.un_parse(x, 'view') }, - 'time_partitioning' => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableTimePartitioning.un_parse(x, 'time_partitioning') }, - 'streaming_buffer' => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableStreamingBuffer.un_parse(x, 'streaming_buffer') }, - 'schema' => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableSchema.un_parse(x, 'schema') }, - 'encryption_configuration' => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableEncryptionConfiguration.un_parse(x, 'encryption_configuration') }, - 'expiration_time' => ->(x, _) { x.nil? ? [] : ["its('expiration_time') { should cmp #{x.inspect} }"] }, - 'external_data_configuration' => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableExternalDataConfiguration.un_parse(x, 'external_data_configuration') }, - 'dataset' => ->(x, _) { x.nil? ? [] : ["its('dataset') { should cmp #{x.inspect} }"] }, + "table_reference" => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableTableReference.un_parse(x, "table_reference") }, + "clustering" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('clustering') { should include #{single.inspect} }" } }, + "creation_time" => ->(x, _) { x.nil? ? [] : ["its('creation_time') { should cmp #{x.inspect} }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "friendly_name" => ->(x, _) { x.nil? ? [] : ["its('friendly_name') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "labels" => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "last_modified_time" => ->(x, _) { x.nil? ? [] : ["its('last_modified_time') { should cmp #{x.inspect} }"] }, + "location" => ->(x, _) { x.nil? ? [] : ["its('location') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "num_bytes" => ->(x, _) { x.nil? ? [] : ["its('num_bytes') { should cmp #{x.inspect} }"] }, + "num_long_term_bytes" => ->(x, _) { x.nil? ? [] : ["its('num_long_term_bytes') { should cmp #{x.inspect} }"] }, + "num_rows" => ->(x, _) { x.nil? ? [] : ["its('num_rows') { should cmp #{x.inspect} }"] }, + "require_partition_filter" => ->(x, _) { x.nil? ? [] : ["its('require_partition_filter') { should cmp #{x.inspect} }"] }, + "type" => ->(x, _) { x.nil? ? [] : ["its('type') { should cmp #{x.inspect} }"] }, + "view" => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableView.un_parse(x, "view") }, + "time_partitioning" => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableTimePartitioning.un_parse(x, "time_partitioning") }, + "streaming_buffer" => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableStreamingBuffer.un_parse(x, "streaming_buffer") }, + "schema" => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableSchema.un_parse(x, "schema") }, + "encryption_configuration" => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableEncryptionConfiguration.un_parse(x, "encryption_configuration") }, + "expiration_time" => ->(x, _) { x.nil? ? [] : ["its('expiration_time') { should cmp #{x.inspect} }"] }, + "external_data_configuration" => ->(x, _) { x.nil? ? [] : GoogleInSpec::BigQuery::Property::TableExternalDataConfiguration.un_parse(x, "external_data_configuration") }, + "dataset" => ->(x, _) { x.nil? ? [] : ["its('dataset') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Table' + name = "Table" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -146,11 +146,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_bigquery_table', + type: "google_bigquery_table", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -158,10 +158,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/bigquery/v2/' + "https://www.googleapis.com/bigquery/v2/" end def resource_base_url - 'projects/{{project}}/datasets/{{dataset}}/tables/{{name}}' + "projects/{{project}}/datasets/{{dataset}}/tables/{{name}}" end end diff --git a/generate/libraries/google_bigquery_tables.rb b/generate/libraries/google_bigquery_tables.rb index a7f82c74a..5909b3e31 100644 --- a/generate/libraries/google_bigquery_tables.rb +++ b/generate/libraries/google_bigquery_tables.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class BigQueryTables < GcpResourceBase - name 'google_bigquery_tables' - desc 'Table plural resource' - supports platform: 'gcp' + name "google_bigquery_tables" + desc "Table plural resource" + supports platform: "gcp" attr_reader :table @@ -50,12 +50,12 @@ class BigQueryTables < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('tables') + @table = fetch_wrapped_resource("tables") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -83,27 +83,27 @@ def transform(key, value) def transformers { - 'tableReference' => ->(obj) { [:table_reference, GoogleInSpec::BigQuery::Property::TableTableReference.new(obj['tableReference'], to_s)] }, - 'clustering' => ->(obj) { [:clustering, obj['clustering']] }, - 'creationTime' => ->(obj) { [:creation_time, obj['creationTime']] }, - 'friendlyName' => ->(obj) { [:friendly_name, obj['friendlyName']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'lastModifiedTime' => ->(obj) { [:last_modified_time, obj['lastModifiedTime']] }, - 'location' => ->(obj) { [:location, obj['location']] }, - 'numBytes' => ->(obj) { [:num_bytes, obj['numBytes']] }, - 'numLongTermBytes' => ->(obj) { [:num_long_term_bytes, obj['numLongTermBytes']] }, - 'numRows' => ->(obj) { [:num_rows, obj['numRows']] }, - 'requirePartitionFilter' => ->(obj) { [:require_partition_filter, obj['requirePartitionFilter']] }, - 'type' => ->(obj) { [:type, obj['type']] }, - 'view' => ->(obj) { [:view, GoogleInSpec::BigQuery::Property::TableView.new(obj['view'], to_s)] }, - 'timePartitioning' => ->(obj) { [:time_partitioning, GoogleInSpec::BigQuery::Property::TableTimePartitioning.new(obj['timePartitioning'], to_s)] }, - 'streamingBuffer' => ->(obj) { [:streaming_buffer, GoogleInSpec::BigQuery::Property::TableStreamingBuffer.new(obj['streamingBuffer'], to_s)] }, - 'schema' => ->(obj) { [:schema, GoogleInSpec::BigQuery::Property::TableSchema.new(obj['schema'], to_s)] }, - 'encryptionConfiguration' => ->(obj) { [:encryption_configuration, GoogleInSpec::BigQuery::Property::TableEncryptionConfiguration.new(obj['encryptionConfiguration'], to_s)] }, - 'expirationTime' => ->(obj) { [:expiration_time, obj['expirationTime']] }, - 'externalDataConfiguration' => ->(obj) { [:external_data_configuration, GoogleInSpec::BigQuery::Property::TableExternalDataConfiguration.new(obj['externalDataConfiguration'], to_s)] }, - 'dataset' => ->(obj) { [:dataset, obj['dataset']] }, + "tableReference" => ->(obj) { [:table_reference, GoogleInSpec::BigQuery::Property::TableTableReference.new(obj["tableReference"], to_s)] }, + "clustering" => ->(obj) { [:clustering, obj["clustering"]] }, + "creationTime" => ->(obj) { [:creation_time, obj["creationTime"]] }, + "friendlyName" => ->(obj) { [:friendly_name, obj["friendlyName"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "lastModifiedTime" => ->(obj) { [:last_modified_time, obj["lastModifiedTime"]] }, + "location" => ->(obj) { [:location, obj["location"]] }, + "numBytes" => ->(obj) { [:num_bytes, obj["numBytes"]] }, + "numLongTermBytes" => ->(obj) { [:num_long_term_bytes, obj["numLongTermBytes"]] }, + "numRows" => ->(obj) { [:num_rows, obj["numRows"]] }, + "requirePartitionFilter" => ->(obj) { [:require_partition_filter, obj["requirePartitionFilter"]] }, + "type" => ->(obj) { [:type, obj["type"]] }, + "view" => ->(obj) { [:view, GoogleInSpec::BigQuery::Property::TableView.new(obj["view"], to_s)] }, + "timePartitioning" => ->(obj) { [:time_partitioning, GoogleInSpec::BigQuery::Property::TableTimePartitioning.new(obj["timePartitioning"], to_s)] }, + "streamingBuffer" => ->(obj) { [:streaming_buffer, GoogleInSpec::BigQuery::Property::TableStreamingBuffer.new(obj["streamingBuffer"], to_s)] }, + "schema" => ->(obj) { [:schema, GoogleInSpec::BigQuery::Property::TableSchema.new(obj["schema"], to_s)] }, + "encryptionConfiguration" => ->(obj) { [:encryption_configuration, GoogleInSpec::BigQuery::Property::TableEncryptionConfiguration.new(obj["encryptionConfiguration"], to_s)] }, + "expirationTime" => ->(obj) { [:expiration_time, obj["expirationTime"]] }, + "externalDataConfiguration" => ->(obj) { [:external_data_configuration, GoogleInSpec::BigQuery::Property::TableExternalDataConfiguration.new(obj["externalDataConfiguration"], to_s)] }, + "dataset" => ->(obj) { [:dataset, obj["dataset"]] }, } end @@ -120,7 +120,7 @@ def identifiers combo = item.merge(@params) item_identifiers = {} params.each do |param| - if param == 'name' + if param == "name" item_identifiers[param.to_sym] = item[:table_reference].table_id else item_identifiers[param.to_sym] = combo[param.to_sym] @@ -134,10 +134,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/bigquery/v2/' + "https://www.googleapis.com/bigquery/v2/" end def resource_base_url - 'projects/{{project}}/datasets/{{dataset}}/tables' + "projects/{{project}}/datasets/{{dataset}}/tables" end end diff --git a/generate/libraries/google_cloudbuild_trigger.rb b/generate/libraries/google_cloudbuild_trigger.rb index 368586aa9..b619a690e 100644 --- a/generate/libraries/google_cloudbuild_trigger.rb +++ b/generate/libraries/google_cloudbuild_trigger.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/cloudbuild/property/trigger_build' -require 'google/cloudbuild/property/trigger_build_steps' -require 'google/cloudbuild/property/trigger_trigger_template' +require "gcp_backend" +require "google/cloudbuild/property/trigger_build" +require "google/cloudbuild/property/trigger_build_steps" +require "google/cloudbuild/property/trigger_trigger_template" # A provider to manage Cloud Build resources. class CloudBuildTrigger < GcpResourceBase - name 'google_cloudbuild_trigger' - desc 'Trigger' - supports platform: 'gcp' + name "google_cloudbuild_trigger" + desc "Trigger" + supports platform: "gcp" attr_reader :params attr_reader :id @@ -39,22 +39,22 @@ class CloudBuildTrigger < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @id = @fetched['id'] - @description = @fetched['description'] - @disabled = @fetched['disabled'] - @create_time = parse_time_string(@fetched['createTime']) - @substitutions = @fetched['substitutions'] - @filename = @fetched['filename'] - @ignored_files = @fetched['ignoredFiles'] - @included_files = @fetched['includedFiles'] - @trigger_template = GoogleInSpec::CloudBuild::Property::TriggerTriggerTemplate.new(@fetched['triggerTemplate'], to_s) - @build = GoogleInSpec::CloudBuild::Property::TriggerBuild.new(@fetched['build'], to_s) + @id = @fetched["id"] + @description = @fetched["description"] + @disabled = @fetched["disabled"] + @create_time = parse_time_string(@fetched["createTime"]) + @substitutions = @fetched["substitutions"] + @filename = @fetched["filename"] + @ignored_files = @fetched["ignoredFiles"] + @included_files = @fetched["includedFiles"] + @trigger_template = GoogleInSpec::CloudBuild::Property::TriggerTriggerTemplate.new(@fetched["triggerTemplate"], to_s) + @build = GoogleInSpec::CloudBuild::Property::TriggerBuild.new(@fetched["build"], to_s) end # Handles parsing RFC3339 time string @@ -72,21 +72,21 @@ def to_s def un_parse { - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'disabled' => ->(x, _) { x.nil? ? [] : ["its('disabled') { should cmp #{x.inspect} }"] }, - 'create_time' => ->(x, _) { x.nil? ? [] : ["its('create_time.to_s') { should cmp '#{x.inspect}' }"] }, - 'substitutions' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('substitutions') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'filename' => ->(x, _) { x.nil? ? [] : ["its('filename') { should cmp #{x.inspect} }"] }, - 'ignored_files' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('ignored_files') { should include #{single.inspect} }" } }, - 'included_files' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('included_files') { should include #{single.inspect} }" } }, - 'trigger_template' => ->(x, _) { x.nil? ? [] : GoogleInSpec::CloudBuild::Property::TriggerTriggerTemplate.un_parse(x, 'trigger_template') }, - 'build' => ->(x, _) { x.nil? ? [] : GoogleInSpec::CloudBuild::Property::TriggerBuild.un_parse(x, 'build') }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "disabled" => ->(x, _) { x.nil? ? [] : ["its('disabled') { should cmp #{x.inspect} }"] }, + "create_time" => ->(x, _) { x.nil? ? [] : ["its('create_time.to_s') { should cmp '#{x.inspect}' }"] }, + "substitutions" => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('substitutions') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "filename" => ->(x, _) { x.nil? ? [] : ["its('filename') { should cmp #{x.inspect} }"] }, + "ignored_files" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('ignored_files') { should include #{single.inspect} }" } }, + "included_files" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('included_files') { should include #{single.inspect} }" } }, + "trigger_template" => ->(x, _) { x.nil? ? [] : GoogleInSpec::CloudBuild::Property::TriggerTriggerTemplate.un_parse(x, "trigger_template") }, + "build" => ->(x, _) { x.nil? ? [] : GoogleInSpec::CloudBuild::Property::TriggerBuild.un_parse(x, "build") }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Trigger' + name = "Trigger" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -95,11 +95,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_cloudbuild_trigger', + type: "google_cloudbuild_trigger", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -107,10 +107,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://cloudbuild.googleapis.com/v1/' + "https://cloudbuild.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/triggers/{{id}}' + "projects/{{project}}/triggers/{{id}}" end end diff --git a/generate/libraries/google_cloudbuild_triggers.rb b/generate/libraries/google_cloudbuild_triggers.rb index f32b7fa6a..8cf1c2521 100644 --- a/generate/libraries/google_cloudbuild_triggers.rb +++ b/generate/libraries/google_cloudbuild_triggers.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class CloudBuildTriggers < GcpResourceBase - name 'google_cloudbuild_triggers' - desc 'Trigger plural resource' - supports platform: 'gcp' + name "google_cloudbuild_triggers" + desc "Trigger plural resource" + supports platform: "gcp" attr_reader :table @@ -39,12 +39,12 @@ class CloudBuildTriggers < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('triggers') + @table = fetch_wrapped_resource("triggers") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { [:id, obj['id']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'disabled' => ->(obj) { [:disabled, obj['disabled']] }, - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'substitutions' => ->(obj) { [:substitutions, obj['substitutions']] }, - 'filename' => ->(obj) { [:filename, obj['filename']] }, - 'ignoredFiles' => ->(obj) { [:ignored_files, obj['ignoredFiles']] }, - 'includedFiles' => ->(obj) { [:included_files, obj['includedFiles']] }, - 'triggerTemplate' => ->(obj) { [:trigger_template, GoogleInSpec::CloudBuild::Property::TriggerTriggerTemplate.new(obj['triggerTemplate'], to_s)] }, - 'build' => ->(obj) { [:build, GoogleInSpec::CloudBuild::Property::TriggerBuild.new(obj['build'], to_s)] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "disabled" => ->(obj) { [:disabled, obj["disabled"]] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "substitutions" => ->(obj) { [:substitutions, obj["substitutions"]] }, + "filename" => ->(obj) { [:filename, obj["filename"]] }, + "ignoredFiles" => ->(obj) { [:ignored_files, obj["ignoredFiles"]] }, + "includedFiles" => ->(obj) { [:included_files, obj["includedFiles"]] }, + "triggerTemplate" => ->(obj) { [:trigger_template, GoogleInSpec::CloudBuild::Property::TriggerTriggerTemplate.new(obj["triggerTemplate"], to_s)] }, + "build" => ->(obj) { [:build, GoogleInSpec::CloudBuild::Property::TriggerBuild.new(obj["build"], to_s)] }, } end @@ -108,10 +108,10 @@ def identifiers private def product_url - 'https://cloudbuild.googleapis.com/v1/' + "https://cloudbuild.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/triggers' + "projects/{{project}}/triggers" end end diff --git a/generate/libraries/google_cloudfunctions_cloud_function.rb b/generate/libraries/google_cloudfunctions_cloud_function.rb index 3b55f513a..c4c77eeda 100644 --- a/generate/libraries/google_cloudfunctions_cloud_function.rb +++ b/generate/libraries/google_cloudfunctions_cloud_function.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/cloudfunctions/property/cloudfunction_event_trigger' -require 'google/cloudfunctions/property/cloudfunction_https_trigger' -require 'google/cloudfunctions/property/cloudfunction_source_repository' +require "gcp_backend" +require "google/cloudfunctions/property/cloudfunction_event_trigger" +require "google/cloudfunctions/property/cloudfunction_https_trigger" +require "google/cloudfunctions/property/cloudfunction_source_repository" # A provider to manage Cloud Functions resources. class CloudFunctionsCloudFunction < GcpResourceBase - name 'google_cloudfunctions_cloud_function' - desc 'CloudFunction' - supports platform: 'gcp' + name "google_cloudfunctions_cloud_function" + desc "CloudFunction" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -47,30 +47,30 @@ class CloudFunctionsCloudFunction < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @name = @fetched['name'] - @description = @fetched['description'] - @status = @fetched['status'] - @entry_point = @fetched['entryPoint'] - @runtime = @fetched['runtime'] - @timeout = @fetched['timeout'] - @available_memory_mb = @fetched['availableMemoryMb'] - @service_account_email = @fetched['serviceAccountEmail'] - @update_time = @fetched['updateTime'] - @version_id = @fetched['versionId'] - @labels = @fetched['labels'] - @environment_variables = @fetched['environmentVariables'] - @source_archive_url = @fetched['sourceArchiveUrl'] - @source_upload_url = @fetched['sourceUploadUrl'] - @source_repository = GoogleInSpec::CloudFunctions::Property::CloudFunctionSourceRepository.new(@fetched['sourceRepository'], to_s) - @https_trigger = GoogleInSpec::CloudFunctions::Property::CloudFunctionHttpsTrigger.new(@fetched['httpsTrigger'], to_s) - @event_trigger = GoogleInSpec::CloudFunctions::Property::CloudFunctionEventTrigger.new(@fetched['eventTrigger'], to_s) - @location = @fetched['location'] + @name = @fetched["name"] + @description = @fetched["description"] + @status = @fetched["status"] + @entry_point = @fetched["entryPoint"] + @runtime = @fetched["runtime"] + @timeout = @fetched["timeout"] + @available_memory_mb = @fetched["availableMemoryMb"] + @service_account_email = @fetched["serviceAccountEmail"] + @update_time = @fetched["updateTime"] + @version_id = @fetched["versionId"] + @labels = @fetched["labels"] + @environment_variables = @fetched["environmentVariables"] + @source_archive_url = @fetched["sourceArchiveUrl"] + @source_upload_url = @fetched["sourceUploadUrl"] + @source_repository = GoogleInSpec::CloudFunctions::Property::CloudFunctionSourceRepository.new(@fetched["sourceRepository"], to_s) + @https_trigger = GoogleInSpec::CloudFunctions::Property::CloudFunctionHttpsTrigger.new(@fetched["httpsTrigger"], to_s) + @event_trigger = GoogleInSpec::CloudFunctions::Property::CloudFunctionEventTrigger.new(@fetched["eventTrigger"], to_s) + @location = @fetched["location"] end # Handles parsing RFC3339 time string @@ -88,29 +88,29 @@ def to_s def un_parse { - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'status' => ->(x, _) { x.nil? ? [] : ["its('status') { should cmp #{x.inspect} }"] }, - 'entry_point' => ->(x, _) { x.nil? ? [] : ["its('entry_point') { should cmp #{x.inspect} }"] }, - 'runtime' => ->(x, _) { x.nil? ? [] : ["its('runtime') { should cmp #{x.inspect} }"] }, - 'timeout' => ->(x, _) { x.nil? ? [] : ["its('timeout') { should cmp #{x.inspect} }"] }, - 'available_memory_mb' => ->(x, _) { x.nil? ? [] : ["its('available_memory_mb') { should cmp #{x.inspect} }"] }, - 'service_account_email' => ->(x, _) { x.nil? ? [] : ["its('service_account_email') { should cmp #{x.inspect} }"] }, - 'update_time' => ->(x, _) { x.nil? ? [] : ["its('update_time') { should cmp #{x.inspect} }"] }, - 'version_id' => ->(x, _) { x.nil? ? [] : ["its('version_id') { should cmp #{x.inspect} }"] }, - 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'environment_variables' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('environment_variables') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'source_archive_url' => ->(x, _) { x.nil? ? [] : ["its('source_archive_url') { should cmp #{x.inspect} }"] }, - 'source_upload_url' => ->(x, _) { x.nil? ? [] : ["its('source_upload_url') { should cmp #{x.inspect} }"] }, - 'source_repository' => ->(x, _) { x.nil? ? [] : GoogleInSpec::CloudFunctions::Property::CloudFunctionSourceRepository.un_parse(x, 'source_repository') }, - 'https_trigger' => ->(x, _) { x.nil? ? [] : GoogleInSpec::CloudFunctions::Property::CloudFunctionHttpsTrigger.un_parse(x, 'https_trigger') }, - 'event_trigger' => ->(x, _) { x.nil? ? [] : GoogleInSpec::CloudFunctions::Property::CloudFunctionEventTrigger.un_parse(x, 'event_trigger') }, - 'location' => ->(x, _) { x.nil? ? [] : ["its('location') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "status" => ->(x, _) { x.nil? ? [] : ["its('status') { should cmp #{x.inspect} }"] }, + "entry_point" => ->(x, _) { x.nil? ? [] : ["its('entry_point') { should cmp #{x.inspect} }"] }, + "runtime" => ->(x, _) { x.nil? ? [] : ["its('runtime') { should cmp #{x.inspect} }"] }, + "timeout" => ->(x, _) { x.nil? ? [] : ["its('timeout') { should cmp #{x.inspect} }"] }, + "available_memory_mb" => ->(x, _) { x.nil? ? [] : ["its('available_memory_mb') { should cmp #{x.inspect} }"] }, + "service_account_email" => ->(x, _) { x.nil? ? [] : ["its('service_account_email') { should cmp #{x.inspect} }"] }, + "update_time" => ->(x, _) { x.nil? ? [] : ["its('update_time') { should cmp #{x.inspect} }"] }, + "version_id" => ->(x, _) { x.nil? ? [] : ["its('version_id') { should cmp #{x.inspect} }"] }, + "labels" => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "environment_variables" => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('environment_variables') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "source_archive_url" => ->(x, _) { x.nil? ? [] : ["its('source_archive_url') { should cmp #{x.inspect} }"] }, + "source_upload_url" => ->(x, _) { x.nil? ? [] : ["its('source_upload_url') { should cmp #{x.inspect} }"] }, + "source_repository" => ->(x, _) { x.nil? ? [] : GoogleInSpec::CloudFunctions::Property::CloudFunctionSourceRepository.un_parse(x, "source_repository") }, + "https_trigger" => ->(x, _) { x.nil? ? [] : GoogleInSpec::CloudFunctions::Property::CloudFunctionHttpsTrigger.un_parse(x, "https_trigger") }, + "event_trigger" => ->(x, _) { x.nil? ? [] : GoogleInSpec::CloudFunctions::Property::CloudFunctionEventTrigger.un_parse(x, "event_trigger") }, + "location" => ->(x, _) { x.nil? ? [] : ["its('location') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'CloudFunction' + name = "CloudFunction" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -119,11 +119,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_cloudfunctions_cloud_function', + type: "google_cloudfunctions_cloud_function", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -131,10 +131,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://cloudfunctions.googleapis.com/v1/' + "https://cloudfunctions.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/functions/{{name}}' + "projects/{{project}}/locations/{{location}}/functions/{{name}}" end end diff --git a/generate/libraries/google_cloudfunctions_cloud_functions.rb b/generate/libraries/google_cloudfunctions_cloud_functions.rb index a270e3ba9..4558b8078 100644 --- a/generate/libraries/google_cloudfunctions_cloud_functions.rb +++ b/generate/libraries/google_cloudfunctions_cloud_functions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class CloudFunctionsCloudFunctions < GcpResourceBase - name 'google_cloudfunctions_cloud_functions' - desc 'CloudFunction plural resource' - supports platform: 'gcp' + name "google_cloudfunctions_cloud_functions" + desc "CloudFunction plural resource" + supports platform: "gcp" attr_reader :table @@ -47,12 +47,12 @@ class CloudFunctionsCloudFunctions < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('functions') + @table = fetch_wrapped_resource("functions") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -80,24 +80,24 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'status' => ->(obj) { [:status, obj['status']] }, - 'entryPoint' => ->(obj) { [:entry_point, obj['entryPoint']] }, - 'runtime' => ->(obj) { [:runtime, obj['runtime']] }, - 'timeout' => ->(obj) { [:timeout, obj['timeout']] }, - 'availableMemoryMb' => ->(obj) { [:available_memory_mb, obj['availableMemoryMb']] }, - 'serviceAccountEmail' => ->(obj) { [:service_account_email, obj['serviceAccountEmail']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'versionId' => ->(obj) { [:version_id, obj['versionId']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'environmentVariables' => ->(obj) { [:environment_variables, obj['environmentVariables']] }, - 'sourceArchiveUrl' => ->(obj) { [:source_archive_url, obj['sourceArchiveUrl']] }, - 'sourceUploadUrl' => ->(obj) { [:source_upload_url, obj['sourceUploadUrl']] }, - 'sourceRepository' => ->(obj) { [:source_repository, GoogleInSpec::CloudFunctions::Property::CloudFunctionSourceRepository.new(obj['sourceRepository'], to_s)] }, - 'httpsTrigger' => ->(obj) { [:https_trigger, GoogleInSpec::CloudFunctions::Property::CloudFunctionHttpsTrigger.new(obj['httpsTrigger'], to_s)] }, - 'eventTrigger' => ->(obj) { [:event_trigger, GoogleInSpec::CloudFunctions::Property::CloudFunctionEventTrigger.new(obj['eventTrigger'], to_s)] }, - 'location' => ->(obj) { [:location, obj['location']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "status" => ->(obj) { [:status, obj["status"]] }, + "entryPoint" => ->(obj) { [:entry_point, obj["entryPoint"]] }, + "runtime" => ->(obj) { [:runtime, obj["runtime"]] }, + "timeout" => ->(obj) { [:timeout, obj["timeout"]] }, + "availableMemoryMb" => ->(obj) { [:available_memory_mb, obj["availableMemoryMb"]] }, + "serviceAccountEmail" => ->(obj) { [:service_account_email, obj["serviceAccountEmail"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "versionId" => ->(obj) { [:version_id, obj["versionId"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "environmentVariables" => ->(obj) { [:environment_variables, obj["environmentVariables"]] }, + "sourceArchiveUrl" => ->(obj) { [:source_archive_url, obj["sourceArchiveUrl"]] }, + "sourceUploadUrl" => ->(obj) { [:source_upload_url, obj["sourceUploadUrl"]] }, + "sourceRepository" => ->(obj) { [:source_repository, GoogleInSpec::CloudFunctions::Property::CloudFunctionSourceRepository.new(obj["sourceRepository"], to_s)] }, + "httpsTrigger" => ->(obj) { [:https_trigger, GoogleInSpec::CloudFunctions::Property::CloudFunctionHttpsTrigger.new(obj["httpsTrigger"], to_s)] }, + "eventTrigger" => ->(obj) { [:event_trigger, GoogleInSpec::CloudFunctions::Property::CloudFunctionEventTrigger.new(obj["eventTrigger"], to_s)] }, + "location" => ->(obj) { [:location, obj["location"]] }, } end @@ -124,10 +124,10 @@ def identifiers private def product_url - 'https://cloudfunctions.googleapis.com/v1/' + "https://cloudfunctions.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/functions' + "projects/{{project}}/locations/{{location}}/functions" end end diff --git a/generate/libraries/google_compute_address.rb b/generate/libraries/google_compute_address.rb index 8648eee96..d363fa207 100644 --- a/generate/libraries/google_compute_address.rb +++ b/generate/libraries/google_compute_address.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleComputeAddress < GcpResourceBase - name 'google_compute_address' - desc 'Verifies settings for a compute address' + name "google_compute_address" + desc "Verifies settings for a compute address" example " describe google_compute_address(project: 'chef-inspec-gcp', location: 'us-west2', name: 'gcp-inspec-test') do @@ -16,7 +16,7 @@ class GoogleComputeAddress < GcpResourceBase end " - supports platform: 'gcp' + supports platform: "gcp" def initialize(opts = {}) # Call the parent class constructor @@ -43,7 +43,7 @@ def user_count # Return the first user resource base name def user_resource_name - users.first.split('/').last + users.first.split("/").last end def to_s diff --git a/generate/libraries/google_compute_autoscaler.rb b/generate/libraries/google_compute_autoscaler.rb index cf14a3d28..6424dc9c2 100644 --- a/generate/libraries/google_compute_autoscaler.rb +++ b/generate/libraries/google_compute_autoscaler.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,17 +13,17 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/autoscaler_autoscaling_policy' -require 'google/compute/property/autoscaler_autoscaling_policy_cpu_utilization' -require 'google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations' -require 'google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization' +require "gcp_backend" +require "google/compute/property/autoscaler_autoscaling_policy" +require "google/compute/property/autoscaler_autoscaling_policy_cpu_utilization" +require "google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations" +require "google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization" # A provider to manage Compute Engine resources. class ComputeAutoscaler < GcpResourceBase - name 'google_compute_autoscaler' - desc 'Autoscaler' - supports platform: 'gcp' + name "google_compute_autoscaler" + desc "Autoscaler" + supports platform: "gcp" attr_reader :params attr_reader :id @@ -37,19 +37,19 @@ class ComputeAutoscaler < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @id = @fetched['id'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @name = @fetched['name'] - @description = @fetched['description'] - @autoscaling_policy = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicy.new(@fetched['autoscalingPolicy'], to_s) - @target = @fetched['target'] - @zone = @fetched['zone'] + @id = @fetched["id"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @name = @fetched["name"] + @description = @fetched["description"] + @autoscaling_policy = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicy.new(@fetched["autoscalingPolicy"], to_s) + @target = @fetched["target"] + @zone = @fetched["zone"] end # Handles parsing RFC3339 time string @@ -67,18 +67,18 @@ def to_s def un_parse { - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'autoscaling_policy' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicy.un_parse(x, 'autoscaling_policy') }, - 'target' => ->(x, _) { x.nil? ? [] : ["its('target') { should cmp #{x.inspect} }"] }, - 'zone' => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "autoscaling_policy" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicy.un_parse(x, "autoscaling_policy") }, + "target" => ->(x, _) { x.nil? ? [] : ["its('target') { should cmp #{x.inspect} }"] }, + "zone" => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Autoscaler' + name = "Autoscaler" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -87,11 +87,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_autoscaler', + type: "google_compute_autoscaler", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -99,10 +99,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/autoscalers/{{name}}' + "projects/{{project}}/zones/{{zone}}/autoscalers/{{name}}" end end diff --git a/generate/libraries/google_compute_autoscalers.rb b/generate/libraries/google_compute_autoscalers.rb index edbf4160a..a33028012 100644 --- a/generate/libraries/google_compute_autoscalers.rb +++ b/generate/libraries/google_compute_autoscalers.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeAutoscalers < GcpResourceBase - name 'google_compute_autoscalers' - desc 'Autoscaler plural resource' - supports platform: 'gcp' + name "google_compute_autoscalers" + desc "Autoscaler plural resource" + supports platform: "gcp" attr_reader :table @@ -36,12 +36,12 @@ class ComputeAutoscalers < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { [:id, obj['id']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'autoscalingPolicy' => ->(obj) { [:autoscaling_policy, GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicy.new(obj['autoscalingPolicy'], to_s)] }, - 'target' => ->(obj) { [:target, obj['target']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "autoscalingPolicy" => ->(obj) { [:autoscaling_policy, GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicy.new(obj["autoscalingPolicy"], to_s)] }, + "target" => ->(obj) { [:target, obj["target"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, } end @@ -102,10 +102,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/autoscalers' + "projects/{{project}}/zones/{{zone}}/autoscalers" end end diff --git a/generate/libraries/google_compute_backend_bucket.rb b/generate/libraries/google_compute_backend_bucket.rb index bb925ece9..cb0acc62e 100644 --- a/generate/libraries/google_compute_backend_bucket.rb +++ b/generate/libraries/google_compute_backend_bucket.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/backendbucket_cdn_policy' +require "gcp_backend" +require "google/compute/property/backendbucket_cdn_policy" # A provider to manage Compute Engine resources. class ComputeBackendBucket < GcpResourceBase - name 'google_compute_backend_bucket' - desc 'BackendBucket' - supports platform: 'gcp' + name "google_compute_backend_bucket" + desc "BackendBucket" + supports platform: "gcp" attr_reader :params attr_reader :bucket_name @@ -34,19 +34,19 @@ class ComputeBackendBucket < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @bucket_name = @fetched['bucketName'] - @cdn_policy = GoogleInSpec::Compute::Property::BackendBucketCdnPolicy.new(@fetched['cdnPolicy'], to_s) - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @enable_cdn = @fetched['enableCdn'] - @id = @fetched['id'] - @name = @fetched['name'] + @bucket_name = @fetched["bucketName"] + @cdn_policy = GoogleInSpec::Compute::Property::BackendBucketCdnPolicy.new(@fetched["cdnPolicy"], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @enable_cdn = @fetched["enableCdn"] + @id = @fetched["id"] + @name = @fetched["name"] end # Handles parsing RFC3339 time string @@ -64,18 +64,18 @@ def to_s def un_parse { - 'bucket_name' => ->(x, _) { x.nil? ? [] : ["its('bucket_name') { should cmp #{x.inspect} }"] }, - 'cdn_policy' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::BackendBucketCdnPolicy.un_parse(x, 'cdn_policy') }, - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'enable_cdn' => ->(x, _) { x.nil? ? [] : ["its('enable_cdn') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "bucket_name" => ->(x, _) { x.nil? ? [] : ["its('bucket_name') { should cmp #{x.inspect} }"] }, + "cdn_policy" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::BackendBucketCdnPolicy.un_parse(x, "cdn_policy") }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "enable_cdn" => ->(x, _) { x.nil? ? [] : ["its('enable_cdn') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'BackendBucket' + name = "BackendBucket" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -84,11 +84,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_backend_bucket', + type: "google_compute_backend_bucket", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -96,10 +96,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/backendBuckets/{{name}}' + "projects/{{project}}/global/backendBuckets/{{name}}" end end diff --git a/generate/libraries/google_compute_backend_buckets.rb b/generate/libraries/google_compute_backend_buckets.rb index 7a0ac1962..bf8326c42 100644 --- a/generate/libraries/google_compute_backend_buckets.rb +++ b/generate/libraries/google_compute_backend_buckets.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeBackendBuckets < GcpResourceBase - name 'google_compute_backend_buckets' - desc 'BackendBucket plural resource' - supports platform: 'gcp' + name "google_compute_backend_buckets" + desc "BackendBucket plural resource" + supports platform: "gcp" attr_reader :table @@ -36,12 +36,12 @@ class ComputeBackendBuckets < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'bucketName' => ->(obj) { [:bucket_name, obj['bucketName']] }, - 'cdnPolicy' => ->(obj) { [:cdn_policy, GoogleInSpec::Compute::Property::BackendBucketCdnPolicy.new(obj['cdnPolicy'], to_s)] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'enableCdn' => ->(obj) { [:enable_cdn, obj['enableCdn']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, + "bucketName" => ->(obj) { [:bucket_name, obj["bucketName"]] }, + "cdnPolicy" => ->(obj) { [:cdn_policy, GoogleInSpec::Compute::Property::BackendBucketCdnPolicy.new(obj["cdnPolicy"], to_s)] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "enableCdn" => ->(obj) { [:enable_cdn, obj["enableCdn"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, } end @@ -102,10 +102,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/backendBuckets' + "projects/{{project}}/global/backendBuckets" end end diff --git a/generate/libraries/google_compute_backend_service.rb b/generate/libraries/google_compute_backend_service.rb index c8fcd434c..3c4285319 100644 --- a/generate/libraries/google_compute_backend_service.rb +++ b/generate/libraries/google_compute_backend_service.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,18 +13,18 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/backendservice_backends' -require 'google/compute/property/backendservice_cdn_policy' -require 'google/compute/property/backendservice_cdn_policy_cache_key_policy' -require 'google/compute/property/backendservice_connection_draining' -require 'google/compute/property/backendservice_iap' +require "gcp_backend" +require "google/compute/property/backendservice_backends" +require "google/compute/property/backendservice_cdn_policy" +require "google/compute/property/backendservice_cdn_policy_cache_key_policy" +require "google/compute/property/backendservice_connection_draining" +require "google/compute/property/backendservice_iap" # A provider to manage Compute Engine resources. class ComputeBackendService < GcpResourceBase - name 'google_compute_backend_service' - desc 'BackendService' - supports platform: 'gcp' + name "google_compute_backend_service" + desc "BackendService" + supports platform: "gcp" attr_reader :params attr_reader :affinity_cookie_ttl_sec @@ -49,30 +49,30 @@ class ComputeBackendService < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @affinity_cookie_ttl_sec = @fetched['affinityCookieTtlSec'] - @backends = GoogleInSpec::Compute::Property::BackendServiceBackendsArray.parse(@fetched['backends'], to_s) - @cdn_policy = GoogleInSpec::Compute::Property::BackendServiceCdnPolicy.new(@fetched['cdnPolicy'], to_s) - @connection_draining = GoogleInSpec::Compute::Property::BackendServiceConnectionDraining.new(@fetched['connectionDraining'], to_s) - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @fingerprint = @fetched['fingerprint'] - @description = @fetched['description'] - @enable_cdn = @fetched['enableCDN'] - @health_checks = @fetched['healthChecks'] - @id = @fetched['id'] - @iap = GoogleInSpec::Compute::Property::BackendServiceIap.new(@fetched['iap'], to_s) - @load_balancing_scheme = @fetched['loadBalancingScheme'] - @name = @fetched['name'] - @port_name = @fetched['portName'] - @protocol = @fetched['protocol'] - @security_policy = @fetched['securityPolicy'] - @session_affinity = @fetched['sessionAffinity'] - @timeout_sec = @fetched['timeoutSec'] + @affinity_cookie_ttl_sec = @fetched["affinityCookieTtlSec"] + @backends = GoogleInSpec::Compute::Property::BackendServiceBackendsArray.parse(@fetched["backends"], to_s) + @cdn_policy = GoogleInSpec::Compute::Property::BackendServiceCdnPolicy.new(@fetched["cdnPolicy"], to_s) + @connection_draining = GoogleInSpec::Compute::Property::BackendServiceConnectionDraining.new(@fetched["connectionDraining"], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @fingerprint = @fetched["fingerprint"] + @description = @fetched["description"] + @enable_cdn = @fetched["enableCDN"] + @health_checks = @fetched["healthChecks"] + @id = @fetched["id"] + @iap = GoogleInSpec::Compute::Property::BackendServiceIap.new(@fetched["iap"], to_s) + @load_balancing_scheme = @fetched["loadBalancingScheme"] + @name = @fetched["name"] + @port_name = @fetched["portName"] + @protocol = @fetched["protocol"] + @security_policy = @fetched["securityPolicy"] + @session_affinity = @fetched["sessionAffinity"] + @timeout_sec = @fetched["timeoutSec"] end # Handles parsing RFC3339 time string @@ -90,29 +90,29 @@ def to_s def un_parse { - 'affinity_cookie_ttl_sec' => ->(x, _) { x.nil? ? [] : ["its('affinity_cookie_ttl_sec') { should cmp #{x.inspect} }"] }, - 'backends' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('backends') { should include '#{single.to_json}' }" } }, - 'cdn_policy' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::BackendServiceCdnPolicy.un_parse(x, 'cdn_policy') }, - 'connection_draining' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::BackendServiceConnectionDraining.un_parse(x, 'connection_draining') }, - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'fingerprint' => ->(x, _) { x.nil? ? [] : ["its('fingerprint') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'enable_cdn' => ->(x, _) { x.nil? ? [] : ["its('enable_cdn') { should cmp #{x.inspect} }"] }, - 'health_checks' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('health_checks') { should include #{single.inspect} }" } }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'iap' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::BackendServiceIap.un_parse(x, 'iap') }, - 'load_balancing_scheme' => ->(x, _) { x.nil? ? [] : ["its('load_balancing_scheme') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'port_name' => ->(x, _) { x.nil? ? [] : ["its('port_name') { should cmp #{x.inspect} }"] }, - 'protocol' => ->(x, _) { x.nil? ? [] : ["its('protocol') { should cmp #{x.inspect} }"] }, - 'security_policy' => ->(x, _) { x.nil? ? [] : ["its('security_policy') { should cmp #{x.inspect} }"] }, - 'session_affinity' => ->(x, _) { x.nil? ? [] : ["its('session_affinity') { should cmp #{x.inspect} }"] }, - 'timeout_sec' => ->(x, _) { x.nil? ? [] : ["its('timeout_sec') { should cmp #{x.inspect} }"] }, + "affinity_cookie_ttl_sec" => ->(x, _) { x.nil? ? [] : ["its('affinity_cookie_ttl_sec') { should cmp #{x.inspect} }"] }, + "backends" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('backends') { should include '#{single.to_json}' }" } }, + "cdn_policy" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::BackendServiceCdnPolicy.un_parse(x, "cdn_policy") }, + "connection_draining" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::BackendServiceConnectionDraining.un_parse(x, "connection_draining") }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "fingerprint" => ->(x, _) { x.nil? ? [] : ["its('fingerprint') { should cmp #{x.inspect} }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "enable_cdn" => ->(x, _) { x.nil? ? [] : ["its('enable_cdn') { should cmp #{x.inspect} }"] }, + "health_checks" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('health_checks') { should include #{single.inspect} }" } }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "iap" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::BackendServiceIap.un_parse(x, "iap") }, + "load_balancing_scheme" => ->(x, _) { x.nil? ? [] : ["its('load_balancing_scheme') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "port_name" => ->(x, _) { x.nil? ? [] : ["its('port_name') { should cmp #{x.inspect} }"] }, + "protocol" => ->(x, _) { x.nil? ? [] : ["its('protocol') { should cmp #{x.inspect} }"] }, + "security_policy" => ->(x, _) { x.nil? ? [] : ["its('security_policy') { should cmp #{x.inspect} }"] }, + "session_affinity" => ->(x, _) { x.nil? ? [] : ["its('session_affinity') { should cmp #{x.inspect} }"] }, + "timeout_sec" => ->(x, _) { x.nil? ? [] : ["its('timeout_sec') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'BackendService' + name = "BackendService" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -121,11 +121,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_backend_service', + type: "google_compute_backend_service", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -133,10 +133,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/backendServices/{{name}}' + "projects/{{project}}/global/backendServices/{{name}}" end end diff --git a/generate/libraries/google_compute_backend_services.rb b/generate/libraries/google_compute_backend_services.rb index 3082c22cf..fb0122d2d 100644 --- a/generate/libraries/google_compute_backend_services.rb +++ b/generate/libraries/google_compute_backend_services.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeBackendServices < GcpResourceBase - name 'google_compute_backend_services' - desc 'BackendService plural resource' - supports platform: 'gcp' + name "google_compute_backend_services" + desc "BackendService plural resource" + supports platform: "gcp" attr_reader :table @@ -47,12 +47,12 @@ class ComputeBackendServices < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -80,24 +80,24 @@ def transform(key, value) def transformers { - 'affinityCookieTtlSec' => ->(obj) { [:affinity_cookie_ttl_sec, obj['affinityCookieTtlSec']] }, - 'backends' => ->(obj) { [:backends, GoogleInSpec::Compute::Property::BackendServiceBackendsArray.parse(obj['backends'], to_s)] }, - 'cdnPolicy' => ->(obj) { [:cdn_policy, GoogleInSpec::Compute::Property::BackendServiceCdnPolicy.new(obj['cdnPolicy'], to_s)] }, - 'connectionDraining' => ->(obj) { [:connection_draining, GoogleInSpec::Compute::Property::BackendServiceConnectionDraining.new(obj['connectionDraining'], to_s)] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'enableCDN' => ->(obj) { [:enable_cdn, obj['enableCDN']] }, - 'healthChecks' => ->(obj) { [:health_checks, obj['healthChecks']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'iap' => ->(obj) { [:iap, GoogleInSpec::Compute::Property::BackendServiceIap.new(obj['iap'], to_s)] }, - 'loadBalancingScheme' => ->(obj) { [:load_balancing_scheme, obj['loadBalancingScheme']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'portName' => ->(obj) { [:port_name, obj['portName']] }, - 'protocol' => ->(obj) { [:protocol, obj['protocol']] }, - 'securityPolicy' => ->(obj) { [:security_policy, obj['securityPolicy']] }, - 'sessionAffinity' => ->(obj) { [:session_affinity, obj['sessionAffinity']] }, - 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, + "affinityCookieTtlSec" => ->(obj) { [:affinity_cookie_ttl_sec, obj["affinityCookieTtlSec"]] }, + "backends" => ->(obj) { [:backends, GoogleInSpec::Compute::Property::BackendServiceBackendsArray.parse(obj["backends"], to_s)] }, + "cdnPolicy" => ->(obj) { [:cdn_policy, GoogleInSpec::Compute::Property::BackendServiceCdnPolicy.new(obj["cdnPolicy"], to_s)] }, + "connectionDraining" => ->(obj) { [:connection_draining, GoogleInSpec::Compute::Property::BackendServiceConnectionDraining.new(obj["connectionDraining"], to_s)] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "fingerprint" => ->(obj) { [:fingerprint, obj["fingerprint"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "enableCDN" => ->(obj) { [:enable_cdn, obj["enableCDN"]] }, + "healthChecks" => ->(obj) { [:health_checks, obj["healthChecks"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "iap" => ->(obj) { [:iap, GoogleInSpec::Compute::Property::BackendServiceIap.new(obj["iap"], to_s)] }, + "loadBalancingScheme" => ->(obj) { [:load_balancing_scheme, obj["loadBalancingScheme"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "portName" => ->(obj) { [:port_name, obj["portName"]] }, + "protocol" => ->(obj) { [:protocol, obj["protocol"]] }, + "securityPolicy" => ->(obj) { [:security_policy, obj["securityPolicy"]] }, + "sessionAffinity" => ->(obj) { [:session_affinity, obj["sessionAffinity"]] }, + "timeoutSec" => ->(obj) { [:timeout_sec, obj["timeoutSec"]] }, } end @@ -124,10 +124,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/backendServices' + "projects/{{project}}/global/backendServices" end end diff --git a/generate/libraries/google_compute_disk.rb b/generate/libraries/google_compute_disk.rb index ccea867d0..fafd29e3c 100644 --- a/generate/libraries/google_compute_disk.rb +++ b/generate/libraries/google_compute_disk.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/disk_disk_encryption_key' -require 'google/compute/property/disk_source_image_encryption_key' -require 'google/compute/property/disk_source_snapshot_encryption_key' +require "gcp_backend" +require "google/compute/property/disk_disk_encryption_key" +require "google/compute/property/disk_source_image_encryption_key" +require "google/compute/property/disk_source_snapshot_encryption_key" # A provider to manage Compute Engine resources. class ComputeDisk < GcpResourceBase - name 'google_compute_disk' - desc 'Disk' - supports platform: 'gcp' + name "google_compute_disk" + desc "Disk" + supports platform: "gcp" attr_reader :params attr_reader :label_fingerprint @@ -50,33 +50,33 @@ class ComputeDisk < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @label_fingerprint = @fetched['labelFingerprint'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @last_attach_timestamp = parse_time_string(@fetched['lastAttachTimestamp']) - @last_detach_timestamp = parse_time_string(@fetched['lastDetachTimestamp']) - @labels = @fetched['labels'] - @licenses = @fetched['licenses'] - @name = @fetched['name'] - @size_gb = @fetched['sizeGb'] - @users = @fetched['users'] - @physical_block_size_bytes = @fetched['physicalBlockSizeBytes'] - @type = @fetched['type'] - @source_image = @fetched['sourceImage'] - @zone = @fetched['zone'] - @source_image_encryption_key = GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(@fetched['sourceImageEncryptionKey'], to_s) - @source_image_id = @fetched['sourceImageId'] - @disk_encryption_key = GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(@fetched['diskEncryptionKey'], to_s) - @source_snapshot = @fetched['sourceSnapshot'] - @source_snapshot_encryption_key = GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(@fetched['sourceSnapshotEncryptionKey'], to_s) - @source_snapshot_id = @fetched['sourceSnapshotId'] + @label_fingerprint = @fetched["labelFingerprint"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @last_attach_timestamp = parse_time_string(@fetched["lastAttachTimestamp"]) + @last_detach_timestamp = parse_time_string(@fetched["lastDetachTimestamp"]) + @labels = @fetched["labels"] + @licenses = @fetched["licenses"] + @name = @fetched["name"] + @size_gb = @fetched["sizeGb"] + @users = @fetched["users"] + @physical_block_size_bytes = @fetched["physicalBlockSizeBytes"] + @type = @fetched["type"] + @source_image = @fetched["sourceImage"] + @zone = @fetched["zone"] + @source_image_encryption_key = GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(@fetched["sourceImageEncryptionKey"], to_s) + @source_image_id = @fetched["sourceImageId"] + @disk_encryption_key = GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(@fetched["diskEncryptionKey"], to_s) + @source_snapshot = @fetched["sourceSnapshot"] + @source_snapshot_encryption_key = GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(@fetched["sourceSnapshotEncryptionKey"], to_s) + @source_snapshot_id = @fetched["sourceSnapshotId"] end # Handles parsing RFC3339 time string @@ -94,32 +94,32 @@ def to_s def un_parse { - 'label_fingerprint' => ->(x, _) { x.nil? ? [] : ["its('label_fingerprint') { should cmp #{x.inspect} }"] }, - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'last_attach_timestamp' => ->(x, _) { x.nil? ? [] : ["its('last_attach_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'last_detach_timestamp' => ->(x, _) { x.nil? ? [] : ["its('last_detach_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'licenses' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('licenses') { should include #{single.inspect} }" } }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'size_gb' => ->(x, _) { x.nil? ? [] : ["its('size_gb') { should cmp #{x.inspect} }"] }, - 'users' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('users') { should include #{single.inspect} }" } }, - 'physical_block_size_bytes' => ->(x, _) { x.nil? ? [] : ["its('physical_block_size_bytes') { should cmp #{x.inspect} }"] }, - 'type' => ->(x, _) { x.nil? ? [] : ["its('type') { should cmp #{x.inspect} }"] }, - 'source_image' => ->(x, _) { x.nil? ? [] : ["its('source_image') { should cmp #{x.inspect} }"] }, - 'zone' => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, - 'source_image_encryption_key' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.un_parse(x, 'source_image_encryption_key') }, - 'source_image_id' => ->(x, _) { x.nil? ? [] : ["its('source_image_id') { should cmp #{x.inspect} }"] }, - 'disk_encryption_key' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.un_parse(x, 'disk_encryption_key') }, - 'source_snapshot' => ->(x, _) { x.nil? ? [] : ["its('source_snapshot') { should cmp #{x.inspect} }"] }, - 'source_snapshot_encryption_key' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.un_parse(x, 'source_snapshot_encryption_key') }, - 'source_snapshot_id' => ->(x, _) { x.nil? ? [] : ["its('source_snapshot_id') { should cmp #{x.inspect} }"] }, + "label_fingerprint" => ->(x, _) { x.nil? ? [] : ["its('label_fingerprint') { should cmp #{x.inspect} }"] }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "last_attach_timestamp" => ->(x, _) { x.nil? ? [] : ["its('last_attach_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "last_detach_timestamp" => ->(x, _) { x.nil? ? [] : ["its('last_detach_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "labels" => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "licenses" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('licenses') { should include #{single.inspect} }" } }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "size_gb" => ->(x, _) { x.nil? ? [] : ["its('size_gb') { should cmp #{x.inspect} }"] }, + "users" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('users') { should include #{single.inspect} }" } }, + "physical_block_size_bytes" => ->(x, _) { x.nil? ? [] : ["its('physical_block_size_bytes') { should cmp #{x.inspect} }"] }, + "type" => ->(x, _) { x.nil? ? [] : ["its('type') { should cmp #{x.inspect} }"] }, + "source_image" => ->(x, _) { x.nil? ? [] : ["its('source_image') { should cmp #{x.inspect} }"] }, + "zone" => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, + "source_image_encryption_key" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.un_parse(x, "source_image_encryption_key") }, + "source_image_id" => ->(x, _) { x.nil? ? [] : ["its('source_image_id') { should cmp #{x.inspect} }"] }, + "disk_encryption_key" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.un_parse(x, "disk_encryption_key") }, + "source_snapshot" => ->(x, _) { x.nil? ? [] : ["its('source_snapshot') { should cmp #{x.inspect} }"] }, + "source_snapshot_encryption_key" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.un_parse(x, "source_snapshot_encryption_key") }, + "source_snapshot_id" => ->(x, _) { x.nil? ? [] : ["its('source_snapshot_id') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Disk' + name = "Disk" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -128,11 +128,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_disk', + type: "google_compute_disk", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -140,10 +140,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/disks/{{name}}' + "projects/{{project}}/zones/{{zone}}/disks/{{name}}" end end diff --git a/generate/libraries/google_compute_disks.rb b/generate/libraries/google_compute_disks.rb index 4f3515c39..6ab18236a 100644 --- a/generate/libraries/google_compute_disks.rb +++ b/generate/libraries/google_compute_disks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeDisks < GcpResourceBase - name 'google_compute_disks' - desc 'Disk plural resource' - supports platform: 'gcp' + name "google_compute_disks" + desc "Disk plural resource" + supports platform: "gcp" attr_reader :table @@ -50,12 +50,12 @@ class ComputeDisks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -83,27 +83,27 @@ def transform(key, value) def transformers { - 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'lastAttachTimestamp' => ->(obj) { [:last_attach_timestamp, parse_time_string(obj['lastAttachTimestamp'])] }, - 'lastDetachTimestamp' => ->(obj) { [:last_detach_timestamp, parse_time_string(obj['lastDetachTimestamp'])] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'licenses' => ->(obj) { [:licenses, obj['licenses']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'sizeGb' => ->(obj) { [:size_gb, obj['sizeGb']] }, - 'users' => ->(obj) { [:users, obj['users']] }, - 'physicalBlockSizeBytes' => ->(obj) { [:physical_block_size_bytes, obj['physicalBlockSizeBytes']] }, - 'type' => ->(obj) { [:type, obj['type']] }, - 'sourceImage' => ->(obj) { [:source_image, obj['sourceImage']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, - 'sourceImageEncryptionKey' => ->(obj) { [:source_image_encryption_key, GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(obj['sourceImageEncryptionKey'], to_s)] }, - 'sourceImageId' => ->(obj) { [:source_image_id, obj['sourceImageId']] }, - 'diskEncryptionKey' => ->(obj) { [:disk_encryption_key, GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(obj['diskEncryptionKey'], to_s)] }, - 'sourceSnapshot' => ->(obj) { [:source_snapshot, obj['sourceSnapshot']] }, - 'sourceSnapshotEncryptionKey' => ->(obj) { [:source_snapshot_encryption_key, GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(obj['sourceSnapshotEncryptionKey'], to_s)] }, - 'sourceSnapshotId' => ->(obj) { [:source_snapshot_id, obj['sourceSnapshotId']] }, + "labelFingerprint" => ->(obj) { [:label_fingerprint, obj["labelFingerprint"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "lastAttachTimestamp" => ->(obj) { [:last_attach_timestamp, parse_time_string(obj["lastAttachTimestamp"])] }, + "lastDetachTimestamp" => ->(obj) { [:last_detach_timestamp, parse_time_string(obj["lastDetachTimestamp"])] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "licenses" => ->(obj) { [:licenses, obj["licenses"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "sizeGb" => ->(obj) { [:size_gb, obj["sizeGb"]] }, + "users" => ->(obj) { [:users, obj["users"]] }, + "physicalBlockSizeBytes" => ->(obj) { [:physical_block_size_bytes, obj["physicalBlockSizeBytes"]] }, + "type" => ->(obj) { [:type, obj["type"]] }, + "sourceImage" => ->(obj) { [:source_image, obj["sourceImage"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, + "sourceImageEncryptionKey" => ->(obj) { [:source_image_encryption_key, GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(obj["sourceImageEncryptionKey"], to_s)] }, + "sourceImageId" => ->(obj) { [:source_image_id, obj["sourceImageId"]] }, + "diskEncryptionKey" => ->(obj) { [:disk_encryption_key, GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(obj["diskEncryptionKey"], to_s)] }, + "sourceSnapshot" => ->(obj) { [:source_snapshot, obj["sourceSnapshot"]] }, + "sourceSnapshotEncryptionKey" => ->(obj) { [:source_snapshot_encryption_key, GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(obj["sourceSnapshotEncryptionKey"], to_s)] }, + "sourceSnapshotId" => ->(obj) { [:source_snapshot_id, obj["sourceSnapshotId"]] }, } end @@ -130,10 +130,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/disks' + "projects/{{project}}/zones/{{zone}}/disks" end end diff --git a/generate/libraries/google_compute_firewall.rb b/generate/libraries/google_compute_firewall.rb index 59456c3c4..b4b967802 100644 --- a/generate/libraries/google_compute_firewall.rb +++ b/generate/libraries/google_compute_firewall.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/firewall_allowed' -require 'google/compute/property/firewall_denied' +require "gcp_backend" +require "google/compute/property/firewall_allowed" +require "google/compute/property/firewall_denied" # A provider to manage Compute Engine resources. class ComputeFirewall < GcpResourceBase - name 'google_compute_firewall' - desc 'Firewall' - supports platform: 'gcp' + name "google_compute_firewall" + desc "Firewall" + supports platform: "gcp" attr_reader :params attr_reader :allowed @@ -44,28 +44,28 @@ class ComputeFirewall < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @allowed = GoogleInSpec::Compute::Property::FirewallAllowedArray.parse(@fetched['allowed'], to_s) - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @denied = GoogleInSpec::Compute::Property::FirewallDeniedArray.parse(@fetched['denied'], to_s) - @description = @fetched['description'] - @destination_ranges = @fetched['destinationRanges'] - @direction = @fetched['direction'] - @disabled = @fetched['disabled'] - @id = @fetched['id'] - @name = @fetched['name'] - @network = @fetched['network'] - @priority = @fetched['priority'] - @source_ranges = @fetched['sourceRanges'] - @source_service_accounts = @fetched['sourceServiceAccounts'] - @source_tags = @fetched['sourceTags'] - @target_service_accounts = @fetched['targetServiceAccounts'] - @target_tags = @fetched['targetTags'] + @allowed = GoogleInSpec::Compute::Property::FirewallAllowedArray.parse(@fetched["allowed"], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @denied = GoogleInSpec::Compute::Property::FirewallDeniedArray.parse(@fetched["denied"], to_s) + @description = @fetched["description"] + @destination_ranges = @fetched["destinationRanges"] + @direction = @fetched["direction"] + @disabled = @fetched["disabled"] + @id = @fetched["id"] + @name = @fetched["name"] + @network = @fetched["network"] + @priority = @fetched["priority"] + @source_ranges = @fetched["sourceRanges"] + @source_service_accounts = @fetched["sourceServiceAccounts"] + @source_tags = @fetched["sourceTags"] + @target_service_accounts = @fetched["targetServiceAccounts"] + @target_tags = @fetched["targetTags"] end # Handles parsing RFC3339 time string @@ -83,27 +83,27 @@ def to_s def un_parse { - 'allowed' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('allowed') { should include '#{single.to_json}' }" } }, - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'denied' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('denied') { should include '#{single.to_json}' }" } }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'destination_ranges' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('destination_ranges') { should include #{single.inspect} }" } }, - 'direction' => ->(x, _) { x.nil? ? [] : ["its('direction') { should cmp #{x.inspect} }"] }, - 'disabled' => ->(x, _) { x.nil? ? [] : ["its('disabled') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'network' => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, - 'priority' => ->(x, _) { x.nil? ? [] : ["its('priority') { should cmp #{x.inspect} }"] }, - 'source_ranges' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('source_ranges') { should include #{single.inspect} }" } }, - 'source_service_accounts' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('source_service_accounts') { should include #{single.inspect} }" } }, - 'source_tags' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('source_tags') { should include #{single.inspect} }" } }, - 'target_service_accounts' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('target_service_accounts') { should include #{single.inspect} }" } }, - 'target_tags' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('target_tags') { should include #{single.inspect} }" } }, + "allowed" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('allowed') { should include '#{single.to_json}' }" } }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "denied" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('denied') { should include '#{single.to_json}' }" } }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "destination_ranges" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('destination_ranges') { should include #{single.inspect} }" } }, + "direction" => ->(x, _) { x.nil? ? [] : ["its('direction') { should cmp #{x.inspect} }"] }, + "disabled" => ->(x, _) { x.nil? ? [] : ["its('disabled') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "network" => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, + "priority" => ->(x, _) { x.nil? ? [] : ["its('priority') { should cmp #{x.inspect} }"] }, + "source_ranges" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('source_ranges') { should include #{single.inspect} }" } }, + "source_service_accounts" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('source_service_accounts') { should include #{single.inspect} }" } }, + "source_tags" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('source_tags') { should include #{single.inspect} }" } }, + "target_service_accounts" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('target_service_accounts') { should include #{single.inspect} }" } }, + "target_tags" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('target_tags') { should include #{single.inspect} }" } }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Firewall' + name = "Firewall" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -112,11 +112,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_firewall', + type: "google_compute_firewall", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -124,10 +124,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/firewalls/{{name}}' + "projects/{{project}}/global/firewalls/{{name}}" end end diff --git a/generate/libraries/google_compute_firewalls.rb b/generate/libraries/google_compute_firewalls.rb index 4d924c383..ed8b3930d 100644 --- a/generate/libraries/google_compute_firewalls.rb +++ b/generate/libraries/google_compute_firewalls.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeFirewalls < GcpResourceBase - name 'google_compute_firewalls' - desc 'Firewall plural resource' - supports platform: 'gcp' + name "google_compute_firewalls" + desc "Firewall plural resource" + supports platform: "gcp" attr_reader :table @@ -45,12 +45,12 @@ class ComputeFirewalls < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -78,22 +78,22 @@ def transform(key, value) def transformers { - 'allowed' => ->(obj) { [:allowed, GoogleInSpec::Compute::Property::FirewallAllowedArray.parse(obj['allowed'], to_s)] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'denied' => ->(obj) { [:denied, GoogleInSpec::Compute::Property::FirewallDeniedArray.parse(obj['denied'], to_s)] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'destinationRanges' => ->(obj) { [:destination_ranges, obj['destinationRanges']] }, - 'direction' => ->(obj) { [:direction, obj['direction']] }, - 'disabled' => ->(obj) { [:disabled, obj['disabled']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'priority' => ->(obj) { [:priority, obj['priority']] }, - 'sourceRanges' => ->(obj) { [:source_ranges, obj['sourceRanges']] }, - 'sourceServiceAccounts' => ->(obj) { [:source_service_accounts, obj['sourceServiceAccounts']] }, - 'sourceTags' => ->(obj) { [:source_tags, obj['sourceTags']] }, - 'targetServiceAccounts' => ->(obj) { [:target_service_accounts, obj['targetServiceAccounts']] }, - 'targetTags' => ->(obj) { [:target_tags, obj['targetTags']] }, + "allowed" => ->(obj) { [:allowed, GoogleInSpec::Compute::Property::FirewallAllowedArray.parse(obj["allowed"], to_s)] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "denied" => ->(obj) { [:denied, GoogleInSpec::Compute::Property::FirewallDeniedArray.parse(obj["denied"], to_s)] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "destinationRanges" => ->(obj) { [:destination_ranges, obj["destinationRanges"]] }, + "direction" => ->(obj) { [:direction, obj["direction"]] }, + "disabled" => ->(obj) { [:disabled, obj["disabled"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "priority" => ->(obj) { [:priority, obj["priority"]] }, + "sourceRanges" => ->(obj) { [:source_ranges, obj["sourceRanges"]] }, + "sourceServiceAccounts" => ->(obj) { [:source_service_accounts, obj["sourceServiceAccounts"]] }, + "sourceTags" => ->(obj) { [:source_tags, obj["sourceTags"]] }, + "targetServiceAccounts" => ->(obj) { [:target_service_accounts, obj["targetServiceAccounts"]] }, + "targetTags" => ->(obj) { [:target_tags, obj["targetTags"]] }, } end @@ -120,10 +120,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/firewalls' + "projects/{{project}}/global/firewalls" end end diff --git a/generate/libraries/google_compute_forwarding_rule.rb b/generate/libraries/google_compute_forwarding_rule.rb index 08d432f81..660d17ded 100644 --- a/generate/libraries/google_compute_forwarding_rule.rb +++ b/generate/libraries/google_compute_forwarding_rule.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleComputeForwardingRule < GcpResourceBase - name 'google_compute_forwarding_rule' - desc 'Verifies settings for a compute forwarding_rule' + name "google_compute_forwarding_rule" + desc "Verifies settings for a compute forwarding_rule" example " describe google_compute_forwarding_rule(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-forwarding-rule') do diff --git a/generate/libraries/google_compute_forwarding_rules.rb b/generate/libraries/google_compute_forwarding_rules.rb index b1d9cf4db..fe054db85 100644 --- a/generate/libraries/google_compute_forwarding_rules.rb +++ b/generate/libraries/google_compute_forwarding_rules.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleComputeForwardingRules < GcpResourceBase - name 'google_compute_forwarding_rules' - desc 'Verifies settings for GCP compute forwarding_rules in bulk' + name "google_compute_forwarding_rules" + desc "Verifies settings for GCP compute forwarding_rules in bulk" example " describe google_compute_forwarding_rules(project: 'chef-inspec-gcp', region: 'europe-west1') do @@ -39,7 +39,7 @@ def fetch_data end return [] if !@forwarding_rules || !@forwarding_rules.items @forwarding_rules.items.map do |forwarding_rule| - forwarding_rule_network = forwarding_rule.network.split('/').last if !forwarding_rule.network.nil? + forwarding_rule_network = forwarding_rule.network.split("/").last if !forwarding_rule.network.nil? forwarding_rule_rows+=[{ forwarding_rule_id: forwarding_rule.id, forwarding_rule_name: forwarding_rule.name, forwarding_rule_network:, diff --git a/generate/libraries/google_compute_global_address.rb b/generate/libraries/google_compute_global_address.rb index 4af83f3dc..e398ad28a 100644 --- a/generate/libraries/google_compute_global_address.rb +++ b/generate/libraries/google_compute_global_address.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeGlobalAddress < GcpResourceBase - name 'google_compute_global_address' - desc 'GlobalAddress' - supports platform: 'gcp' + name "google_compute_global_address" + desc "GlobalAddress" + supports platform: "gcp" attr_reader :params attr_reader :address @@ -37,23 +37,23 @@ class ComputeGlobalAddress < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @address = @fetched['address'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @ip_version = @fetched['ipVersion'] - @region = @fetched['region'] - @prefix_length = @fetched['prefixLength'] - @address_type = @fetched['addressType'] - @purpose = @fetched['purpose'] - @network = @fetched['network'] + @address = @fetched["address"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @ip_version = @fetched["ipVersion"] + @region = @fetched["region"] + @prefix_length = @fetched["prefixLength"] + @address_type = @fetched["addressType"] + @purpose = @fetched["purpose"] + @network = @fetched["network"] end # Handles parsing RFC3339 time string @@ -71,22 +71,22 @@ def to_s def un_parse { - 'address' => ->(x, _) { x.nil? ? [] : ["its('address') { should cmp #{x.inspect} }"] }, - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'ip_version' => ->(x, _) { x.nil? ? [] : ["its('ip_version') { should cmp #{x.inspect} }"] }, - 'region' => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, - 'prefix_length' => ->(x, _) { x.nil? ? [] : ["its('prefix_length') { should cmp #{x.inspect} }"] }, - 'address_type' => ->(x, _) { x.nil? ? [] : ["its('address_type') { should cmp #{x.inspect} }"] }, - 'purpose' => ->(x, _) { x.nil? ? [] : ["its('purpose') { should cmp #{x.inspect} }"] }, - 'network' => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, + "address" => ->(x, _) { x.nil? ? [] : ["its('address') { should cmp #{x.inspect} }"] }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "ip_version" => ->(x, _) { x.nil? ? [] : ["its('ip_version') { should cmp #{x.inspect} }"] }, + "region" => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, + "prefix_length" => ->(x, _) { x.nil? ? [] : ["its('prefix_length') { should cmp #{x.inspect} }"] }, + "address_type" => ->(x, _) { x.nil? ? [] : ["its('address_type') { should cmp #{x.inspect} }"] }, + "purpose" => ->(x, _) { x.nil? ? [] : ["its('purpose') { should cmp #{x.inspect} }"] }, + "network" => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'GlobalAddress' + name = "GlobalAddress" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -95,11 +95,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_global_address', + type: "google_compute_global_address", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -107,10 +107,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/addresses/{{name}}' + "projects/{{project}}/global/addresses/{{name}}" end end diff --git a/generate/libraries/google_compute_global_addresses.rb b/generate/libraries/google_compute_global_addresses.rb index e85f048bd..93a51d95b 100644 --- a/generate/libraries/google_compute_global_addresses.rb +++ b/generate/libraries/google_compute_global_addresses.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeGlobalAddresss < GcpResourceBase - name 'google_compute_global_addresses' - desc 'GlobalAddress plural resource' - supports platform: 'gcp' + name "google_compute_global_addresses" + desc "GlobalAddress plural resource" + supports platform: "gcp" attr_reader :table @@ -40,12 +40,12 @@ class ComputeGlobalAddresss < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -73,17 +73,17 @@ def transform(key, value) def transformers { - 'address' => ->(obj) { [:address, obj['address']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'ipVersion' => ->(obj) { [:ip_version, obj['ipVersion']] }, - 'region' => ->(obj) { [:region, obj['region']] }, - 'prefixLength' => ->(obj) { [:prefix_length, obj['prefixLength']] }, - 'addressType' => ->(obj) { [:address_type, obj['addressType']] }, - 'purpose' => ->(obj) { [:purpose, obj['purpose']] }, - 'network' => ->(obj) { [:network, obj['network']] }, + "address" => ->(obj) { [:address, obj["address"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "ipVersion" => ->(obj) { [:ip_version, obj["ipVersion"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, + "prefixLength" => ->(obj) { [:prefix_length, obj["prefixLength"]] }, + "addressType" => ->(obj) { [:address_type, obj["addressType"]] }, + "purpose" => ->(obj) { [:purpose, obj["purpose"]] }, + "network" => ->(obj) { [:network, obj["network"]] }, } end @@ -110,10 +110,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/addresses' + "projects/{{project}}/global/addresses" end end diff --git a/generate/libraries/google_compute_global_forwarding_rule.rb b/generate/libraries/google_compute_global_forwarding_rule.rb index 0896d72b0..7fe82b497 100644 --- a/generate/libraries/google_compute_global_forwarding_rule.rb +++ b/generate/libraries/google_compute_global_forwarding_rule.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/globalforwardingrule_metadata_filters' +require "gcp_backend" +require "google/compute/property/globalforwardingrule_metadata_filters" # A provider to manage Compute Engine resources. class ComputeGlobalForwardingRule < GcpResourceBase - name 'google_compute_global_forwarding_rule' - desc 'GlobalForwardingRule' - supports platform: 'gcp' + name "google_compute_global_forwarding_rule" + desc "GlobalForwardingRule" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -39,24 +39,24 @@ class ComputeGlobalForwardingRule < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @ip_address = @fetched['IPAddress'] - @ip_protocol = @fetched['IPProtocol'] - @ip_version = @fetched['ipVersion'] - @load_balancing_scheme = @fetched['loadBalancingScheme'] - @metadata_filters = GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersArray.parse(@fetched['metadataFilters'], to_s) - @name = @fetched['name'] - @network = @fetched['network'] - @port_range = @fetched['portRange'] - @target = @fetched['target'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @ip_address = @fetched["IPAddress"] + @ip_protocol = @fetched["IPProtocol"] + @ip_version = @fetched["ipVersion"] + @load_balancing_scheme = @fetched["loadBalancingScheme"] + @metadata_filters = GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersArray.parse(@fetched["metadataFilters"], to_s) + @name = @fetched["name"] + @network = @fetched["network"] + @port_range = @fetched["portRange"] + @target = @fetched["target"] end # Handles parsing RFC3339 time string @@ -74,23 +74,23 @@ def to_s def un_parse { - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'ip_address' => ->(x, _) { x.nil? ? [] : ["its('ip_address') { should cmp #{x.inspect} }"] }, - 'ip_protocol' => ->(x, _) { x.nil? ? [] : ["its('ip_protocol') { should cmp #{x.inspect} }"] }, - 'ip_version' => ->(x, _) { x.nil? ? [] : ["its('ip_version') { should cmp #{x.inspect} }"] }, - 'load_balancing_scheme' => ->(x, _) { x.nil? ? [] : ["its('load_balancing_scheme') { should cmp #{x.inspect} }"] }, - 'metadata_filters' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('metadata_filters') { should include '#{single.to_json}' }" } }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'network' => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, - 'port_range' => ->(x, _) { x.nil? ? [] : ["its('port_range') { should cmp #{x.inspect} }"] }, - 'target' => ->(x, _) { x.nil? ? [] : ["its('target') { should cmp #{x.inspect} }"] }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "ip_address" => ->(x, _) { x.nil? ? [] : ["its('ip_address') { should cmp #{x.inspect} }"] }, + "ip_protocol" => ->(x, _) { x.nil? ? [] : ["its('ip_protocol') { should cmp #{x.inspect} }"] }, + "ip_version" => ->(x, _) { x.nil? ? [] : ["its('ip_version') { should cmp #{x.inspect} }"] }, + "load_balancing_scheme" => ->(x, _) { x.nil? ? [] : ["its('load_balancing_scheme') { should cmp #{x.inspect} }"] }, + "metadata_filters" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('metadata_filters') { should include '#{single.to_json}' }" } }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "network" => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, + "port_range" => ->(x, _) { x.nil? ? [] : ["its('port_range') { should cmp #{x.inspect} }"] }, + "target" => ->(x, _) { x.nil? ? [] : ["its('target') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'GlobalForwardingRule' + name = "GlobalForwardingRule" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -99,11 +99,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_global_forwarding_rule', + type: "google_compute_global_forwarding_rule", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -111,10 +111,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/forwardingRules/{{name}}' + "projects/{{project}}/global/forwardingRules/{{name}}" end end diff --git a/generate/libraries/google_compute_global_forwarding_rules.rb b/generate/libraries/google_compute_global_forwarding_rules.rb index 08cb63e8e..c09ef7632 100644 --- a/generate/libraries/google_compute_global_forwarding_rules.rb +++ b/generate/libraries/google_compute_global_forwarding_rules.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeGlobalForwardingRules < GcpResourceBase - name 'google_compute_global_forwarding_rules' - desc 'GlobalForwardingRule plural resource' - supports platform: 'gcp' + name "google_compute_global_forwarding_rules" + desc "GlobalForwardingRule plural resource" + supports platform: "gcp" attr_reader :table @@ -41,12 +41,12 @@ class ComputeGlobalForwardingRules < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -74,18 +74,18 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'IPAddress' => ->(obj) { [:ip_address, obj['IPAddress']] }, - 'IPProtocol' => ->(obj) { [:ip_protocol, obj['IPProtocol']] }, - 'ipVersion' => ->(obj) { [:ip_version, obj['ipVersion']] }, - 'loadBalancingScheme' => ->(obj) { [:load_balancing_scheme, obj['loadBalancingScheme']] }, - 'metadataFilters' => ->(obj) { [:metadata_filters, GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersArray.parse(obj['metadataFilters'], to_s)] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'portRange' => ->(obj) { [:port_range, obj['portRange']] }, - 'target' => ->(obj) { [:target, obj['target']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "IPAddress" => ->(obj) { [:ip_address, obj["IPAddress"]] }, + "IPProtocol" => ->(obj) { [:ip_protocol, obj["IPProtocol"]] }, + "ipVersion" => ->(obj) { [:ip_version, obj["ipVersion"]] }, + "loadBalancingScheme" => ->(obj) { [:load_balancing_scheme, obj["loadBalancingScheme"]] }, + "metadataFilters" => ->(obj) { [:metadata_filters, GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersArray.parse(obj["metadataFilters"], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "portRange" => ->(obj) { [:port_range, obj["portRange"]] }, + "target" => ->(obj) { [:target, obj["target"]] }, } end @@ -112,10 +112,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/forwardingRules' + "projects/{{project}}/global/forwardingRules" end end diff --git a/generate/libraries/google_compute_health_check.rb b/generate/libraries/google_compute_health_check.rb index acf4a3a87..2dcededa1 100644 --- a/generate/libraries/google_compute_health_check.rb +++ b/generate/libraries/google_compute_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,18 +13,18 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/healthcheck_http2_health_check' -require 'google/compute/property/healthcheck_http_health_check' -require 'google/compute/property/healthcheck_https_health_check' -require 'google/compute/property/healthcheck_ssl_health_check' -require 'google/compute/property/healthcheck_tcp_health_check' +require "gcp_backend" +require "google/compute/property/healthcheck_http2_health_check" +require "google/compute/property/healthcheck_http_health_check" +require "google/compute/property/healthcheck_https_health_check" +require "google/compute/property/healthcheck_ssl_health_check" +require "google/compute/property/healthcheck_tcp_health_check" # A provider to manage Compute Engine resources. class ComputeHealthCheck < GcpResourceBase - name 'google_compute_health_check' - desc 'HealthCheck' - supports platform: 'gcp' + name "google_compute_health_check" + desc "HealthCheck" + supports platform: "gcp" attr_reader :params attr_reader :check_interval_sec @@ -45,26 +45,26 @@ class ComputeHealthCheck < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @check_interval_sec = @fetched['checkIntervalSec'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @healthy_threshold = @fetched['healthyThreshold'] - @id = @fetched['id'] - @name = @fetched['name'] - @timeout_sec = @fetched['timeoutSec'] - @unhealthy_threshold = @fetched['unhealthyThreshold'] - @type = @fetched['type'] - @http_health_check = GoogleInSpec::Compute::Property::HealthCheckHttpHealthCheck.new(@fetched['httpHealthCheck'], to_s) - @https_health_check = GoogleInSpec::Compute::Property::HealthCheckHttpsHealthCheck.new(@fetched['httpsHealthCheck'], to_s) - @tcp_health_check = GoogleInSpec::Compute::Property::HealthCheckTcpHealthCheck.new(@fetched['tcpHealthCheck'], to_s) - @ssl_health_check = GoogleInSpec::Compute::Property::HealthCheckSslHealthCheck.new(@fetched['sslHealthCheck'], to_s) - @http2_health_check = GoogleInSpec::Compute::Property::HealthCheckHttp2HealthCheck.new(@fetched['http2HealthCheck'], to_s) + @check_interval_sec = @fetched["checkIntervalSec"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @healthy_threshold = @fetched["healthyThreshold"] + @id = @fetched["id"] + @name = @fetched["name"] + @timeout_sec = @fetched["timeoutSec"] + @unhealthy_threshold = @fetched["unhealthyThreshold"] + @type = @fetched["type"] + @http_health_check = GoogleInSpec::Compute::Property::HealthCheckHttpHealthCheck.new(@fetched["httpHealthCheck"], to_s) + @https_health_check = GoogleInSpec::Compute::Property::HealthCheckHttpsHealthCheck.new(@fetched["httpsHealthCheck"], to_s) + @tcp_health_check = GoogleInSpec::Compute::Property::HealthCheckTcpHealthCheck.new(@fetched["tcpHealthCheck"], to_s) + @ssl_health_check = GoogleInSpec::Compute::Property::HealthCheckSslHealthCheck.new(@fetched["sslHealthCheck"], to_s) + @http2_health_check = GoogleInSpec::Compute::Property::HealthCheckHttp2HealthCheck.new(@fetched["http2HealthCheck"], to_s) end # Handles parsing RFC3339 time string @@ -82,25 +82,25 @@ def to_s def un_parse { - 'check_interval_sec' => ->(x, _) { x.nil? ? [] : ["its('check_interval_sec') { should cmp #{x.inspect} }"] }, - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'healthy_threshold' => ->(x, _) { x.nil? ? [] : ["its('healthy_threshold') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'timeout_sec' => ->(x, _) { x.nil? ? [] : ["its('timeout_sec') { should cmp #{x.inspect} }"] }, - 'unhealthy_threshold' => ->(x, _) { x.nil? ? [] : ["its('unhealthy_threshold') { should cmp #{x.inspect} }"] }, - 'type' => ->(x, _) { x.nil? ? [] : ["its('type') { should cmp #{x.inspect} }"] }, - 'http_health_check' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::HealthCheckHttpHealthCheck.un_parse(x, 'http_health_check') }, - 'https_health_check' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::HealthCheckHttpsHealthCheck.un_parse(x, 'https_health_check') }, - 'tcp_health_check' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::HealthCheckTcpHealthCheck.un_parse(x, 'tcp_health_check') }, - 'ssl_health_check' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::HealthCheckSslHealthCheck.un_parse(x, 'ssl_health_check') }, - 'http2_health_check' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::HealthCheckHttp2HealthCheck.un_parse(x, 'http2_health_check') }, + "check_interval_sec" => ->(x, _) { x.nil? ? [] : ["its('check_interval_sec') { should cmp #{x.inspect} }"] }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "healthy_threshold" => ->(x, _) { x.nil? ? [] : ["its('healthy_threshold') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "timeout_sec" => ->(x, _) { x.nil? ? [] : ["its('timeout_sec') { should cmp #{x.inspect} }"] }, + "unhealthy_threshold" => ->(x, _) { x.nil? ? [] : ["its('unhealthy_threshold') { should cmp #{x.inspect} }"] }, + "type" => ->(x, _) { x.nil? ? [] : ["its('type') { should cmp #{x.inspect} }"] }, + "http_health_check" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::HealthCheckHttpHealthCheck.un_parse(x, "http_health_check") }, + "https_health_check" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::HealthCheckHttpsHealthCheck.un_parse(x, "https_health_check") }, + "tcp_health_check" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::HealthCheckTcpHealthCheck.un_parse(x, "tcp_health_check") }, + "ssl_health_check" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::HealthCheckSslHealthCheck.un_parse(x, "ssl_health_check") }, + "http2_health_check" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::HealthCheckHttp2HealthCheck.un_parse(x, "http2_health_check") }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'HealthCheck' + name = "HealthCheck" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -109,11 +109,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_health_check', + type: "google_compute_health_check", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -121,10 +121,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/healthChecks/{{name}}' + "projects/{{project}}/global/healthChecks/{{name}}" end end diff --git a/generate/libraries/google_compute_health_checks.rb b/generate/libraries/google_compute_health_checks.rb index 8bc92e779..01a658bda 100644 --- a/generate/libraries/google_compute_health_checks.rb +++ b/generate/libraries/google_compute_health_checks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeHealthChecks < GcpResourceBase - name 'google_compute_health_checks' - desc 'HealthCheck plural resource' - supports platform: 'gcp' + name "google_compute_health_checks" + desc "HealthCheck plural resource" + supports platform: "gcp" attr_reader :table @@ -43,12 +43,12 @@ class ComputeHealthChecks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -76,20 +76,20 @@ def transform(key, value) def transformers { - 'checkIntervalSec' => ->(obj) { [:check_interval_sec, obj['checkIntervalSec']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'healthyThreshold' => ->(obj) { [:healthy_threshold, obj['healthyThreshold']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, - 'unhealthyThreshold' => ->(obj) { [:unhealthy_threshold, obj['unhealthyThreshold']] }, - 'type' => ->(obj) { [:type, obj['type']] }, - 'httpHealthCheck' => ->(obj) { [:http_health_check, GoogleInSpec::Compute::Property::HealthCheckHttpHealthCheck.new(obj['httpHealthCheck'], to_s)] }, - 'httpsHealthCheck' => ->(obj) { [:https_health_check, GoogleInSpec::Compute::Property::HealthCheckHttpsHealthCheck.new(obj['httpsHealthCheck'], to_s)] }, - 'tcpHealthCheck' => ->(obj) { [:tcp_health_check, GoogleInSpec::Compute::Property::HealthCheckTcpHealthCheck.new(obj['tcpHealthCheck'], to_s)] }, - 'sslHealthCheck' => ->(obj) { [:ssl_health_check, GoogleInSpec::Compute::Property::HealthCheckSslHealthCheck.new(obj['sslHealthCheck'], to_s)] }, - 'http2HealthCheck' => ->(obj) { [:http2_health_check, GoogleInSpec::Compute::Property::HealthCheckHttp2HealthCheck.new(obj['http2HealthCheck'], to_s)] }, + "checkIntervalSec" => ->(obj) { [:check_interval_sec, obj["checkIntervalSec"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "healthyThreshold" => ->(obj) { [:healthy_threshold, obj["healthyThreshold"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "timeoutSec" => ->(obj) { [:timeout_sec, obj["timeoutSec"]] }, + "unhealthyThreshold" => ->(obj) { [:unhealthy_threshold, obj["unhealthyThreshold"]] }, + "type" => ->(obj) { [:type, obj["type"]] }, + "httpHealthCheck" => ->(obj) { [:http_health_check, GoogleInSpec::Compute::Property::HealthCheckHttpHealthCheck.new(obj["httpHealthCheck"], to_s)] }, + "httpsHealthCheck" => ->(obj) { [:https_health_check, GoogleInSpec::Compute::Property::HealthCheckHttpsHealthCheck.new(obj["httpsHealthCheck"], to_s)] }, + "tcpHealthCheck" => ->(obj) { [:tcp_health_check, GoogleInSpec::Compute::Property::HealthCheckTcpHealthCheck.new(obj["tcpHealthCheck"], to_s)] }, + "sslHealthCheck" => ->(obj) { [:ssl_health_check, GoogleInSpec::Compute::Property::HealthCheckSslHealthCheck.new(obj["sslHealthCheck"], to_s)] }, + "http2HealthCheck" => ->(obj) { [:http2_health_check, GoogleInSpec::Compute::Property::HealthCheckHttp2HealthCheck.new(obj["http2HealthCheck"], to_s)] }, } end @@ -116,10 +116,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/healthChecks' + "projects/{{project}}/global/healthChecks" end end diff --git a/generate/libraries/google_compute_http_health_check.rb b/generate/libraries/google_compute_http_health_check.rb index c8e48dd98..4b9514fbd 100644 --- a/generate/libraries/google_compute_http_health_check.rb +++ b/generate/libraries/google_compute_http_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeHttpHealthCheck < GcpResourceBase - name 'google_compute_http_health_check' - desc 'HttpHealthCheck' - supports platform: 'gcp' + name "google_compute_http_health_check" + desc "HttpHealthCheck" + supports platform: "gcp" attr_reader :params attr_reader :check_interval_sec @@ -37,23 +37,23 @@ class ComputeHttpHealthCheck < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @check_interval_sec = @fetched['checkIntervalSec'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @healthy_threshold = @fetched['healthyThreshold'] - @host = @fetched['host'] - @id = @fetched['id'] - @name = @fetched['name'] - @port = @fetched['port'] - @request_path = @fetched['requestPath'] - @timeout_sec = @fetched['timeoutSec'] - @unhealthy_threshold = @fetched['unhealthyThreshold'] + @check_interval_sec = @fetched["checkIntervalSec"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @healthy_threshold = @fetched["healthyThreshold"] + @host = @fetched["host"] + @id = @fetched["id"] + @name = @fetched["name"] + @port = @fetched["port"] + @request_path = @fetched["requestPath"] + @timeout_sec = @fetched["timeoutSec"] + @unhealthy_threshold = @fetched["unhealthyThreshold"] end # Handles parsing RFC3339 time string @@ -71,22 +71,22 @@ def to_s def un_parse { - 'check_interval_sec' => ->(x, _) { x.nil? ? [] : ["its('check_interval_sec') { should cmp #{x.inspect} }"] }, - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'healthy_threshold' => ->(x, _) { x.nil? ? [] : ["its('healthy_threshold') { should cmp #{x.inspect} }"] }, - 'host' => ->(x, _) { x.nil? ? [] : ["its('host') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'port' => ->(x, _) { x.nil? ? [] : ["its('port') { should cmp #{x.inspect} }"] }, - 'request_path' => ->(x, _) { x.nil? ? [] : ["its('request_path') { should cmp #{x.inspect} }"] }, - 'timeout_sec' => ->(x, _) { x.nil? ? [] : ["its('timeout_sec') { should cmp #{x.inspect} }"] }, - 'unhealthy_threshold' => ->(x, _) { x.nil? ? [] : ["its('unhealthy_threshold') { should cmp #{x.inspect} }"] }, + "check_interval_sec" => ->(x, _) { x.nil? ? [] : ["its('check_interval_sec') { should cmp #{x.inspect} }"] }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "healthy_threshold" => ->(x, _) { x.nil? ? [] : ["its('healthy_threshold') { should cmp #{x.inspect} }"] }, + "host" => ->(x, _) { x.nil? ? [] : ["its('host') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "port" => ->(x, _) { x.nil? ? [] : ["its('port') { should cmp #{x.inspect} }"] }, + "request_path" => ->(x, _) { x.nil? ? [] : ["its('request_path') { should cmp #{x.inspect} }"] }, + "timeout_sec" => ->(x, _) { x.nil? ? [] : ["its('timeout_sec') { should cmp #{x.inspect} }"] }, + "unhealthy_threshold" => ->(x, _) { x.nil? ? [] : ["its('unhealthy_threshold') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'HttpHealthCheck' + name = "HttpHealthCheck" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -95,11 +95,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_http_health_check', + type: "google_compute_http_health_check", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -107,10 +107,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/httpHealthChecks/{{name}}' + "projects/{{project}}/global/httpHealthChecks/{{name}}" end end diff --git a/generate/libraries/google_compute_http_health_checks.rb b/generate/libraries/google_compute_http_health_checks.rb index 87e30bdf1..c359d1ff3 100644 --- a/generate/libraries/google_compute_http_health_checks.rb +++ b/generate/libraries/google_compute_http_health_checks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeHttpHealthChecks < GcpResourceBase - name 'google_compute_http_health_checks' - desc 'HttpHealthCheck plural resource' - supports platform: 'gcp' + name "google_compute_http_health_checks" + desc "HttpHealthCheck plural resource" + supports platform: "gcp" attr_reader :table @@ -40,12 +40,12 @@ class ComputeHttpHealthChecks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -73,17 +73,17 @@ def transform(key, value) def transformers { - 'checkIntervalSec' => ->(obj) { [:check_interval_sec, obj['checkIntervalSec']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'healthyThreshold' => ->(obj) { [:healthy_threshold, obj['healthyThreshold']] }, - 'host' => ->(obj) { [:host, obj['host']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'port' => ->(obj) { [:port, obj['port']] }, - 'requestPath' => ->(obj) { [:request_path, obj['requestPath']] }, - 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, - 'unhealthyThreshold' => ->(obj) { [:unhealthy_threshold, obj['unhealthyThreshold']] }, + "checkIntervalSec" => ->(obj) { [:check_interval_sec, obj["checkIntervalSec"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "healthyThreshold" => ->(obj) { [:healthy_threshold, obj["healthyThreshold"]] }, + "host" => ->(obj) { [:host, obj["host"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "port" => ->(obj) { [:port, obj["port"]] }, + "requestPath" => ->(obj) { [:request_path, obj["requestPath"]] }, + "timeoutSec" => ->(obj) { [:timeout_sec, obj["timeoutSec"]] }, + "unhealthyThreshold" => ->(obj) { [:unhealthy_threshold, obj["unhealthyThreshold"]] }, } end @@ -110,10 +110,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/httpHealthChecks' + "projects/{{project}}/global/httpHealthChecks" end end diff --git a/generate/libraries/google_compute_https_health_check.rb b/generate/libraries/google_compute_https_health_check.rb index 5e7505d55..fae1c659b 100644 --- a/generate/libraries/google_compute_https_health_check.rb +++ b/generate/libraries/google_compute_https_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeHttpsHealthCheck < GcpResourceBase - name 'google_compute_https_health_check' - desc 'HttpsHealthCheck' - supports platform: 'gcp' + name "google_compute_https_health_check" + desc "HttpsHealthCheck" + supports platform: "gcp" attr_reader :params attr_reader :check_interval_sec @@ -37,23 +37,23 @@ class ComputeHttpsHealthCheck < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @check_interval_sec = @fetched['checkIntervalSec'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @healthy_threshold = @fetched['healthyThreshold'] - @host = @fetched['host'] - @id = @fetched['id'] - @name = @fetched['name'] - @port = @fetched['port'] - @request_path = @fetched['requestPath'] - @timeout_sec = @fetched['timeoutSec'] - @unhealthy_threshold = @fetched['unhealthyThreshold'] + @check_interval_sec = @fetched["checkIntervalSec"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @healthy_threshold = @fetched["healthyThreshold"] + @host = @fetched["host"] + @id = @fetched["id"] + @name = @fetched["name"] + @port = @fetched["port"] + @request_path = @fetched["requestPath"] + @timeout_sec = @fetched["timeoutSec"] + @unhealthy_threshold = @fetched["unhealthyThreshold"] end # Handles parsing RFC3339 time string @@ -71,22 +71,22 @@ def to_s def un_parse { - 'check_interval_sec' => ->(x, _) { x.nil? ? [] : ["its('check_interval_sec') { should cmp #{x.inspect} }"] }, - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'healthy_threshold' => ->(x, _) { x.nil? ? [] : ["its('healthy_threshold') { should cmp #{x.inspect} }"] }, - 'host' => ->(x, _) { x.nil? ? [] : ["its('host') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'port' => ->(x, _) { x.nil? ? [] : ["its('port') { should cmp #{x.inspect} }"] }, - 'request_path' => ->(x, _) { x.nil? ? [] : ["its('request_path') { should cmp #{x.inspect} }"] }, - 'timeout_sec' => ->(x, _) { x.nil? ? [] : ["its('timeout_sec') { should cmp #{x.inspect} }"] }, - 'unhealthy_threshold' => ->(x, _) { x.nil? ? [] : ["its('unhealthy_threshold') { should cmp #{x.inspect} }"] }, + "check_interval_sec" => ->(x, _) { x.nil? ? [] : ["its('check_interval_sec') { should cmp #{x.inspect} }"] }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "healthy_threshold" => ->(x, _) { x.nil? ? [] : ["its('healthy_threshold') { should cmp #{x.inspect} }"] }, + "host" => ->(x, _) { x.nil? ? [] : ["its('host') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "port" => ->(x, _) { x.nil? ? [] : ["its('port') { should cmp #{x.inspect} }"] }, + "request_path" => ->(x, _) { x.nil? ? [] : ["its('request_path') { should cmp #{x.inspect} }"] }, + "timeout_sec" => ->(x, _) { x.nil? ? [] : ["its('timeout_sec') { should cmp #{x.inspect} }"] }, + "unhealthy_threshold" => ->(x, _) { x.nil? ? [] : ["its('unhealthy_threshold') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'HttpsHealthCheck' + name = "HttpsHealthCheck" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -95,11 +95,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_https_health_check', + type: "google_compute_https_health_check", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -107,10 +107,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/httpsHealthChecks/{{name}}' + "projects/{{project}}/global/httpsHealthChecks/{{name}}" end end diff --git a/generate/libraries/google_compute_https_health_checks.rb b/generate/libraries/google_compute_https_health_checks.rb index 1b262e6db..e2cf7194e 100644 --- a/generate/libraries/google_compute_https_health_checks.rb +++ b/generate/libraries/google_compute_https_health_checks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeHttpsHealthChecks < GcpResourceBase - name 'google_compute_https_health_checks' - desc 'HttpsHealthCheck plural resource' - supports platform: 'gcp' + name "google_compute_https_health_checks" + desc "HttpsHealthCheck plural resource" + supports platform: "gcp" attr_reader :table @@ -40,12 +40,12 @@ class ComputeHttpsHealthChecks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -73,17 +73,17 @@ def transform(key, value) def transformers { - 'checkIntervalSec' => ->(obj) { [:check_interval_sec, obj['checkIntervalSec']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'healthyThreshold' => ->(obj) { [:healthy_threshold, obj['healthyThreshold']] }, - 'host' => ->(obj) { [:host, obj['host']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'port' => ->(obj) { [:port, obj['port']] }, - 'requestPath' => ->(obj) { [:request_path, obj['requestPath']] }, - 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, - 'unhealthyThreshold' => ->(obj) { [:unhealthy_threshold, obj['unhealthyThreshold']] }, + "checkIntervalSec" => ->(obj) { [:check_interval_sec, obj["checkIntervalSec"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "healthyThreshold" => ->(obj) { [:healthy_threshold, obj["healthyThreshold"]] }, + "host" => ->(obj) { [:host, obj["host"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "port" => ->(obj) { [:port, obj["port"]] }, + "requestPath" => ->(obj) { [:request_path, obj["requestPath"]] }, + "timeoutSec" => ->(obj) { [:timeout_sec, obj["timeoutSec"]] }, + "unhealthyThreshold" => ->(obj) { [:unhealthy_threshold, obj["unhealthyThreshold"]] }, } end @@ -110,10 +110,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/httpsHealthChecks' + "projects/{{project}}/global/httpsHealthChecks" end end diff --git a/generate/libraries/google_compute_image.rb b/generate/libraries/google_compute_image.rb index 06c6e9bdb..a5c739980 100644 --- a/generate/libraries/google_compute_image.rb +++ b/generate/libraries/google_compute_image.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleComputeImage < GcpResourceBase - name 'google_compute_image' - desc 'Verifies settings for an image' + name "google_compute_image" + desc "Verifies settings for an image" example " describe google_compute_image(project: 'chef-inspec-gcp', name: 'image-1') do diff --git a/generate/libraries/google_compute_instance.rb b/generate/libraries/google_compute_instance.rb index c0cd53cc7..a646acfb6 100644 --- a/generate/libraries/google_compute_instance.rb +++ b/generate/libraries/google_compute_instance.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,20 +13,20 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/instance_disks' -require 'google/compute/property/instance_guest_accelerators' -require 'google/compute/property/instance_network_interfaces' -require 'google/compute/property/instance_scheduling' -require 'google/compute/property/instance_service_accounts' -require 'google/compute/property/instance_shielded_instance_config' -require 'google/compute/property/instance_tags' +require "gcp_backend" +require "google/compute/property/instance_disks" +require "google/compute/property/instance_guest_accelerators" +require "google/compute/property/instance_network_interfaces" +require "google/compute/property/instance_scheduling" +require "google/compute/property/instance_service_accounts" +require "google/compute/property/instance_shielded_instance_config" +require "google/compute/property/instance_tags" # A provider to manage Compute Engine resources. class ComputeInstance < GcpResourceBase - name 'google_compute_instance' - desc 'Instance' - supports platform: 'gcp' + name "google_compute_instance" + desc "Instance" + supports platform: "gcp" attr_reader :params attr_reader :can_ip_forward @@ -55,34 +55,34 @@ class ComputeInstance < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @can_ip_forward = @fetched['canIpForward'] - @cpu_platform = @fetched['cpuPlatform'] - @creation_timestamp = @fetched['creationTimestamp'] - @deletion_protection = @fetched['deletionProtection'] - @disks = GoogleInSpec::Compute::Property::InstanceDisksArray.parse(@fetched['disks'], to_s) - @guest_accelerators = GoogleInSpec::Compute::Property::InstanceGuestAcceleratorsArray.parse(@fetched['guestAccelerators'], to_s) - @hostname = @fetched['hostname'] - @id = @fetched['id'] - @label_fingerprint = @fetched['labelFingerprint'] - @labels = @fetched['labels'] - @metadata = @fetched['metadata'] - @machine_type = @fetched['machineType'] - @min_cpu_platform = @fetched['minCpuPlatform'] - @name = @fetched['name'] - @network_interfaces = GoogleInSpec::Compute::Property::InstanceNetworkInterfacesArray.parse(@fetched['networkInterfaces'], to_s) - @scheduling = GoogleInSpec::Compute::Property::InstanceScheduling.new(@fetched['scheduling'], to_s) - @service_accounts = GoogleInSpec::Compute::Property::InstanceServiceAccountsArray.parse(@fetched['serviceAccounts'], to_s) - @shielded_instance_config = GoogleInSpec::Compute::Property::InstanceShieldedInstanceConfig.new(@fetched['shieldedInstanceConfig'], to_s) - @status = @fetched['status'] - @status_message = @fetched['statusMessage'] - @tags = GoogleInSpec::Compute::Property::InstanceTags.new(@fetched['tags'], to_s) - @zone = @fetched['zone'] + @can_ip_forward = @fetched["canIpForward"] + @cpu_platform = @fetched["cpuPlatform"] + @creation_timestamp = @fetched["creationTimestamp"] + @deletion_protection = @fetched["deletionProtection"] + @disks = GoogleInSpec::Compute::Property::InstanceDisksArray.parse(@fetched["disks"], to_s) + @guest_accelerators = GoogleInSpec::Compute::Property::InstanceGuestAcceleratorsArray.parse(@fetched["guestAccelerators"], to_s) + @hostname = @fetched["hostname"] + @id = @fetched["id"] + @label_fingerprint = @fetched["labelFingerprint"] + @labels = @fetched["labels"] + @metadata = @fetched["metadata"] + @machine_type = @fetched["machineType"] + @min_cpu_platform = @fetched["minCpuPlatform"] + @name = @fetched["name"] + @network_interfaces = GoogleInSpec::Compute::Property::InstanceNetworkInterfacesArray.parse(@fetched["networkInterfaces"], to_s) + @scheduling = GoogleInSpec::Compute::Property::InstanceScheduling.new(@fetched["scheduling"], to_s) + @service_accounts = GoogleInSpec::Compute::Property::InstanceServiceAccountsArray.parse(@fetched["serviceAccounts"], to_s) + @shielded_instance_config = GoogleInSpec::Compute::Property::InstanceShieldedInstanceConfig.new(@fetched["shieldedInstanceConfig"], to_s) + @status = @fetched["status"] + @status_message = @fetched["statusMessage"] + @tags = GoogleInSpec::Compute::Property::InstanceTags.new(@fetched["tags"], to_s) + @zone = @fetched["zone"] end # Handles parsing RFC3339 time string @@ -100,33 +100,33 @@ def to_s def un_parse { - 'can_ip_forward' => ->(x, _) { x.nil? ? [] : ["its('can_ip_forward') { should cmp #{x.inspect} }"] }, - 'cpu_platform' => ->(x, _) { x.nil? ? [] : ["its('cpu_platform') { should cmp #{x.inspect} }"] }, - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp') { should cmp #{x.inspect} }"] }, - 'deletion_protection' => ->(x, _) { x.nil? ? [] : ["its('deletion_protection') { should cmp #{x.inspect} }"] }, - 'disks' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('disks') { should include '#{single.to_json}' }" } }, - 'guest_accelerators' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('guest_accelerators') { should include '#{single.to_json}' }" } }, - 'hostname' => ->(x, _) { x.nil? ? [] : ["its('hostname') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'label_fingerprint' => ->(x, _) { x.nil? ? [] : ["its('label_fingerprint') { should cmp #{x.inspect} }"] }, - 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'metadata' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('metadata') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'machine_type' => ->(x, _) { x.nil? ? [] : ["its('machine_type') { should cmp #{x.inspect} }"] }, - 'min_cpu_platform' => ->(x, _) { x.nil? ? [] : ["its('min_cpu_platform') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'network_interfaces' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('network_interfaces') { should include '#{single.to_json}' }" } }, - 'scheduling' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceScheduling.un_parse(x, 'scheduling') }, - 'service_accounts' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('service_accounts') { should include '#{single.to_json}' }" } }, - 'shielded_instance_config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceShieldedInstanceConfig.un_parse(x, 'shielded_instance_config') }, - 'status' => ->(x, _) { x.nil? ? [] : ["its('status') { should cmp #{x.inspect} }"] }, - 'status_message' => ->(x, _) { x.nil? ? [] : ["its('status_message') { should cmp #{x.inspect} }"] }, - 'tags' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTags.un_parse(x, 'tags') }, - 'zone' => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, + "can_ip_forward" => ->(x, _) { x.nil? ? [] : ["its('can_ip_forward') { should cmp #{x.inspect} }"] }, + "cpu_platform" => ->(x, _) { x.nil? ? [] : ["its('cpu_platform') { should cmp #{x.inspect} }"] }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp') { should cmp #{x.inspect} }"] }, + "deletion_protection" => ->(x, _) { x.nil? ? [] : ["its('deletion_protection') { should cmp #{x.inspect} }"] }, + "disks" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('disks') { should include '#{single.to_json}' }" } }, + "guest_accelerators" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('guest_accelerators') { should include '#{single.to_json}' }" } }, + "hostname" => ->(x, _) { x.nil? ? [] : ["its('hostname') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "label_fingerprint" => ->(x, _) { x.nil? ? [] : ["its('label_fingerprint') { should cmp #{x.inspect} }"] }, + "labels" => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "metadata" => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('metadata') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "machine_type" => ->(x, _) { x.nil? ? [] : ["its('machine_type') { should cmp #{x.inspect} }"] }, + "min_cpu_platform" => ->(x, _) { x.nil? ? [] : ["its('min_cpu_platform') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "network_interfaces" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('network_interfaces') { should include '#{single.to_json}' }" } }, + "scheduling" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceScheduling.un_parse(x, "scheduling") }, + "service_accounts" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('service_accounts') { should include '#{single.to_json}' }" } }, + "shielded_instance_config" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceShieldedInstanceConfig.un_parse(x, "shielded_instance_config") }, + "status" => ->(x, _) { x.nil? ? [] : ["its('status') { should cmp #{x.inspect} }"] }, + "status_message" => ->(x, _) { x.nil? ? [] : ["its('status_message') { should cmp #{x.inspect} }"] }, + "tags" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTags.un_parse(x, "tags") }, + "zone" => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Instance' + name = "Instance" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -135,11 +135,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_instance', + type: "google_compute_instance", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -147,10 +147,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/instances/{{name}}' + "projects/{{project}}/zones/{{zone}}/instances/{{name}}" end end diff --git a/generate/libraries/google_compute_instance_group.rb b/generate/libraries/google_compute_instance_group.rb index 49eb2d757..8d15783fa 100644 --- a/generate/libraries/google_compute_instance_group.rb +++ b/generate/libraries/google_compute_instance_group.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleComputeInstanceGroup < GcpResourceBase - name 'google_compute_instance_group' - desc 'Verifies settings for a compute instance group' + name "google_compute_instance_group" + desc "Verifies settings for a compute instance group" example " describe google_compute_instance_group(project: 'chef-inspec-gcp', zone: 'europe-west2-a', name: 'gcp-inspec-test') do diff --git a/generate/libraries/google_compute_instance_group_manager.rb b/generate/libraries/google_compute_instance_group_manager.rb index 422f94f14..300fa2dbd 100644 --- a/generate/libraries/google_compute_instance_group_manager.rb +++ b/generate/libraries/google_compute_instance_group_manager.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/instancegroupmanager_current_actions' -require 'google/compute/property/instancegroupmanager_named_ports' +require "gcp_backend" +require "google/compute/property/instancegroupmanager_current_actions" +require "google/compute/property/instancegroupmanager_named_ports" # A provider to manage Compute Engine resources. class ComputeInstanceGroupManager < GcpResourceBase - name 'google_compute_instance_group_manager' - desc 'InstanceGroupManager' - supports platform: 'gcp' + name "google_compute_instance_group_manager" + desc "InstanceGroupManager" + supports platform: "gcp" attr_reader :params attr_reader :base_instance_name @@ -41,25 +41,25 @@ class ComputeInstanceGroupManager < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @base_instance_name = @fetched['baseInstanceName'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @current_actions = GoogleInSpec::Compute::Property::InstanceGroupManagerCurrentActions.new(@fetched['currentActions'], to_s) - @description = @fetched['description'] - @id = @fetched['id'] - @instance_group = @fetched['instanceGroup'] - @instance_template = @fetched['instanceTemplate'] - @name = @fetched['name'] - @named_ports = GoogleInSpec::Compute::Property::InstanceGroupManagerNamedPortsArray.parse(@fetched['namedPorts'], to_s) - @region = @fetched['region'] - @target_pools = @fetched['targetPools'] - @target_size = @fetched['targetSize'] - @zone = @fetched['zone'] + @base_instance_name = @fetched["baseInstanceName"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @current_actions = GoogleInSpec::Compute::Property::InstanceGroupManagerCurrentActions.new(@fetched["currentActions"], to_s) + @description = @fetched["description"] + @id = @fetched["id"] + @instance_group = @fetched["instanceGroup"] + @instance_template = @fetched["instanceTemplate"] + @name = @fetched["name"] + @named_ports = GoogleInSpec::Compute::Property::InstanceGroupManagerNamedPortsArray.parse(@fetched["namedPorts"], to_s) + @region = @fetched["region"] + @target_pools = @fetched["targetPools"] + @target_size = @fetched["targetSize"] + @zone = @fetched["zone"] end # Handles parsing RFC3339 time string @@ -77,24 +77,24 @@ def to_s def un_parse { - 'base_instance_name' => ->(x, _) { x.nil? ? [] : ["its('base_instance_name') { should cmp #{x.inspect} }"] }, - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'current_actions' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceGroupManagerCurrentActions.un_parse(x, 'current_actions') }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'instance_group' => ->(x, _) { x.nil? ? [] : ["its('instance_group') { should cmp #{x.inspect} }"] }, - 'instance_template' => ->(x, _) { x.nil? ? [] : ["its('instance_template') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'named_ports' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('named_ports') { should include '#{single.to_json}' }" } }, - 'region' => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, - 'target_pools' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('target_pools') { should include #{single.inspect} }" } }, - 'target_size' => ->(x, _) { x.nil? ? [] : ["its('target_size') { should cmp #{x.inspect} }"] }, - 'zone' => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, + "base_instance_name" => ->(x, _) { x.nil? ? [] : ["its('base_instance_name') { should cmp #{x.inspect} }"] }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "current_actions" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceGroupManagerCurrentActions.un_parse(x, "current_actions") }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "instance_group" => ->(x, _) { x.nil? ? [] : ["its('instance_group') { should cmp #{x.inspect} }"] }, + "instance_template" => ->(x, _) { x.nil? ? [] : ["its('instance_template') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "named_ports" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('named_ports') { should include '#{single.to_json}' }" } }, + "region" => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, + "target_pools" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('target_pools') { should include #{single.inspect} }" } }, + "target_size" => ->(x, _) { x.nil? ? [] : ["its('target_size') { should cmp #{x.inspect} }"] }, + "zone" => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'InstanceGroupManager' + name = "InstanceGroupManager" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -103,11 +103,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_instance_group_manager', + type: "google_compute_instance_group_manager", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -115,10 +115,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/instanceGroupManagers/{{name}}' + "projects/{{project}}/zones/{{zone}}/instanceGroupManagers/{{name}}" end end diff --git a/generate/libraries/google_compute_instance_group_managers.rb b/generate/libraries/google_compute_instance_group_managers.rb index 3255f833c..79c7e4521 100644 --- a/generate/libraries/google_compute_instance_group_managers.rb +++ b/generate/libraries/google_compute_instance_group_managers.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeInstanceGroupManagers < GcpResourceBase - name 'google_compute_instance_group_managers' - desc 'InstanceGroupManager plural resource' - supports platform: 'gcp' + name "google_compute_instance_group_managers" + desc "InstanceGroupManager plural resource" + supports platform: "gcp" attr_reader :table @@ -42,12 +42,12 @@ class ComputeInstanceGroupManagers < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'baseInstanceName' => ->(obj) { [:base_instance_name, obj['baseInstanceName']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'currentActions' => ->(obj) { [:current_actions, GoogleInSpec::Compute::Property::InstanceGroupManagerCurrentActions.new(obj['currentActions'], to_s)] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'instanceGroup' => ->(obj) { [:instance_group, obj['instanceGroup']] }, - 'instanceTemplate' => ->(obj) { [:instance_template, obj['instanceTemplate']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'namedPorts' => ->(obj) { [:named_ports, GoogleInSpec::Compute::Property::InstanceGroupManagerNamedPortsArray.parse(obj['namedPorts'], to_s)] }, - 'region' => ->(obj) { [:region, obj['region']] }, - 'targetPools' => ->(obj) { [:target_pools, obj['targetPools']] }, - 'targetSize' => ->(obj) { [:target_size, obj['targetSize']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, + "baseInstanceName" => ->(obj) { [:base_instance_name, obj["baseInstanceName"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "currentActions" => ->(obj) { [:current_actions, GoogleInSpec::Compute::Property::InstanceGroupManagerCurrentActions.new(obj["currentActions"], to_s)] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "instanceGroup" => ->(obj) { [:instance_group, obj["instanceGroup"]] }, + "instanceTemplate" => ->(obj) { [:instance_template, obj["instanceTemplate"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "namedPorts" => ->(obj) { [:named_ports, GoogleInSpec::Compute::Property::InstanceGroupManagerNamedPortsArray.parse(obj["namedPorts"], to_s)] }, + "region" => ->(obj) { [:region, obj["region"]] }, + "targetPools" => ->(obj) { [:target_pools, obj["targetPools"]] }, + "targetSize" => ->(obj) { [:target_size, obj["targetSize"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, } end @@ -114,10 +114,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/instanceGroupManagers' + "projects/{{project}}/zones/{{zone}}/instanceGroupManagers" end end diff --git a/generate/libraries/google_compute_instance_groups.rb b/generate/libraries/google_compute_instance_groups.rb index bd97e07fa..99ded1f12 100644 --- a/generate/libraries/google_compute_instance_groups.rb +++ b/generate/libraries/google_compute_instance_groups.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleComputeInstanceGroups < GcpResourceBase - name 'google_compute_instance_groups' - desc 'Verifies settings for GCP compute instance_groups in bulk' + name "google_compute_instance_groups" + desc "Verifies settings for GCP compute instance_groups in bulk" example " describe google_compute_instance_groups(project: 'chef-inspec-gcp', zone: 'europe-west2-a') do diff --git a/generate/libraries/google_compute_instance_template.rb b/generate/libraries/google_compute_instance_template.rb index c5e129bcf..83b78c96e 100644 --- a/generate/libraries/google_compute_instance_template.rb +++ b/generate/libraries/google_compute_instance_template.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,20 +13,20 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/instancetemplate_properties' -require 'google/compute/property/instancetemplate_properties_disks' -require 'google/compute/property/instancetemplate_properties_guest_accelerators' -require 'google/compute/property/instancetemplate_properties_network_interfaces' -require 'google/compute/property/instancetemplate_properties_scheduling' -require 'google/compute/property/instancetemplate_properties_service_accounts' -require 'google/compute/property/instancetemplate_properties_tags' +require "gcp_backend" +require "google/compute/property/instancetemplate_properties" +require "google/compute/property/instancetemplate_properties_disks" +require "google/compute/property/instancetemplate_properties_guest_accelerators" +require "google/compute/property/instancetemplate_properties_network_interfaces" +require "google/compute/property/instancetemplate_properties_scheduling" +require "google/compute/property/instancetemplate_properties_service_accounts" +require "google/compute/property/instancetemplate_properties_tags" # A provider to manage Compute Engine resources. class ComputeInstanceTemplate < GcpResourceBase - name 'google_compute_instance_template' - desc 'InstanceTemplate' - supports platform: 'gcp' + name "google_compute_instance_template" + desc "InstanceTemplate" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -38,17 +38,17 @@ class ComputeInstanceTemplate < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @properties = GoogleInSpec::Compute::Property::InstanceTemplateProperties.new(@fetched['properties'], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @properties = GoogleInSpec::Compute::Property::InstanceTemplateProperties.new(@fetched["properties"], to_s) end # Handles parsing RFC3339 time string @@ -66,16 +66,16 @@ def to_s def un_parse { - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'properties' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTemplateProperties.un_parse(x, 'properties') }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "properties" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::InstanceTemplateProperties.un_parse(x, "properties") }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'InstanceTemplate' + name = "InstanceTemplate" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -84,11 +84,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_instance_template', + type: "google_compute_instance_template", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -96,10 +96,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/instanceTemplates/{{name}}' + "projects/{{project}}/global/instanceTemplates/{{name}}" end end diff --git a/generate/libraries/google_compute_instance_templates.rb b/generate/libraries/google_compute_instance_templates.rb index 8d8e921ec..502bc3092 100644 --- a/generate/libraries/google_compute_instance_templates.rb +++ b/generate/libraries/google_compute_instance_templates.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeInstanceTemplates < GcpResourceBase - name 'google_compute_instance_templates' - desc 'InstanceTemplate plural resource' - supports platform: 'gcp' + name "google_compute_instance_templates" + desc "InstanceTemplate plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class ComputeInstanceTemplates < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'properties' => ->(obj) { [:properties, GoogleInSpec::Compute::Property::InstanceTemplateProperties.new(obj['properties'], to_s)] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "properties" => ->(obj) { [:properties, GoogleInSpec::Compute::Property::InstanceTemplateProperties.new(obj["properties"], to_s)] }, } end @@ -98,10 +98,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/instanceTemplates' + "projects/{{project}}/global/instanceTemplates" end end diff --git a/generate/libraries/google_compute_instances.rb b/generate/libraries/google_compute_instances.rb index 7c1ac0b43..a3ae5c960 100644 --- a/generate/libraries/google_compute_instances.rb +++ b/generate/libraries/google_compute_instances.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeInstances < GcpResourceBase - name 'google_compute_instances' - desc 'Instance plural resource' - supports platform: 'gcp' + name "google_compute_instances" + desc "Instance plural resource" + supports platform: "gcp" attr_reader :table @@ -51,12 +51,12 @@ class ComputeInstances < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -84,28 +84,28 @@ def transform(key, value) def transformers { - 'canIpForward' => ->(obj) { [:can_ip_forward, obj['canIpForward']] }, - 'cpuPlatform' => ->(obj) { [:cpu_platform, obj['cpuPlatform']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, - 'deletionProtection' => ->(obj) { [:deletion_protection, obj['deletionProtection']] }, - 'disks' => ->(obj) { [:disks, GoogleInSpec::Compute::Property::InstanceDisksArray.parse(obj['disks'], to_s)] }, - 'guestAccelerators' => ->(obj) { [:guest_accelerators, GoogleInSpec::Compute::Property::InstanceGuestAcceleratorsArray.parse(obj['guestAccelerators'], to_s)] }, - 'hostname' => ->(obj) { [:hostname, obj['hostname']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'metadata' => ->(obj) { [:metadata, obj['metadata']] }, - 'machineType' => ->(obj) { [:machine_type, obj['machineType']] }, - 'minCpuPlatform' => ->(obj) { [:min_cpu_platform, obj['minCpuPlatform']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'networkInterfaces' => ->(obj) { [:network_interfaces, GoogleInSpec::Compute::Property::InstanceNetworkInterfacesArray.parse(obj['networkInterfaces'], to_s)] }, - 'scheduling' => ->(obj) { [:scheduling, GoogleInSpec::Compute::Property::InstanceScheduling.new(obj['scheduling'], to_s)] }, - 'serviceAccounts' => ->(obj) { [:service_accounts, GoogleInSpec::Compute::Property::InstanceServiceAccountsArray.parse(obj['serviceAccounts'], to_s)] }, - 'shieldedInstanceConfig' => ->(obj) { [:shielded_instance_config, GoogleInSpec::Compute::Property::InstanceShieldedInstanceConfig.new(obj['shieldedInstanceConfig'], to_s)] }, - 'status' => ->(obj) { [:status, obj['status']] }, - 'statusMessage' => ->(obj) { [:status_message, obj['statusMessage']] }, - 'tags' => ->(obj) { [:tags, GoogleInSpec::Compute::Property::InstanceTags.new(obj['tags'], to_s)] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, + "canIpForward" => ->(obj) { [:can_ip_forward, obj["canIpForward"]] }, + "cpuPlatform" => ->(obj) { [:cpu_platform, obj["cpuPlatform"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, obj["creationTimestamp"]] }, + "deletionProtection" => ->(obj) { [:deletion_protection, obj["deletionProtection"]] }, + "disks" => ->(obj) { [:disks, GoogleInSpec::Compute::Property::InstanceDisksArray.parse(obj["disks"], to_s)] }, + "guestAccelerators" => ->(obj) { [:guest_accelerators, GoogleInSpec::Compute::Property::InstanceGuestAcceleratorsArray.parse(obj["guestAccelerators"], to_s)] }, + "hostname" => ->(obj) { [:hostname, obj["hostname"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "labelFingerprint" => ->(obj) { [:label_fingerprint, obj["labelFingerprint"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "metadata" => ->(obj) { [:metadata, obj["metadata"]] }, + "machineType" => ->(obj) { [:machine_type, obj["machineType"]] }, + "minCpuPlatform" => ->(obj) { [:min_cpu_platform, obj["minCpuPlatform"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "networkInterfaces" => ->(obj) { [:network_interfaces, GoogleInSpec::Compute::Property::InstanceNetworkInterfacesArray.parse(obj["networkInterfaces"], to_s)] }, + "scheduling" => ->(obj) { [:scheduling, GoogleInSpec::Compute::Property::InstanceScheduling.new(obj["scheduling"], to_s)] }, + "serviceAccounts" => ->(obj) { [:service_accounts, GoogleInSpec::Compute::Property::InstanceServiceAccountsArray.parse(obj["serviceAccounts"], to_s)] }, + "shieldedInstanceConfig" => ->(obj) { [:shielded_instance_config, GoogleInSpec::Compute::Property::InstanceShieldedInstanceConfig.new(obj["shieldedInstanceConfig"], to_s)] }, + "status" => ->(obj) { [:status, obj["status"]] }, + "statusMessage" => ->(obj) { [:status_message, obj["statusMessage"]] }, + "tags" => ->(obj) { [:tags, GoogleInSpec::Compute::Property::InstanceTags.new(obj["tags"], to_s)] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, } end @@ -132,10 +132,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/instances' + "projects/{{project}}/zones/{{zone}}/instances" end end diff --git a/generate/libraries/google_compute_network.rb b/generate/libraries/google_compute_network.rb index ce923f400..e706cc8f2 100644 --- a/generate/libraries/google_compute_network.rb +++ b/generate/libraries/google_compute_network.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/network_routing_config' +require "gcp_backend" +require "google/compute/property/network_routing_config" # A provider to manage Compute Engine resources. class ComputeNetwork < GcpResourceBase - name 'google_compute_network' - desc 'Network' - supports platform: 'gcp' + name "google_compute_network" + desc "Network" + supports platform: "gcp" attr_reader :params attr_reader :description @@ -35,20 +35,20 @@ class ComputeNetwork < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @description = @fetched['description'] - @gateway_ipv4 = @fetched['gatewayIPv4'] - @id = @fetched['id'] - @name = @fetched['name'] - @subnetworks = @fetched['subnetworks'] - @auto_create_subnetworks = @fetched['autoCreateSubnetworks'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @routing_config = GoogleInSpec::Compute::Property::NetworkRoutingConfig.new(@fetched['routingConfig'], to_s) + @description = @fetched["description"] + @gateway_ipv4 = @fetched["gatewayIPv4"] + @id = @fetched["id"] + @name = @fetched["name"] + @subnetworks = @fetched["subnetworks"] + @auto_create_subnetworks = @fetched["autoCreateSubnetworks"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @routing_config = GoogleInSpec::Compute::Property::NetworkRoutingConfig.new(@fetched["routingConfig"], to_s) end # Handles parsing RFC3339 time string @@ -66,19 +66,19 @@ def to_s def un_parse { - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'gateway_ipv4' => ->(x, _) { x.nil? ? [] : ["its('gateway_ipv4') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'subnetworks' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('subnetworks') { should include #{single.inspect} }" } }, - 'auto_create_subnetworks' => ->(x, _) { x.nil? ? [] : ["its('auto_create_subnetworks') { should cmp #{x.inspect} }"] }, - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'routing_config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::NetworkRoutingConfig.un_parse(x, 'routing_config') }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "gateway_ipv4" => ->(x, _) { x.nil? ? [] : ["its('gateway_ipv4') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "subnetworks" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('subnetworks') { should include #{single.inspect} }" } }, + "auto_create_subnetworks" => ->(x, _) { x.nil? ? [] : ["its('auto_create_subnetworks') { should cmp #{x.inspect} }"] }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "routing_config" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::NetworkRoutingConfig.un_parse(x, "routing_config") }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Network' + name = "Network" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -87,11 +87,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_network', + type: "google_compute_network", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -99,10 +99,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/networks/{{name}}' + "projects/{{project}}/global/networks/{{name}}" end end diff --git a/generate/libraries/google_compute_network_endpoint_group.rb b/generate/libraries/google_compute_network_endpoint_group.rb index 26ab7060b..e96be7672 100644 --- a/generate/libraries/google_compute_network_endpoint_group.rb +++ b/generate/libraries/google_compute_network_endpoint_group.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeNetworkEndpointGroup < GcpResourceBase - name 'google_compute_network_endpoint_group' - desc 'NetworkEndpointGroup' - supports platform: 'gcp' + name "google_compute_network_endpoint_group" + desc "NetworkEndpointGroup" + supports platform: "gcp" attr_reader :params attr_reader :id @@ -35,21 +35,21 @@ class ComputeNetworkEndpointGroup < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @id = @fetched['id'] - @name = @fetched['name'] - @description = @fetched['description'] - @network_endpoint_type = @fetched['networkEndpointType'] - @size = @fetched['size'] - @network = @fetched['network'] - @subnetwork = @fetched['subnetwork'] - @default_port = @fetched['defaultPort'] - @zone = @fetched['zone'] + @id = @fetched["id"] + @name = @fetched["name"] + @description = @fetched["description"] + @network_endpoint_type = @fetched["networkEndpointType"] + @size = @fetched["size"] + @network = @fetched["network"] + @subnetwork = @fetched["subnetwork"] + @default_port = @fetched["defaultPort"] + @zone = @fetched["zone"] end # Handles parsing RFC3339 time string @@ -67,20 +67,20 @@ def to_s def un_parse { - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'network_endpoint_type' => ->(x, _) { x.nil? ? [] : ["its('network_endpoint_type') { should cmp #{x.inspect} }"] }, - 'size' => ->(x, _) { x.nil? ? [] : ["its('size') { should cmp #{x.inspect} }"] }, - 'network' => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, - 'subnetwork' => ->(x, _) { x.nil? ? [] : ["its('subnetwork') { should cmp #{x.inspect} }"] }, - 'default_port' => ->(x, _) { x.nil? ? [] : ["its('default_port') { should cmp #{x.inspect} }"] }, - 'zone' => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "network_endpoint_type" => ->(x, _) { x.nil? ? [] : ["its('network_endpoint_type') { should cmp #{x.inspect} }"] }, + "size" => ->(x, _) { x.nil? ? [] : ["its('size') { should cmp #{x.inspect} }"] }, + "network" => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, + "subnetwork" => ->(x, _) { x.nil? ? [] : ["its('subnetwork') { should cmp #{x.inspect} }"] }, + "default_port" => ->(x, _) { x.nil? ? [] : ["its('default_port') { should cmp #{x.inspect} }"] }, + "zone" => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'NetworkEndpointGroup' + name = "NetworkEndpointGroup" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -89,11 +89,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_network_endpoint_group', + type: "google_compute_network_endpoint_group", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -101,10 +101,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/networkEndpointGroups/{{name}}' + "projects/{{project}}/zones/{{zone}}/networkEndpointGroups/{{name}}" end end diff --git a/generate/libraries/google_compute_network_endpoint_groups.rb b/generate/libraries/google_compute_network_endpoint_groups.rb index 53bc4c375..cd216bb39 100644 --- a/generate/libraries/google_compute_network_endpoint_groups.rb +++ b/generate/libraries/google_compute_network_endpoint_groups.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeNetworkEndpointGroups < GcpResourceBase - name 'google_compute_network_endpoint_groups' - desc 'NetworkEndpointGroup plural resource' - supports platform: 'gcp' + name "google_compute_network_endpoint_groups" + desc "NetworkEndpointGroup plural resource" + supports platform: "gcp" attr_reader :table @@ -38,12 +38,12 @@ class ComputeNetworkEndpointGroups < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'networkEndpointType' => ->(obj) { [:network_endpoint_type, obj['networkEndpointType']] }, - 'size' => ->(obj) { [:size, obj['size']] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'subnetwork' => ->(obj) { [:subnetwork, obj['subnetwork']] }, - 'defaultPort' => ->(obj) { [:default_port, obj['defaultPort']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "networkEndpointType" => ->(obj) { [:network_endpoint_type, obj["networkEndpointType"]] }, + "size" => ->(obj) { [:size, obj["size"]] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "subnetwork" => ->(obj) { [:subnetwork, obj["subnetwork"]] }, + "defaultPort" => ->(obj) { [:default_port, obj["defaultPort"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, } end @@ -106,10 +106,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/networkEndpointGroups' + "projects/{{project}}/zones/{{zone}}/networkEndpointGroups" end end diff --git a/generate/libraries/google_compute_networks.rb b/generate/libraries/google_compute_networks.rb index d4619245e..9f35345dc 100644 --- a/generate/libraries/google_compute_networks.rb +++ b/generate/libraries/google_compute_networks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeNetworks < GcpResourceBase - name 'google_compute_networks' - desc 'Network plural resource' - supports platform: 'gcp' + name "google_compute_networks" + desc "Network plural resource" + supports platform: "gcp" attr_reader :table @@ -37,12 +37,12 @@ class ComputeNetworks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'description' => ->(obj) { [:description, obj['description']] }, - 'gatewayIPv4' => ->(obj) { [:gateway_ipv4, obj['gatewayIPv4']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'subnetworks' => ->(obj) { [:subnetworks, obj['subnetworks']] }, - 'autoCreateSubnetworks' => ->(obj) { [:auto_create_subnetworks, obj['autoCreateSubnetworks']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'routingConfig' => ->(obj) { [:routing_config, GoogleInSpec::Compute::Property::NetworkRoutingConfig.new(obj['routingConfig'], to_s)] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "gatewayIPv4" => ->(obj) { [:gateway_ipv4, obj["gatewayIPv4"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "subnetworks" => ->(obj) { [:subnetworks, obj["subnetworks"]] }, + "autoCreateSubnetworks" => ->(obj) { [:auto_create_subnetworks, obj["autoCreateSubnetworks"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "routingConfig" => ->(obj) { [:routing_config, GoogleInSpec::Compute::Property::NetworkRoutingConfig.new(obj["routingConfig"], to_s)] }, } end @@ -104,10 +104,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/networks' + "projects/{{project}}/global/networks" end end diff --git a/generate/libraries/google_compute_node_group.rb b/generate/libraries/google_compute_node_group.rb index 1f39e226d..65f35c7a5 100644 --- a/generate/libraries/google_compute_node_group.rb +++ b/generate/libraries/google_compute_node_group.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeNodeGroup < GcpResourceBase - name 'google_compute_node_group' - desc 'NodeGroup' - supports platform: 'gcp' + name "google_compute_node_group" + desc "NodeGroup" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -32,18 +32,18 @@ class ComputeNodeGroup < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @name = @fetched['name'] - @node_template = @fetched['nodeTemplate'] - @size = @fetched['size'] - @zone = @fetched['zone'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @name = @fetched["name"] + @node_template = @fetched["nodeTemplate"] + @size = @fetched["size"] + @zone = @fetched["zone"] end # Handles parsing RFC3339 time string @@ -61,17 +61,17 @@ def to_s def un_parse { - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'node_template' => ->(x, _) { x.nil? ? [] : ["its('node_template') { should cmp #{x.inspect} }"] }, - 'size' => ->(x, _) { x.nil? ? [] : ["its('size') { should cmp #{x.inspect} }"] }, - 'zone' => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "node_template" => ->(x, _) { x.nil? ? [] : ["its('node_template') { should cmp #{x.inspect} }"] }, + "size" => ->(x, _) { x.nil? ? [] : ["its('size') { should cmp #{x.inspect} }"] }, + "zone" => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'NodeGroup' + name = "NodeGroup" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -80,11 +80,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_node_group', + type: "google_compute_node_group", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -92,10 +92,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/nodeGroups/{{name}}' + "projects/{{project}}/zones/{{zone}}/nodeGroups/{{name}}" end end diff --git a/generate/libraries/google_compute_node_groups.rb b/generate/libraries/google_compute_node_groups.rb index 4bf3674ad..427c3a919 100644 --- a/generate/libraries/google_compute_node_groups.rb +++ b/generate/libraries/google_compute_node_groups.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeNodeGroups < GcpResourceBase - name 'google_compute_node_groups' - desc 'NodeGroup plural resource' - supports platform: 'gcp' + name "google_compute_node_groups" + desc "NodeGroup plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class ComputeNodeGroups < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'nodeTemplate' => ->(obj) { [:node_template, obj['nodeTemplate']] }, - 'size' => ->(obj) { [:size, obj['size']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "nodeTemplate" => ->(obj) { [:node_template, obj["nodeTemplate"]] }, + "size" => ->(obj) { [:size, obj["size"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, } end @@ -100,10 +100,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/nodeGroups' + "projects/{{project}}/zones/{{zone}}/nodeGroups" end end diff --git a/generate/libraries/google_compute_node_template.rb b/generate/libraries/google_compute_node_template.rb index 9f44ab611..717ee0e4f 100644 --- a/generate/libraries/google_compute_node_template.rb +++ b/generate/libraries/google_compute_node_template.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/nodetemplate_node_type_flexibility' +require "gcp_backend" +require "google/compute/property/nodetemplate_node_type_flexibility" # A provider to manage Compute Engine resources. class ComputeNodeTemplate < GcpResourceBase - name 'google_compute_node_template' - desc 'NodeTemplate' - supports platform: 'gcp' + name "google_compute_node_template" + desc "NodeTemplate" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -34,19 +34,19 @@ class ComputeNodeTemplate < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @name = @fetched['name'] - @node_affinity_labels = @fetched['nodeAffinityLabels'] - @node_type = @fetched['nodeType'] - @node_type_flexibility = GoogleInSpec::Compute::Property::NodeTemplateNodeTypeFlexibility.new(@fetched['nodeTypeFlexibility'], to_s) - @region = @fetched['region'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @name = @fetched["name"] + @node_affinity_labels = @fetched["nodeAffinityLabels"] + @node_type = @fetched["nodeType"] + @node_type_flexibility = GoogleInSpec::Compute::Property::NodeTemplateNodeTypeFlexibility.new(@fetched["nodeTypeFlexibility"], to_s) + @region = @fetched["region"] end # Handles parsing RFC3339 time string @@ -64,18 +64,18 @@ def to_s def un_parse { - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'node_affinity_labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('node_affinity_labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'node_type' => ->(x, _) { x.nil? ? [] : ["its('node_type') { should cmp #{x.inspect} }"] }, - 'node_type_flexibility' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::NodeTemplateNodeTypeFlexibility.un_parse(x, 'node_type_flexibility') }, - 'region' => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "node_affinity_labels" => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('node_affinity_labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "node_type" => ->(x, _) { x.nil? ? [] : ["its('node_type') { should cmp #{x.inspect} }"] }, + "node_type_flexibility" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::NodeTemplateNodeTypeFlexibility.un_parse(x, "node_type_flexibility") }, + "region" => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'NodeTemplate' + name = "NodeTemplate" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -84,11 +84,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_node_template', + type: "google_compute_node_template", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -96,10 +96,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/nodeTemplates/{{name}}' + "projects/{{project}}/regions/{{region}}/nodeTemplates/{{name}}" end end diff --git a/generate/libraries/google_compute_node_templates.rb b/generate/libraries/google_compute_node_templates.rb index 73e841808..ebf347829 100644 --- a/generate/libraries/google_compute_node_templates.rb +++ b/generate/libraries/google_compute_node_templates.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeNodeTemplates < GcpResourceBase - name 'google_compute_node_templates' - desc 'NodeTemplate plural resource' - supports platform: 'gcp' + name "google_compute_node_templates" + desc "NodeTemplate plural resource" + supports platform: "gcp" attr_reader :table @@ -36,12 +36,12 @@ class ComputeNodeTemplates < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'nodeAffinityLabels' => ->(obj) { [:node_affinity_labels, obj['nodeAffinityLabels']] }, - 'nodeType' => ->(obj) { [:node_type, obj['nodeType']] }, - 'nodeTypeFlexibility' => ->(obj) { [:node_type_flexibility, GoogleInSpec::Compute::Property::NodeTemplateNodeTypeFlexibility.new(obj['nodeTypeFlexibility'], to_s)] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "nodeAffinityLabels" => ->(obj) { [:node_affinity_labels, obj["nodeAffinityLabels"]] }, + "nodeType" => ->(obj) { [:node_type, obj["nodeType"]] }, + "nodeTypeFlexibility" => ->(obj) { [:node_type_flexibility, GoogleInSpec::Compute::Property::NodeTemplateNodeTypeFlexibility.new(obj["nodeTypeFlexibility"], to_s)] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end @@ -102,10 +102,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/nodeTemplates' + "projects/{{project}}/regions/{{region}}/nodeTemplates" end end diff --git a/generate/libraries/google_compute_project_info.rb b/generate/libraries/google_compute_project_info.rb index 98fb6e1bd..5ba856a8e 100644 --- a/generate/libraries/google_compute_project_info.rb +++ b/generate/libraries/google_compute_project_info.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleComputeProjectInfo < GcpResourceBase - name 'google_compute_project_info' - desc 'Verifies settings for GCP Compute Project Info' + name "google_compute_project_info" + desc "Verifies settings for GCP Compute Project Info" example " describe google_compute_project_info(project: 'chef-inspec-gcp') do @@ -26,7 +26,7 @@ def initialize(opts = {}) def has_enabled_oslogin? return false if !defined?(@project_info.common_instance_metadata.items) || @project_info.common_instance_metadata.items.nil? @project_info.common_instance_metadata.items.each do |element| - return true if element.key=='enable-oslogin' and element.value.casecmp('true').zero? + return true if element.key=="enable-oslogin" and element.value.casecmp("true") == 0 end false end diff --git a/generate/libraries/google_compute_region.rb b/generate/libraries/google_compute_region.rb index 81973622b..adff3f3cd 100644 --- a/generate/libraries/google_compute_region.rb +++ b/generate/libraries/google_compute_region.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/region_deprecated' -require 'google/compute/property/region_quotas' +require "gcp_backend" +require "google/compute/property/region_deprecated" +require "google/compute/property/region_quotas" # A provider to manage Compute Engine resources. class ComputeRegion < GcpResourceBase - name 'google_compute_region' - desc 'Region' - supports platform: 'gcp' + name "google_compute_region" + desc "Region" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -36,20 +36,20 @@ class ComputeRegion < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @deprecated = GoogleInSpec::Compute::Property::RegionDeprecated.new(@fetched['deprecated'], to_s) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @quotas = GoogleInSpec::Compute::Property::RegionQuotasArray.parse(@fetched['quotas'], to_s) - @status = @fetched['status'] - @zones = @fetched['zones'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @deprecated = GoogleInSpec::Compute::Property::RegionDeprecated.new(@fetched["deprecated"], to_s) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @quotas = GoogleInSpec::Compute::Property::RegionQuotasArray.parse(@fetched["quotas"], to_s) + @status = @fetched["status"] + @zones = @fetched["zones"] end # Handles parsing RFC3339 time string @@ -67,19 +67,19 @@ def to_s def un_parse { - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'deprecated' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::RegionDeprecated.un_parse(x, 'deprecated') }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'quotas' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('quotas') { should include '#{single.to_json}' }" } }, - 'status' => ->(x, _) { x.nil? ? [] : ["its('status') { should cmp #{x.inspect} }"] }, - 'zones' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('zones') { should include #{single.inspect} }" } }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "deprecated" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::RegionDeprecated.un_parse(x, "deprecated") }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "quotas" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('quotas') { should include '#{single.to_json}' }" } }, + "status" => ->(x, _) { x.nil? ? [] : ["its('status') { should cmp #{x.inspect} }"] }, + "zones" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('zones') { should include #{single.inspect} }" } }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Region' + name = "Region" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -88,11 +88,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_region', + type: "google_compute_region", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -101,21 +101,21 @@ def dump(path, template_path, test_number, ignored_fields) # https://www.googleapis.com/compute/v1/projects/spaterson-project/zones/asia-east1-a def zone_names return [] if !exists? - @zones.map { |zone| zone.split('/').last } + @zones.map { |zone| zone.split("/").last } end def up? return false if !exists? - @status == 'UP' + @status == "UP" end private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{name}}' + "projects/{{project}}/regions/{{name}}" end end diff --git a/generate/libraries/google_compute_region_backend_service.rb b/generate/libraries/google_compute_region_backend_service.rb index 2c767ac33..d00e44e95 100644 --- a/generate/libraries/google_compute_region_backend_service.rb +++ b/generate/libraries/google_compute_region_backend_service.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/regionbackendservice_backends' -require 'google/compute/property/regionbackendservice_connection_draining' +require "gcp_backend" +require "google/compute/property/regionbackendservice_backends" +require "google/compute/property/regionbackendservice_connection_draining" # A provider to manage Compute Engine resources. class ComputeRegionBackendService < GcpResourceBase - name 'google_compute_region_backend_service' - desc 'RegionBackendService' - supports platform: 'gcp' + name "google_compute_region_backend_service" + desc "RegionBackendService" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -39,23 +39,23 @@ class ComputeRegionBackendService < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @name = @fetched['name'] - @health_checks = @fetched['healthChecks'] - @backends = GoogleInSpec::Compute::Property::RegionBackendServiceBackendsArray.parse(@fetched['backends'], to_s) - @description = @fetched['description'] - @fingerprint = @fetched['fingerprint'] - @protocol = @fetched['protocol'] - @session_affinity = @fetched['sessionAffinity'] - @region = @fetched['region'] - @timeout_sec = @fetched['timeoutSec'] - @connection_draining = GoogleInSpec::Compute::Property::RegionBackendServiceConnectionDraining.new(@fetched['connectionDraining'], to_s) - @load_balancing_scheme = @fetched['loadBalancingScheme'] + @name = @fetched["name"] + @health_checks = @fetched["healthChecks"] + @backends = GoogleInSpec::Compute::Property::RegionBackendServiceBackendsArray.parse(@fetched["backends"], to_s) + @description = @fetched["description"] + @fingerprint = @fetched["fingerprint"] + @protocol = @fetched["protocol"] + @session_affinity = @fetched["sessionAffinity"] + @region = @fetched["region"] + @timeout_sec = @fetched["timeoutSec"] + @connection_draining = GoogleInSpec::Compute::Property::RegionBackendServiceConnectionDraining.new(@fetched["connectionDraining"], to_s) + @load_balancing_scheme = @fetched["loadBalancingScheme"] end # Handles parsing RFC3339 time string @@ -73,22 +73,22 @@ def to_s def un_parse { - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'health_checks' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('health_checks') { should include #{single.inspect} }" } }, - 'backends' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('backends') { should include '#{single.to_json}' }" } }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'fingerprint' => ->(x, _) { x.nil? ? [] : ["its('fingerprint') { should cmp #{x.inspect} }"] }, - 'protocol' => ->(x, _) { x.nil? ? [] : ["its('protocol') { should cmp #{x.inspect} }"] }, - 'session_affinity' => ->(x, _) { x.nil? ? [] : ["its('session_affinity') { should cmp #{x.inspect} }"] }, - 'region' => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, - 'timeout_sec' => ->(x, _) { x.nil? ? [] : ["its('timeout_sec') { should cmp #{x.inspect} }"] }, - 'connection_draining' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::RegionBackendServiceConnectionDraining.un_parse(x, 'connection_draining') }, - 'load_balancing_scheme' => ->(x, _) { x.nil? ? [] : ["its('load_balancing_scheme') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "health_checks" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('health_checks') { should include #{single.inspect} }" } }, + "backends" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('backends') { should include '#{single.to_json}' }" } }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "fingerprint" => ->(x, _) { x.nil? ? [] : ["its('fingerprint') { should cmp #{x.inspect} }"] }, + "protocol" => ->(x, _) { x.nil? ? [] : ["its('protocol') { should cmp #{x.inspect} }"] }, + "session_affinity" => ->(x, _) { x.nil? ? [] : ["its('session_affinity') { should cmp #{x.inspect} }"] }, + "region" => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, + "timeout_sec" => ->(x, _) { x.nil? ? [] : ["its('timeout_sec') { should cmp #{x.inspect} }"] }, + "connection_draining" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::RegionBackendServiceConnectionDraining.un_parse(x, "connection_draining") }, + "load_balancing_scheme" => ->(x, _) { x.nil? ? [] : ["its('load_balancing_scheme') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'RegionBackendService' + name = "RegionBackendService" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -97,11 +97,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_region_backend_service', + type: "google_compute_region_backend_service", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -109,10 +109,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/backendServices/{{name}}' + "projects/{{project}}/regions/{{region}}/backendServices/{{name}}" end end diff --git a/generate/libraries/google_compute_region_backend_services.rb b/generate/libraries/google_compute_region_backend_services.rb index c7137f2be..7161902e9 100644 --- a/generate/libraries/google_compute_region_backend_services.rb +++ b/generate/libraries/google_compute_region_backend_services.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeRegionBackendServices < GcpResourceBase - name 'google_compute_region_backend_services' - desc 'RegionBackendService plural resource' - supports platform: 'gcp' + name "google_compute_region_backend_services" + desc "RegionBackendService plural resource" + supports platform: "gcp" attr_reader :table @@ -40,12 +40,12 @@ class ComputeRegionBackendServices < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -73,17 +73,17 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'healthChecks' => ->(obj) { [:health_checks, obj['healthChecks']] }, - 'backends' => ->(obj) { [:backends, GoogleInSpec::Compute::Property::RegionBackendServiceBackendsArray.parse(obj['backends'], to_s)] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, - 'protocol' => ->(obj) { [:protocol, obj['protocol']] }, - 'sessionAffinity' => ->(obj) { [:session_affinity, obj['sessionAffinity']] }, - 'region' => ->(obj) { [:region, obj['region']] }, - 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, - 'connectionDraining' => ->(obj) { [:connection_draining, GoogleInSpec::Compute::Property::RegionBackendServiceConnectionDraining.new(obj['connectionDraining'], to_s)] }, - 'loadBalancingScheme' => ->(obj) { [:load_balancing_scheme, obj['loadBalancingScheme']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "healthChecks" => ->(obj) { [:health_checks, obj["healthChecks"]] }, + "backends" => ->(obj) { [:backends, GoogleInSpec::Compute::Property::RegionBackendServiceBackendsArray.parse(obj["backends"], to_s)] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "fingerprint" => ->(obj) { [:fingerprint, obj["fingerprint"]] }, + "protocol" => ->(obj) { [:protocol, obj["protocol"]] }, + "sessionAffinity" => ->(obj) { [:session_affinity, obj["sessionAffinity"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, + "timeoutSec" => ->(obj) { [:timeout_sec, obj["timeoutSec"]] }, + "connectionDraining" => ->(obj) { [:connection_draining, GoogleInSpec::Compute::Property::RegionBackendServiceConnectionDraining.new(obj["connectionDraining"], to_s)] }, + "loadBalancingScheme" => ->(obj) { [:load_balancing_scheme, obj["loadBalancingScheme"]] }, } end @@ -110,10 +110,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/backendServices' + "projects/{{project}}/regions/{{region}}/backendServices" end end diff --git a/generate/libraries/google_compute_region_instance_group_manager.rb b/generate/libraries/google_compute_region_instance_group_manager.rb index 9ab212861..c5c1e85ce 100644 --- a/generate/libraries/google_compute_region_instance_group_manager.rb +++ b/generate/libraries/google_compute_region_instance_group_manager.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleComputeRegionInstanceGroupManager < GcpResourceBase - name 'google_compute_region_instance_group_manager' - desc 'Verifies settings for a compute instance group manager' + name "google_compute_region_instance_group_manager" + desc "Verifies settings for a compute instance group manager" example " describe google_compute_region_instance_group_manager(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-test') do diff --git a/generate/libraries/google_compute_region_instance_group_managers.rb b/generate/libraries/google_compute_region_instance_group_managers.rb index ed2d5687e..d23347412 100644 --- a/generate/libraries/google_compute_region_instance_group_managers.rb +++ b/generate/libraries/google_compute_region_instance_group_managers.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleComputeRegionInstanceGroupManagers < GcpResourceBase - name 'google_compute_region_instance_group_managers' - desc 'Verifies settings for GCP compute region_instance_group_managers in bulk' + name "google_compute_region_instance_group_managers" + desc "Verifies settings for GCP compute region_instance_group_managers in bulk" example " describe google_compute_region_instance_group_managers(project: 'chef-inspec-gcp', region: 'europe-west2') do diff --git a/generate/libraries/google_compute_regional_disk.rb b/generate/libraries/google_compute_regional_disk.rb index 639db3e76..a9a73c214 100644 --- a/generate/libraries/google_compute_regional_disk.rb +++ b/generate/libraries/google_compute_regional_disk.rb @@ -1,15 +1,15 @@ -# frozen_string_literal: false -require 'gcp_backend' -require 'google/compute/property/disk_disk_encryption_key' -require 'google/compute/property/disk_source_image_encryption_key' -require 'google/compute/property/disk_source_snapshot_encryption_key' + +require "gcp_backend" +require "google/compute/property/disk_disk_encryption_key" +require "google/compute/property/disk_source_image_encryption_key" +require "google/compute/property/disk_source_snapshot_encryption_key" # A provider to manage Compute Engine resources. class RegionalDisk < GcpResourceBase - name 'google_compute_regional_disk' - desc 'RegionalDisk' - supports platform: 'gcp' + name "google_compute_regional_disk" + desc "RegionalDisk" + supports platform: "gcp" attr_reader :id attr_reader :creation_timestamp @@ -45,30 +45,30 @@ def initialize(params) end def parse - @id = @fetched['id'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @name = @fetched['name'] - @size_gb = @fetched['sizeGb'] - @type = @fetched['type'] - @label_fingerprint = @fetched['labelFingerprint'] - @region = @fetched['region'] - @replica_zones = @fetched['replicaZones'] - @physical_block_size_bytes = @fetched['physicalBlockSizeBytes'] - @description = @fetched['description'] - @last_attach_timestamp = parse_time_string(@fetched['lastAttachTimestamp']) - @last_detach_timestamp = parse_time_string(@fetched['lastDetachTimestamp']) - @labels = @fetched['labels'] - @licenses = @fetched['licenses'] - @users = @fetched['users'] - @source_image = @fetched['sourceImage'] - @zone = @fetched['zone'] - @source_image_encryption_key = GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(@fetched['sourceImageEncryptionKey'], to_s) - @source_image_id = @fetched['sourceImageId'] - @disk_encryption_key = GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(@fetched['diskEncryptionKey'], to_s) - @source_snapshot = @fetched['sourceSnapshot'] - @source_snapshot_encryption_key = GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(@fetched['sourceSnapshotEncryptionKey'], to_s) - @source_snapshot_id = @fetched['sourceSnapshotId'] - @stat = @fetched['status'] + @id = @fetched["id"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @name = @fetched["name"] + @size_gb = @fetched["sizeGb"] + @type = @fetched["type"] + @label_fingerprint = @fetched["labelFingerprint"] + @region = @fetched["region"] + @replica_zones = @fetched["replicaZones"] + @physical_block_size_bytes = @fetched["physicalBlockSizeBytes"] + @description = @fetched["description"] + @last_attach_timestamp = parse_time_string(@fetched["lastAttachTimestamp"]) + @last_detach_timestamp = parse_time_string(@fetched["lastDetachTimestamp"]) + @labels = @fetched["labels"] + @licenses = @fetched["licenses"] + @users = @fetched["users"] + @source_image = @fetched["sourceImage"] + @zone = @fetched["zone"] + @source_image_encryption_key = GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(@fetched["sourceImageEncryptionKey"], to_s) + @source_image_id = @fetched["sourceImageId"] + @disk_encryption_key = GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(@fetched["diskEncryptionKey"], to_s) + @source_snapshot = @fetched["sourceSnapshot"] + @source_snapshot_encryption_key = GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(@fetched["sourceSnapshotEncryptionKey"], to_s) + @source_snapshot_id = @fetched["sourceSnapshotId"] + @stat = @fetched["status"] end # Handles parsing RFC3339 time string @@ -87,10 +87,10 @@ def to_s private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/disks/{{name}}' + "projects/{{project}}/regions/{{region}}/disks/{{name}}" end end diff --git a/generate/libraries/google_compute_regions.rb b/generate/libraries/google_compute_regions.rb index 9b73e559f..e015b7e80 100644 --- a/generate/libraries/google_compute_regions.rb +++ b/generate/libraries/google_compute_regions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeRegions < GcpResourceBase - name 'google_compute_regions' - desc 'Region plural resource' - supports platform: 'gcp' + name "google_compute_regions" + desc "Region plural resource" + supports platform: "gcp" attr_reader :table @@ -37,12 +37,12 @@ class ComputeRegions < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'deprecated' => ->(obj) { [:deprecated, GoogleInSpec::Compute::Property::RegionDeprecated.new(obj['deprecated'], to_s)] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:region_id, obj['id']] }, - 'name' => ->(obj) { [:region_name, obj['name']] }, - 'quotas' => ->(obj) { [:quotas, GoogleInSpec::Compute::Property::RegionQuotasArray.parse(obj['quotas'], to_s)] }, - 'status' => ->(obj) { [:region_status, obj['status']] }, - 'zones' => ->(obj) { [:zones, obj['zones']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "deprecated" => ->(obj) { [:deprecated, GoogleInSpec::Compute::Property::RegionDeprecated.new(obj["deprecated"], to_s)] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:region_id, obj["id"]] }, + "name" => ->(obj) { [:region_name, obj["name"]] }, + "quotas" => ->(obj) { [:quotas, GoogleInSpec::Compute::Property::RegionQuotasArray.parse(obj["quotas"], to_s)] }, + "status" => ->(obj) { [:region_status, obj["status"]] }, + "zones" => ->(obj) { [:zones, obj["zones"]] }, } end @@ -104,10 +104,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions' + "projects/{{project}}/regions" end end diff --git a/generate/libraries/google_compute_route.rb b/generate/libraries/google_compute_route.rb index 1d8f16205..c288c8433 100644 --- a/generate/libraries/google_compute_route.rb +++ b/generate/libraries/google_compute_route.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeRoute < GcpResourceBase - name 'google_compute_route' - desc 'Route' - supports platform: 'gcp' + name "google_compute_route" + desc "Route" + supports platform: "gcp" attr_reader :params attr_reader :dest_range @@ -37,23 +37,23 @@ class ComputeRoute < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @dest_range = @fetched['destRange'] - @description = @fetched['description'] - @name = @fetched['name'] - @network = @fetched['network'] - @priority = @fetched['priority'] - @tags = @fetched['tags'] - @next_hop_gateway = @fetched['nextHopGateway'] - @next_hop_instance = @fetched['nextHopInstance'] - @next_hop_ip = @fetched['nextHopIp'] - @next_hop_vpn_tunnel = @fetched['nextHopVpnTunnel'] - @next_hop_network = @fetched['nextHopNetwork'] + @dest_range = @fetched["destRange"] + @description = @fetched["description"] + @name = @fetched["name"] + @network = @fetched["network"] + @priority = @fetched["priority"] + @tags = @fetched["tags"] + @next_hop_gateway = @fetched["nextHopGateway"] + @next_hop_instance = @fetched["nextHopInstance"] + @next_hop_ip = @fetched["nextHopIp"] + @next_hop_vpn_tunnel = @fetched["nextHopVpnTunnel"] + @next_hop_network = @fetched["nextHopNetwork"] end # Handles parsing RFC3339 time string @@ -71,22 +71,22 @@ def to_s def un_parse { - 'dest_range' => ->(x, _) { x.nil? ? [] : ["its('dest_range') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'network' => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, - 'priority' => ->(x, _) { x.nil? ? [] : ["its('priority') { should cmp #{x.inspect} }"] }, - 'tags' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('tags') { should include #{single.inspect} }" } }, - 'next_hop_gateway' => ->(x, _) { x.nil? ? [] : ["its('next_hop_gateway') { should cmp #{x.inspect} }"] }, - 'next_hop_instance' => ->(x, _) { x.nil? ? [] : ["its('next_hop_instance') { should cmp #{x.inspect} }"] }, - 'next_hop_ip' => ->(x, _) { x.nil? ? [] : ["its('next_hop_ip') { should cmp #{x.inspect} }"] }, - 'next_hop_vpn_tunnel' => ->(x, _) { x.nil? ? [] : ["its('next_hop_vpn_tunnel') { should cmp #{x.inspect} }"] }, - 'next_hop_network' => ->(x, _) { x.nil? ? [] : ["its('next_hop_network') { should cmp #{x.inspect} }"] }, + "dest_range" => ->(x, _) { x.nil? ? [] : ["its('dest_range') { should cmp #{x.inspect} }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "network" => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, + "priority" => ->(x, _) { x.nil? ? [] : ["its('priority') { should cmp #{x.inspect} }"] }, + "tags" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('tags') { should include #{single.inspect} }" } }, + "next_hop_gateway" => ->(x, _) { x.nil? ? [] : ["its('next_hop_gateway') { should cmp #{x.inspect} }"] }, + "next_hop_instance" => ->(x, _) { x.nil? ? [] : ["its('next_hop_instance') { should cmp #{x.inspect} }"] }, + "next_hop_ip" => ->(x, _) { x.nil? ? [] : ["its('next_hop_ip') { should cmp #{x.inspect} }"] }, + "next_hop_vpn_tunnel" => ->(x, _) { x.nil? ? [] : ["its('next_hop_vpn_tunnel') { should cmp #{x.inspect} }"] }, + "next_hop_network" => ->(x, _) { x.nil? ? [] : ["its('next_hop_network') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Route' + name = "Route" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -95,11 +95,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_route', + type: "google_compute_route", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -107,10 +107,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/routes/{{name}}' + "projects/{{project}}/global/routes/{{name}}" end end diff --git a/generate/libraries/google_compute_router.rb b/generate/libraries/google_compute_router.rb index 19ade5369..c75ee6565 100644 --- a/generate/libraries/google_compute_router.rb +++ b/generate/libraries/google_compute_router.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/router_bgp' -require 'google/compute/property/router_bgp_advertised_ip_ranges' +require "gcp_backend" +require "google/compute/property/router_bgp" +require "google/compute/property/router_bgp_advertised_ip_ranges" # A provider to manage Compute Engine resources. class ComputeRouter < GcpResourceBase - name 'google_compute_router' - desc 'Router' - supports platform: 'gcp' + name "google_compute_router" + desc "Router" + supports platform: "gcp" attr_reader :params attr_reader :id @@ -35,19 +35,19 @@ class ComputeRouter < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @id = @fetched['id'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @name = @fetched['name'] - @description = @fetched['description'] - @network = @fetched['network'] - @bgp = GoogleInSpec::Compute::Property::RouterBgp.new(@fetched['bgp'], to_s) - @region = @fetched['region'] + @id = @fetched["id"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @name = @fetched["name"] + @description = @fetched["description"] + @network = @fetched["network"] + @bgp = GoogleInSpec::Compute::Property::RouterBgp.new(@fetched["bgp"], to_s) + @region = @fetched["region"] end # Handles parsing RFC3339 time string @@ -65,18 +65,18 @@ def to_s def un_parse { - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'network' => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, - 'bgp' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::RouterBgp.un_parse(x, 'bgp') }, - 'region' => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "network" => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, + "bgp" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::RouterBgp.un_parse(x, "bgp") }, + "region" => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Router' + name = "Router" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -85,11 +85,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_router', + type: "google_compute_router", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -97,10 +97,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/routers/{{name}}' + "projects/{{project}}/regions/{{region}}/routers/{{name}}" end end diff --git a/generate/libraries/google_compute_routers.rb b/generate/libraries/google_compute_routers.rb index 852693326..387f11166 100644 --- a/generate/libraries/google_compute_routers.rb +++ b/generate/libraries/google_compute_routers.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeRouters < GcpResourceBase - name 'google_compute_routers' - desc 'Router plural resource' - supports platform: 'gcp' + name "google_compute_routers" + desc "Router plural resource" + supports platform: "gcp" attr_reader :table @@ -36,12 +36,12 @@ class ComputeRouters < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { [:id, obj['id']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'bgp' => ->(obj) { [:bgp, GoogleInSpec::Compute::Property::RouterBgp.new(obj['bgp'], to_s)] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "bgp" => ->(obj) { [:bgp, GoogleInSpec::Compute::Property::RouterBgp.new(obj["bgp"], to_s)] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end @@ -102,10 +102,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/routers' + "projects/{{project}}/regions/{{region}}/routers" end end diff --git a/generate/libraries/google_compute_routes.rb b/generate/libraries/google_compute_routes.rb index 2dd78f16a..00db92536 100644 --- a/generate/libraries/google_compute_routes.rb +++ b/generate/libraries/google_compute_routes.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeRoutes < GcpResourceBase - name 'google_compute_routes' - desc 'Route plural resource' - supports platform: 'gcp' + name "google_compute_routes" + desc "Route plural resource" + supports platform: "gcp" attr_reader :table @@ -40,12 +40,12 @@ class ComputeRoutes < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -73,17 +73,17 @@ def transform(key, value) def transformers { - 'destRange' => ->(obj) { [:dest_range, obj['destRange']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'priority' => ->(obj) { [:priority, obj['priority']] }, - 'tags' => ->(obj) { [:tags, obj['tags']] }, - 'nextHopGateway' => ->(obj) { [:next_hop_gateway, obj['nextHopGateway']] }, - 'nextHopInstance' => ->(obj) { [:next_hop_instance, obj['nextHopInstance']] }, - 'nextHopIp' => ->(obj) { [:next_hop_ip, obj['nextHopIp']] }, - 'nextHopVpnTunnel' => ->(obj) { [:next_hop_vpn_tunnel, obj['nextHopVpnTunnel']] }, - 'nextHopNetwork' => ->(obj) { [:next_hop_network, obj['nextHopNetwork']] }, + "destRange" => ->(obj) { [:dest_range, obj["destRange"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "priority" => ->(obj) { [:priority, obj["priority"]] }, + "tags" => ->(obj) { [:tags, obj["tags"]] }, + "nextHopGateway" => ->(obj) { [:next_hop_gateway, obj["nextHopGateway"]] }, + "nextHopInstance" => ->(obj) { [:next_hop_instance, obj["nextHopInstance"]] }, + "nextHopIp" => ->(obj) { [:next_hop_ip, obj["nextHopIp"]] }, + "nextHopVpnTunnel" => ->(obj) { [:next_hop_vpn_tunnel, obj["nextHopVpnTunnel"]] }, + "nextHopNetwork" => ->(obj) { [:next_hop_network, obj["nextHopNetwork"]] }, } end @@ -110,10 +110,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/routes' + "projects/{{project}}/global/routes" end end diff --git a/generate/libraries/google_compute_snapshot.rb b/generate/libraries/google_compute_snapshot.rb index 123d442bb..3951dcb17 100644 --- a/generate/libraries/google_compute_snapshot.rb +++ b/generate/libraries/google_compute_snapshot.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/snapshot_snapshot_encryption_key' -require 'google/compute/property/snapshot_source_disk_encryption_key' +require "gcp_backend" +require "google/compute/property/snapshot_snapshot_encryption_key" +require "google/compute/property/snapshot_source_disk_encryption_key" # A provider to manage Compute Engine resources. class ComputeSnapshot < GcpResourceBase - name 'google_compute_snapshot' - desc 'Snapshot' - supports platform: 'gcp' + name "google_compute_snapshot" + desc "Snapshot" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -41,25 +41,25 @@ class ComputeSnapshot < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @id = @fetched['id'] - @disk_size_gb = @fetched['diskSizeGb'] - @name = @fetched['name'] - @description = @fetched['description'] - @storage_bytes = @fetched['storageBytes'] - @licenses = @fetched['licenses'] - @labels = @fetched['labels'] - @label_fingerprint = @fetched['labelFingerprint'] - @source_disk = @fetched['sourceDisk'] - @zone = @fetched['zone'] - @snapshot_encryption_key = GoogleInSpec::Compute::Property::SnapshotSnapshotEncryptionKey.new(@fetched['snapshotEncryptionKey'], to_s) - @source_disk_encryption_key = GoogleInSpec::Compute::Property::SnapshotSourceDiskEncryptionKey.new(@fetched['sourceDiskEncryptionKey'], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @id = @fetched["id"] + @disk_size_gb = @fetched["diskSizeGb"] + @name = @fetched["name"] + @description = @fetched["description"] + @storage_bytes = @fetched["storageBytes"] + @licenses = @fetched["licenses"] + @labels = @fetched["labels"] + @label_fingerprint = @fetched["labelFingerprint"] + @source_disk = @fetched["sourceDisk"] + @zone = @fetched["zone"] + @snapshot_encryption_key = GoogleInSpec::Compute::Property::SnapshotSnapshotEncryptionKey.new(@fetched["snapshotEncryptionKey"], to_s) + @source_disk_encryption_key = GoogleInSpec::Compute::Property::SnapshotSourceDiskEncryptionKey.new(@fetched["sourceDiskEncryptionKey"], to_s) end # Handles parsing RFC3339 time string @@ -77,24 +77,24 @@ def to_s def un_parse { - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'disk_size_gb' => ->(x, _) { x.nil? ? [] : ["its('disk_size_gb') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'storage_bytes' => ->(x, _) { x.nil? ? [] : ["its('storage_bytes') { should cmp #{x.inspect} }"] }, - 'licenses' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('licenses') { should include #{single.inspect} }" } }, - 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'label_fingerprint' => ->(x, _) { x.nil? ? [] : ["its('label_fingerprint') { should cmp #{x.inspect} }"] }, - 'source_disk' => ->(x, _) { x.nil? ? [] : ["its('source_disk') { should cmp #{x.inspect} }"] }, - 'zone' => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, - 'snapshot_encryption_key' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::SnapshotSnapshotEncryptionKey.un_parse(x, 'snapshot_encryption_key') }, - 'source_disk_encryption_key' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::SnapshotSourceDiskEncryptionKey.un_parse(x, 'source_disk_encryption_key') }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "disk_size_gb" => ->(x, _) { x.nil? ? [] : ["its('disk_size_gb') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "storage_bytes" => ->(x, _) { x.nil? ? [] : ["its('storage_bytes') { should cmp #{x.inspect} }"] }, + "licenses" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('licenses') { should include #{single.inspect} }" } }, + "labels" => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "label_fingerprint" => ->(x, _) { x.nil? ? [] : ["its('label_fingerprint') { should cmp #{x.inspect} }"] }, + "source_disk" => ->(x, _) { x.nil? ? [] : ["its('source_disk') { should cmp #{x.inspect} }"] }, + "zone" => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, + "snapshot_encryption_key" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::SnapshotSnapshotEncryptionKey.un_parse(x, "snapshot_encryption_key") }, + "source_disk_encryption_key" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::SnapshotSourceDiskEncryptionKey.un_parse(x, "source_disk_encryption_key") }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Snapshot' + name = "Snapshot" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -103,11 +103,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_snapshot', + type: "google_compute_snapshot", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -115,10 +115,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/snapshots/{{name}}' + "projects/{{project}}/global/snapshots/{{name}}" end end diff --git a/generate/libraries/google_compute_snapshots.rb b/generate/libraries/google_compute_snapshots.rb index 49dcb1c35..55537005b 100644 --- a/generate/libraries/google_compute_snapshots.rb +++ b/generate/libraries/google_compute_snapshots.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeSnapshots < GcpResourceBase - name 'google_compute_snapshots' - desc 'Snapshot plural resource' - supports platform: 'gcp' + name "google_compute_snapshots" + desc "Snapshot plural resource" + supports platform: "gcp" attr_reader :table @@ -42,12 +42,12 @@ class ComputeSnapshots < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'diskSizeGb' => ->(obj) { [:disk_size_gb, obj['diskSizeGb']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'storageBytes' => ->(obj) { [:storage_bytes, obj['storageBytes']] }, - 'licenses' => ->(obj) { [:licenses, obj['licenses']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, - 'sourceDisk' => ->(obj) { [:source_disk, obj['sourceDisk']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, - 'snapshotEncryptionKey' => ->(obj) { [:snapshot_encryption_key, GoogleInSpec::Compute::Property::SnapshotSnapshotEncryptionKey.new(obj['snapshotEncryptionKey'], to_s)] }, - 'sourceDiskEncryptionKey' => ->(obj) { [:source_disk_encryption_key, GoogleInSpec::Compute::Property::SnapshotSourceDiskEncryptionKey.new(obj['sourceDiskEncryptionKey'], to_s)] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "diskSizeGb" => ->(obj) { [:disk_size_gb, obj["diskSizeGb"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "storageBytes" => ->(obj) { [:storage_bytes, obj["storageBytes"]] }, + "licenses" => ->(obj) { [:licenses, obj["licenses"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "labelFingerprint" => ->(obj) { [:label_fingerprint, obj["labelFingerprint"]] }, + "sourceDisk" => ->(obj) { [:source_disk, obj["sourceDisk"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, + "snapshotEncryptionKey" => ->(obj) { [:snapshot_encryption_key, GoogleInSpec::Compute::Property::SnapshotSnapshotEncryptionKey.new(obj["snapshotEncryptionKey"], to_s)] }, + "sourceDiskEncryptionKey" => ->(obj) { [:source_disk_encryption_key, GoogleInSpec::Compute::Property::SnapshotSourceDiskEncryptionKey.new(obj["sourceDiskEncryptionKey"], to_s)] }, } end @@ -114,10 +114,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/snapshots' + "projects/{{project}}/global/snapshots" end end diff --git a/generate/libraries/google_compute_ssl_certificate.rb b/generate/libraries/google_compute_ssl_certificate.rb index 21e37c856..8c2ab0d2e 100644 --- a/generate/libraries/google_compute_ssl_certificate.rb +++ b/generate/libraries/google_compute_ssl_certificate.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeSslCertificate < GcpResourceBase - name 'google_compute_ssl_certificate' - desc 'SslCertificate' - supports platform: 'gcp' + name "google_compute_ssl_certificate" + desc "SslCertificate" + supports platform: "gcp" attr_reader :params attr_reader :certificate @@ -32,18 +32,18 @@ class ComputeSslCertificate < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @certificate = @fetched['certificate'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @private_key = @fetched['privateKey'] + @certificate = @fetched["certificate"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @private_key = @fetched["privateKey"] end # Handles parsing RFC3339 time string @@ -61,17 +61,17 @@ def to_s def un_parse { - 'certificate' => ->(x, _) { x.nil? ? [] : ["its('certificate') { should cmp #{x.inspect} }"] }, - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'private_key' => ->(x, _) { x.nil? ? [] : ["its('private_key') { should cmp #{x.inspect} }"] }, + "certificate" => ->(x, _) { x.nil? ? [] : ["its('certificate') { should cmp #{x.inspect} }"] }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "private_key" => ->(x, _) { x.nil? ? [] : ["its('private_key') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'SslCertificate' + name = "SslCertificate" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -80,11 +80,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_ssl_certificate', + type: "google_compute_ssl_certificate", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -92,10 +92,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/sslCertificates/{{name}}' + "projects/{{project}}/global/sslCertificates/{{name}}" end end diff --git a/generate/libraries/google_compute_ssl_certificates.rb b/generate/libraries/google_compute_ssl_certificates.rb index dbf853c8f..244ed5be5 100644 --- a/generate/libraries/google_compute_ssl_certificates.rb +++ b/generate/libraries/google_compute_ssl_certificates.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeSslCertificates < GcpResourceBase - name 'google_compute_ssl_certificates' - desc 'SslCertificate plural resource' - supports platform: 'gcp' + name "google_compute_ssl_certificates" + desc "SslCertificate plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class ComputeSslCertificates < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'certificate' => ->(obj) { [:certificate, obj['certificate']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'privateKey' => ->(obj) { [:private_key, obj['privateKey']] }, + "certificate" => ->(obj) { [:certificate, obj["certificate"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "privateKey" => ->(obj) { [:private_key, obj["privateKey"]] }, } end @@ -100,10 +100,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/sslCertificates' + "projects/{{project}}/global/sslCertificates" end end diff --git a/generate/libraries/google_compute_ssl_policies.rb b/generate/libraries/google_compute_ssl_policies.rb index a81141114..0e4c78ae0 100644 --- a/generate/libraries/google_compute_ssl_policies.rb +++ b/generate/libraries/google_compute_ssl_policies.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeSslPolicys < GcpResourceBase - name 'google_compute_ssl_policies' - desc 'SslPolicy plural resource' - supports platform: 'gcp' + name "google_compute_ssl_policies" + desc "SslPolicy plural resource" + supports platform: "gcp" attr_reader :table @@ -39,12 +39,12 @@ class ComputeSslPolicys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'profile' => ->(obj) { [:profile, obj['profile']] }, - 'minTlsVersion' => ->(obj) { [:min_tls_version, obj['minTlsVersion']] }, - 'enabledFeatures' => ->(obj) { [:enabled_features, obj['enabledFeatures']] }, - 'customFeatures' => ->(obj) { [:custom_features, obj['customFeatures']] }, - 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, - 'warnings' => ->(obj) { [:warnings, GoogleInSpec::Compute::Property::SslPolicyWarningsArray.parse(obj['warnings'], to_s)] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "profile" => ->(obj) { [:profile, obj["profile"]] }, + "minTlsVersion" => ->(obj) { [:min_tls_version, obj["minTlsVersion"]] }, + "enabledFeatures" => ->(obj) { [:enabled_features, obj["enabledFeatures"]] }, + "customFeatures" => ->(obj) { [:custom_features, obj["customFeatures"]] }, + "fingerprint" => ->(obj) { [:fingerprint, obj["fingerprint"]] }, + "warnings" => ->(obj) { [:warnings, GoogleInSpec::Compute::Property::SslPolicyWarningsArray.parse(obj["warnings"], to_s)] }, } end @@ -108,10 +108,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/sslPolicies' + "projects/{{project}}/global/sslPolicies" end end diff --git a/generate/libraries/google_compute_ssl_policy.rb b/generate/libraries/google_compute_ssl_policy.rb index 8419ecebb..b234fd49e 100644 --- a/generate/libraries/google_compute_ssl_policy.rb +++ b/generate/libraries/google_compute_ssl_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/sslpolicy_warnings' +require "gcp_backend" +require "google/compute/property/sslpolicy_warnings" # A provider to manage Compute Engine resources. class ComputeSslPolicy < GcpResourceBase - name 'google_compute_ssl_policy' - desc 'SslPolicy' - supports platform: 'gcp' + name "google_compute_ssl_policy" + desc "SslPolicy" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -37,22 +37,22 @@ class ComputeSslPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @profile = @fetched['profile'] - @min_tls_version = @fetched['minTlsVersion'] - @enabled_features = @fetched['enabledFeatures'] - @custom_features = @fetched['customFeatures'] - @fingerprint = @fetched['fingerprint'] - @warnings = GoogleInSpec::Compute::Property::SslPolicyWarningsArray.parse(@fetched['warnings'], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @profile = @fetched["profile"] + @min_tls_version = @fetched["minTlsVersion"] + @enabled_features = @fetched["enabledFeatures"] + @custom_features = @fetched["customFeatures"] + @fingerprint = @fetched["fingerprint"] + @warnings = GoogleInSpec::Compute::Property::SslPolicyWarningsArray.parse(@fetched["warnings"], to_s) end # Handles parsing RFC3339 time string @@ -70,21 +70,21 @@ def to_s def un_parse { - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'profile' => ->(x, _) { x.nil? ? [] : ["its('profile') { should cmp #{x.inspect} }"] }, - 'min_tls_version' => ->(x, _) { x.nil? ? [] : ["its('min_tls_version') { should cmp #{x.inspect} }"] }, - 'enabled_features' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('enabled_features') { should include #{single.inspect} }" } }, - 'custom_features' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('custom_features') { should include #{single.inspect} }" } }, - 'fingerprint' => ->(x, _) { x.nil? ? [] : ["its('fingerprint') { should cmp #{x.inspect} }"] }, - 'warnings' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('warnings') { should include '#{single.to_json}' }" } }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "profile" => ->(x, _) { x.nil? ? [] : ["its('profile') { should cmp #{x.inspect} }"] }, + "min_tls_version" => ->(x, _) { x.nil? ? [] : ["its('min_tls_version') { should cmp #{x.inspect} }"] }, + "enabled_features" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('enabled_features') { should include #{single.inspect} }" } }, + "custom_features" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('custom_features') { should include #{single.inspect} }" } }, + "fingerprint" => ->(x, _) { x.nil? ? [] : ["its('fingerprint') { should cmp #{x.inspect} }"] }, + "warnings" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('warnings') { should include '#{single.to_json}' }" } }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'SslPolicy' + name = "SslPolicy" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -93,11 +93,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_ssl_policy', + type: "google_compute_ssl_policy", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -105,10 +105,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/sslPolicies/{{name}}' + "projects/{{project}}/global/sslPolicies/{{name}}" end end diff --git a/generate/libraries/google_compute_subnetwork.rb b/generate/libraries/google_compute_subnetwork.rb index 4c5edbf56..f0414a61c 100644 --- a/generate/libraries/google_compute_subnetwork.rb +++ b/generate/libraries/google_compute_subnetwork.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/subnetwork_log_config' -require 'google/compute/property/subnetwork_secondary_ip_ranges' +require "gcp_backend" +require "google/compute/property/subnetwork_log_config" +require "google/compute/property/subnetwork_secondary_ip_ranges" # A provider to manage Compute Engine resources. class ComputeSubnetwork < GcpResourceBase - name 'google_compute_subnetwork' - desc 'Subnetwork' - supports platform: 'gcp' + name "google_compute_subnetwork" + desc "Subnetwork" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -40,24 +40,24 @@ class ComputeSubnetwork < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @gateway_address = @fetched['gatewayAddress'] - @id = @fetched['id'] - @ip_cidr_range = @fetched['ipCidrRange'] - @name = @fetched['name'] - @network = @fetched['network'] - @fingerprint = @fetched['fingerprint'] - @secondary_ip_ranges = GoogleInSpec::Compute::Property::SubnetworkSecondaryIpRangesArray.parse(@fetched['secondaryIpRanges'], to_s) - @private_ip_google_access = @fetched['privateIpGoogleAccess'] - @region = @fetched['region'] - @log_config = GoogleInSpec::Compute::Property::SubnetworkLogConfig.new(@fetched['logConfig'], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @gateway_address = @fetched["gatewayAddress"] + @id = @fetched["id"] + @ip_cidr_range = @fetched["ipCidrRange"] + @name = @fetched["name"] + @network = @fetched["network"] + @fingerprint = @fetched["fingerprint"] + @secondary_ip_ranges = GoogleInSpec::Compute::Property::SubnetworkSecondaryIpRangesArray.parse(@fetched["secondaryIpRanges"], to_s) + @private_ip_google_access = @fetched["privateIpGoogleAccess"] + @region = @fetched["region"] + @log_config = GoogleInSpec::Compute::Property::SubnetworkLogConfig.new(@fetched["logConfig"], to_s) end # Handles parsing RFC3339 time string @@ -75,23 +75,23 @@ def to_s def un_parse { - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'gateway_address' => ->(x, _) { x.nil? ? [] : ["its('gateway_address') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'ip_cidr_range' => ->(x, _) { x.nil? ? [] : ["its('ip_cidr_range') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'network' => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, - 'fingerprint' => ->(x, _) { x.nil? ? [] : ["its('fingerprint') { should cmp #{x.inspect} }"] }, - 'secondary_ip_ranges' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('secondary_ip_ranges') { should include '#{single.to_json}' }" } }, - 'private_ip_google_access' => ->(x, _) { x.nil? ? [] : ["its('private_ip_google_access') { should cmp #{x.inspect} }"] }, - 'region' => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, - 'log_config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::SubnetworkLogConfig.un_parse(x, 'log_config') }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "gateway_address" => ->(x, _) { x.nil? ? [] : ["its('gateway_address') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "ip_cidr_range" => ->(x, _) { x.nil? ? [] : ["its('ip_cidr_range') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "network" => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, + "fingerprint" => ->(x, _) { x.nil? ? [] : ["its('fingerprint') { should cmp #{x.inspect} }"] }, + "secondary_ip_ranges" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('secondary_ip_ranges') { should include '#{single.to_json}' }" } }, + "private_ip_google_access" => ->(x, _) { x.nil? ? [] : ["its('private_ip_google_access') { should cmp #{x.inspect} }"] }, + "region" => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, + "log_config" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Compute::Property::SubnetworkLogConfig.un_parse(x, "log_config") }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Subnetwork' + name = "Subnetwork" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -100,11 +100,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_subnetwork', + type: "google_compute_subnetwork", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -112,10 +112,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/subnetworks/{{name}}' + "projects/{{project}}/regions/{{region}}/subnetworks/{{name}}" end end diff --git a/generate/libraries/google_compute_subnetwork_iam_policy.rb b/generate/libraries/google_compute_subnetwork_iam_policy.rb index f5c70fe93..58cfc3779 100644 --- a/generate/libraries/google_compute_subnetwork_iam_policy.rb +++ b/generate/libraries/google_compute_subnetwork_iam_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_audit_configs' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_audit_configs" +require "google/iam/property/iam_policy_bindings" # A provider to manage Compute Engine IAM Policy resources. class SubnetworkIamPolicy < GcpResourceBase - name 'google_compute_subnetwork_iam_policy' - desc 'Subnetwork Iam Policy' - supports platform: 'gcp' + name "google_compute_subnetwork_iam_policy" + desc "Subnetwork Iam Policy" + supports platform: "gcp" attr_reader :params attr_reader :bindings @@ -30,13 +30,13 @@ class SubnetworkIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) - @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) + @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched["auditConfigs"], to_s) end def exists? @@ -50,10 +50,10 @@ def to_s private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/subnetworks/{{name}}/getIamPolicy' + "projects/{{project}}/regions/{{region}}/subnetworks/{{name}}/getIamPolicy" end end diff --git a/generate/libraries/google_compute_subnetworks.rb b/generate/libraries/google_compute_subnetworks.rb index 35d8d6562..74ca1efdd 100644 --- a/generate/libraries/google_compute_subnetworks.rb +++ b/generate/libraries/google_compute_subnetworks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeSubnetworks < GcpResourceBase - name 'google_compute_subnetworks' - desc 'Subnetwork plural resource' - supports platform: 'gcp' + name "google_compute_subnetworks" + desc "Subnetwork plural resource" + supports platform: "gcp" attr_reader :table @@ -41,12 +41,12 @@ class ComputeSubnetworks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -74,18 +74,18 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'gatewayAddress' => ->(obj) { [:gateway_address, obj['gatewayAddress']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'ipCidrRange' => ->(obj) { [:ip_cidr_range, obj['ipCidrRange']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, - 'secondaryIpRanges' => ->(obj) { [:secondary_ip_ranges, GoogleInSpec::Compute::Property::SubnetworkSecondaryIpRangesArray.parse(obj['secondaryIpRanges'], to_s)] }, - 'privateIpGoogleAccess' => ->(obj) { [:private_ip_google_access, obj['privateIpGoogleAccess']] }, - 'region' => ->(obj) { [:region, obj['region']] }, - 'logConfig' => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::SubnetworkLogConfig.new(obj['logConfig'], to_s)] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "gatewayAddress" => ->(obj) { [:gateway_address, obj["gatewayAddress"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "ipCidrRange" => ->(obj) { [:ip_cidr_range, obj["ipCidrRange"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "fingerprint" => ->(obj) { [:fingerprint, obj["fingerprint"]] }, + "secondaryIpRanges" => ->(obj) { [:secondary_ip_ranges, GoogleInSpec::Compute::Property::SubnetworkSecondaryIpRangesArray.parse(obj["secondaryIpRanges"], to_s)] }, + "privateIpGoogleAccess" => ->(obj) { [:private_ip_google_access, obj["privateIpGoogleAccess"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, + "logConfig" => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::SubnetworkLogConfig.new(obj["logConfig"], to_s)] }, } end @@ -112,10 +112,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/subnetworks' + "projects/{{project}}/regions/{{region}}/subnetworks" end end diff --git a/generate/libraries/google_compute_target_http_proxies.rb b/generate/libraries/google_compute_target_http_proxies.rb index a1257dd64..110d14214 100644 --- a/generate/libraries/google_compute_target_http_proxies.rb +++ b/generate/libraries/google_compute_target_http_proxies.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeTargetHttpProxys < GcpResourceBase - name 'google_compute_target_http_proxies' - desc 'TargetHttpProxy plural resource' - supports platform: 'gcp' + name "google_compute_target_http_proxies" + desc "TargetHttpProxy plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class ComputeTargetHttpProxys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'urlMap' => ->(obj) { [:url_map, obj['urlMap']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "urlMap" => ->(obj) { [:url_map, obj["urlMap"]] }, } end @@ -98,10 +98,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/targetHttpProxies' + "projects/{{project}}/global/targetHttpProxies" end end diff --git a/generate/libraries/google_compute_target_http_proxy.rb b/generate/libraries/google_compute_target_http_proxy.rb index 468f0ff4e..2ac50f872 100644 --- a/generate/libraries/google_compute_target_http_proxy.rb +++ b/generate/libraries/google_compute_target_http_proxy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeTargetHttpProxy < GcpResourceBase - name 'google_compute_target_http_proxy' - desc 'TargetHttpProxy' - supports platform: 'gcp' + name "google_compute_target_http_proxy" + desc "TargetHttpProxy" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -31,17 +31,17 @@ class ComputeTargetHttpProxy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @url_map = @fetched['urlMap'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @url_map = @fetched["urlMap"] end # Handles parsing RFC3339 time string @@ -59,16 +59,16 @@ def to_s def un_parse { - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'url_map' => ->(x, _) { x.nil? ? [] : ["its('url_map') { should cmp #{x.inspect} }"] }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "url_map" => ->(x, _) { x.nil? ? [] : ["its('url_map') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'TargetHttpProxy' + name = "TargetHttpProxy" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -77,11 +77,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_target_http_proxy', + type: "google_compute_target_http_proxy", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -89,10 +89,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/targetHttpProxies/{{name}}' + "projects/{{project}}/global/targetHttpProxies/{{name}}" end end diff --git a/generate/libraries/google_compute_target_https_proxies.rb b/generate/libraries/google_compute_target_https_proxies.rb index d7fabb3f5..292a3dc69 100644 --- a/generate/libraries/google_compute_target_https_proxies.rb +++ b/generate/libraries/google_compute_target_https_proxies.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeTargetHttpsProxys < GcpResourceBase - name 'google_compute_target_https_proxies' - desc 'TargetHttpsProxy plural resource' - supports platform: 'gcp' + name "google_compute_target_https_proxies" + desc "TargetHttpsProxy plural resource" + supports platform: "gcp" attr_reader :table @@ -37,12 +37,12 @@ class ComputeTargetHttpsProxys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'quicOverride' => ->(obj) { [:quic_override, obj['quicOverride']] }, - 'sslCertificates' => ->(obj) { [:ssl_certificates, obj['sslCertificates']] }, - 'sslPolicy' => ->(obj) { [:ssl_policy, obj['sslPolicy']] }, - 'urlMap' => ->(obj) { [:url_map, obj['urlMap']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "quicOverride" => ->(obj) { [:quic_override, obj["quicOverride"]] }, + "sslCertificates" => ->(obj) { [:ssl_certificates, obj["sslCertificates"]] }, + "sslPolicy" => ->(obj) { [:ssl_policy, obj["sslPolicy"]] }, + "urlMap" => ->(obj) { [:url_map, obj["urlMap"]] }, } end @@ -104,10 +104,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/targetHttpsProxies' + "projects/{{project}}/global/targetHttpsProxies" end end diff --git a/generate/libraries/google_compute_target_https_proxy.rb b/generate/libraries/google_compute_target_https_proxy.rb index 9c96520dd..b072b9b62 100644 --- a/generate/libraries/google_compute_target_https_proxy.rb +++ b/generate/libraries/google_compute_target_https_proxy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeTargetHttpsProxy < GcpResourceBase - name 'google_compute_target_https_proxy' - desc 'TargetHttpsProxy' - supports platform: 'gcp' + name "google_compute_target_https_proxy" + desc "TargetHttpsProxy" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -34,20 +34,20 @@ class ComputeTargetHttpsProxy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @quic_override = @fetched['quicOverride'] - @ssl_certificates = @fetched['sslCertificates'] - @ssl_policy = @fetched['sslPolicy'] - @url_map = @fetched['urlMap'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @quic_override = @fetched["quicOverride"] + @ssl_certificates = @fetched["sslCertificates"] + @ssl_policy = @fetched["sslPolicy"] + @url_map = @fetched["urlMap"] end # Handles parsing RFC3339 time string @@ -65,19 +65,19 @@ def to_s def un_parse { - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'quic_override' => ->(x, _) { x.nil? ? [] : ["its('quic_override') { should cmp #{x.inspect} }"] }, - 'ssl_certificates' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('ssl_certificates') { should include #{single.inspect} }" } }, - 'ssl_policy' => ->(x, _) { x.nil? ? [] : ["its('ssl_policy') { should cmp #{x.inspect} }"] }, - 'url_map' => ->(x, _) { x.nil? ? [] : ["its('url_map') { should cmp #{x.inspect} }"] }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "quic_override" => ->(x, _) { x.nil? ? [] : ["its('quic_override') { should cmp #{x.inspect} }"] }, + "ssl_certificates" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('ssl_certificates') { should include #{single.inspect} }" } }, + "ssl_policy" => ->(x, _) { x.nil? ? [] : ["its('ssl_policy') { should cmp #{x.inspect} }"] }, + "url_map" => ->(x, _) { x.nil? ? [] : ["its('url_map') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'TargetHttpsProxy' + name = "TargetHttpsProxy" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -86,11 +86,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_target_https_proxy', + type: "google_compute_target_https_proxy", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -98,10 +98,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/targetHttpsProxies/{{name}}' + "projects/{{project}}/global/targetHttpsProxies/{{name}}" end end diff --git a/generate/libraries/google_compute_target_pool.rb b/generate/libraries/google_compute_target_pool.rb index e6ab7f4f1..b6817f691 100644 --- a/generate/libraries/google_compute_target_pool.rb +++ b/generate/libraries/google_compute_target_pool.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeTargetPool < GcpResourceBase - name 'google_compute_target_pool' - desc 'TargetPool' - supports platform: 'gcp' + name "google_compute_target_pool" + desc "TargetPool" + supports platform: "gcp" attr_reader :params attr_reader :backup_pool @@ -36,22 +36,22 @@ class ComputeTargetPool < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @backup_pool = @fetched['backupPool'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @failover_ratio = @fetched['failoverRatio'] - @health_check = @fetched['healthCheck'] - @id = @fetched['id'] - @instances = @fetched['instances'] - @name = @fetched['name'] - @session_affinity = @fetched['sessionAffinity'] - @region = @fetched['region'] + @backup_pool = @fetched["backupPool"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @failover_ratio = @fetched["failoverRatio"] + @health_check = @fetched["healthCheck"] + @id = @fetched["id"] + @instances = @fetched["instances"] + @name = @fetched["name"] + @session_affinity = @fetched["sessionAffinity"] + @region = @fetched["region"] end # Handles parsing RFC3339 time string @@ -69,21 +69,21 @@ def to_s def un_parse { - 'backup_pool' => ->(x, _) { x.nil? ? [] : ["its('backup_pool') { should cmp #{x.inspect} }"] }, - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'failover_ratio' => ->(x, _) { x.nil? ? [] : ["its('failover_ratio') { should cmp #{x.inspect} }"] }, - 'health_check' => ->(x, _) { x.nil? ? [] : ["its('health_check') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'instances' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('instances') { should include #{single.inspect} }" } }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'session_affinity' => ->(x, _) { x.nil? ? [] : ["its('session_affinity') { should cmp #{x.inspect} }"] }, - 'region' => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, + "backup_pool" => ->(x, _) { x.nil? ? [] : ["its('backup_pool') { should cmp #{x.inspect} }"] }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "failover_ratio" => ->(x, _) { x.nil? ? [] : ["its('failover_ratio') { should cmp #{x.inspect} }"] }, + "health_check" => ->(x, _) { x.nil? ? [] : ["its('health_check') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "instances" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('instances') { should include #{single.inspect} }" } }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "session_affinity" => ->(x, _) { x.nil? ? [] : ["its('session_affinity') { should cmp #{x.inspect} }"] }, + "region" => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'TargetPool' + name = "TargetPool" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -92,11 +92,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_target_pool', + type: "google_compute_target_pool", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -110,10 +110,10 @@ def has_target_instance?(name, zone) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/targetPools/{{name}}' + "projects/{{project}}/regions/{{region}}/targetPools/{{name}}" end end diff --git a/generate/libraries/google_compute_target_pools.rb b/generate/libraries/google_compute_target_pools.rb index 166a803d7..535efb2c7 100644 --- a/generate/libraries/google_compute_target_pools.rb +++ b/generate/libraries/google_compute_target_pools.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeTargetPools < GcpResourceBase - name 'google_compute_target_pools' - desc 'TargetPool plural resource' - supports platform: 'gcp' + name "google_compute_target_pools" + desc "TargetPool plural resource" + supports platform: "gcp" attr_reader :table @@ -39,12 +39,12 @@ class ComputeTargetPools < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'backupPool' => ->(obj) { [:backup_pool, obj['backupPool']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'failoverRatio' => ->(obj) { [:failover_ratio, obj['failoverRatio']] }, - 'healthCheck' => ->(obj) { [:health_check, obj['healthCheck']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'instances' => ->(obj) { [:instances, obj['instances']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'sessionAffinity' => ->(obj) { [:session_affinity, obj['sessionAffinity']] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "backupPool" => ->(obj) { [:backup_pool, obj["backupPool"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "failoverRatio" => ->(obj) { [:failover_ratio, obj["failoverRatio"]] }, + "healthCheck" => ->(obj) { [:health_check, obj["healthCheck"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "instances" => ->(obj) { [:instances, obj["instances"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "sessionAffinity" => ->(obj) { [:session_affinity, obj["sessionAffinity"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end @@ -108,10 +108,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/targetPools' + "projects/{{project}}/regions/{{region}}/targetPools" end end diff --git a/generate/libraries/google_compute_target_tcp_proxies.rb b/generate/libraries/google_compute_target_tcp_proxies.rb index 4c5c21664..6716e2b1c 100644 --- a/generate/libraries/google_compute_target_tcp_proxies.rb +++ b/generate/libraries/google_compute_target_tcp_proxies.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeTargetTcpProxys < GcpResourceBase - name 'google_compute_target_tcp_proxies' - desc 'TargetTcpProxy plural resource' - supports platform: 'gcp' + name "google_compute_target_tcp_proxies" + desc "TargetTcpProxy plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class ComputeTargetTcpProxys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'proxyHeader' => ->(obj) { [:proxy_header, obj['proxyHeader']] }, - 'service' => ->(obj) { [:service, obj['service']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "proxyHeader" => ->(obj) { [:proxy_header, obj["proxyHeader"]] }, + "service" => ->(obj) { [:service, obj["service"]] }, } end @@ -100,10 +100,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/targetTcpProxies' + "projects/{{project}}/global/targetTcpProxies" end end diff --git a/generate/libraries/google_compute_target_tcp_proxy.rb b/generate/libraries/google_compute_target_tcp_proxy.rb index 1311e09d6..c5f787304 100644 --- a/generate/libraries/google_compute_target_tcp_proxy.rb +++ b/generate/libraries/google_compute_target_tcp_proxy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeTargetTcpProxy < GcpResourceBase - name 'google_compute_target_tcp_proxy' - desc 'TargetTcpProxy' - supports platform: 'gcp' + name "google_compute_target_tcp_proxy" + desc "TargetTcpProxy" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -32,18 +32,18 @@ class ComputeTargetTcpProxy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @proxy_header = @fetched['proxyHeader'] - @service = @fetched['service'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @proxy_header = @fetched["proxyHeader"] + @service = @fetched["service"] end # Handles parsing RFC3339 time string @@ -61,17 +61,17 @@ def to_s def un_parse { - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'proxy_header' => ->(x, _) { x.nil? ? [] : ["its('proxy_header') { should cmp #{x.inspect} }"] }, - 'service' => ->(x, _) { x.nil? ? [] : ["its('service') { should cmp #{x.inspect} }"] }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "proxy_header" => ->(x, _) { x.nil? ? [] : ["its('proxy_header') { should cmp #{x.inspect} }"] }, + "service" => ->(x, _) { x.nil? ? [] : ["its('service') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'TargetTcpProxy' + name = "TargetTcpProxy" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -80,11 +80,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_target_tcp_proxy', + type: "google_compute_target_tcp_proxy", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -92,10 +92,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/targetTcpProxies/{{name}}' + "projects/{{project}}/global/targetTcpProxies/{{name}}" end end diff --git a/generate/libraries/google_compute_url_map.rb b/generate/libraries/google_compute_url_map.rb index 5eec4f033..fcc15a297 100644 --- a/generate/libraries/google_compute_url_map.rb +++ b/generate/libraries/google_compute_url_map.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/urlmap_host_rules' -require 'google/compute/property/urlmap_path_matchers' -require 'google/compute/property/urlmap_tests' +require "gcp_backend" +require "google/compute/property/urlmap_host_rules" +require "google/compute/property/urlmap_path_matchers" +require "google/compute/property/urlmap_tests" # A provider to manage Compute Engine resources. class ComputeUrlMap < GcpResourceBase - name 'google_compute_url_map' - desc 'UrlMap' - supports platform: 'gcp' + name "google_compute_url_map" + desc "UrlMap" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -38,21 +38,21 @@ class ComputeUrlMap < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @default_service = @fetched['defaultService'] - @description = @fetched['description'] - @host_rules = GoogleInSpec::Compute::Property::UrlMapHostRulesArray.parse(@fetched['hostRules'], to_s) - @id = @fetched['id'] - @fingerprint = @fetched['fingerprint'] - @name = @fetched['name'] - @path_matchers = GoogleInSpec::Compute::Property::UrlMapPathMatchersArray.parse(@fetched['pathMatchers'], to_s) - @tests = GoogleInSpec::Compute::Property::UrlMapTestsArray.parse(@fetched['tests'], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @default_service = @fetched["defaultService"] + @description = @fetched["description"] + @host_rules = GoogleInSpec::Compute::Property::UrlMapHostRulesArray.parse(@fetched["hostRules"], to_s) + @id = @fetched["id"] + @fingerprint = @fetched["fingerprint"] + @name = @fetched["name"] + @path_matchers = GoogleInSpec::Compute::Property::UrlMapPathMatchersArray.parse(@fetched["pathMatchers"], to_s) + @tests = GoogleInSpec::Compute::Property::UrlMapTestsArray.parse(@fetched["tests"], to_s) end # Handles parsing RFC3339 time string @@ -70,20 +70,20 @@ def to_s def un_parse { - 'creation_timestamp' => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, - 'default_service' => ->(x, _) { x.nil? ? [] : ["its('default_service') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'host_rules' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('host_rules') { should include '#{single.to_json}' }" } }, - 'id' => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, - 'fingerprint' => ->(x, _) { x.nil? ? [] : ["its('fingerprint') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'path_matchers' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('path_matchers') { should include '#{single.to_json}' }" } }, - 'tests' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('tests') { should include '#{single.to_json}' }" } }, + "creation_timestamp" => ->(x, _) { x.nil? ? [] : ["its('creation_timestamp.to_s') { should cmp '#{x.inspect}' }"] }, + "default_service" => ->(x, _) { x.nil? ? [] : ["its('default_service') { should cmp #{x.inspect} }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "host_rules" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('host_rules') { should include '#{single.to_json}' }" } }, + "id" => ->(x, _) { x.nil? ? [] : ["its('id') { should cmp #{x.inspect} }"] }, + "fingerprint" => ->(x, _) { x.nil? ? [] : ["its('fingerprint') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "path_matchers" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('path_matchers') { should include '#{single.to_json}' }" } }, + "tests" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('tests') { should include '#{single.to_json}' }" } }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'UrlMap' + name = "UrlMap" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -92,11 +92,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_compute_url_map', + type: "google_compute_url_map", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -104,10 +104,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/urlMaps/{{name}}' + "projects/{{project}}/global/urlMaps/{{name}}" end end diff --git a/generate/libraries/google_compute_url_maps.rb b/generate/libraries/google_compute_url_maps.rb index 45ee1bf48..0166750fe 100644 --- a/generate/libraries/google_compute_url_maps.rb +++ b/generate/libraries/google_compute_url_maps.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeUrlMaps < GcpResourceBase - name 'google_compute_url_maps' - desc 'UrlMap plural resource' - supports platform: 'gcp' + name "google_compute_url_maps" + desc "UrlMap plural resource" + supports platform: "gcp" attr_reader :table @@ -38,12 +38,12 @@ class ComputeUrlMaps < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'defaultService' => ->(obj) { [:default_service, obj['defaultService']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'hostRules' => ->(obj) { [:host_rules, GoogleInSpec::Compute::Property::UrlMapHostRulesArray.parse(obj['hostRules'], to_s)] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'pathMatchers' => ->(obj) { [:path_matchers, GoogleInSpec::Compute::Property::UrlMapPathMatchersArray.parse(obj['pathMatchers'], to_s)] }, - 'tests' => ->(obj) { [:tests, GoogleInSpec::Compute::Property::UrlMapTestsArray.parse(obj['tests'], to_s)] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "defaultService" => ->(obj) { [:default_service, obj["defaultService"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "hostRules" => ->(obj) { [:host_rules, GoogleInSpec::Compute::Property::UrlMapHostRulesArray.parse(obj["hostRules"], to_s)] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "fingerprint" => ->(obj) { [:fingerprint, obj["fingerprint"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "pathMatchers" => ->(obj) { [:path_matchers, GoogleInSpec::Compute::Property::UrlMapPathMatchersArray.parse(obj["pathMatchers"], to_s)] }, + "tests" => ->(obj) { [:tests, GoogleInSpec::Compute::Property::UrlMapTestsArray.parse(obj["tests"], to_s)] }, } end @@ -106,10 +106,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/urlMaps' + "projects/{{project}}/global/urlMaps" end end diff --git a/generate/libraries/google_compute_vpn_tunnel.rb b/generate/libraries/google_compute_vpn_tunnel.rb index a6813d618..f84fa6db6 100644 --- a/generate/libraries/google_compute_vpn_tunnel.rb +++ b/generate/libraries/google_compute_vpn_tunnel.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleComputeVpnTunnel < GcpResourceBase - name 'google_compute_vpn_tunnel' - desc 'Verifies settings for a compute vpn_tunnel' + name "google_compute_vpn_tunnel" + desc "Verifies settings for a compute vpn_tunnel" example " describe google_compute_vpn_tunnel(project: 'chef-inspec-gcp', region: 'europe-west2', name: 'gcp-inspec-vpn_tunnel') do diff --git a/generate/libraries/google_compute_vpn_tunnels.rb b/generate/libraries/google_compute_vpn_tunnels.rb index 2209f615a..b0d28587c 100644 --- a/generate/libraries/google_compute_vpn_tunnels.rb +++ b/generate/libraries/google_compute_vpn_tunnels.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleComputeVpnTunnels < GcpResourceBase - name 'google_compute_vpn_tunnels' - desc 'Verifies settings for GCP compute vpn_tunnels in bulk' + name "google_compute_vpn_tunnels" + desc "Verifies settings for GCP compute vpn_tunnels in bulk" example " describe google_compute_vpn_tunnels(project: 'chef-inspec-gcp', region: 'europe-west2') do diff --git a/generate/libraries/google_compute_zone.rb b/generate/libraries/google_compute_zone.rb index 171bec85c..c8b6038f5 100644 --- a/generate/libraries/google_compute_zone.rb +++ b/generate/libraries/google_compute_zone.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleComputeZone < GcpResourceBase - name 'google_compute_zone' - desc 'Verifies settings for a zone' + name "google_compute_zone" + desc "Verifies settings for a zone" example " describe google_compute_zone(project: 'chef-inspec-gcp', zone: 'us-east1-b') do @@ -26,8 +26,8 @@ def initialize(opts = {}) # helper method for retrieving a region name def region_name - return '' if !defined?(region) || region.nil? - region.split('/').last + return "" if !defined?(region) || region.nil? + region.split("/").last end def exists? @@ -36,7 +36,7 @@ def exists? def up? return false if !defined?(status) || status.nil? - status == 'UP' + status == "UP" end def to_s diff --git a/generate/libraries/google_compute_zones.rb b/generate/libraries/google_compute_zones.rb index 611a8e3b6..f3c6197f7 100644 --- a/generate/libraries/google_compute_zones.rb +++ b/generate/libraries/google_compute_zones.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleComputeZones < GcpResourceBase - name 'google_compute_zones' - desc 'Verifies settings for GCP compute zones in bulk' + name "google_compute_zones" + desc "Verifies settings for GCP compute zones in bulk" example " describe google_compute_zones(project: 'chef-inspec-gcp') do diff --git a/generate/libraries/google_container_cluster.rb b/generate/libraries/google_container_cluster.rb index 930eadd06..b490a19ab 100644 --- a/generate/libraries/google_container_cluster.rb +++ b/generate/libraries/google_container_cluster.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'google/apis/container_v1beta1' + +require "gcp_backend" +require "google/apis/container_v1beta1" module Inspec::Resources class GoogleContainerCluster < GcpResourceBase - name 'google_container_cluster' - desc 'Verifies settings for a google container cluster' + name "google_container_cluster" + desc "Verifies settings for a google container cluster" example " describe google_container_cluster(project: 'chef-inspec-gcp', zone: 'europe-west2-a', name: 'cluster-name') do @@ -81,7 +81,7 @@ def has_network_policy_enabled? def has_master_auth_client_key? return false if !defined?(@cluster.master_auth.client_key) return false if @cluster.master_auth.client_key.nil? - return false if @cluster.master_auth.client_key=='' + return false if @cluster.master_auth.client_key=="" true end diff --git a/generate/libraries/google_container_clusters.rb b/generate/libraries/google_container_clusters.rb index 0d410fc3c..413a0ac01 100644 --- a/generate/libraries/google_container_clusters.rb +++ b/generate/libraries/google_container_clusters.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleContainerClusters < GcpResourceBase - name 'google_container_clusters' - desc 'Verifies settings for GCP container clusters in bulk' + name "google_container_clusters" + desc "Verifies settings for GCP container clusters in bulk" example " describe google_container_clusters(project: 'chef-inspec-gcp', zone: 'europe-west2-a') do diff --git a/generate/libraries/google_container_node_pool.rb b/generate/libraries/google_container_node_pool.rb index 9debefdfa..6901e79e0 100644 --- a/generate/libraries/google_container_node_pool.rb +++ b/generate/libraries/google_container_node_pool.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'google/apis/container_v1' + +require "gcp_backend" +require "google/apis/container_v1" module Inspec::Resources class GoogleContainerNodePool < GcpResourceBase - name 'google_container_node_pool' - desc 'Verifies settings for a container nodepool' + name "google_container_node_pool" + desc "Verifies settings for a container nodepool" example " describe google_container_node_pool(project: 'chef-inspec-gcp', zone: 'europe-west2-a', cluster_name: 'cluster-name', nodepool_name: 'inspec-test') do @@ -38,14 +38,14 @@ def has_automatic_node_upgrade? end def config_image_type - return '' if !defined?(@nodepool.config.image_type) - return '' if @nodepool.config.image_type.nil? + return "" if !defined?(@nodepool.config.image_type) + return "" if @nodepool.config.image_type.nil? @nodepool.config.image_type end def config_service_account - return '' if !defined?(@nodepool.config.service_account) - return '' if @nodepool.config.service_account.nil? + return "" if !defined?(@nodepool.config.service_account) + return "" if @nodepool.config.service_account.nil? @nodepool.config.service_account end diff --git a/generate/libraries/google_container_node_pools.rb b/generate/libraries/google_container_node_pools.rb index f46d1533c..d0776f2c5 100644 --- a/generate/libraries/google_container_node_pools.rb +++ b/generate/libraries/google_container_node_pools.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleContainerNodePools < GcpResourceBase - name 'google_container_node_pools' - desc 'Verifies settings for GCP container node pools in bulk' + name "google_container_node_pools" + desc "Verifies settings for GCP container node pools in bulk" example " describe google_container_node_pools(project: 'chef-inspec-gcp', node_pool: 'europe-west2-a', cluster_name: 'inspec-gcp-cluster') diff --git a/generate/libraries/google_container_regional_cluster.rb b/generate/libraries/google_container_regional_cluster.rb index 6807ef806..1b26bfc66 100644 --- a/generate/libraries/google_container_regional_cluster.rb +++ b/generate/libraries/google_container_regional_cluster.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,31 +13,31 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/container/property/regionalcluster_addons_config' -require 'google/container/property/regionalcluster_addons_config_horizontal_pod_autoscaling' -require 'google/container/property/regionalcluster_addons_config_http_load_balancing' -require 'google/container/property/regionalcluster_addons_config_kubernetes_dashboard' -require 'google/container/property/regionalcluster_addons_config_network_policy_config' -require 'google/container/property/regionalcluster_conditions' -require 'google/container/property/regionalcluster_default_max_pods_constraint' -require 'google/container/property/regionalcluster_ip_allocation_policy' -require 'google/container/property/regionalcluster_legacy_abac' -require 'google/container/property/regionalcluster_master_auth' -require 'google/container/property/regionalcluster_master_auth_client_certificate_config' -require 'google/container/property/regionalcluster_master_authorized_networks_config' -require 'google/container/property/regionalcluster_master_authorized_networks_config_cidr_blocks' -require 'google/container/property/regionalcluster_network_policy' -require 'google/container/property/regionalcluster_node_config' -require 'google/container/property/regionalcluster_node_config_accelerators' -require 'google/container/property/regionalcluster_node_config_taints' -require 'google/container/property/regionalcluster_private_cluster_config' +require "gcp_backend" +require "google/container/property/regionalcluster_addons_config" +require "google/container/property/regionalcluster_addons_config_horizontal_pod_autoscaling" +require "google/container/property/regionalcluster_addons_config_http_load_balancing" +require "google/container/property/regionalcluster_addons_config_kubernetes_dashboard" +require "google/container/property/regionalcluster_addons_config_network_policy_config" +require "google/container/property/regionalcluster_conditions" +require "google/container/property/regionalcluster_default_max_pods_constraint" +require "google/container/property/regionalcluster_ip_allocation_policy" +require "google/container/property/regionalcluster_legacy_abac" +require "google/container/property/regionalcluster_master_auth" +require "google/container/property/regionalcluster_master_auth_client_certificate_config" +require "google/container/property/regionalcluster_master_authorized_networks_config" +require "google/container/property/regionalcluster_master_authorized_networks_config_cidr_blocks" +require "google/container/property/regionalcluster_network_policy" +require "google/container/property/regionalcluster_node_config" +require "google/container/property/regionalcluster_node_config_accelerators" +require "google/container/property/regionalcluster_node_config_taints" +require "google/container/property/regionalcluster_private_cluster_config" # A provider to manage Google Kubernetes Engine resources. class ContainerRegionalCluster < GcpResourceBase - name 'google_container_regional_cluster' - desc 'RegionalCluster' - supports platform: 'gcp' + name "google_container_regional_cluster" + desc "RegionalCluster" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -79,47 +79,47 @@ class ContainerRegionalCluster < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @name = @fetched['name'] - @description = @fetched['description'] - @initial_node_count = @fetched['initialNodeCount'] - @node_config = GoogleInSpec::Container::Property::RegionalClusterNodeConfig.new(@fetched['nodeConfig'], to_s) - @master_auth = GoogleInSpec::Container::Property::RegionalClusterMasterAuth.new(@fetched['masterAuth'], to_s) - @logging_service = @fetched['loggingService'] - @monitoring_service = @fetched['monitoringService'] - @network = @fetched['network'] - @private_cluster_config = GoogleInSpec::Container::Property::RegionalClusterPrivateClusterConfig.new(@fetched['privateClusterConfig'], to_s) - @cluster_ipv4_cidr = @fetched['clusterIpv4Cidr'] - @addons_config = GoogleInSpec::Container::Property::RegionalClusterAddonsConfig.new(@fetched['addonsConfig'], to_s) - @subnetwork = @fetched['subnetwork'] - @locations = @fetched['locations'] - @resource_labels = @fetched['resourceLabels'] - @label_fingerprint = @fetched['labelFingerprint'] - @legacy_abac = GoogleInSpec::Container::Property::RegionalClusterLegacyAbac.new(@fetched['legacyAbac'], to_s) - @network_policy = GoogleInSpec::Container::Property::RegionalClusterNetworkPolicy.new(@fetched['networkPolicy'], to_s) - @default_max_pods_constraint = GoogleInSpec::Container::Property::RegionalClusterDefaultMaxPodsConstraint.new(@fetched['defaultMaxPodsConstraint'], to_s) - @ip_allocation_policy = GoogleInSpec::Container::Property::RegionalClusterIpAllocationPolicy.new(@fetched['ipAllocationPolicy'], to_s) - @endpoint = @fetched['endpoint'] - @initial_cluster_version = @fetched['initialClusterVersion'] - @current_master_version = @fetched['currentMasterVersion'] - @current_node_version = @fetched['currentNodeVersion'] - @create_time = parse_time_string(@fetched['createTime']) - @status = @fetched['status'] - @status_message = @fetched['statusMessage'] - @node_ipv4_cidr_size = @fetched['nodeIpv4CidrSize'] - @services_ipv4_cidr = @fetched['servicesIpv4Cidr'] - @current_node_count = @fetched['currentNodeCount'] - @expire_time = parse_time_string(@fetched['expireTime']) - @enable_tpu = @fetched['enableTpu'] - @tpu_ipv4_cidr_block = @fetched['tpuIpv4CidrBlock'] - @conditions = GoogleInSpec::Container::Property::RegionalClusterConditionsArray.parse(@fetched['conditions'], to_s) - @master_authorized_networks_config = GoogleInSpec::Container::Property::RegionalClusterMasterAuthorizedNetworksConfig.new(@fetched['masterAuthorizedNetworksConfig'], to_s) - @location = @fetched['location'] + @name = @fetched["name"] + @description = @fetched["description"] + @initial_node_count = @fetched["initialNodeCount"] + @node_config = GoogleInSpec::Container::Property::RegionalClusterNodeConfig.new(@fetched["nodeConfig"], to_s) + @master_auth = GoogleInSpec::Container::Property::RegionalClusterMasterAuth.new(@fetched["masterAuth"], to_s) + @logging_service = @fetched["loggingService"] + @monitoring_service = @fetched["monitoringService"] + @network = @fetched["network"] + @private_cluster_config = GoogleInSpec::Container::Property::RegionalClusterPrivateClusterConfig.new(@fetched["privateClusterConfig"], to_s) + @cluster_ipv4_cidr = @fetched["clusterIpv4Cidr"] + @addons_config = GoogleInSpec::Container::Property::RegionalClusterAddonsConfig.new(@fetched["addonsConfig"], to_s) + @subnetwork = @fetched["subnetwork"] + @locations = @fetched["locations"] + @resource_labels = @fetched["resourceLabels"] + @label_fingerprint = @fetched["labelFingerprint"] + @legacy_abac = GoogleInSpec::Container::Property::RegionalClusterLegacyAbac.new(@fetched["legacyAbac"], to_s) + @network_policy = GoogleInSpec::Container::Property::RegionalClusterNetworkPolicy.new(@fetched["networkPolicy"], to_s) + @default_max_pods_constraint = GoogleInSpec::Container::Property::RegionalClusterDefaultMaxPodsConstraint.new(@fetched["defaultMaxPodsConstraint"], to_s) + @ip_allocation_policy = GoogleInSpec::Container::Property::RegionalClusterIpAllocationPolicy.new(@fetched["ipAllocationPolicy"], to_s) + @endpoint = @fetched["endpoint"] + @initial_cluster_version = @fetched["initialClusterVersion"] + @current_master_version = @fetched["currentMasterVersion"] + @current_node_version = @fetched["currentNodeVersion"] + @create_time = parse_time_string(@fetched["createTime"]) + @status = @fetched["status"] + @status_message = @fetched["statusMessage"] + @node_ipv4_cidr_size = @fetched["nodeIpv4CidrSize"] + @services_ipv4_cidr = @fetched["servicesIpv4Cidr"] + @current_node_count = @fetched["currentNodeCount"] + @expire_time = parse_time_string(@fetched["expireTime"]) + @enable_tpu = @fetched["enableTpu"] + @tpu_ipv4_cidr_block = @fetched["tpuIpv4CidrBlock"] + @conditions = GoogleInSpec::Container::Property::RegionalClusterConditionsArray.parse(@fetched["conditions"], to_s) + @master_authorized_networks_config = GoogleInSpec::Container::Property::RegionalClusterMasterAuthorizedNetworksConfig.new(@fetched["masterAuthorizedNetworksConfig"], to_s) + @location = @fetched["location"] end # Handles parsing RFC3339 time string @@ -137,46 +137,46 @@ def to_s def un_parse { - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'initial_node_count' => ->(x, _) { x.nil? ? [] : ["its('initial_node_count') { should cmp #{x.inspect} }"] }, - 'node_config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterNodeConfig.un_parse(x, 'node_config') }, - 'master_auth' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterMasterAuth.un_parse(x, 'master_auth') }, - 'logging_service' => ->(x, _) { x.nil? ? [] : ["its('logging_service') { should cmp #{x.inspect} }"] }, - 'monitoring_service' => ->(x, _) { x.nil? ? [] : ["its('monitoring_service') { should cmp #{x.inspect} }"] }, - 'network' => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, - 'private_cluster_config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterPrivateClusterConfig.un_parse(x, 'private_cluster_config') }, - 'cluster_ipv4_cidr' => ->(x, _) { x.nil? ? [] : ["its('cluster_ipv4_cidr') { should cmp #{x.inspect} }"] }, - 'addons_config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterAddonsConfig.un_parse(x, 'addons_config') }, - 'subnetwork' => ->(x, _) { x.nil? ? [] : ["its('subnetwork') { should cmp #{x.inspect} }"] }, - 'locations' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('locations') { should include #{single.inspect} }" } }, - 'resource_labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('resource_labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'label_fingerprint' => ->(x, _) { x.nil? ? [] : ["its('label_fingerprint') { should cmp #{x.inspect} }"] }, - 'legacy_abac' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterLegacyAbac.un_parse(x, 'legacy_abac') }, - 'network_policy' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterNetworkPolicy.un_parse(x, 'network_policy') }, - 'default_max_pods_constraint' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterDefaultMaxPodsConstraint.un_parse(x, 'default_max_pods_constraint') }, - 'ip_allocation_policy' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterIpAllocationPolicy.un_parse(x, 'ip_allocation_policy') }, - 'endpoint' => ->(x, _) { x.nil? ? [] : ["its('endpoint') { should cmp #{x.inspect} }"] }, - 'initial_cluster_version' => ->(x, _) { x.nil? ? [] : ["its('initial_cluster_version') { should cmp #{x.inspect} }"] }, - 'current_master_version' => ->(x, _) { x.nil? ? [] : ["its('current_master_version') { should cmp #{x.inspect} }"] }, - 'current_node_version' => ->(x, _) { x.nil? ? [] : ["its('current_node_version') { should cmp #{x.inspect} }"] }, - 'create_time' => ->(x, _) { x.nil? ? [] : ["its('create_time.to_s') { should cmp '#{x.inspect}' }"] }, - 'status' => ->(x, _) { x.nil? ? [] : ["its('status') { should cmp #{x.inspect} }"] }, - 'status_message' => ->(x, _) { x.nil? ? [] : ["its('status_message') { should cmp #{x.inspect} }"] }, - 'node_ipv4_cidr_size' => ->(x, _) { x.nil? ? [] : ["its('node_ipv4_cidr_size') { should cmp #{x.inspect} }"] }, - 'services_ipv4_cidr' => ->(x, _) { x.nil? ? [] : ["its('services_ipv4_cidr') { should cmp #{x.inspect} }"] }, - 'current_node_count' => ->(x, _) { x.nil? ? [] : ["its('current_node_count') { should cmp #{x.inspect} }"] }, - 'expire_time' => ->(x, _) { x.nil? ? [] : ["its('expire_time.to_s') { should cmp '#{x.inspect}' }"] }, - 'enable_tpu' => ->(x, _) { x.nil? ? [] : ["its('enable_tpu') { should cmp #{x.inspect} }"] }, - 'tpu_ipv4_cidr_block' => ->(x, _) { x.nil? ? [] : ["its('tpu_ipv4_cidr_block') { should cmp #{x.inspect} }"] }, - 'conditions' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('conditions') { should include '#{single.to_json}' }" } }, - 'master_authorized_networks_config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterMasterAuthorizedNetworksConfig.un_parse(x, 'master_authorized_networks_config') }, - 'location' => ->(x, _) { x.nil? ? [] : ["its('location') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "initial_node_count" => ->(x, _) { x.nil? ? [] : ["its('initial_node_count') { should cmp #{x.inspect} }"] }, + "node_config" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterNodeConfig.un_parse(x, "node_config") }, + "master_auth" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterMasterAuth.un_parse(x, "master_auth") }, + "logging_service" => ->(x, _) { x.nil? ? [] : ["its('logging_service') { should cmp #{x.inspect} }"] }, + "monitoring_service" => ->(x, _) { x.nil? ? [] : ["its('monitoring_service') { should cmp #{x.inspect} }"] }, + "network" => ->(x, _) { x.nil? ? [] : ["its('network') { should cmp #{x.inspect} }"] }, + "private_cluster_config" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterPrivateClusterConfig.un_parse(x, "private_cluster_config") }, + "cluster_ipv4_cidr" => ->(x, _) { x.nil? ? [] : ["its('cluster_ipv4_cidr') { should cmp #{x.inspect} }"] }, + "addons_config" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterAddonsConfig.un_parse(x, "addons_config") }, + "subnetwork" => ->(x, _) { x.nil? ? [] : ["its('subnetwork') { should cmp #{x.inspect} }"] }, + "locations" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('locations') { should include #{single.inspect} }" } }, + "resource_labels" => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('resource_labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "label_fingerprint" => ->(x, _) { x.nil? ? [] : ["its('label_fingerprint') { should cmp #{x.inspect} }"] }, + "legacy_abac" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterLegacyAbac.un_parse(x, "legacy_abac") }, + "network_policy" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterNetworkPolicy.un_parse(x, "network_policy") }, + "default_max_pods_constraint" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterDefaultMaxPodsConstraint.un_parse(x, "default_max_pods_constraint") }, + "ip_allocation_policy" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterIpAllocationPolicy.un_parse(x, "ip_allocation_policy") }, + "endpoint" => ->(x, _) { x.nil? ? [] : ["its('endpoint') { should cmp #{x.inspect} }"] }, + "initial_cluster_version" => ->(x, _) { x.nil? ? [] : ["its('initial_cluster_version') { should cmp #{x.inspect} }"] }, + "current_master_version" => ->(x, _) { x.nil? ? [] : ["its('current_master_version') { should cmp #{x.inspect} }"] }, + "current_node_version" => ->(x, _) { x.nil? ? [] : ["its('current_node_version') { should cmp #{x.inspect} }"] }, + "create_time" => ->(x, _) { x.nil? ? [] : ["its('create_time.to_s') { should cmp '#{x.inspect}' }"] }, + "status" => ->(x, _) { x.nil? ? [] : ["its('status') { should cmp #{x.inspect} }"] }, + "status_message" => ->(x, _) { x.nil? ? [] : ["its('status_message') { should cmp #{x.inspect} }"] }, + "node_ipv4_cidr_size" => ->(x, _) { x.nil? ? [] : ["its('node_ipv4_cidr_size') { should cmp #{x.inspect} }"] }, + "services_ipv4_cidr" => ->(x, _) { x.nil? ? [] : ["its('services_ipv4_cidr') { should cmp #{x.inspect} }"] }, + "current_node_count" => ->(x, _) { x.nil? ? [] : ["its('current_node_count') { should cmp #{x.inspect} }"] }, + "expire_time" => ->(x, _) { x.nil? ? [] : ["its('expire_time.to_s') { should cmp '#{x.inspect}' }"] }, + "enable_tpu" => ->(x, _) { x.nil? ? [] : ["its('enable_tpu') { should cmp #{x.inspect} }"] }, + "tpu_ipv4_cidr_block" => ->(x, _) { x.nil? ? [] : ["its('tpu_ipv4_cidr_block') { should cmp #{x.inspect} }"] }, + "conditions" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('conditions') { should include '#{single.to_json}' }" } }, + "master_authorized_networks_config" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalClusterMasterAuthorizedNetworksConfig.un_parse(x, "master_authorized_networks_config") }, + "location" => ->(x, _) { x.nil? ? [] : ["its('location') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'RegionalCluster' + name = "RegionalCluster" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -185,11 +185,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_container_regional_cluster', + type: "google_container_regional_cluster", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -197,10 +197,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://container.googleapis.com/v1/' + "https://container.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/clusters/{{name}}' + "projects/{{project}}/locations/{{location}}/clusters/{{name}}" end end diff --git a/generate/libraries/google_container_regional_clusters.rb b/generate/libraries/google_container_regional_clusters.rb index 406177a9a..1f87086ae 100644 --- a/generate/libraries/google_container_regional_clusters.rb +++ b/generate/libraries/google_container_regional_clusters.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ContainerRegionalClusters < GcpResourceBase - name 'google_container_regional_clusters' - desc 'RegionalCluster plural resource' - supports platform: 'gcp' + name "google_container_regional_clusters" + desc "RegionalCluster plural resource" + supports platform: "gcp" attr_reader :table @@ -64,12 +64,12 @@ class ContainerRegionalClusters < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('clusters') + @table = fetch_wrapped_resource("clusters") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -97,41 +97,41 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'initialNodeCount' => ->(obj) { [:initial_node_count, obj['initialNodeCount']] }, - 'nodeConfig' => ->(obj) { [:node_config, GoogleInSpec::Container::Property::RegionalClusterNodeConfig.new(obj['nodeConfig'], to_s)] }, - 'masterAuth' => ->(obj) { [:master_auth, GoogleInSpec::Container::Property::RegionalClusterMasterAuth.new(obj['masterAuth'], to_s)] }, - 'loggingService' => ->(obj) { [:logging_service, obj['loggingService']] }, - 'monitoringService' => ->(obj) { [:monitoring_service, obj['monitoringService']] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'privateClusterConfig' => ->(obj) { [:private_cluster_config, GoogleInSpec::Container::Property::RegionalClusterPrivateClusterConfig.new(obj['privateClusterConfig'], to_s)] }, - 'clusterIpv4Cidr' => ->(obj) { [:cluster_ipv4_cidr, obj['clusterIpv4Cidr']] }, - 'addonsConfig' => ->(obj) { [:addons_config, GoogleInSpec::Container::Property::RegionalClusterAddonsConfig.new(obj['addonsConfig'], to_s)] }, - 'subnetwork' => ->(obj) { [:subnetwork, obj['subnetwork']] }, - 'locations' => ->(obj) { [:locations, obj['locations']] }, - 'resourceLabels' => ->(obj) { [:resource_labels, obj['resourceLabels']] }, - 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, - 'legacyAbac' => ->(obj) { [:legacy_abac, GoogleInSpec::Container::Property::RegionalClusterLegacyAbac.new(obj['legacyAbac'], to_s)] }, - 'networkPolicy' => ->(obj) { [:network_policy, GoogleInSpec::Container::Property::RegionalClusterNetworkPolicy.new(obj['networkPolicy'], to_s)] }, - 'defaultMaxPodsConstraint' => ->(obj) { [:default_max_pods_constraint, GoogleInSpec::Container::Property::RegionalClusterDefaultMaxPodsConstraint.new(obj['defaultMaxPodsConstraint'], to_s)] }, - 'ipAllocationPolicy' => ->(obj) { [:ip_allocation_policy, GoogleInSpec::Container::Property::RegionalClusterIpAllocationPolicy.new(obj['ipAllocationPolicy'], to_s)] }, - 'endpoint' => ->(obj) { [:endpoint, obj['endpoint']] }, - 'initialClusterVersion' => ->(obj) { [:initial_cluster_version, obj['initialClusterVersion']] }, - 'currentMasterVersion' => ->(obj) { [:current_master_version, obj['currentMasterVersion']] }, - 'currentNodeVersion' => ->(obj) { [:current_node_version, obj['currentNodeVersion']] }, - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'status' => ->(obj) { [:status, obj['status']] }, - 'statusMessage' => ->(obj) { [:status_message, obj['statusMessage']] }, - 'nodeIpv4CidrSize' => ->(obj) { [:node_ipv4_cidr_size, obj['nodeIpv4CidrSize']] }, - 'servicesIpv4Cidr' => ->(obj) { [:services_ipv4_cidr, obj['servicesIpv4Cidr']] }, - 'currentNodeCount' => ->(obj) { [:current_node_count, obj['currentNodeCount']] }, - 'expireTime' => ->(obj) { [:expire_time, parse_time_string(obj['expireTime'])] }, - 'enableTpu' => ->(obj) { [:enable_tpu, obj['enableTpu']] }, - 'tpuIpv4CidrBlock' => ->(obj) { [:tpu_ipv4_cidr_block, obj['tpuIpv4CidrBlock']] }, - 'conditions' => ->(obj) { [:conditions, GoogleInSpec::Container::Property::RegionalClusterConditionsArray.parse(obj['conditions'], to_s)] }, - 'masterAuthorizedNetworksConfig' => ->(obj) { [:master_authorized_networks_config, GoogleInSpec::Container::Property::RegionalClusterMasterAuthorizedNetworksConfig.new(obj['masterAuthorizedNetworksConfig'], to_s)] }, - 'location' => ->(obj) { [:location, obj['location']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "initialNodeCount" => ->(obj) { [:initial_node_count, obj["initialNodeCount"]] }, + "nodeConfig" => ->(obj) { [:node_config, GoogleInSpec::Container::Property::RegionalClusterNodeConfig.new(obj["nodeConfig"], to_s)] }, + "masterAuth" => ->(obj) { [:master_auth, GoogleInSpec::Container::Property::RegionalClusterMasterAuth.new(obj["masterAuth"], to_s)] }, + "loggingService" => ->(obj) { [:logging_service, obj["loggingService"]] }, + "monitoringService" => ->(obj) { [:monitoring_service, obj["monitoringService"]] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "privateClusterConfig" => ->(obj) { [:private_cluster_config, GoogleInSpec::Container::Property::RegionalClusterPrivateClusterConfig.new(obj["privateClusterConfig"], to_s)] }, + "clusterIpv4Cidr" => ->(obj) { [:cluster_ipv4_cidr, obj["clusterIpv4Cidr"]] }, + "addonsConfig" => ->(obj) { [:addons_config, GoogleInSpec::Container::Property::RegionalClusterAddonsConfig.new(obj["addonsConfig"], to_s)] }, + "subnetwork" => ->(obj) { [:subnetwork, obj["subnetwork"]] }, + "locations" => ->(obj) { [:locations, obj["locations"]] }, + "resourceLabels" => ->(obj) { [:resource_labels, obj["resourceLabels"]] }, + "labelFingerprint" => ->(obj) { [:label_fingerprint, obj["labelFingerprint"]] }, + "legacyAbac" => ->(obj) { [:legacy_abac, GoogleInSpec::Container::Property::RegionalClusterLegacyAbac.new(obj["legacyAbac"], to_s)] }, + "networkPolicy" => ->(obj) { [:network_policy, GoogleInSpec::Container::Property::RegionalClusterNetworkPolicy.new(obj["networkPolicy"], to_s)] }, + "defaultMaxPodsConstraint" => ->(obj) { [:default_max_pods_constraint, GoogleInSpec::Container::Property::RegionalClusterDefaultMaxPodsConstraint.new(obj["defaultMaxPodsConstraint"], to_s)] }, + "ipAllocationPolicy" => ->(obj) { [:ip_allocation_policy, GoogleInSpec::Container::Property::RegionalClusterIpAllocationPolicy.new(obj["ipAllocationPolicy"], to_s)] }, + "endpoint" => ->(obj) { [:endpoint, obj["endpoint"]] }, + "initialClusterVersion" => ->(obj) { [:initial_cluster_version, obj["initialClusterVersion"]] }, + "currentMasterVersion" => ->(obj) { [:current_master_version, obj["currentMasterVersion"]] }, + "currentNodeVersion" => ->(obj) { [:current_node_version, obj["currentNodeVersion"]] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "status" => ->(obj) { [:status, obj["status"]] }, + "statusMessage" => ->(obj) { [:status_message, obj["statusMessage"]] }, + "nodeIpv4CidrSize" => ->(obj) { [:node_ipv4_cidr_size, obj["nodeIpv4CidrSize"]] }, + "servicesIpv4Cidr" => ->(obj) { [:services_ipv4_cidr, obj["servicesIpv4Cidr"]] }, + "currentNodeCount" => ->(obj) { [:current_node_count, obj["currentNodeCount"]] }, + "expireTime" => ->(obj) { [:expire_time, parse_time_string(obj["expireTime"])] }, + "enableTpu" => ->(obj) { [:enable_tpu, obj["enableTpu"]] }, + "tpuIpv4CidrBlock" => ->(obj) { [:tpu_ipv4_cidr_block, obj["tpuIpv4CidrBlock"]] }, + "conditions" => ->(obj) { [:conditions, GoogleInSpec::Container::Property::RegionalClusterConditionsArray.parse(obj["conditions"], to_s)] }, + "masterAuthorizedNetworksConfig" => ->(obj) { [:master_authorized_networks_config, GoogleInSpec::Container::Property::RegionalClusterMasterAuthorizedNetworksConfig.new(obj["masterAuthorizedNetworksConfig"], to_s)] }, + "location" => ->(obj) { [:location, obj["location"]] }, } end @@ -158,10 +158,10 @@ def identifiers private def product_url - 'https://container.googleapis.com/v1/' + "https://container.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/clusters' + "projects/{{project}}/locations/{{location}}/clusters" end end diff --git a/generate/libraries/google_container_regional_node_pool.rb b/generate/libraries/google_container_regional_node_pool.rb index fb515deaf..761879d68 100644 --- a/generate/libraries/google_container_regional_node_pool.rb +++ b/generate/libraries/google_container_regional_node_pool.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,21 +13,21 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/container/property/regionalnodepool_autoscaling' -require 'google/container/property/regionalnodepool_conditions' -require 'google/container/property/regionalnodepool_config' -require 'google/container/property/regionalnodepool_config_accelerators' -require 'google/container/property/regionalnodepool_config_taints' -require 'google/container/property/regionalnodepool_management' -require 'google/container/property/regionalnodepool_management_upgrade_options' -require 'google/container/property/regionalnodepool_max_pods_constraint' +require "gcp_backend" +require "google/container/property/regionalnodepool_autoscaling" +require "google/container/property/regionalnodepool_conditions" +require "google/container/property/regionalnodepool_config" +require "google/container/property/regionalnodepool_config_accelerators" +require "google/container/property/regionalnodepool_config_taints" +require "google/container/property/regionalnodepool_management" +require "google/container/property/regionalnodepool_management_upgrade_options" +require "google/container/property/regionalnodepool_max_pods_constraint" # A provider to manage Google Kubernetes Engine resources. class ContainerRegionalNodePool < GcpResourceBase - name 'google_container_regional_node_pool' - desc 'RegionalNodePool' - supports platform: 'gcp' + name "google_container_regional_node_pool" + desc "RegionalNodePool" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -47,25 +47,25 @@ class ContainerRegionalNodePool < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @name = @fetched['name'] - @config = GoogleInSpec::Container::Property::RegionalNodePoolConfig.new(@fetched['config'], to_s) - @initial_node_count = @fetched['initialNodeCount'] - @status = @fetched['status'] - @status_message = @fetched['statusMessage'] - @version = @fetched['version'] - @autoscaling = GoogleInSpec::Container::Property::RegionalNodePoolAutoscaling.new(@fetched['autoscaling'], to_s) - @management = GoogleInSpec::Container::Property::RegionalNodePoolManagement.new(@fetched['management'], to_s) - @max_pods_constraint = GoogleInSpec::Container::Property::RegionalNodePoolMaxPodsConstraint.new(@fetched['maxPodsConstraint'], to_s) - @conditions = GoogleInSpec::Container::Property::RegionalNodePoolConditionsArray.parse(@fetched['conditions'], to_s) - @pod_ipv4_cidr_size = @fetched['podIpv4CidrSize'] - @cluster = @fetched['cluster'] - @location = @fetched['location'] + @name = @fetched["name"] + @config = GoogleInSpec::Container::Property::RegionalNodePoolConfig.new(@fetched["config"], to_s) + @initial_node_count = @fetched["initialNodeCount"] + @status = @fetched["status"] + @status_message = @fetched["statusMessage"] + @version = @fetched["version"] + @autoscaling = GoogleInSpec::Container::Property::RegionalNodePoolAutoscaling.new(@fetched["autoscaling"], to_s) + @management = GoogleInSpec::Container::Property::RegionalNodePoolManagement.new(@fetched["management"], to_s) + @max_pods_constraint = GoogleInSpec::Container::Property::RegionalNodePoolMaxPodsConstraint.new(@fetched["maxPodsConstraint"], to_s) + @conditions = GoogleInSpec::Container::Property::RegionalNodePoolConditionsArray.parse(@fetched["conditions"], to_s) + @pod_ipv4_cidr_size = @fetched["podIpv4CidrSize"] + @cluster = @fetched["cluster"] + @location = @fetched["location"] end # Handles parsing RFC3339 time string @@ -83,24 +83,24 @@ def to_s def un_parse { - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalNodePoolConfig.un_parse(x, 'config') }, - 'initial_node_count' => ->(x, _) { x.nil? ? [] : ["its('initial_node_count') { should cmp #{x.inspect} }"] }, - 'status' => ->(x, _) { x.nil? ? [] : ["its('status') { should cmp #{x.inspect} }"] }, - 'status_message' => ->(x, _) { x.nil? ? [] : ["its('status_message') { should cmp #{x.inspect} }"] }, - 'version' => ->(x, _) { x.nil? ? [] : ["its('version') { should cmp #{x.inspect} }"] }, - 'autoscaling' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalNodePoolAutoscaling.un_parse(x, 'autoscaling') }, - 'management' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalNodePoolManagement.un_parse(x, 'management') }, - 'max_pods_constraint' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalNodePoolMaxPodsConstraint.un_parse(x, 'max_pods_constraint') }, - 'conditions' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('conditions') { should include '#{single.to_json}' }" } }, - 'pod_ipv4_cidr_size' => ->(x, _) { x.nil? ? [] : ["its('pod_ipv4_cidr_size') { should cmp #{x.inspect} }"] }, - 'cluster' => ->(x, _) { x.nil? ? [] : ["its('cluster') { should cmp #{x.inspect} }"] }, - 'location' => ->(x, _) { x.nil? ? [] : ["its('location') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "config" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalNodePoolConfig.un_parse(x, "config") }, + "initial_node_count" => ->(x, _) { x.nil? ? [] : ["its('initial_node_count') { should cmp #{x.inspect} }"] }, + "status" => ->(x, _) { x.nil? ? [] : ["its('status') { should cmp #{x.inspect} }"] }, + "status_message" => ->(x, _) { x.nil? ? [] : ["its('status_message') { should cmp #{x.inspect} }"] }, + "version" => ->(x, _) { x.nil? ? [] : ["its('version') { should cmp #{x.inspect} }"] }, + "autoscaling" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalNodePoolAutoscaling.un_parse(x, "autoscaling") }, + "management" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalNodePoolManagement.un_parse(x, "management") }, + "max_pods_constraint" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Container::Property::RegionalNodePoolMaxPodsConstraint.un_parse(x, "max_pods_constraint") }, + "conditions" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('conditions') { should include '#{single.to_json}' }" } }, + "pod_ipv4_cidr_size" => ->(x, _) { x.nil? ? [] : ["its('pod_ipv4_cidr_size') { should cmp #{x.inspect} }"] }, + "cluster" => ->(x, _) { x.nil? ? [] : ["its('cluster') { should cmp #{x.inspect} }"] }, + "location" => ->(x, _) { x.nil? ? [] : ["its('location') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'RegionalNodePool' + name = "RegionalNodePool" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -109,11 +109,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_container_regional_node_pool', + type: "google_container_regional_node_pool", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -121,10 +121,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://container.googleapis.com/v1/' + "https://container.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/nodePools/{{name}}' + "projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/nodePools/{{name}}" end end diff --git a/generate/libraries/google_container_regional_node_pools.rb b/generate/libraries/google_container_regional_node_pools.rb index 480db9174..86a75984e 100644 --- a/generate/libraries/google_container_regional_node_pools.rb +++ b/generate/libraries/google_container_regional_node_pools.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ContainerRegionalNodePools < GcpResourceBase - name 'google_container_regional_node_pools' - desc 'RegionalNodePool plural resource' - supports platform: 'gcp' + name "google_container_regional_node_pools" + desc "RegionalNodePool plural resource" + supports platform: "gcp" attr_reader :table @@ -42,12 +42,12 @@ class ContainerRegionalNodePools < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('nodePools') + @table = fetch_wrapped_resource("nodePools") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'config' => ->(obj) { [:config, GoogleInSpec::Container::Property::RegionalNodePoolConfig.new(obj['config'], to_s)] }, - 'initialNodeCount' => ->(obj) { [:initial_node_count, obj['initialNodeCount']] }, - 'status' => ->(obj) { [:status, obj['status']] }, - 'statusMessage' => ->(obj) { [:status_message, obj['statusMessage']] }, - 'version' => ->(obj) { [:version, obj['version']] }, - 'autoscaling' => ->(obj) { [:autoscaling, GoogleInSpec::Container::Property::RegionalNodePoolAutoscaling.new(obj['autoscaling'], to_s)] }, - 'management' => ->(obj) { [:management, GoogleInSpec::Container::Property::RegionalNodePoolManagement.new(obj['management'], to_s)] }, - 'maxPodsConstraint' => ->(obj) { [:max_pods_constraint, GoogleInSpec::Container::Property::RegionalNodePoolMaxPodsConstraint.new(obj['maxPodsConstraint'], to_s)] }, - 'conditions' => ->(obj) { [:conditions, GoogleInSpec::Container::Property::RegionalNodePoolConditionsArray.parse(obj['conditions'], to_s)] }, - 'podIpv4CidrSize' => ->(obj) { [:pod_ipv4_cidr_size, obj['podIpv4CidrSize']] }, - 'cluster' => ->(obj) { [:cluster, obj['cluster']] }, - 'location' => ->(obj) { [:location, obj['location']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "config" => ->(obj) { [:config, GoogleInSpec::Container::Property::RegionalNodePoolConfig.new(obj["config"], to_s)] }, + "initialNodeCount" => ->(obj) { [:initial_node_count, obj["initialNodeCount"]] }, + "status" => ->(obj) { [:status, obj["status"]] }, + "statusMessage" => ->(obj) { [:status_message, obj["statusMessage"]] }, + "version" => ->(obj) { [:version, obj["version"]] }, + "autoscaling" => ->(obj) { [:autoscaling, GoogleInSpec::Container::Property::RegionalNodePoolAutoscaling.new(obj["autoscaling"], to_s)] }, + "management" => ->(obj) { [:management, GoogleInSpec::Container::Property::RegionalNodePoolManagement.new(obj["management"], to_s)] }, + "maxPodsConstraint" => ->(obj) { [:max_pods_constraint, GoogleInSpec::Container::Property::RegionalNodePoolMaxPodsConstraint.new(obj["maxPodsConstraint"], to_s)] }, + "conditions" => ->(obj) { [:conditions, GoogleInSpec::Container::Property::RegionalNodePoolConditionsArray.parse(obj["conditions"], to_s)] }, + "podIpv4CidrSize" => ->(obj) { [:pod_ipv4_cidr_size, obj["podIpv4CidrSize"]] }, + "cluster" => ->(obj) { [:cluster, obj["cluster"]] }, + "location" => ->(obj) { [:location, obj["location"]] }, } end @@ -114,10 +114,10 @@ def identifiers private def product_url - 'https://container.googleapis.com/v1/' + "https://container.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/nodePools' + "projects/{{project}}/locations/{{location}}/clusters/{{cluster}}/nodePools" end end diff --git a/generate/libraries/google_dataproc_cluster.rb b/generate/libraries/google_dataproc_cluster.rb index 87be903df..813ed6b94 100644 --- a/generate/libraries/google_dataproc_cluster.rb +++ b/generate/libraries/google_dataproc_cluster.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,29 +13,29 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/dataproc/property/cluster_config' -require 'google/dataproc/property/cluster_config_encryption_config' -require 'google/dataproc/property/cluster_config_gce_cluster_config' -require 'google/dataproc/property/cluster_config_initialization_actions' -require 'google/dataproc/property/cluster_config_master_config' -require 'google/dataproc/property/cluster_config_master_config_disk_config' -require 'google/dataproc/property/cluster_config_master_config_managed_group_config' -require 'google/dataproc/property/cluster_config_secondary_worker_config' -require 'google/dataproc/property/cluster_config_secondary_worker_config_disk_config' -require 'google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config' -require 'google/dataproc/property/cluster_config_security_config' -require 'google/dataproc/property/cluster_config_security_config_kerberos_config' -require 'google/dataproc/property/cluster_config_software_config' -require 'google/dataproc/property/cluster_config_worker_config' -require 'google/dataproc/property/cluster_config_worker_config_disk_config' -require 'google/dataproc/property/cluster_config_worker_config_managed_group_config' +require "gcp_backend" +require "google/dataproc/property/cluster_config" +require "google/dataproc/property/cluster_config_encryption_config" +require "google/dataproc/property/cluster_config_gce_cluster_config" +require "google/dataproc/property/cluster_config_initialization_actions" +require "google/dataproc/property/cluster_config_master_config" +require "google/dataproc/property/cluster_config_master_config_disk_config" +require "google/dataproc/property/cluster_config_master_config_managed_group_config" +require "google/dataproc/property/cluster_config_secondary_worker_config" +require "google/dataproc/property/cluster_config_secondary_worker_config_disk_config" +require "google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config" +require "google/dataproc/property/cluster_config_security_config" +require "google/dataproc/property/cluster_config_security_config_kerberos_config" +require "google/dataproc/property/cluster_config_software_config" +require "google/dataproc/property/cluster_config_worker_config" +require "google/dataproc/property/cluster_config_worker_config_disk_config" +require "google/dataproc/property/cluster_config_worker_config_managed_group_config" # A provider to manage Cloud Dataproc resources. class DataprocCluster < GcpResourceBase - name 'google_dataproc_cluster' - desc 'Cluster' - supports platform: 'gcp' + name "google_dataproc_cluster" + desc "Cluster" + supports platform: "gcp" attr_reader :params attr_reader :cluster_name @@ -46,16 +46,16 @@ class DataprocCluster < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @cluster_name = @fetched['clusterName'] - @labels = @fetched['labels'] - @config = GoogleInSpec::Dataproc::Property::ClusterConfig.new(@fetched['config'], to_s) - @region = @fetched['region'] + @cluster_name = @fetched["clusterName"] + @labels = @fetched["labels"] + @config = GoogleInSpec::Dataproc::Property::ClusterConfig.new(@fetched["config"], to_s) + @region = @fetched["region"] end # Handles parsing RFC3339 time string @@ -73,15 +73,15 @@ def to_s def un_parse { - 'cluster_name' => ->(x, _) { x.nil? ? [] : ["its('cluster_name') { should cmp #{x.inspect} }"] }, - 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfig.un_parse(x, 'config') }, - 'region' => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, + "cluster_name" => ->(x, _) { x.nil? ? [] : ["its('cluster_name') { should cmp #{x.inspect} }"] }, + "labels" => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "config" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Dataproc::Property::ClusterConfig.un_parse(x, "config") }, + "region" => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Cluster' + name = "Cluster" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -90,11 +90,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_dataproc_cluster', + type: "google_dataproc_cluster", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -102,10 +102,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://dataproc.googleapis.com/v1/' + "https://dataproc.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/clusters/{{cluster_name}}' + "projects/{{project}}/regions/{{region}}/clusters/{{cluster_name}}" end end diff --git a/generate/libraries/google_dataproc_clusters.rb b/generate/libraries/google_dataproc_clusters.rb index 66db33005..cac92754e 100644 --- a/generate/libraries/google_dataproc_clusters.rb +++ b/generate/libraries/google_dataproc_clusters.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class DataprocClusters < GcpResourceBase - name 'google_dataproc_clusters' - desc 'Cluster plural resource' - supports platform: 'gcp' + name "google_dataproc_clusters" + desc "Cluster plural resource" + supports platform: "gcp" attr_reader :table @@ -33,12 +33,12 @@ class DataprocClusters < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('clusters') + @table = fetch_wrapped_resource("clusters") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -66,10 +66,10 @@ def transform(key, value) def transformers { - 'clusterName' => ->(obj) { [:cluster_name, obj['clusterName']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'config' => ->(obj) { [:config, GoogleInSpec::Dataproc::Property::ClusterConfig.new(obj['config'], to_s)] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "clusterName" => ->(obj) { [:cluster_name, obj["clusterName"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "config" => ->(obj) { [:config, GoogleInSpec::Dataproc::Property::ClusterConfig.new(obj["config"], to_s)] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end @@ -96,10 +96,10 @@ def identifiers private def product_url - 'https://dataproc.googleapis.com/v1/' + "https://dataproc.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/clusters' + "projects/{{project}}/regions/{{region}}/clusters" end end diff --git a/generate/libraries/google_dns_managed_zone.rb b/generate/libraries/google_dns_managed_zone.rb index 62f191035..7f159ee61 100644 --- a/generate/libraries/google_dns_managed_zone.rb +++ b/generate/libraries/google_dns_managed_zone.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleDnsManagedZone < GcpResourceBase - name 'google_dns_managed_zone' - desc 'Verifies settings for a GCP DNS managed zone' + name "google_dns_managed_zone" + desc "Verifies settings for a GCP DNS managed zone" example " describe google_dns_managed_zone(project: 'chef-inspec-gcp', zone: 'zone-name') do @@ -39,13 +39,13 @@ def creation_time_date end def key_signing_key_algorithm - raise Inspec::Exceptions::ResourceFailed, "google_dns_managed_zone is missing expected property 'dnssec_config.default_key_specs KEY_SIGNING'" if !@key_specs.key?('KEY_SIGNING') - @key_specs['KEY_SIGNING'] + raise Inspec::Exceptions::ResourceFailed, "google_dns_managed_zone is missing expected property 'dnssec_config.default_key_specs KEY_SIGNING'" if !@key_specs.key?("KEY_SIGNING") + @key_specs["KEY_SIGNING"] end def zone_signing_key_algorithm - raise Inspec::Exceptions::ResourceFailed, "google_dns_managed_zone is missing expected property 'dnssec_config.default_key_specs ZONE_SIGNING'" if !@key_specs.key?('ZONE_SIGNING') - @key_specs['ZONE_SIGNING'] + raise Inspec::Exceptions::ResourceFailed, "google_dns_managed_zone is missing expected property 'dnssec_config.default_key_specs ZONE_SIGNING'" if !@key_specs.key?("ZONE_SIGNING") + @key_specs["ZONE_SIGNING"] end def to_s diff --git a/generate/libraries/google_dns_managed_zones.rb b/generate/libraries/google_dns_managed_zones.rb index bc994510a..b28b4c8e1 100644 --- a/generate/libraries/google_dns_managed_zones.rb +++ b/generate/libraries/google_dns_managed_zones.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'google/apis/dns_v2beta1' + +require "gcp_backend" +require "google/apis/dns_v2beta1" module Inspec::Resources class GoogleDnsManagedZones < GcpResourceBase - name 'google_dns_managed_zones' - desc 'Verifies settings for GCP DNS managed zones in bulk' + name "google_dns_managed_zones" + desc "Verifies settings for GCP DNS managed zones in bulk" example " describe google_dns_managed_zones(project: 'chef-inspec-gcp') do @@ -38,7 +38,7 @@ def fetch_data return [] if !@managed_zones || !@managed_zones.managed_zones @managed_zones.managed_zones.map do |zone| dns_enabled=false - if defined?(zone.dnssec_config.state) && (zone.dnssec_config.state == 'on') + if defined?(zone.dnssec_config.state) && (zone.dnssec_config.state == "on") dns_enabled=true end managed_zones+=[{ zone_id: zone.id, diff --git a/generate/libraries/google_dns_resource_record_set.rb b/generate/libraries/google_dns_resource_record_set.rb index 32e36a7ed..3d420c27f 100644 --- a/generate/libraries/google_dns_resource_record_set.rb +++ b/generate/libraries/google_dns_resource_record_set.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud DNS resources. class DNSResourceRecordSet < GcpResourceBase - name 'google_dns_resource_record_set' - desc 'ResourceRecordSet' - supports platform: 'gcp' + name "google_dns_resource_record_set" + desc "ResourceRecordSet" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -31,7 +31,7 @@ class DNSResourceRecordSet < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + fetched = @connection.fetch(product_url, resource_base_url, params, "Get") @fetched = unwrap(fetched, params) parse unless @fetched.nil? end @@ -41,7 +41,7 @@ def identity end def collection_item - 'rrsets' + "rrsets" end def unwrap(fetched, params) @@ -49,11 +49,11 @@ def unwrap(fetched, params) end def parse - @name = @fetched['name'] - @type = @fetched['type'] - @ttl = @fetched['ttl'] - @target = @fetched['rrdatas'] - @managed_zone = @fetched['managed_zone'] + @name = @fetched["name"] + @type = @fetched["type"] + @ttl = @fetched["ttl"] + @target = @fetched["rrdatas"] + @managed_zone = @fetched["managed_zone"] end # Handles parsing RFC3339 time string @@ -71,16 +71,16 @@ def to_s def un_parse { - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'type' => ->(x, _) { x.nil? ? [] : ["its('type') { should cmp #{x.inspect} }"] }, - 'ttl' => ->(x, _) { x.nil? ? [] : ["its('ttl') { should cmp #{x.inspect} }"] }, - 'target' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('target') { should include #{single.inspect} }" } }, - 'managed_zone' => ->(x, _) { x.nil? ? [] : ["its('managed_zone') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "type" => ->(x, _) { x.nil? ? [] : ["its('type') { should cmp #{x.inspect} }"] }, + "ttl" => ->(x, _) { x.nil? ? [] : ["its('ttl') { should cmp #{x.inspect} }"] }, + "target" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('target') { should include #{single.inspect} }" } }, + "managed_zone" => ->(x, _) { x.nil? ? [] : ["its('managed_zone') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'ResourceRecordSet' + name = "ResourceRecordSet" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -89,11 +89,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_dns_resource_record_set', + type: "google_dns_resource_record_set", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -101,10 +101,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://www.googleapis.com/dns/v1/' + "https://www.googleapis.com/dns/v1/" end def resource_base_url - 'projects/{{project}}/managedZones/{{managed_zone}}/rrsets?name={{name}}&type={{type}}' + "projects/{{project}}/managedZones/{{managed_zone}}/rrsets?name={{name}}&type={{type}}" end end diff --git a/generate/libraries/google_dns_resource_record_sets.rb b/generate/libraries/google_dns_resource_record_sets.rb index 0f7fff532..dcf0cb7a4 100644 --- a/generate/libraries/google_dns_resource_record_sets.rb +++ b/generate/libraries/google_dns_resource_record_sets.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class DNSResourceRecordSets < GcpResourceBase - name 'google_dns_resource_record_sets' - desc 'ResourceRecordSet plural resource' - supports platform: 'gcp' + name "google_dns_resource_record_sets" + desc "ResourceRecordSet plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class DNSResourceRecordSets < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('rrsets') + @table = fetch_wrapped_resource("rrsets") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'type' => ->(obj) { [:type, obj['type']] }, - 'ttl' => ->(obj) { [:ttl, obj['ttl']] }, - 'rrdatas' => ->(obj) { [:target, obj['rrdatas']] }, - 'managed_zone' => ->(obj) { [:managed_zone, obj['managed_zone']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "type" => ->(obj) { [:type, obj["type"]] }, + "ttl" => ->(obj) { [:ttl, obj["ttl"]] }, + "rrdatas" => ->(obj) { [:target, obj["rrdatas"]] }, + "managed_zone" => ->(obj) { [:managed_zone, obj["managed_zone"]] }, } end @@ -98,10 +98,10 @@ def identifiers private def product_url - 'https://www.googleapis.com/dns/v1/' + "https://www.googleapis.com/dns/v1/" end def resource_base_url - 'projects/{{project}}/managedZones/{{managed_zone}}/rrsets' + "projects/{{project}}/managedZones/{{managed_zone}}/rrsets" end end diff --git a/generate/libraries/google_filestore_instance.rb b/generate/libraries/google_filestore_instance.rb index 0565d2989..dd70abc6c 100644 --- a/generate/libraries/google_filestore_instance.rb +++ b/generate/libraries/google_filestore_instance.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/filestore/property/instance_file_shares' -require 'google/filestore/property/instance_networks' +require "gcp_backend" +require "google/filestore/property/instance_file_shares" +require "google/filestore/property/instance_networks" # A provider to manage Cloud Filestore resources. class FilestoreInstance < GcpResourceBase - name 'google_filestore_instance' - desc 'Instance' - supports platform: 'gcp' + name "google_filestore_instance" + desc "Instance" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -37,21 +37,21 @@ class FilestoreInstance < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @name = @fetched['name'] - @description = @fetched['description'] - @create_time = parse_time_string(@fetched['createTime']) - @tier = @fetched['tier'] - @labels = @fetched['labels'] - @file_shares = GoogleInSpec::Filestore::Property::InstanceFileSharesArray.parse(@fetched['fileShares'], to_s) - @networks = GoogleInSpec::Filestore::Property::InstanceNetworksArray.parse(@fetched['networks'], to_s) - @etag = @fetched['etag'] - @zone = @fetched['zone'] + @name = @fetched["name"] + @description = @fetched["description"] + @create_time = parse_time_string(@fetched["createTime"]) + @tier = @fetched["tier"] + @labels = @fetched["labels"] + @file_shares = GoogleInSpec::Filestore::Property::InstanceFileSharesArray.parse(@fetched["fileShares"], to_s) + @networks = GoogleInSpec::Filestore::Property::InstanceNetworksArray.parse(@fetched["networks"], to_s) + @etag = @fetched["etag"] + @zone = @fetched["zone"] end # Handles parsing RFC3339 time string @@ -69,20 +69,20 @@ def to_s def un_parse { - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'create_time' => ->(x, _) { x.nil? ? [] : ["its('create_time.to_s') { should cmp '#{x.inspect}' }"] }, - 'tier' => ->(x, _) { x.nil? ? [] : ["its('tier') { should cmp #{x.inspect} }"] }, - 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'file_shares' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('file_shares') { should include '#{single.to_json}' }" } }, - 'networks' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('networks') { should include '#{single.to_json}' }" } }, - 'etag' => ->(x, _) { x.nil? ? [] : ["its('etag') { should cmp #{x.inspect} }"] }, - 'zone' => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "create_time" => ->(x, _) { x.nil? ? [] : ["its('create_time.to_s') { should cmp '#{x.inspect}' }"] }, + "tier" => ->(x, _) { x.nil? ? [] : ["its('tier') { should cmp #{x.inspect} }"] }, + "labels" => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "file_shares" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('file_shares') { should include '#{single.to_json}' }" } }, + "networks" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('networks') { should include '#{single.to_json}' }" } }, + "etag" => ->(x, _) { x.nil? ? [] : ["its('etag') { should cmp #{x.inspect} }"] }, + "zone" => ->(x, _) { x.nil? ? [] : ["its('zone') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Instance' + name = "Instance" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -91,11 +91,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_filestore_instance', + type: "google_filestore_instance", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -103,10 +103,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://file.googleapis.com/v1/' + "https://file.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{zone}}/instances/{{name}}' + "projects/{{project}}/locations/{{zone}}/instances/{{name}}" end end diff --git a/generate/libraries/google_filestore_instances.rb b/generate/libraries/google_filestore_instances.rb index e64638d84..5b36dafb7 100644 --- a/generate/libraries/google_filestore_instances.rb +++ b/generate/libraries/google_filestore_instances.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class FilestoreInstances < GcpResourceBase - name 'google_filestore_instances' - desc 'Instance plural resource' - supports platform: 'gcp' + name "google_filestore_instances" + desc "Instance plural resource" + supports platform: "gcp" attr_reader :table @@ -38,12 +38,12 @@ class FilestoreInstances < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('instances') + @table = fetch_wrapped_resource("instances") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'tier' => ->(obj) { [:tier, obj['tier']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'fileShares' => ->(obj) { [:file_shares, GoogleInSpec::Filestore::Property::InstanceFileSharesArray.parse(obj['fileShares'], to_s)] }, - 'networks' => ->(obj) { [:networks, GoogleInSpec::Filestore::Property::InstanceNetworksArray.parse(obj['networks'], to_s)] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "tier" => ->(obj) { [:tier, obj["tier"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "fileShares" => ->(obj) { [:file_shares, GoogleInSpec::Filestore::Property::InstanceFileSharesArray.parse(obj["fileShares"], to_s)] }, + "networks" => ->(obj) { [:networks, GoogleInSpec::Filestore::Property::InstanceNetworksArray.parse(obj["networks"], to_s)] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, } end @@ -106,10 +106,10 @@ def identifiers private def product_url - 'https://file.googleapis.com/v1/' + "https://file.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{zone}}/instances' + "projects/{{project}}/locations/{{zone}}/instances" end end diff --git a/generate/libraries/google_kms_crypto_key.rb b/generate/libraries/google_kms_crypto_key.rb index 7f4b4a857..b55ba530d 100644 --- a/generate/libraries/google_kms_crypto_key.rb +++ b/generate/libraries/google_kms_crypto_key.rb @@ -1,13 +1,13 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'time' -require 'google/apis/cloudkms_v1' + +require "gcp_backend" +require "time" +require "google/apis/cloudkms_v1" module Inspec::Resources class GoogleKMSCryptoKey < GcpResourceBase - name 'google_kms_crypto_key' - desc 'Verifies settings for a KMS key ring' + name "google_kms_crypto_key" + desc "Verifies settings for a KMS key ring" example " describe google_kms_crypto_key(project: 'chef-inspec-gcp', location: 'us-east1', key_ring_name: 'key-ring', name: 'crypto-key') do @@ -26,8 +26,8 @@ def initialize(opts = {}) end def crypto_key_name - return '' if !defined?(name) || name.nil? - name.split('/').last + return "" if !defined?(name) || name.nil? + name.split("/").last end def create_time_date @@ -37,7 +37,7 @@ def create_time_date # this is added for completeness as crypto key IAM bindings use the crypto_key_url as an identifier def crypto_key_url - return '' if !defined?(name) || name.nil? + return "" if !defined?(name) || name.nil? name end @@ -54,16 +54,16 @@ def primary_create_time_date def rotation_period_seconds return 0 if !defined?(rotation_period) || rotation_period.nil? result = nil - conversion = { 's'=>1, 'm'=>60, 'h'=>60*60, 'd'=>24*60*60 } + conversion = { "s"=>1, "m"=>60, "h"=>60*60, "d"=>24*60*60 } conversion.each do |time_unit, multiplier| next if /#{time_unit}/.match(rotation_period).nil? - result=rotation_period.gsub(time_unit, '').to_i*multiplier + result=rotation_period.gsub(time_unit, "").to_i*multiplier end result end def primary_name - return '' if !defined?(primary.name) || primary.name.nil? + return "" if !defined?(primary.name) || primary.name.nil? primary.name end diff --git a/generate/libraries/google_kms_crypto_key_iam_binding.rb b/generate/libraries/google_kms_crypto_key_iam_binding.rb index e7ebc3aff..2baf1865f 100644 --- a/generate/libraries/google_kms_crypto_key_iam_binding.rb +++ b/generate/libraries/google_kms_crypto_key_iam_binding.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleKMSCryptoKeyIAMBinding < GcpResourceBase - name 'google_kms_crypto_key_iam_binding' - desc 'Verifies settings for a single KMS Crypto Key IAM binding' + name "google_kms_crypto_key_iam_binding" + desc "Verifies settings for a single KMS Crypto Key IAM binding" example " describe google_kms_crypto_key_iam_binding(crypto_key_url: 'projects/project/locations/europe-west2/keyRings/key-ring/cryptoKeys/key-name', role: 'roles/owner') do diff --git a/generate/libraries/google_kms_crypto_key_iam_bindings.rb b/generate/libraries/google_kms_crypto_key_iam_bindings.rb index d7abb480e..0819fefd0 100644 --- a/generate/libraries/google_kms_crypto_key_iam_bindings.rb +++ b/generate/libraries/google_kms_crypto_key_iam_bindings.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleKMSCryptoKeyIAMBindings < GcpResourceBase - name 'google_kms_crypto_key_iam_bindings' - desc 'Verifies settings for GCP KMS Crypto Key IAM Bindings in bulk' + name "google_kms_crypto_key_iam_bindings" + desc "Verifies settings for GCP KMS Crypto Key IAM Bindings in bulk" example " describe google_kms_key_ring_iam_bindings(crypto_key_url: 'projects/project/locations/europe-west2/keyRings/key-ring/cryptoKeys/key-name') do diff --git a/generate/libraries/google_kms_crypto_keys.rb b/generate/libraries/google_kms_crypto_keys.rb index 3d84b7037..c75e0085a 100644 --- a/generate/libraries/google_kms_crypto_keys.rb +++ b/generate/libraries/google_kms_crypto_keys.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleKMSCryptoKeys < GcpResourceBase - name 'google_kms_crypto_keys' - desc 'Verifies settings for GCP KMS crypto keys in bulk' + name "google_kms_crypto_keys" + desc "Verifies settings for GCP KMS crypto keys in bulk" example " describe google_kms_crypto_keys(project: 'chef-inspec-gcp', location: 'us-east1', crypto_key_name: 'key-ring') do @@ -36,7 +36,7 @@ def fetch_data end return [] if !@crypto_keys || !@crypto_keys.crypto_keys @crypto_keys.crypto_keys.map do |crypto_key| - crypto_key_rows += [{ crypto_key_name: crypto_key.name.split('/').last, + crypto_key_rows += [{ crypto_key_name: crypto_key.name.split("/").last, crypto_key_url: crypto_key.name }] end next_page = @crypto_keys.next_page_token diff --git a/generate/libraries/google_kms_key_ring.rb b/generate/libraries/google_kms_key_ring.rb index 7df1e05b3..65b92cfde 100644 --- a/generate/libraries/google_kms_key_ring.rb +++ b/generate/libraries/google_kms_key_ring.rb @@ -1,13 +1,13 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'time' -require 'google/apis/cloudkms_v1' + +require "gcp_backend" +require "time" +require "google/apis/cloudkms_v1" module Inspec::Resources class GoogleKMSKeyRing < GcpResourceBase - name 'google_kms_key_ring' - desc 'Verifies settings for a KMS key ring' + name "google_kms_key_ring" + desc "Verifies settings for a KMS key ring" example " describe google_kms_key_ring(project: 'chef-inspec-gcp', location: 'us-east1', name: 'key-ring-name') do @@ -26,8 +26,8 @@ def initialize(opts = {}) end def key_ring_name - return '' if !defined?(name) || name.nil? - name.split('/').last + return "" if !defined?(name) || name.nil? + name.split("/").last end def create_time_date @@ -37,7 +37,7 @@ def create_time_date # this is added for completeness as key ring IAM bindings use the key_ring_url as an identifier def key_ring_url - return '' if !defined?(name) || name.nil? + return "" if !defined?(name) || name.nil? name end diff --git a/generate/libraries/google_kms_key_ring_iam_binding.rb b/generate/libraries/google_kms_key_ring_iam_binding.rb index 9c8fa5d40..ac4ae19bc 100644 --- a/generate/libraries/google_kms_key_ring_iam_binding.rb +++ b/generate/libraries/google_kms_key_ring_iam_binding.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleKMSKeyRingIAMBinding < GcpResourceBase - name 'google_kms_key_ring_iam_binding' - desc 'Verifies settings for a single KMS Key Ring IAM binding' + name "google_kms_key_ring_iam_binding" + desc "Verifies settings for a single KMS Key Ring IAM binding" example " describe google_kms_key_ring_iam_binding(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring', role: 'roles/compute.admin') do diff --git a/generate/libraries/google_kms_key_ring_iam_bindings.rb b/generate/libraries/google_kms_key_ring_iam_bindings.rb index 16a85a676..dad04aa46 100644 --- a/generate/libraries/google_kms_key_ring_iam_bindings.rb +++ b/generate/libraries/google_kms_key_ring_iam_bindings.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleKMSKeyRingIAMBindings < GcpResourceBase - name 'google_kms_key_ring_iam_bindings' - desc 'Verifies settings for GCP KMS key ring IAM bindings in bulk' + name "google_kms_key_ring_iam_bindings" + desc "Verifies settings for GCP KMS key ring IAM bindings in bulk" example " describe google_kms_key_ring_iam_bindings(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring') do diff --git a/generate/libraries/google_kms_key_rings.rb b/generate/libraries/google_kms_key_rings.rb index f3e32d870..a54b9048f 100644 --- a/generate/libraries/google_kms_key_rings.rb +++ b/generate/libraries/google_kms_key_rings.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleKMSKeyRings < GcpResourceBase - name 'google_kms_key_rings' - desc 'Verifies settings for GCP KMS key rings in bulk' + name "google_kms_key_rings" + desc "Verifies settings for GCP KMS key rings in bulk" example " describe google_kms_key_rings(project: 'chef-inspec-gcp', location: 'us-east1') do @@ -36,7 +36,7 @@ def fetch_data end return [] if !@key_rings || !@key_rings.key_rings @key_rings.key_rings.map do |key_ring| - key_ring_rows += [{ key_ring_name: key_ring.name.split('/').last, + key_ring_rows += [{ key_ring_name: key_ring.name.split("/").last, key_ring_url: key_ring.name }] end next_page = @key_rings.next_page_token diff --git a/generate/libraries/google_logging_folder_exclusion.rb b/generate/libraries/google_logging_folder_exclusion.rb index 34a83122a..c250a1846 100644 --- a/generate/libraries/google_logging_folder_exclusion.rb +++ b/generate/libraries/google_logging_folder_exclusion.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Stackdriver Logging resources. class LoggingFolderExclusion < GcpResourceBase - name 'google_logging_folder_exclusion' - desc 'FolderExclusion' - supports platform: 'gcp' + name "google_logging_folder_exclusion" + desc "FolderExclusion" + supports platform: "gcp" attr_reader :params attr_reader :folder @@ -31,17 +31,17 @@ class LoggingFolderExclusion < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @folder = @fetched['folder'] - @name = @fetched['name'] - @description = @fetched['description'] - @filter = @fetched['filter'] - @disabled = @fetched['disabled'] + @folder = @fetched["folder"] + @name = @fetched["name"] + @description = @fetched["description"] + @filter = @fetched["filter"] + @disabled = @fetched["disabled"] end # Handles parsing RFC3339 time string @@ -59,16 +59,16 @@ def to_s def un_parse { - 'folder' => ->(x, _) { x.nil? ? [] : ["its('folder') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'filter' => ->(x, _) { x.nil? ? [] : ["its('filter') { should cmp #{x.inspect} }"] }, - 'disabled' => ->(x, _) { x.nil? ? [] : ["its('disabled') { should cmp #{x.inspect} }"] }, + "folder" => ->(x, _) { x.nil? ? [] : ["its('folder') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "filter" => ->(x, _) { x.nil? ? [] : ["its('filter') { should cmp #{x.inspect} }"] }, + "disabled" => ->(x, _) { x.nil? ? [] : ["its('disabled') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'FolderExclusion' + name = "FolderExclusion" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -77,11 +77,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_logging_folder_exclusion', + type: "google_logging_folder_exclusion", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -89,10 +89,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://logging.googleapis.com/v2/' + "https://logging.googleapis.com/v2/" end def resource_base_url - 'folders/{{folder}}/exclusions/{{name}}' + "folders/{{folder}}/exclusions/{{name}}" end end diff --git a/generate/libraries/google_logging_folder_exclusions.rb b/generate/libraries/google_logging_folder_exclusions.rb index a3b3d9dc5..f76a05625 100644 --- a/generate/libraries/google_logging_folder_exclusions.rb +++ b/generate/libraries/google_logging_folder_exclusions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class LoggingFolderExclusions < GcpResourceBase - name 'google_logging_folder_exclusions' - desc 'FolderExclusion plural resource' - supports platform: 'gcp' + name "google_logging_folder_exclusions" + desc "FolderExclusion plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class LoggingFolderExclusions < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('exclusions') + @table = fetch_wrapped_resource("exclusions") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'folder' => ->(obj) { [:folder, obj['folder']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'filter' => ->(obj) { [:filter, obj['filter']] }, - 'disabled' => ->(obj) { [:disabled, obj['disabled']] }, + "folder" => ->(obj) { [:folder, obj["folder"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "filter" => ->(obj) { [:filter, obj["filter"]] }, + "disabled" => ->(obj) { [:disabled, obj["disabled"]] }, } end @@ -98,10 +98,10 @@ def identifiers private def product_url - 'https://logging.googleapis.com/v2/' + "https://logging.googleapis.com/v2/" end def resource_base_url - 'folders/{{folder}}/exclusions' + "folders/{{folder}}/exclusions" end end diff --git a/generate/libraries/google_logging_folder_log_sink.rb b/generate/libraries/google_logging_folder_log_sink.rb index 2e7fa872e..2bdc670f8 100644 --- a/generate/libraries/google_logging_folder_log_sink.rb +++ b/generate/libraries/google_logging_folder_log_sink.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Stackdriver Logging resources. class LoggingFolderLogSink < GcpResourceBase - name 'google_logging_folder_log_sink' - desc 'FolderLogSink' - supports platform: 'gcp' + name "google_logging_folder_log_sink" + desc "FolderLogSink" + supports platform: "gcp" attr_reader :params attr_reader :folder @@ -32,18 +32,18 @@ class LoggingFolderLogSink < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @folder = @fetched['folder'] - @name = @fetched['name'] - @filter = @fetched['filter'] - @destination = @fetched['destination'] - @writer_identity = @fetched['writerIdentity'] - @include_children = @fetched['includeChildren'] + @folder = @fetched["folder"] + @name = @fetched["name"] + @filter = @fetched["filter"] + @destination = @fetched["destination"] + @writer_identity = @fetched["writerIdentity"] + @include_children = @fetched["includeChildren"] end # Handles parsing RFC3339 time string @@ -61,17 +61,17 @@ def to_s def un_parse { - 'folder' => ->(x, _) { x.nil? ? [] : ["its('folder') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'filter' => ->(x, _) { x.nil? ? [] : ["its('filter') { should cmp #{x.inspect} }"] }, - 'destination' => ->(x, _) { x.nil? ? [] : ["its('destination') { should cmp #{x.inspect} }"] }, - 'writer_identity' => ->(x, _) { x.nil? ? [] : ["its('writer_identity') { should cmp #{x.inspect} }"] }, - 'include_children' => ->(x, _) { x.nil? ? [] : ["its('include_children') { should cmp #{x.inspect} }"] }, + "folder" => ->(x, _) { x.nil? ? [] : ["its('folder') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "filter" => ->(x, _) { x.nil? ? [] : ["its('filter') { should cmp #{x.inspect} }"] }, + "destination" => ->(x, _) { x.nil? ? [] : ["its('destination') { should cmp #{x.inspect} }"] }, + "writer_identity" => ->(x, _) { x.nil? ? [] : ["its('writer_identity') { should cmp #{x.inspect} }"] }, + "include_children" => ->(x, _) { x.nil? ? [] : ["its('include_children') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'FolderLogSink' + name = "FolderLogSink" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -80,11 +80,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_logging_folder_log_sink', + type: "google_logging_folder_log_sink", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -92,10 +92,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://logging.googleapis.com/v2/' + "https://logging.googleapis.com/v2/" end def resource_base_url - 'folders/{{folder}}/sinks/{{name}}' + "folders/{{folder}}/sinks/{{name}}" end end diff --git a/generate/libraries/google_logging_folder_log_sinks.rb b/generate/libraries/google_logging_folder_log_sinks.rb index de5f6b8fa..d70bb90b9 100644 --- a/generate/libraries/google_logging_folder_log_sinks.rb +++ b/generate/libraries/google_logging_folder_log_sinks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class LoggingFolderLogSinks < GcpResourceBase - name 'google_logging_folder_log_sinks' - desc 'FolderLogSink plural resource' - supports platform: 'gcp' + name "google_logging_folder_log_sinks" + desc "FolderLogSink plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class LoggingFolderLogSinks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('sinks') + @table = fetch_wrapped_resource("sinks") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'folder' => ->(obj) { [:folder, obj['folder']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'filter' => ->(obj) { [:filter, obj['filter']] }, - 'destination' => ->(obj) { [:destination, obj['destination']] }, - 'writerIdentity' => ->(obj) { [:writer_identity, obj['writerIdentity']] }, - 'includeChildren' => ->(obj) { [:include_children, obj['includeChildren']] }, + "folder" => ->(obj) { [:folder, obj["folder"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "filter" => ->(obj) { [:filter, obj["filter"]] }, + "destination" => ->(obj) { [:destination, obj["destination"]] }, + "writerIdentity" => ->(obj) { [:writer_identity, obj["writerIdentity"]] }, + "includeChildren" => ->(obj) { [:include_children, obj["includeChildren"]] }, } end @@ -100,10 +100,10 @@ def identifiers private def product_url - 'https://logging.googleapis.com/v2/' + "https://logging.googleapis.com/v2/" end def resource_base_url - 'folders/{{folder}}/sinks' + "folders/{{folder}}/sinks" end end diff --git a/generate/libraries/google_logging_organization_log_sink.rb b/generate/libraries/google_logging_organization_log_sink.rb index 96e57f989..4cf3f4a70 100644 --- a/generate/libraries/google_logging_organization_log_sink.rb +++ b/generate/libraries/google_logging_organization_log_sink.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Stackdriver Logging resources. class LoggingOrganizationLogSink < GcpResourceBase - name 'google_logging_organization_log_sink' - desc 'OrganizationLogSink' - supports platform: 'gcp' + name "google_logging_organization_log_sink" + desc "OrganizationLogSink" + supports platform: "gcp" attr_reader :params attr_reader :organization @@ -32,18 +32,18 @@ class LoggingOrganizationLogSink < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @organization = @fetched['organization'] - @name = @fetched['name'] - @filter = @fetched['filter'] - @destination = @fetched['destination'] - @writer_identity = @fetched['writerIdentity'] - @include_children = @fetched['includeChildren'] + @organization = @fetched["organization"] + @name = @fetched["name"] + @filter = @fetched["filter"] + @destination = @fetched["destination"] + @writer_identity = @fetched["writerIdentity"] + @include_children = @fetched["includeChildren"] end # Handles parsing RFC3339 time string @@ -61,17 +61,17 @@ def to_s def un_parse { - 'organization' => ->(x, _) { x.nil? ? [] : ["its('organization') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'filter' => ->(x, _) { x.nil? ? [] : ["its('filter') { should cmp #{x.inspect} }"] }, - 'destination' => ->(x, _) { x.nil? ? [] : ["its('destination') { should cmp #{x.inspect} }"] }, - 'writer_identity' => ->(x, _) { x.nil? ? [] : ["its('writer_identity') { should cmp #{x.inspect} }"] }, - 'include_children' => ->(x, _) { x.nil? ? [] : ["its('include_children') { should cmp #{x.inspect} }"] }, + "organization" => ->(x, _) { x.nil? ? [] : ["its('organization') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "filter" => ->(x, _) { x.nil? ? [] : ["its('filter') { should cmp #{x.inspect} }"] }, + "destination" => ->(x, _) { x.nil? ? [] : ["its('destination') { should cmp #{x.inspect} }"] }, + "writer_identity" => ->(x, _) { x.nil? ? [] : ["its('writer_identity') { should cmp #{x.inspect} }"] }, + "include_children" => ->(x, _) { x.nil? ? [] : ["its('include_children') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'OrganizationLogSink' + name = "OrganizationLogSink" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -80,11 +80,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_logging_organization_log_sink', + type: "google_logging_organization_log_sink", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -92,10 +92,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://logging.googleapis.com/v2/' + "https://logging.googleapis.com/v2/" end def resource_base_url - 'organizations/{{organization}}/sinks/{{name}}' + "organizations/{{organization}}/sinks/{{name}}" end end diff --git a/generate/libraries/google_logging_organization_log_sinks.rb b/generate/libraries/google_logging_organization_log_sinks.rb index 692b472e8..a09c47b51 100644 --- a/generate/libraries/google_logging_organization_log_sinks.rb +++ b/generate/libraries/google_logging_organization_log_sinks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class LoggingOrganizationLogSinks < GcpResourceBase - name 'google_logging_organization_log_sinks' - desc 'OrganizationLogSink plural resource' - supports platform: 'gcp' + name "google_logging_organization_log_sinks" + desc "OrganizationLogSink plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class LoggingOrganizationLogSinks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('sinks') + @table = fetch_wrapped_resource("sinks") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'organization' => ->(obj) { [:organization, obj['organization']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'filter' => ->(obj) { [:filter, obj['filter']] }, - 'destination' => ->(obj) { [:destination, obj['destination']] }, - 'writerIdentity' => ->(obj) { [:writer_identity, obj['writerIdentity']] }, - 'includeChildren' => ->(obj) { [:include_children, obj['includeChildren']] }, + "organization" => ->(obj) { [:organization, obj["organization"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "filter" => ->(obj) { [:filter, obj["filter"]] }, + "destination" => ->(obj) { [:destination, obj["destination"]] }, + "writerIdentity" => ->(obj) { [:writer_identity, obj["writerIdentity"]] }, + "includeChildren" => ->(obj) { [:include_children, obj["includeChildren"]] }, } end @@ -100,10 +100,10 @@ def identifiers private def product_url - 'https://logging.googleapis.com/v2/' + "https://logging.googleapis.com/v2/" end def resource_base_url - 'organizations/{{organization}}/sinks' + "organizations/{{organization}}/sinks" end end diff --git a/generate/libraries/google_logging_project_exclusion.rb b/generate/libraries/google_logging_project_exclusion.rb index d55d68f74..1c753e7df 100644 --- a/generate/libraries/google_logging_project_exclusion.rb +++ b/generate/libraries/google_logging_project_exclusion.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'google/apis/logging_v2' + +require "gcp_backend" +require "google/apis/logging_v2" module Inspec::Resources class GoogleLoggingProjectExclusion < GcpResourceBase - name 'google_logging_project_exclusion' - desc 'Verifies settings for a project logging exclusion' + name "google_logging_project_exclusion" + desc "Verifies settings for a project logging exclusion" example " describe google_logging_project_exclusion(project: 'chef-inspec-gcp', exclusion: 'exclusion-name-abcd') do diff --git a/generate/libraries/google_logging_project_sink.rb b/generate/libraries/google_logging_project_sink.rb index 3ff0fd3ee..ddc3306af 100644 --- a/generate/libraries/google_logging_project_sink.rb +++ b/generate/libraries/google_logging_project_sink.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'google/apis/logging_v2' + +require "gcp_backend" +require "google/apis/logging_v2" module Inspec::Resources class GoogleLoggingProjectSink < GcpResourceBase - name 'google_logging_project_sink' - desc 'Verifies settings for a project logging sink' + name "google_logging_project_sink" + desc "Verifies settings for a project logging sink" example " describe google_logging_project_sink(project: 'chef-inspec-gcp', sink: 'sink-name-abcd') do diff --git a/generate/libraries/google_logging_project_sinks.rb b/generate/libraries/google_logging_project_sinks.rb index 6be98aa60..49bc5ba66 100644 --- a/generate/libraries/google_logging_project_sinks.rb +++ b/generate/libraries/google_logging_project_sinks.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleLoggingProjectSinks < GcpResourceBase - name 'google_logging_project_sinks' - desc 'Verifies settings for GCP project logging sinks in bulk' + name "google_logging_project_sinks" + desc "Verifies settings for GCP project logging sinks in bulk" example " describe google_logging_project_sinks(project: 'chef-inspec-gcp') do diff --git a/generate/libraries/google_ml_engine_model.rb b/generate/libraries/google_ml_engine_model.rb index 8ed948059..877dc1645 100644 --- a/generate/libraries/google_ml_engine_model.rb +++ b/generate/libraries/google_ml_engine_model.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/mlengine/property/model_default_version' +require "gcp_backend" +require "google/mlengine/property/model_default_version" # A provider to manage ML Engine resources. class MLEngineModel < GcpResourceBase - name 'google_ml_engine_model' - desc 'Model' - supports platform: 'gcp' + name "google_ml_engine_model" + desc "Model" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -34,19 +34,19 @@ class MLEngineModel < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @name = @fetched['name'] - @description = @fetched['description'] - @default_version = GoogleInSpec::MLEngine::Property::ModelDefaultVersion.new(@fetched['defaultVersion'], to_s) - @regions = @fetched['regions'] - @online_prediction_logging = @fetched['onlinePredictionLogging'] - @online_prediction_console_logging = @fetched['onlinePredictionConsoleLogging'] - @labels = @fetched['labels'] + @name = @fetched["name"] + @description = @fetched["description"] + @default_version = GoogleInSpec::MLEngine::Property::ModelDefaultVersion.new(@fetched["defaultVersion"], to_s) + @regions = @fetched["regions"] + @online_prediction_logging = @fetched["onlinePredictionLogging"] + @online_prediction_console_logging = @fetched["onlinePredictionConsoleLogging"] + @labels = @fetched["labels"] end # Handles parsing RFC3339 time string @@ -64,18 +64,18 @@ def to_s def un_parse { - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'default_version' => ->(x, _) { x.nil? ? [] : GoogleInSpec::MLEngine::Property::ModelDefaultVersion.un_parse(x, 'default_version') }, - 'regions' => ->(x, _) { x.nil? ? [] : x.map { |single| "its('regions') { should include #{single.inspect} }" } }, - 'online_prediction_logging' => ->(x, _) { x.nil? ? [] : ["its('online_prediction_logging') { should cmp #{x.inspect} }"] }, - 'online_prediction_console_logging' => ->(x, _) { x.nil? ? [] : ["its('online_prediction_console_logging') { should cmp #{x.inspect} }"] }, - 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "default_version" => ->(x, _) { x.nil? ? [] : GoogleInSpec::MLEngine::Property::ModelDefaultVersion.un_parse(x, "default_version") }, + "regions" => ->(x, _) { x.nil? ? [] : x.map { |single| "its('regions') { should include #{single.inspect} }" } }, + "online_prediction_logging" => ->(x, _) { x.nil? ? [] : ["its('online_prediction_logging') { should cmp #{x.inspect} }"] }, + "online_prediction_console_logging" => ->(x, _) { x.nil? ? [] : ["its('online_prediction_console_logging') { should cmp #{x.inspect} }"] }, + "labels" => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Model' + name = "Model" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -84,11 +84,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_ml_engine_model', + type: "google_ml_engine_model", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -96,10 +96,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://ml.googleapis.com/v1/' + "https://ml.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/models/{{name}}' + "projects/{{project}}/models/{{name}}" end end diff --git a/generate/libraries/google_ml_engine_models.rb b/generate/libraries/google_ml_engine_models.rb index 7151a94df..ee8470e68 100644 --- a/generate/libraries/google_ml_engine_models.rb +++ b/generate/libraries/google_ml_engine_models.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class MLEngineModels < GcpResourceBase - name 'google_ml_engine_models' - desc 'Model plural resource' - supports platform: 'gcp' + name "google_ml_engine_models" + desc "Model plural resource" + supports platform: "gcp" attr_reader :table @@ -36,12 +36,12 @@ class MLEngineModels < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('models') + @table = fetch_wrapped_resource("models") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'defaultVersion' => ->(obj) { [:default_version, GoogleInSpec::MLEngine::Property::ModelDefaultVersion.new(obj['defaultVersion'], to_s)] }, - 'regions' => ->(obj) { [:regions, obj['regions']] }, - 'onlinePredictionLogging' => ->(obj) { [:online_prediction_logging, obj['onlinePredictionLogging']] }, - 'onlinePredictionConsoleLogging' => ->(obj) { [:online_prediction_console_logging, obj['onlinePredictionConsoleLogging']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "defaultVersion" => ->(obj) { [:default_version, GoogleInSpec::MLEngine::Property::ModelDefaultVersion.new(obj["defaultVersion"], to_s)] }, + "regions" => ->(obj) { [:regions, obj["regions"]] }, + "onlinePredictionLogging" => ->(obj) { [:online_prediction_logging, obj["onlinePredictionLogging"]] }, + "onlinePredictionConsoleLogging" => ->(obj) { [:online_prediction_console_logging, obj["onlinePredictionConsoleLogging"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, } end @@ -102,10 +102,10 @@ def identifiers private def product_url - 'https://ml.googleapis.com/v1/' + "https://ml.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/models' + "projects/{{project}}/models" end end diff --git a/generate/libraries/google_organization.rb b/generate/libraries/google_organization.rb index 5bbcd5e34..e1876bfd5 100644 --- a/generate/libraries/google_organization.rb +++ b/generate/libraries/google_organization.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleOrganization < GcpResourceBase - name 'google_organization' - desc 'Verifies settings for an organization' + name "google_organization" + desc "Verifies settings for an organization" example " describe google_organization(name: 'google.com') do diff --git a/generate/libraries/google_organization_policy.rb b/generate/libraries/google_organization_policy.rb index c9173fa25..f765b9c9a 100644 --- a/generate/libraries/google_organization_policy.rb +++ b/generate/libraries/google_organization_policy.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleOrganizationPolicy < GcpResourceBase - name 'google_organization_policy' - desc 'Verifies configuration of an organization policy' + name "google_organization_policy" + desc "Verifies configuration of an organization policy" example " describe google_organization_policy(name: 'organizations/123456', constraint: 'constraints/compute.disableGuestAttributesAccess') do diff --git a/generate/libraries/google_organizations.rb b/generate/libraries/google_organizations.rb index a0f602135..d259d5214 100644 --- a/generate/libraries/google_organizations.rb +++ b/generate/libraries/google_organizations.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleComputeOrganizations < GcpResourceBase - name 'google_organizations' - desc 'Verifies settings for GCP organizations in bulk' + name "google_organizations" + desc "Verifies settings for GCP organizations in bulk" example " describe google_organizations do diff --git a/generate/libraries/google_project.rb b/generate/libraries/google_project.rb index ce6db146f..24db94d0e 100644 --- a/generate/libraries/google_project.rb +++ b/generate/libraries/google_project.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleProject < GcpResourceBase - name 'google_project' - desc 'Verifies settings for a project' + name "google_project" + desc "Verifies settings for a project" example " describe google_project(project: 'chef-inspec-gcp') do diff --git a/generate/libraries/google_project_alert_policies.rb b/generate/libraries/google_project_alert_policies.rb index fe28e9ebe..b255f5785 100644 --- a/generate/libraries/google_project_alert_policies.rb +++ b/generate/libraries/google_project_alert_policies.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'google/apis/monitoring_v3' + +require "gcp_backend" +require "google/apis/monitoring_v3" module Inspec::Resources class GoogleProjectAlertPolicies < GcpResourceBase - name 'google_project_alert_policies' - desc 'Verifies settings for GCP project alert policies in bulk' + name "google_project_alert_policies" + desc "Verifies settings for GCP project alert policies in bulk" example " describe google_project_alert_policies(project: 'chef-inspec-gcp') do diff --git a/generate/libraries/google_project_alert_policy.rb b/generate/libraries/google_project_alert_policy.rb index f9257115b..ebf509c0d 100644 --- a/generate/libraries/google_project_alert_policy.rb +++ b/generate/libraries/google_project_alert_policy.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'google/apis/monitoring_v3' + +require "gcp_backend" +require "google/apis/monitoring_v3" module Inspec::Resources class GoogleProjectAlertPolicy < GcpResourceBase - name 'google_project_alert_policy' - desc 'Verifies settings for a single GCP project alert policy' + name "google_project_alert_policy" + desc "Verifies settings for a single GCP project alert policy" example " describe google_project_alert_policy(policy: 'projects/spaterson-project/alertPolicies/9271751234503117449') do diff --git a/generate/libraries/google_project_alert_policy_condition.rb b/generate/libraries/google_project_alert_policy_condition.rb index c2059066a..d960491c8 100644 --- a/generate/libraries/google_project_alert_policy_condition.rb +++ b/generate/libraries/google_project_alert_policy_condition.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'google/apis/monitoring_v3' + +require "gcp_backend" +require "google/apis/monitoring_v3" module Inspec::Resources class GoogleProjectAlertPolicyCondition < GcpResourceBase - name 'google_project_alert_policy_condition' - desc 'Verifies settings for a single GCP project alert policy condition by policy name and filter name' + name "google_project_alert_policy_condition" + desc "Verifies settings for a single GCP project alert policy condition by policy name and filter name" example " describe google_project_alert_policy_condition(policy: 'projects/my-project/alertPolicies/9271751234503117449', filter 'project=\"my-project\"') do diff --git a/generate/libraries/google_project_iam_binding.rb b/generate/libraries/google_project_iam_binding.rb index dec488e84..1d87d26be 100644 --- a/generate/libraries/google_project_iam_binding.rb +++ b/generate/libraries/google_project_iam_binding.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleProjectIAMBinding < GcpResourceBase - name 'google_project_iam_binding' - desc 'Verifies settings for a single GCP KMS key ring IAM bindings' + name "google_project_iam_binding" + desc "Verifies settings for a single GCP KMS key ring IAM bindings" example " describe google_kms_key_ring_iam_binding(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring', role: 'roles/compute.admin') do diff --git a/generate/libraries/google_project_iam_bindings.rb b/generate/libraries/google_project_iam_bindings.rb index 8a5f29929..1fe0a4d84 100644 --- a/generate/libraries/google_project_iam_bindings.rb +++ b/generate/libraries/google_project_iam_bindings.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleProjectIAMBindings < GcpResourceBase - name 'google_project_iam_bindings' - desc 'Verifies settings for GCP project iam_bindings in bulk' + name "google_project_iam_bindings" + desc "Verifies settings for GCP project iam_bindings in bulk" example " describe google_project_iam_bindings(project: 'chef-inspec-gcp') do diff --git a/generate/libraries/google_project_iam_custom_role.rb b/generate/libraries/google_project_iam_custom_role.rb index 99811cc14..cb91a6081 100644 --- a/generate/libraries/google_project_iam_custom_role.rb +++ b/generate/libraries/google_project_iam_custom_role.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleProjectIamCustomRole < GcpResourceBase - name 'google_project_iam_custom_role' - desc 'Verifies settings for a project IAM role' + name "google_project_iam_custom_role" + desc "Verifies settings for a project IAM role" example " describe google_project_iam_custom_role(project: 'chef-inspec-gcp', name: 'admin12345') do diff --git a/generate/libraries/google_project_logging_audit_config.rb b/generate/libraries/google_project_logging_audit_config.rb index 2b604dd13..4df6829b1 100644 --- a/generate/libraries/google_project_logging_audit_config.rb +++ b/generate/libraries/google_project_logging_audit_config.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleProjectLoggingAuditConfig < GcpResourceBase - name 'google_project_logging_audit_config' - desc 'Verifies settings for a GCP project logging audit configuration' + name "google_project_logging_audit_config" + desc "Verifies settings for a GCP project logging audit configuration" example " describe google_project_logging_audit_config(project: 'chef-inspec-gcp') do @@ -23,7 +23,7 @@ def initialize(opts = {}) @default_exempted_members = {} if defined?(@audit_logging_configs.audit_configs) && @audit_logging_configs.audit_configs.instance_of?(::Array) @audit_logging_configs.audit_configs.each do |service_config| - next if service_config.service != 'allServices' + next if service_config.service != "allServices" service_config.audit_log_configs.each do |config| @default_types+=[config.log_type] @default_exempted_members[config.log_type]=config.exempted_members if defined?(config.exempted_members) && !config.exempted_members.nil? diff --git a/generate/libraries/google_project_metric.rb b/generate/libraries/google_project_metric.rb index af46038cd..06ec689ce 100644 --- a/generate/libraries/google_project_metric.rb +++ b/generate/libraries/google_project_metric.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'google/apis/logging_v2' + +require "gcp_backend" +require "google/apis/logging_v2" module Inspec::Resources class GoogleProjectMetric < GcpResourceBase - name 'google_project_metric' - desc 'Verifies settings for a project metric' + name "google_project_metric" + desc "Verifies settings for a project metric" example " describe google_project_metric(project: 'chef-inspec-gcp', metric: 'metric_name') do diff --git a/generate/libraries/google_project_metrics.rb b/generate/libraries/google_project_metrics.rb index 63690c445..18549b9aa 100644 --- a/generate/libraries/google_project_metrics.rb +++ b/generate/libraries/google_project_metrics.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'google/apis/logging_v2' + +require "gcp_backend" +require "google/apis/logging_v2" module Inspec::Resources class GoogleProjectMetrics < GcpResourceBase - name 'google_project_metrics' - desc 'Verifies settings for GCP project metrics in bulk' + name "google_project_metrics" + desc "Verifies settings for GCP project metrics in bulk" example " describe google_project_metrics(project: 'chef-inspec-gcp') do diff --git a/generate/libraries/google_projects.rb b/generate/libraries/google_projects.rb index 5d23ddef6..54b37c655 100644 --- a/generate/libraries/google_projects.rb +++ b/generate/libraries/google_projects.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleComputeProjects < GcpResourceBase - name 'google_projects' - desc 'Verifies settings for GCP compute projects in bulk' + name "google_projects" + desc "Verifies settings for GCP compute projects in bulk" example " describe google_projects do diff --git a/generate/libraries/google_pubsub_subscription.rb b/generate/libraries/google_pubsub_subscription.rb index 15a654c54..ebe063d61 100644 --- a/generate/libraries/google_pubsub_subscription.rb +++ b/generate/libraries/google_pubsub_subscription.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/pubsub/property/subscription_expiration_policy' -require 'google/pubsub/property/subscription_push_config' +require "gcp_backend" +require "google/pubsub/property/subscription_expiration_policy" +require "google/pubsub/property/subscription_push_config" # A provider to manage Cloud Pub/Sub resources. class PubsubSubscription < GcpResourceBase - name 'google_pubsub_subscription' - desc 'Subscription' - supports platform: 'gcp' + name "google_pubsub_subscription" + desc "Subscription" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -36,20 +36,20 @@ class PubsubSubscription < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @name = name_from_self_link(@fetched['name']) - @topic = @fetched['topic'] - @labels = @fetched['labels'] - @push_config = GoogleInSpec::Pubsub::Property::SubscriptionPushConfig.new(@fetched['pushConfig'], to_s) - @ack_deadline_seconds = @fetched['ackDeadlineSeconds'] - @message_retention_duration = @fetched['messageRetentionDuration'] - @retain_acked_messages = @fetched['retainAckedMessages'] - @expiration_policy = GoogleInSpec::Pubsub::Property::SubscriptionExpirationPolicy.new(@fetched['expirationPolicy'], to_s) + @name = name_from_self_link(@fetched["name"]) + @topic = @fetched["topic"] + @labels = @fetched["labels"] + @push_config = GoogleInSpec::Pubsub::Property::SubscriptionPushConfig.new(@fetched["pushConfig"], to_s) + @ack_deadline_seconds = @fetched["ackDeadlineSeconds"] + @message_retention_duration = @fetched["messageRetentionDuration"] + @retain_acked_messages = @fetched["retainAckedMessages"] + @expiration_policy = GoogleInSpec::Pubsub::Property::SubscriptionExpirationPolicy.new(@fetched["expirationPolicy"], to_s) end # Handles parsing RFC3339 time string @@ -67,19 +67,19 @@ def to_s def un_parse { - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'topic' => ->(x, _) { x.nil? ? [] : ["its('topic') { should cmp #{x.inspect} }"] }, - 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'push_config' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Pubsub::Property::SubscriptionPushConfig.un_parse(x, 'push_config') }, - 'ack_deadline_seconds' => ->(x, _) { x.nil? ? [] : ["its('ack_deadline_seconds') { should cmp #{x.inspect} }"] }, - 'message_retention_duration' => ->(x, _) { x.nil? ? [] : ["its('message_retention_duration') { should cmp #{x.inspect} }"] }, - 'retain_acked_messages' => ->(x, _) { x.nil? ? [] : ["its('retain_acked_messages') { should cmp #{x.inspect} }"] }, - 'expiration_policy' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Pubsub::Property::SubscriptionExpirationPolicy.un_parse(x, 'expiration_policy') }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "topic" => ->(x, _) { x.nil? ? [] : ["its('topic') { should cmp #{x.inspect} }"] }, + "labels" => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "push_config" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Pubsub::Property::SubscriptionPushConfig.un_parse(x, "push_config") }, + "ack_deadline_seconds" => ->(x, _) { x.nil? ? [] : ["its('ack_deadline_seconds') { should cmp #{x.inspect} }"] }, + "message_retention_duration" => ->(x, _) { x.nil? ? [] : ["its('message_retention_duration') { should cmp #{x.inspect} }"] }, + "retain_acked_messages" => ->(x, _) { x.nil? ? [] : ["its('retain_acked_messages') { should cmp #{x.inspect} }"] }, + "expiration_policy" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Pubsub::Property::SubscriptionExpirationPolicy.un_parse(x, "expiration_policy") }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Subscription' + name = "Subscription" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -88,11 +88,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_pubsub_subscription', + type: "google_pubsub_subscription", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -100,10 +100,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://pubsub.googleapis.com/v1/' + "https://pubsub.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/subscriptions/{{name}}' + "projects/{{project}}/subscriptions/{{name}}" end end diff --git a/generate/libraries/google_pubsub_subscription_iam_policy.rb b/generate/libraries/google_pubsub_subscription_iam_policy.rb index 73467b1cf..838fbdf61 100644 --- a/generate/libraries/google_pubsub_subscription_iam_policy.rb +++ b/generate/libraries/google_pubsub_subscription_iam_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_audit_configs' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_audit_configs" +require "google/iam/property/iam_policy_bindings" # A provider to manage Cloud Pub/Sub IAM Policy resources. class SubscriptionIamPolicy < GcpResourceBase - name 'google_pubsub_subscription_iam_policy' - desc 'Subscription Iam Policy' - supports platform: 'gcp' + name "google_pubsub_subscription_iam_policy" + desc "Subscription Iam Policy" + supports platform: "gcp" attr_reader :params attr_reader :bindings @@ -30,13 +30,13 @@ class SubscriptionIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) - @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) + @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched["auditConfigs"], to_s) end def exists? @@ -50,10 +50,10 @@ def to_s private def product_url - 'https://pubsub.googleapis.com/v1/' + "https://pubsub.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/subscriptions/{{name}}:getIamPolicy' + "projects/{{project}}/subscriptions/{{name}}:getIamPolicy" end end diff --git a/generate/libraries/google_pubsub_subscriptions.rb b/generate/libraries/google_pubsub_subscriptions.rb index bb67e0a5f..d34873e61 100644 --- a/generate/libraries/google_pubsub_subscriptions.rb +++ b/generate/libraries/google_pubsub_subscriptions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class PubsubSubscriptions < GcpResourceBase - name 'google_pubsub_subscriptions' - desc 'Subscription plural resource' - supports platform: 'gcp' + name "google_pubsub_subscriptions" + desc "Subscription plural resource" + supports platform: "gcp" attr_reader :table @@ -37,12 +37,12 @@ class PubsubSubscriptions < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('subscriptions') + @table = fetch_wrapped_resource("subscriptions") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, name_from_self_link(obj['name'])] }, - 'topic' => ->(obj) { [:topic, obj['topic']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'pushConfig' => ->(obj) { [:push_config, GoogleInSpec::Pubsub::Property::SubscriptionPushConfig.new(obj['pushConfig'], to_s)] }, - 'ackDeadlineSeconds' => ->(obj) { [:ack_deadline_seconds, obj['ackDeadlineSeconds']] }, - 'messageRetentionDuration' => ->(obj) { [:message_retention_duration, obj['messageRetentionDuration']] }, - 'retainAckedMessages' => ->(obj) { [:retain_acked_messages, obj['retainAckedMessages']] }, - 'expirationPolicy' => ->(obj) { [:expiration_policy, GoogleInSpec::Pubsub::Property::SubscriptionExpirationPolicy.new(obj['expirationPolicy'], to_s)] }, + "name" => ->(obj) { [:name, name_from_self_link(obj["name"])] }, + "topic" => ->(obj) { [:topic, obj["topic"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "pushConfig" => ->(obj) { [:push_config, GoogleInSpec::Pubsub::Property::SubscriptionPushConfig.new(obj["pushConfig"], to_s)] }, + "ackDeadlineSeconds" => ->(obj) { [:ack_deadline_seconds, obj["ackDeadlineSeconds"]] }, + "messageRetentionDuration" => ->(obj) { [:message_retention_duration, obj["messageRetentionDuration"]] }, + "retainAckedMessages" => ->(obj) { [:retain_acked_messages, obj["retainAckedMessages"]] }, + "expirationPolicy" => ->(obj) { [:expiration_policy, GoogleInSpec::Pubsub::Property::SubscriptionExpirationPolicy.new(obj["expirationPolicy"], to_s)] }, } end @@ -104,10 +104,10 @@ def identifiers private def product_url - 'https://pubsub.googleapis.com/v1/' + "https://pubsub.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/subscriptions' + "projects/{{project}}/subscriptions" end end diff --git a/generate/libraries/google_pubsub_topic.rb b/generate/libraries/google_pubsub_topic.rb index cda190266..6976dd316 100644 --- a/generate/libraries/google_pubsub_topic.rb +++ b/generate/libraries/google_pubsub_topic.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/pubsub/property/topic_message_storage_policy' +require "gcp_backend" +require "google/pubsub/property/topic_message_storage_policy" # A provider to manage Cloud Pub/Sub resources. class PubsubTopic < GcpResourceBase - name 'google_pubsub_topic' - desc 'Topic' - supports platform: 'gcp' + name "google_pubsub_topic" + desc "Topic" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -31,16 +31,16 @@ class PubsubTopic < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @name = name_from_self_link(@fetched['name']) - @kms_key_name = @fetched['kmsKeyName'] - @labels = @fetched['labels'] - @message_storage_policy = GoogleInSpec::Pubsub::Property::TopicMessageStoragePolicy.new(@fetched['messageStoragePolicy'], to_s) + @name = name_from_self_link(@fetched["name"]) + @kms_key_name = @fetched["kmsKeyName"] + @labels = @fetched["labels"] + @message_storage_policy = GoogleInSpec::Pubsub::Property::TopicMessageStoragePolicy.new(@fetched["messageStoragePolicy"], to_s) end # Handles parsing RFC3339 time string @@ -58,15 +58,15 @@ def to_s def un_parse { - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'kms_key_name' => ->(x, _) { x.nil? ? [] : ["its('kms_key_name') { should cmp #{x.inspect} }"] }, - 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'message_storage_policy' => ->(x, _) { x.nil? ? [] : GoogleInSpec::Pubsub::Property::TopicMessageStoragePolicy.un_parse(x, 'message_storage_policy') }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "kms_key_name" => ->(x, _) { x.nil? ? [] : ["its('kms_key_name') { should cmp #{x.inspect} }"] }, + "labels" => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "message_storage_policy" => ->(x, _) { x.nil? ? [] : GoogleInSpec::Pubsub::Property::TopicMessageStoragePolicy.un_parse(x, "message_storage_policy") }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Topic' + name = "Topic" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -75,11 +75,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_pubsub_topic', + type: "google_pubsub_topic", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -87,10 +87,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://pubsub.googleapis.com/v1/' + "https://pubsub.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/topics/{{name}}' + "projects/{{project}}/topics/{{name}}" end end diff --git a/generate/libraries/google_pubsub_topic_iam_policy.rb b/generate/libraries/google_pubsub_topic_iam_policy.rb index cbc14d1d1..e43cd6a91 100644 --- a/generate/libraries/google_pubsub_topic_iam_policy.rb +++ b/generate/libraries/google_pubsub_topic_iam_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_audit_configs' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_audit_configs" +require "google/iam/property/iam_policy_bindings" # A provider to manage Cloud Pub/Sub IAM Policy resources. class TopicIamPolicy < GcpResourceBase - name 'google_pubsub_topic_iam_policy' - desc 'Topic Iam Policy' - supports platform: 'gcp' + name "google_pubsub_topic_iam_policy" + desc "Topic Iam Policy" + supports platform: "gcp" attr_reader :params attr_reader :bindings @@ -30,13 +30,13 @@ class TopicIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) - @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) + @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched["auditConfigs"], to_s) end def exists? @@ -50,10 +50,10 @@ def to_s private def product_url - 'https://pubsub.googleapis.com/v1/' + "https://pubsub.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/topics/{{name}}:getIamPolicy' + "projects/{{project}}/topics/{{name}}:getIamPolicy" end end diff --git a/generate/libraries/google_pubsub_topics.rb b/generate/libraries/google_pubsub_topics.rb index ee104f682..524ee9f18 100644 --- a/generate/libraries/google_pubsub_topics.rb +++ b/generate/libraries/google_pubsub_topics.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class PubsubTopics < GcpResourceBase - name 'google_pubsub_topics' - desc 'Topic plural resource' - supports platform: 'gcp' + name "google_pubsub_topics" + desc "Topic plural resource" + supports platform: "gcp" attr_reader :table @@ -33,12 +33,12 @@ class PubsubTopics < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('topics') + @table = fetch_wrapped_resource("topics") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -66,10 +66,10 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, name_from_self_link(obj['name'])] }, - 'kmsKeyName' => ->(obj) { [:kms_key_name, obj['kmsKeyName']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'messageStoragePolicy' => ->(obj) { [:message_storage_policy, GoogleInSpec::Pubsub::Property::TopicMessageStoragePolicy.new(obj['messageStoragePolicy'], to_s)] }, + "name" => ->(obj) { [:name, name_from_self_link(obj["name"])] }, + "kmsKeyName" => ->(obj) { [:kms_key_name, obj["kmsKeyName"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "messageStoragePolicy" => ->(obj) { [:message_storage_policy, GoogleInSpec::Pubsub::Property::TopicMessageStoragePolicy.new(obj["messageStoragePolicy"], to_s)] }, } end @@ -96,10 +96,10 @@ def identifiers private def product_url - 'https://pubsub.googleapis.com/v1/' + "https://pubsub.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/topics' + "projects/{{project}}/topics" end end diff --git a/generate/libraries/google_redis_instance.rb b/generate/libraries/google_redis_instance.rb index bb1392562..afba47f6c 100644 --- a/generate/libraries/google_redis_instance.rb +++ b/generate/libraries/google_redis_instance.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud Memorystore resources. class RedisInstance < GcpResourceBase - name 'google_redis_instance' - desc 'Instance' - supports platform: 'gcp' + name "google_redis_instance" + desc "Instance" + supports platform: "gcp" attr_reader :params attr_reader :alternative_location_id @@ -42,28 +42,28 @@ class RedisInstance < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @alternative_location_id = @fetched['alternativeLocationId'] - @authorized_network = @fetched['authorizedNetwork'] - @create_time = parse_time_string(@fetched['createTime']) - @current_location_id = @fetched['currentLocationId'] - @display_name = @fetched['displayName'] - @host = @fetched['host'] - @labels = @fetched['labels'] - @redis_configs = @fetched['redisConfigs'] - @location_id = @fetched['locationId'] - @name = @fetched['name'] - @memory_size_gb = @fetched['memorySizeGb'] - @port = @fetched['port'] - @redis_version = @fetched['redisVersion'] - @reserved_ip_range = @fetched['reservedIpRange'] - @tier = @fetched['tier'] - @region = @fetched['region'] + @alternative_location_id = @fetched["alternativeLocationId"] + @authorized_network = @fetched["authorizedNetwork"] + @create_time = parse_time_string(@fetched["createTime"]) + @current_location_id = @fetched["currentLocationId"] + @display_name = @fetched["displayName"] + @host = @fetched["host"] + @labels = @fetched["labels"] + @redis_configs = @fetched["redisConfigs"] + @location_id = @fetched["locationId"] + @name = @fetched["name"] + @memory_size_gb = @fetched["memorySizeGb"] + @port = @fetched["port"] + @redis_version = @fetched["redisVersion"] + @reserved_ip_range = @fetched["reservedIpRange"] + @tier = @fetched["tier"] + @region = @fetched["region"] end # Handles parsing RFC3339 time string @@ -81,27 +81,27 @@ def to_s def un_parse { - 'alternative_location_id' => ->(x, _) { x.nil? ? [] : ["its('alternative_location_id') { should cmp #{x.inspect} }"] }, - 'authorized_network' => ->(x, _) { x.nil? ? [] : ["its('authorized_network') { should cmp #{x.inspect} }"] }, - 'create_time' => ->(x, _) { x.nil? ? [] : ["its('create_time.to_s') { should cmp '#{x.inspect}' }"] }, - 'current_location_id' => ->(x, _) { x.nil? ? [] : ["its('current_location_id') { should cmp #{x.inspect} }"] }, - 'display_name' => ->(x, _) { x.nil? ? [] : ["its('display_name') { should cmp #{x.inspect} }"] }, - 'host' => ->(x, _) { x.nil? ? [] : ["its('host') { should cmp #{x.inspect} }"] }, - 'labels' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'redis_configs' => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('redis_configs') { should include(#{k.inspect} => #{v.inspect}) }" } }, - 'location_id' => ->(x, _) { x.nil? ? [] : ["its('location_id') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'memory_size_gb' => ->(x, _) { x.nil? ? [] : ["its('memory_size_gb') { should cmp #{x.inspect} }"] }, - 'port' => ->(x, _) { x.nil? ? [] : ["its('port') { should cmp #{x.inspect} }"] }, - 'redis_version' => ->(x, _) { x.nil? ? [] : ["its('redis_version') { should cmp #{x.inspect} }"] }, - 'reserved_ip_range' => ->(x, _) { x.nil? ? [] : ["its('reserved_ip_range') { should cmp #{x.inspect} }"] }, - 'tier' => ->(x, _) { x.nil? ? [] : ["its('tier') { should cmp #{x.inspect} }"] }, - 'region' => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, + "alternative_location_id" => ->(x, _) { x.nil? ? [] : ["its('alternative_location_id') { should cmp #{x.inspect} }"] }, + "authorized_network" => ->(x, _) { x.nil? ? [] : ["its('authorized_network') { should cmp #{x.inspect} }"] }, + "create_time" => ->(x, _) { x.nil? ? [] : ["its('create_time.to_s') { should cmp '#{x.inspect}' }"] }, + "current_location_id" => ->(x, _) { x.nil? ? [] : ["its('current_location_id') { should cmp #{x.inspect} }"] }, + "display_name" => ->(x, _) { x.nil? ? [] : ["its('display_name') { should cmp #{x.inspect} }"] }, + "host" => ->(x, _) { x.nil? ? [] : ["its('host') { should cmp #{x.inspect} }"] }, + "labels" => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('labels') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "redis_configs" => ->(x, _) { x.nil? ? [] : x.map { |k, v| "its('redis_configs') { should include(#{k.inspect} => #{v.inspect}) }" } }, + "location_id" => ->(x, _) { x.nil? ? [] : ["its('location_id') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "memory_size_gb" => ->(x, _) { x.nil? ? [] : ["its('memory_size_gb') { should cmp #{x.inspect} }"] }, + "port" => ->(x, _) { x.nil? ? [] : ["its('port') { should cmp #{x.inspect} }"] }, + "redis_version" => ->(x, _) { x.nil? ? [] : ["its('redis_version') { should cmp #{x.inspect} }"] }, + "reserved_ip_range" => ->(x, _) { x.nil? ? [] : ["its('reserved_ip_range') { should cmp #{x.inspect} }"] }, + "tier" => ->(x, _) { x.nil? ? [] : ["its('tier') { should cmp #{x.inspect} }"] }, + "region" => ->(x, _) { x.nil? ? [] : ["its('region') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Instance' + name = "Instance" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -110,11 +110,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_redis_instance', + type: "google_redis_instance", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -122,10 +122,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://redis.googleapis.com/v1/' + "https://redis.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{region}}/instances/{{name}}' + "projects/{{project}}/locations/{{region}}/instances/{{name}}" end end diff --git a/generate/libraries/google_redis_instances.rb b/generate/libraries/google_redis_instances.rb index 11be18814..aa032cbb8 100644 --- a/generate/libraries/google_redis_instances.rb +++ b/generate/libraries/google_redis_instances.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class RedisInstances < GcpResourceBase - name 'google_redis_instances' - desc 'Instance plural resource' - supports platform: 'gcp' + name "google_redis_instances" + desc "Instance plural resource" + supports platform: "gcp" attr_reader :table @@ -45,12 +45,12 @@ class RedisInstances < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('instances') + @table = fetch_wrapped_resource("instances") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -78,22 +78,22 @@ def transform(key, value) def transformers { - 'alternativeLocationId' => ->(obj) { [:alternative_location_id, obj['alternativeLocationId']] }, - 'authorizedNetwork' => ->(obj) { [:authorized_network, obj['authorizedNetwork']] }, - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'currentLocationId' => ->(obj) { [:current_location_id, obj['currentLocationId']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'host' => ->(obj) { [:host, obj['host']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'redisConfigs' => ->(obj) { [:redis_configs, obj['redisConfigs']] }, - 'locationId' => ->(obj) { [:location_id, obj['locationId']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'memorySizeGb' => ->(obj) { [:memory_size_gb, obj['memorySizeGb']] }, - 'port' => ->(obj) { [:port, obj['port']] }, - 'redisVersion' => ->(obj) { [:redis_version, obj['redisVersion']] }, - 'reservedIpRange' => ->(obj) { [:reserved_ip_range, obj['reservedIpRange']] }, - 'tier' => ->(obj) { [:tier, obj['tier']] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "alternativeLocationId" => ->(obj) { [:alternative_location_id, obj["alternativeLocationId"]] }, + "authorizedNetwork" => ->(obj) { [:authorized_network, obj["authorizedNetwork"]] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "currentLocationId" => ->(obj) { [:current_location_id, obj["currentLocationId"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "host" => ->(obj) { [:host, obj["host"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "redisConfigs" => ->(obj) { [:redis_configs, obj["redisConfigs"]] }, + "locationId" => ->(obj) { [:location_id, obj["locationId"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "memorySizeGb" => ->(obj) { [:memory_size_gb, obj["memorySizeGb"]] }, + "port" => ->(obj) { [:port, obj["port"]] }, + "redisVersion" => ->(obj) { [:redis_version, obj["redisVersion"]] }, + "reservedIpRange" => ->(obj) { [:reserved_ip_range, obj["reservedIpRange"]] }, + "tier" => ->(obj) { [:tier, obj["tier"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end @@ -120,10 +120,10 @@ def identifiers private def product_url - 'https://redis.googleapis.com/v1/' + "https://redis.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{region}}/instances' + "projects/{{project}}/locations/{{region}}/instances" end end diff --git a/generate/libraries/google_resourcemanager_folder.rb b/generate/libraries/google_resourcemanager_folder.rb index 17600376c..22b71f1b1 100644 --- a/generate/libraries/google_resourcemanager_folder.rb +++ b/generate/libraries/google_resourcemanager_folder.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Resource Manager resources. class ResourceManagerFolder < GcpResourceBase - name 'google_resourcemanager_folder' - desc 'Folder' - supports platform: 'gcp' + name "google_resourcemanager_folder" + desc "Folder" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -31,17 +31,17 @@ class ResourceManagerFolder < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @name = @fetched['name'] - @lifecycle_state = @fetched['lifecycleState'] - @create_time = parse_time_string(@fetched['createTime']) - @parent = @fetched['parent'] - @display_name = @fetched['displayName'] + @name = @fetched["name"] + @lifecycle_state = @fetched["lifecycleState"] + @create_time = parse_time_string(@fetched["createTime"]) + @parent = @fetched["parent"] + @display_name = @fetched["displayName"] end # Handles parsing RFC3339 time string @@ -59,16 +59,16 @@ def to_s def un_parse { - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'lifecycle_state' => ->(x, _) { x.nil? ? [] : ["its('lifecycle_state') { should cmp #{x.inspect} }"] }, - 'create_time' => ->(x, _) { x.nil? ? [] : ["its('create_time.to_s') { should cmp '#{x.inspect}' }"] }, - 'parent' => ->(x, _) { x.nil? ? [] : ["its('parent') { should cmp #{x.inspect} }"] }, - 'display_name' => ->(x, _) { x.nil? ? [] : ["its('display_name') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "lifecycle_state" => ->(x, _) { x.nil? ? [] : ["its('lifecycle_state') { should cmp #{x.inspect} }"] }, + "create_time" => ->(x, _) { x.nil? ? [] : ["its('create_time.to_s') { should cmp '#{x.inspect}' }"] }, + "parent" => ->(x, _) { x.nil? ? [] : ["its('parent') { should cmp #{x.inspect} }"] }, + "display_name" => ->(x, _) { x.nil? ? [] : ["its('display_name') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Folder' + name = "Folder" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -77,11 +77,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_resourcemanager_folder', + type: "google_resourcemanager_folder", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -89,10 +89,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://cloudresourcemanager.googleapis.com/v2/' + "https://cloudresourcemanager.googleapis.com/v2/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/generate/libraries/google_resourcemanager_folders.rb b/generate/libraries/google_resourcemanager_folders.rb index 85fdddc10..c60a330ba 100644 --- a/generate/libraries/google_resourcemanager_folders.rb +++ b/generate/libraries/google_resourcemanager_folders.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ResourceManagerFolders < GcpResourceBase - name 'google_resourcemanager_folders' - desc 'Folder plural resource' - supports platform: 'gcp' + name "google_resourcemanager_folders" + desc "Folder plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class ResourceManagerFolders < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('folders') + @table = fetch_wrapped_resource("folders") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'lifecycleState' => ->(obj) { [:lifecycle_state, obj['lifecycleState']] }, - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'parent' => ->(obj) { [:parent, obj['parent']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "lifecycleState" => ->(obj) { [:lifecycle_state, obj["lifecycleState"]] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "parent" => ->(obj) { [:parent, obj["parent"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, } end @@ -98,10 +98,10 @@ def identifiers private def product_url - 'https://cloudresourcemanager.googleapis.com/v2/' + "https://cloudresourcemanager.googleapis.com/v2/" end def resource_base_url - 'folders?parent={{parent}}' + "folders?parent={{parent}}" end end diff --git a/generate/libraries/google_resourcemanager_organization_policy.rb b/generate/libraries/google_resourcemanager_organization_policy.rb index 557b48909..b0f10aa00 100644 --- a/generate/libraries/google_resourcemanager_organization_policy.rb +++ b/generate/libraries/google_resourcemanager_organization_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/resourcemanager/property/organizationpolicy_boolean_policy' -require 'google/resourcemanager/property/organizationpolicy_list_policy' +require "gcp_backend" +require "google/resourcemanager/property/organizationpolicy_boolean_policy" +require "google/resourcemanager/property/organizationpolicy_list_policy" # A provider to manage Resource Manager resources. class OrganizationPolicy < GcpResourceBase - name 'google_resourcemanager_organization_policy' - desc 'OrganizationPolicy' - supports platform: 'gcp' + name "google_resourcemanager_organization_policy" + desc "OrganizationPolicy" + supports platform: "gcp" attr_reader :params attr_reader :version @@ -43,11 +43,11 @@ def initialize(opts) end def parse - @version = @fetched['version'] - @constraint = @fetched['constraint'] - @update_time = parse_time_string(@fetched['updateTime']) - @list_policy = GoogleInSpec::ResourceManager::Property::OrganizationPolicyListPolicy.new(@fetched['listPolicy'], to_s) - @boolean_policy = GoogleInSpec::ResourceManager::Property::OrganizationPolicyBooleanPolicy.new(@fetched['booleanPolicy'], to_s) + @version = @fetched["version"] + @constraint = @fetched["constraint"] + @update_time = parse_time_string(@fetched["updateTime"]) + @list_policy = GoogleInSpec::ResourceManager::Property::OrganizationPolicyListPolicy.new(@fetched["listPolicy"], to_s) + @boolean_policy = GoogleInSpec::ResourceManager::Property::OrganizationPolicyBooleanPolicy.new(@fetched["booleanPolicy"], to_s) end # Handles parsing RFC3339 time string diff --git a/generate/libraries/google_resourcemanager_project_iam_policy.rb b/generate/libraries/google_resourcemanager_project_iam_policy.rb index 5001739d6..7020f864c 100644 --- a/generate/libraries/google_resourcemanager_project_iam_policy.rb +++ b/generate/libraries/google_resourcemanager_project_iam_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_audit_configs' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_audit_configs" +require "google/iam/property/iam_policy_bindings" # A provider to manage Resource Manager IAM Policy resources. class ProjectIamPolicy < GcpResourceBase - name 'google_resourcemanager_project_iam_policy' - desc 'Project Iam Policy' - supports platform: 'gcp' + name "google_resourcemanager_project_iam_policy" + desc "Project Iam Policy" + supports platform: "gcp" attr_reader :params attr_reader :bindings @@ -30,13 +30,13 @@ class ProjectIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Post') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Post") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) - @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) + @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched["auditConfigs"], to_s) end def exists? @@ -50,10 +50,10 @@ def to_s private def product_url - 'https://cloudresourcemanager.googleapis.com/v1/' + "https://cloudresourcemanager.googleapis.com/v1/" end def resource_base_url - 'projects/{{project_id}}:getIamPolicy' + "projects/{{project_id}}:getIamPolicy" end end diff --git a/generate/libraries/google_runtime_config_config.rb b/generate/libraries/google_runtime_config_config.rb index 1f8f76a7b..af97a3257 100644 --- a/generate/libraries/google_runtime_config_config.rb +++ b/generate/libraries/google_runtime_config_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud Runtime Configuration resources. class RuntimeConfigConfig < GcpResourceBase - name 'google_runtime_config_config' - desc 'Config' - supports platform: 'gcp' + name "google_runtime_config_config" + desc "Config" + supports platform: "gcp" attr_reader :params attr_reader :description @@ -28,14 +28,14 @@ class RuntimeConfigConfig < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @description = @fetched['description'] - @name = @fetched['name'] + @description = @fetched["description"] + @name = @fetched["name"] end # Handles parsing RFC3339 time string @@ -53,13 +53,13 @@ def to_s def un_parse { - 'description' => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "description" => ->(x, _) { x.nil? ? [] : ["its('description') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Config' + name = "Config" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -68,11 +68,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_runtime_config_config', + type: "google_runtime_config_config", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -80,10 +80,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://runtimeconfig.googleapis.com/v1beta1/' + "https://runtimeconfig.googleapis.com/v1beta1/" end def resource_base_url - 'projects/{{project}}/configs/{{name}}' + "projects/{{project}}/configs/{{name}}" end end diff --git a/generate/libraries/google_runtime_config_config_iam_policy.rb b/generate/libraries/google_runtime_config_config_iam_policy.rb index 9955b8825..ec07228d6 100644 --- a/generate/libraries/google_runtime_config_config_iam_policy.rb +++ b/generate/libraries/google_runtime_config_config_iam_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_audit_configs' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_audit_configs" +require "google/iam/property/iam_policy_bindings" # A provider to manage Cloud Runtime Configuration IAM Policy resources. class ConfigIamPolicy < GcpResourceBase - name 'google_runtime_config_config_iam_policy' - desc 'Config Iam Policy' - supports platform: 'gcp' + name "google_runtime_config_config_iam_policy" + desc "Config Iam Policy" + supports platform: "gcp" attr_reader :params attr_reader :bindings @@ -30,13 +30,13 @@ class ConfigIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) - @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) + @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched["auditConfigs"], to_s) end def exists? @@ -50,10 +50,10 @@ def to_s private def product_url - 'https://runtimeconfig.googleapis.com/v1beta1/' + "https://runtimeconfig.googleapis.com/v1beta1/" end def resource_base_url - 'projects/{{project}}/configs/{{name}}:getIamPolicy' + "projects/{{project}}/configs/{{name}}:getIamPolicy" end end diff --git a/generate/libraries/google_runtime_config_configs.rb b/generate/libraries/google_runtime_config_configs.rb index b320a1867..f850a5347 100644 --- a/generate/libraries/google_runtime_config_configs.rb +++ b/generate/libraries/google_runtime_config_configs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class RuntimeConfigConfigs < GcpResourceBase - name 'google_runtime_config_configs' - desc 'Config plural resource' - supports platform: 'gcp' + name "google_runtime_config_configs" + desc "Config plural resource" + supports platform: "gcp" attr_reader :table @@ -31,12 +31,12 @@ class RuntimeConfigConfigs < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('configs') + @table = fetch_wrapped_resource("configs") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -64,8 +64,8 @@ def transform(key, value) def transformers { - 'description' => ->(obj) { [:description, obj['description']] }, - 'name' => ->(obj) { [:name, obj['name']] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, } end @@ -92,10 +92,10 @@ def identifiers private def product_url - 'https://runtimeconfig.googleapis.com/v1beta1/' + "https://runtimeconfig.googleapis.com/v1beta1/" end def resource_base_url - 'projects/{{project}}/configs' + "projects/{{project}}/configs" end end diff --git a/generate/libraries/google_runtime_config_variable.rb b/generate/libraries/google_runtime_config_variable.rb index 55a18876a..996548b35 100644 --- a/generate/libraries/google_runtime_config_variable.rb +++ b/generate/libraries/google_runtime_config_variable.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud Runtime Configuration resources. class RuntimeConfigVariable < GcpResourceBase - name 'google_runtime_config_variable' - desc 'Variable' - supports platform: 'gcp' + name "google_runtime_config_variable" + desc "Variable" + supports platform: "gcp" attr_reader :params attr_reader :value @@ -30,16 +30,16 @@ class RuntimeConfigVariable < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @value = @fetched['value'] - @text = @fetched['text'] - @name = @fetched['name'] - @config = @fetched['config'] + @value = @fetched["value"] + @text = @fetched["text"] + @name = @fetched["name"] + @config = @fetched["config"] end # Handles parsing RFC3339 time string @@ -57,15 +57,15 @@ def to_s def un_parse { - 'value' => ->(x, _) { x.nil? ? [] : ["its('value') { should cmp #{x.inspect} }"] }, - 'text' => ->(x, _) { x.nil? ? [] : ["its('text') { should cmp #{x.inspect} }"] }, - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'config' => ->(x, _) { x.nil? ? [] : ["its('config') { should cmp #{x.inspect} }"] }, + "value" => ->(x, _) { x.nil? ? [] : ["its('value') { should cmp #{x.inspect} }"] }, + "text" => ->(x, _) { x.nil? ? [] : ["its('text') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "config" => ->(x, _) { x.nil? ? [] : ["its('config') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Variable' + name = "Variable" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -74,11 +74,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_runtime_config_variable', + type: "google_runtime_config_variable", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -86,10 +86,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://runtimeconfig.googleapis.com/v1beta1/' + "https://runtimeconfig.googleapis.com/v1beta1/" end def resource_base_url - 'projects/{{project}}/configs/{{config}}/variables/{{name}}' + "projects/{{project}}/configs/{{config}}/variables/{{name}}" end end diff --git a/generate/libraries/google_runtime_config_variables.rb b/generate/libraries/google_runtime_config_variables.rb index 64a085dab..b5cbb7ec2 100644 --- a/generate/libraries/google_runtime_config_variables.rb +++ b/generate/libraries/google_runtime_config_variables.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class RuntimeConfigVariables < GcpResourceBase - name 'google_runtime_config_variables' - desc 'Variable plural resource' - supports platform: 'gcp' + name "google_runtime_config_variables" + desc "Variable plural resource" + supports platform: "gcp" attr_reader :table @@ -33,12 +33,12 @@ class RuntimeConfigVariables < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('variables') + @table = fetch_wrapped_resource("variables") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -66,10 +66,10 @@ def transform(key, value) def transformers { - 'value' => ->(obj) { [:value, obj['value']] }, - 'text' => ->(obj) { [:text, obj['text']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'config' => ->(obj) { [:config, obj['config']] }, + "value" => ->(obj) { [:value, obj["value"]] }, + "text" => ->(obj) { [:text, obj["text"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "config" => ->(obj) { [:config, obj["config"]] }, } end @@ -96,10 +96,10 @@ def identifiers private def product_url - 'https://runtimeconfig.googleapis.com/v1beta1/' + "https://runtimeconfig.googleapis.com/v1beta1/" end def resource_base_url - 'projects/{{project}}/configs/{{config}}/variables?returnValues=true' + "projects/{{project}}/configs/{{config}}/variables?returnValues=true" end end diff --git a/generate/libraries/google_service_account.rb b/generate/libraries/google_service_account.rb index 660850da9..3f0b1e91c 100644 --- a/generate/libraries/google_service_account.rb +++ b/generate/libraries/google_service_account.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleServiceAccount < GcpResourceBase - name 'google_service_account' - desc 'Verifies settings for a project IAM Service Account' + name "google_service_account" + desc "Verifies settings for a project IAM Service Account" example " describe google_service_account(name: 'projects/spaterson-project/serviceAccounts/sample-account@spaterson-project.iam.gserviceaccount.com') do @@ -33,7 +33,7 @@ def exists? # returned by default when listing keys. def user_managed_keys raise Inspec::Exceptions::ResourceFailed, "Service Account #{@display_name} does not exist!" if not exists? - @gcp.gcp_iam_client.list_project_service_account_keys(@service_account.name, key_types: ['USER_MANAGED']) + @gcp.gcp_iam_client.list_project_service_account_keys(@service_account.name, key_types: ["USER_MANAGED"]) end def has_user_managed_keys? diff --git a/generate/libraries/google_service_account_key.rb b/generate/libraries/google_service_account_key.rb index 20f7988a6..bfbaea8a6 100644 --- a/generate/libraries/google_service_account_key.rb +++ b/generate/libraries/google_service_account_key.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleServiceAccountKey < GcpResourceBase - name 'google_service_account_key' - desc 'Verifies settings for a GCP project service account key' + name "google_service_account_key" + desc "Verifies settings for a GCP project service account key" example " describe google_service_account_key(name: 'projects/sample-project/serviceAccounts/test-sa@sample-project.iam.gserviceaccount.com/keys/c6bd986da9fac6d71178db41d1741cbe751a5080' ) do @@ -16,7 +16,7 @@ class GoogleServiceAccountKey < GcpResourceBase def initialize(opts = {}) # Call the parent class constructor super(opts) - @display_name = opts[:name].split('/').last + @display_name = opts[:name].split("/").last catch_gcp_errors do @sa_key = @gcp.gcp_iam_client.get_project_service_account_key(opts[:name]) create_resource_methods(@sa_key) diff --git a/generate/libraries/google_service_account_keys.rb b/generate/libraries/google_service_account_keys.rb index d9e1f41ac..1b85c710c 100644 --- a/generate/libraries/google_service_account_keys.rb +++ b/generate/libraries/google_service_account_keys.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleServiceAccountKeys < GcpResourceBase - name 'google_service_account_keys' - desc 'Verifies settings for GCP service account keys in bulk' + name "google_service_account_keys" + desc "Verifies settings for GCP service account keys in bulk" example " describe google_service_account_keys(service_account: 'projects/sample-project/serviceAccounts/sample-account@sample-project.iam.gserviceaccount.com') do diff --git a/generate/libraries/google_service_accounts.rb b/generate/libraries/google_service_accounts.rb index 94268ea8b..014fa7d32 100644 --- a/generate/libraries/google_service_accounts.rb +++ b/generate/libraries/google_service_accounts.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleServiceAccounts < GcpResourceBase - name 'google_service_accounts' - desc 'Verifies settings for GCP compute service accounts in bulk' + name "google_service_accounts" + desc "Verifies settings for GCP compute service accounts in bulk" example " describe google_service_accounts(project: 'chef-inspec-gcp') do diff --git a/generate/libraries/google_sourcerepo_repositories.rb b/generate/libraries/google_sourcerepo_repositories.rb index 524f0d6d9..dfa575115 100644 --- a/generate/libraries/google_sourcerepo_repositories.rb +++ b/generate/libraries/google_sourcerepo_repositories.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class SourceRepoRepositorys < GcpResourceBase - name 'google_sourcerepo_repositories' - desc 'Repository plural resource' - supports platform: 'gcp' + name "google_sourcerepo_repositories" + desc "Repository plural resource" + supports platform: "gcp" attr_reader :table @@ -32,12 +32,12 @@ class SourceRepoRepositorys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('repos') + @table = fetch_wrapped_resource("repos") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -65,9 +65,9 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'url' => ->(obj) { [:url, obj['url']] }, - 'size' => ->(obj) { [:size, obj['size']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "url" => ->(obj) { [:url, obj["url"]] }, + "size" => ->(obj) { [:size, obj["size"]] }, } end @@ -94,10 +94,10 @@ def identifiers private def product_url - 'https://sourcerepo.googleapis.com/v1/' + "https://sourcerepo.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/repos' + "projects/{{project}}/repos" end end diff --git a/generate/libraries/google_sourcerepo_repository.rb b/generate/libraries/google_sourcerepo_repository.rb index 3849b09f5..d2c9e7865 100644 --- a/generate/libraries/google_sourcerepo_repository.rb +++ b/generate/libraries/google_sourcerepo_repository.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud Source Repositories resources. class SourceRepoRepository < GcpResourceBase - name 'google_sourcerepo_repository' - desc 'Repository' - supports platform: 'gcp' + name "google_sourcerepo_repository" + desc "Repository" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -29,15 +29,15 @@ class SourceRepoRepository < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? @params = params end def parse - @name = @fetched['name'] - @url = @fetched['url'] - @size = @fetched['size'] + @name = @fetched["name"] + @url = @fetched["url"] + @size = @fetched["size"] end # Handles parsing RFC3339 time string @@ -55,14 +55,14 @@ def to_s def un_parse { - 'name' => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, - 'url' => ->(x, _) { x.nil? ? [] : ["its('url') { should cmp #{x.inspect} }"] }, - 'size' => ->(x, _) { x.nil? ? [] : ["its('size') { should cmp #{x.inspect} }"] }, + "name" => ->(x, _) { x.nil? ? [] : ["its('name') { should cmp #{x.inspect} }"] }, + "url" => ->(x, _) { x.nil? ? [] : ["its('url') { should cmp #{x.inspect} }"] }, + "size" => ->(x, _) { x.nil? ? [] : ["its('size') { should cmp #{x.inspect} }"] }, } end def dump(path, template_path, test_number, ignored_fields) - name = 'Repository' + name = "Repository" arr = un_parse.map do |k, v| next if ignored_fields.include?(k) @@ -71,11 +71,11 @@ def dump(path, template_path, test_number, ignored_fields) template_vars = { name:, arr:, - type: 'google_sourcerepo_repository', + type: "google_sourcerepo_repository", identifiers: @params, number: test_number, } - File.open("#{path}/#{name}_#{test_number}.rb", 'w') do |file| + File.open("#{path}/#{name}_#{test_number}.rb", "w") do |file| file.write(ERB.new(File.read(template_path)).result_with_hash(template_vars)) end end @@ -83,10 +83,10 @@ def dump(path, template_path, test_number, ignored_fields) private def product_url - 'https://sourcerepo.googleapis.com/v1/' + "https://sourcerepo.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/repos/{{name}}' + "projects/{{project}}/repos/{{name}}" end end diff --git a/generate/libraries/google_sql_database_instance.rb b/generate/libraries/google_sql_database_instance.rb index 31e5e459b..571c197c1 100644 --- a/generate/libraries/google_sql_database_instance.rb +++ b/generate/libraries/google_sql_database_instance.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'google/apis/sqladmin_v1beta4' + +require "gcp_backend" +require "google/apis/sqladmin_v1beta4" module Inspec::Resources class GoogleCloudSqlDatabaseInstance < GcpResourceBase - name 'google_sql_database_instance' - desc 'Verifies settings for a GCP Cloud SQL Database instance' + name "google_sql_database_instance" + desc "Verifies settings for a GCP Cloud SQL Database instance" example " describe google_sql_database_instance(project: 'chef-inspec-gcp', database: 'my-database') do @@ -31,7 +31,7 @@ def exists? def has_ip_configuration_require_ssl? return false if !defined?(@database.settings.ip_configuration.require_ssl) return false if @database.settings.ip_configuration.require_ssl.nil? - return true if @database.settings.ip_configuration.require_ssl.to_s.casecmp('true').zero? + return true if @database.settings.ip_configuration.require_ssl.to_s.casecmp("true") == 0 false end @@ -41,7 +41,7 @@ def authorized_networks end def primary_ip_address - return '' if !defined?(@database.ip_addresses[0].ip_address) || @database.ip_addresses[0].ip_address.nil? + return "" if !defined?(@database.ip_addresses[0].ip_address) || @database.ip_addresses[0].ip_address.nil? @database.ip_addresses[0].ip_address end diff --git a/generate/libraries/google_sql_database_instances.rb b/generate/libraries/google_sql_database_instances.rb index 72871cc56..ea9f125cf 100644 --- a/generate/libraries/google_sql_database_instances.rb +++ b/generate/libraries/google_sql_database_instances.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleCloudSqlDatabaseInstances < GcpResourceBase - name 'google_sql_database_instances' - desc 'Verifies settings for GCP Cloud SQL Database instances in bulk' + name "google_sql_database_instances" + desc "Verifies settings for GCP Cloud SQL Database instances in bulk" example " describe google_sql_database_instances(project: 'chef-inspec-gcp') do diff --git a/generate/libraries/google_sql_users.rb b/generate/libraries/google_sql_users.rb index 437cec101..7e30bf1cc 100644 --- a/generate/libraries/google_sql_users.rb +++ b/generate/libraries/google_sql_users.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleCloudSqlUsers < GcpResourceBase - name 'google_sql_users' - desc 'Verifies settings for GCP Cloud SQL Database users in bulk' + name "google_sql_users" + desc "Verifies settings for GCP Cloud SQL Database users in bulk" example " describe google_sql_users(project: 'chef-inspec-gcp', database: 'database') do diff --git a/generate/libraries/google_storage_bucket.rb b/generate/libraries/google_storage_bucket.rb index 1f3c7f1f0..e0d85228b 100644 --- a/generate/libraries/google_storage_bucket.rb +++ b/generate/libraries/google_storage_bucket.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleStorageBucket < GcpResourceBase - name 'google_storage_bucket' - desc 'Verifies settings for a bucket' + name "google_storage_bucket" + desc "Verifies settings for a bucket" example " describe google_storage_bucket(name: 'inspec-test-bucket') do diff --git a/generate/libraries/google_storage_bucket_acl.rb b/generate/libraries/google_storage_bucket_acl.rb index 53b57245b..1b761445a 100644 --- a/generate/libraries/google_storage_bucket_acl.rb +++ b/generate/libraries/google_storage_bucket_acl.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleStorageBucketAcl < GcpResourceBase - name 'google_storage_bucket_acl' - desc 'Verifies settings for a storage bucket ACL' + name "google_storage_bucket_acl" + desc "Verifies settings for a storage bucket ACL" example " describe google_storage_bucket_acl(bucket: 'bucket-buvsjjcndqz', entity: 'user-object-viewer@spaterson-project.iam.gserviceaccount.com') do diff --git a/generate/libraries/google_storage_bucket_iam_binding.rb b/generate/libraries/google_storage_bucket_iam_binding.rb index f6d4254af..285aa2b05 100644 --- a/generate/libraries/google_storage_bucket_iam_binding.rb +++ b/generate/libraries/google_storage_bucket_iam_binding.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleStorageBucketIamBinding < GcpResourceBase - name 'google_storage_bucket_iam_binding' - desc 'Verifies settings for a storage bucket IAM binding' + name "google_storage_bucket_iam_binding" + desc "Verifies settings for a storage bucket IAM binding" example " describe google_storage_bucket_iam_binding(bucket: 'bucket-buvsjjcndqz', role: 'roles/storage.objectViewer') do diff --git a/generate/libraries/google_storage_bucket_iam_bindings.rb b/generate/libraries/google_storage_bucket_iam_bindings.rb index 6ecb0f341..20a41a6cd 100644 --- a/generate/libraries/google_storage_bucket_iam_bindings.rb +++ b/generate/libraries/google_storage_bucket_iam_bindings.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleStorageBucketIamBindings < GcpResourceBase - name 'google_storage_bucket_iam_bindings' - desc 'Verifies settings for GCP storage bucket IAM bindings in bulk' + name "google_storage_bucket_iam_bindings" + desc "Verifies settings for GCP storage bucket IAM bindings in bulk" example " describe google_storage_bucket_iam_bindings(bucket: 'bucket-buvsjjcndqz') do diff --git a/generate/libraries/google_storage_bucket_object.rb b/generate/libraries/google_storage_bucket_object.rb index 8477ba338..2cf1ebb70 100644 --- a/generate/libraries/google_storage_bucket_object.rb +++ b/generate/libraries/google_storage_bucket_object.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'time' + +require "gcp_backend" +require "time" module Inspec::Resources class GoogleStorageBucketObject < GcpResourceBase - name 'google_storage_bucket_object' - desc 'Verifies settings for a storage bucket object' + name "google_storage_bucket_object" + desc "Verifies settings for a storage bucket object" example " describe google_storage_bucket_object(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq') do diff --git a/generate/libraries/google_storage_bucket_objects.rb b/generate/libraries/google_storage_bucket_objects.rb index 8a03233c6..f0a01811f 100644 --- a/generate/libraries/google_storage_bucket_objects.rb +++ b/generate/libraries/google_storage_bucket_objects.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleStorageBucketObjects < GcpResourceBase - name 'google_storage_bucket_objects' - desc 'Verifies settings for GCP storage bucket objects in bulk' + name "google_storage_bucket_objects" + desc "Verifies settings for GCP storage bucket objects in bulk" example " describe google_storage_bucket_objects(bucket: 'bucket-name') do diff --git a/generate/libraries/google_storage_buckets.rb b/generate/libraries/google_storage_buckets.rb index 7970f951d..9c35c5ebb 100644 --- a/generate/libraries/google_storage_buckets.rb +++ b/generate/libraries/google_storage_buckets.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleStorageBuckets < GcpResourceBase - name 'google_storage_buckets' - desc 'Verifies settings for GCP storage buckets in bulk' + name "google_storage_buckets" + desc "Verifies settings for GCP storage buckets in bulk" example " describe google_storage_buckets(project: 'chef-inspec-gcp') do diff --git a/generate/libraries/google_storage_default_object_acl.rb b/generate/libraries/google_storage_default_object_acl.rb index 20aaff0be..be286566c 100644 --- a/generate/libraries/google_storage_default_object_acl.rb +++ b/generate/libraries/google_storage_default_object_acl.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleStorageDefaultObjectAcl < GcpResourceBase - name 'google_storage_default_object_acl' - desc 'Verifies settings for a storage default object ACL' + name "google_storage_default_object_acl" + desc "Verifies settings for a storage default object ACL" example " describe google_storage_default_object_acl(bucket: 'bucket-buvsjjcndqz', entity: 'user-object-viewer@spaterson-project.iam.gserviceaccount.com') do diff --git a/generate/libraries/google_storage_object_acl.rb b/generate/libraries/google_storage_object_acl.rb index 8ea3b79ee..30d38f6c5 100644 --- a/generate/libraries/google_storage_object_acl.rb +++ b/generate/libraries/google_storage_object_acl.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'json' + +require "gcp_backend" +require "json" module Inspec::Resources class GoogleStorageObjectAcl < GcpResourceBase - name 'google_storage_object_acl' - desc 'Verifies settings for a storage object ACL' + name "google_storage_object_acl" + desc "Verifies settings for a storage object ACL" example " describe google_storage_object_acl(bucket: 'bucket-buvsjjcndqz', object: 'bucket-object-pmxbiikq', entity: 'user-object-viewer@spaterson-project.iam.gserviceaccount.com') do diff --git a/generate/libraries/google_user.rb b/generate/libraries/google_user.rb index 81be96b6e..d012bc575 100644 --- a/generate/libraries/google_user.rb +++ b/generate/libraries/google_user.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'google/apis/admin_directory_v1' + +require "gcp_backend" +require "google/apis/admin_directory_v1" module Inspec::Resources class GoogleUser < GcpResourceBase - name 'google_user' - desc 'Verifies settings for a GCP user' + name "google_user" + desc "Verifies settings for a GCP user" example " describe google_user(user_key: '110491234567894702010') do diff --git a/generate/libraries/google_users.rb b/generate/libraries/google_users.rb index af3332101..773996ed5 100644 --- a/generate/libraries/google_users.rb +++ b/generate/libraries/google_users.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'google/apis/admin_directory_v1' + +require "gcp_backend" +require "google/apis/admin_directory_v1" module Inspec::Resources class GoogleUsers < GcpResourceBase - name 'google_users' - desc 'Verifies settings for GCP users in bulk' + name "google_users" + desc "Verifies settings for GCP users in bulk" example " describe google_users(customer: 'my_customer') do @@ -17,8 +17,8 @@ class GoogleUsers < GcpResourceBase def initialize(opts = {}) # Call the parent class constructor super(opts) - @customer = opts[:customer] || 'my_customer' - @domain = opts[:domain] || '' + @customer = opts[:customer] || "my_customer" + @domain = opts[:domain] || "" end # FilterTable setup diff --git a/libraries/gcp_backend.rb b/libraries/gcp_backend.rb index ca60cd4cb..f0bab7007 100644 --- a/libraries/gcp_backend.rb +++ b/libraries/gcp_backend.rb @@ -1,13 +1,13 @@ -# frozen_string_literal: true + # GCP Inspec Backend Classes # # Based on the Azure Inspec classes by Russell Seymour # -require 'json' -require 'net/http' -require 'googleauth' +require "json" +require "net/http" +require "googleauth" # Base class for GCP resources - depends on train GCP transport for connection # @@ -39,7 +39,7 @@ def catch_gcp_errors # create custom messages as needed rescue Google::Apis::ClientError => e error = JSON.parse(e.body) - fail_resource error['error']['message'] + fail_resource error["error"]["message"] @failed_resource = true nil end @@ -50,7 +50,7 @@ def create_resource_methods(object) end def name_from_self_link(property) - property&.split('/')&.last + property&.split("/")&.last end end # end @@ -72,11 +72,11 @@ def create_methods(object, data) when /Google::Apis::.*/ # iterate around the instance variables data.instance_variables.each do |var| - create_method(object, var.to_s.delete('@'), data.instance_variable_get(var)) + create_method(object, var.to_s.delete("@"), data.instance_variable_get(var)) end # When the data is a Hash object iterate around each of the key value pairs and # craete a method for each one. - when 'Hash' + when "Hash" data.each do |key, value| create_method(object, key, value) end @@ -94,12 +94,12 @@ def create_method(object, name, value) # Create the necessary method based on the var that has been passed # Test the value for its type so that the method can be setup correctly case value.class.to_s - when 'String', 'Integer', 'TrueClass', 'FalseClass', 'Fixnum' + when "String", "Integer", "TrueClass", "FalseClass", "Fixnum" object.define_singleton_method name do value end - when 'Hash' - value.count.zero? ? return_value = value : return_value = GcpResourceProbe.new(value) + when "Hash" + value.count == 0 ? return_value = value : return_value = GcpResourceProbe.new(value) object.define_singleton_method name do return_value end @@ -111,7 +111,7 @@ def create_method(object, name, value) end GcpResourceProbe.new(value) end - when 'Array' + when "Array" # Some things are just string or integer arrays # Check this by seeing if the first element is a string / integer / boolean or # a hashtable @@ -119,7 +119,7 @@ def create_method(object, name, value) # the quickest test # p value[0].class.to_s case value[0].class.to_s - when 'String', 'Integer', 'TrueClass', 'FalseClass', 'Fixnum' + when "String", "Integer", "TrueClass", "FalseClass", "Fixnum" probes = value else probes = [] @@ -186,7 +186,7 @@ def include?(key) # # @return string def camel_case(data) - camel_case_data = data.split('_').inject([]) { |buffer, e| buffer.push(buffer.empty? ? e : e.capitalize) }.join + camel_case_data = data.split("_").inject([]) { |buffer, e| buffer.push(buffer.empty? ? e : e.capitalize) }.join # Ensure that gb (as in gigabytes) is uppercased camel_case_data.gsub(/[gb]/, &:upcase) @@ -196,15 +196,15 @@ def camel_case(data) class GcpApiConnection def initialize config_name = Inspec::Config.cached.unpack_train_credentials[:host] - ENV['CLOUDSDK_ACTIVE_CONFIG_NAME'] = config_name - @google_application_credentials = config_name.blank? && ENV['GOOGLE_APPLICATION_CREDENTIALS'] + ENV["CLOUDSDK_ACTIVE_CONFIG_NAME"] = config_name + @google_application_credentials = config_name.blank? && ENV["GOOGLE_APPLICATION_CREDENTIALS"] end def fetch_auth unless @google_application_credentials.nil? return Network::Authorization.new.for!( [ - 'https://www.googleapis.com/auth/cloud-platform', + "https://www.googleapis.com/auth/cloud-platform", ], ).from_google_credentials_json!( @google_application_credentials, @@ -213,7 +213,7 @@ def fetch_auth Network::Authorization.new.from_application_default! end - def fetch(base_url, template, var_data, request_type = 'Get', body = nil) + def fetch(base_url, template, var_data, request_type = "Get", body = nil) get_request = Network::Base.new( build_uri(base_url, template, var_data), fetch_auth, @@ -223,14 +223,14 @@ def fetch(base_url, template, var_data, request_type = 'Get', body = nil) return_if_object get_request.send end - def fetch_all(base_url, template, var_data, request_type = 'Get') + def fetch_all(base_url, template, var_data, request_type = "Get") next_page(build_uri(base_url, template, var_data), request_type) end def next_page(uri, request_type, token = nil) next_hash = {} - next_hash['pageToken'] = token unless token.nil? - current_params = Hash[URI.decode_www_form(uri.query || '')].merge(next_hash) + next_hash["pageToken"] = token unless token.nil? + current_params = Hash[URI.decode_www_form(uri.query || "")].merge(next_hash) uri.query = URI.encode_www_form(current_params) get_request = Network::Base.new( uri, @@ -238,7 +238,7 @@ def next_page(uri, request_type, token = nil) request_type, ) result = JSON.parse(get_request.send.body) - next_page_token = result['nextPageToken'] + next_page_token = result["nextPageToken"] return [result] if next_page_token.nil? [result] + next_page(uri, request_type, next_page_token) @@ -252,17 +252,17 @@ def return_if_object(response) return if response.is_a?(Net::HTTPNotFound) return if response.is_a?(Net::HTTPNoContent) result = JSON.parse(response.body) - raise_if_errors result, %w{error errors}, 'message' + raise_if_errors result, %w{error errors}, "message" raise "Bad response: #{response}" unless response.is_a?(Net::HTTPOK) fetch_id result result end def fetch_id(result) - @resource_id = if result.key?('id') - result['id'] + @resource_id = if result.key?("id") + result["id"] else - result['name'] + result["name"] end end attr_reader :resource_id @@ -273,13 +273,13 @@ def raise_if_errors(response, err_path, msg_field) end def raise_error(errors, msg_field) - raise IOError, ['Operation failed:', - errors.map { |e| e[msg_field] }.join(', ')].join(' ') + raise IOError, ["Operation failed:", + errors.map { |e| e[msg_field] }.join(", ")].join(" ") end def build_uri(base_url, template, var_data) - is_region_included = base_url.include?('{{region}}') - url = is_region_included ? base_url.gsub('{{region}}', var_data[:region]): base_url + is_region_included = base_url.include?("{{region}}") + url = is_region_included ? base_url.gsub("{{region}}", var_data[:region]): base_url URI.join( "#{url}#{expand_variables(template, var_data)}", ) @@ -297,14 +297,14 @@ def self.navigate(source, path, default = nil) def extract_variables(template) template.scan(/{{[^}]*}}/).map { |v| v.gsub(/{{([^}]*)}}/, '\1') } - .map(&:to_sym) + .map(&:to_sym) end def expand_variables(template, var_data) extract_variables(template).each do |v| unless var_data.key?(v) # Magic Modules uses % as an indicator that the param needs to be URL escaped - v = v.to_s.gsub('%', '').to_sym + v = v.to_s.gsub("%", "").to_sym raise "Missing variable :#{v} in #{var_data} on #{caller.join("\n")}}" unless var_data.key?(v) template.gsub!("{{%#{v}}}", CGI.escape(var_data[v].to_s)) @@ -331,15 +331,15 @@ def builder def send request = @cred.authorize(builder.new(@link)) - request['User-Agent'] = generate_user_agent + request["User-Agent"] = generate_user_agent if @body - request['Content-Type'] = 'application/json' + request["Content-Type"] = "application/json" request.body = @body end response = transport(request).request(request) - unless ENV['GOOGLE_HTTP_VERBOSE'].nil? + unless ENV["GOOGLE_HTTP_VERBOSE"].nil? puts ["network(#{request}: [#{response.code}]", - response.body.split("\n").map(&:strip).join(' ')].join(' ') + response.body.split("\n").map(&:strip).join(" ")].join(" ") end response end @@ -347,19 +347,19 @@ def send def transport(request) uri = request.uri puts "network(#{request}: #{uri})" \ - unless ENV['GOOGLE_HTTP_VERBOSE'].nil? + unless ENV["GOOGLE_HTTP_VERBOSE"].nil? transport = Net::HTTP.new(uri.host, uri.port) transport.use_ssl = uri.is_a?(URI::HTTPS) transport.verify_mode = OpenSSL::SSL::VERIFY_PEER transport.set_debug_output $stderr \ - unless ENV['GOOGLE_HTTP_DEBUG'].nil? + unless ENV["GOOGLE_HTTP_DEBUG"].nil? transport end private def generate_user_agent - 'inspec-google/1.0.0' + "inspec-google/1.0.0" end end @@ -371,7 +371,7 @@ def initialize end def authorize(obj) - raise ArgumentError, 'A from_* method needs to be called before' \ + raise ArgumentError, "A from_* method needs to be called before" \ unless @authorization if obj.class <= URI::HTTPS || obj.class <= URI::HTTP @@ -390,7 +390,7 @@ def for!(*scopes) end def from_google_credentials_json!(credentials_file) - raise 'Missing argument for scopes' if @scopes.empty? + raise "Missing argument for scopes" if @scopes.empty? @authorization = ::Google::Auth::DefaultCredentials.make_creds( json_key_io: File.open(credentials_file), scope: @scopes, @@ -416,8 +416,8 @@ def authorize_http(req) req.extend TokenProperty auth = {} @authorization.apply!(auth) - req['Authorization'] = auth[:authorization] - req.token = auth[:authorization].split(' ')[1] + req["Authorization"] = auth[:authorization] + req.token = auth[:authorization].split(" ")[1] req end end diff --git a/libraries/google/accesscontextmanager/property/accesslevel_basic.rb b/libraries/google/accesscontextmanager/property/accesslevel_basic.rb index 11c666c9e..5cee14ccf 100644 --- a/libraries/google/accesscontextmanager/property/accesslevel_basic.rb +++ b/libraries/google/accesscontextmanager/property/accesslevel_basic.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/accesscontextmanager/property/accesslevel_basic_conditions' +require "google/accesscontextmanager/property/accesslevel_basic_conditions" module GoogleInSpec module AccessContextManager module Property @@ -25,8 +25,8 @@ class AccessLevelBasic def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @combining_function = args['combiningFunction'] - @conditions = GoogleInSpec::AccessContextManager::Property::AccessLevelBasicConditionsArray.parse(args['conditions'], to_s) + @combining_function = args["combiningFunction"] + @conditions = GoogleInSpec::AccessContextManager::Property::AccessLevelBasicConditionsArray.parse(args["conditions"], to_s) end def to_s diff --git a/libraries/google/accesscontextmanager/property/accesslevel_basic_conditions.rb b/libraries/google/accesscontextmanager/property/accesslevel_basic_conditions.rb index 6baa9cce3..bd21daeaf 100644 --- a/libraries/google/accesscontextmanager/property/accesslevel_basic_conditions.rb +++ b/libraries/google/accesscontextmanager/property/accesslevel_basic_conditions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy' -require 'google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy_os_constraints' +require "google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy" +require "google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy_os_constraints" module GoogleInSpec module AccessContextManager module Property @@ -34,12 +34,12 @@ class AccessLevelBasicConditions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @ip_subnetworks = args['ipSubnetworks'] - @required_access_levels = args['requiredAccessLevels'] - @members = args['members'] - @negate = args['negate'] - @device_policy = GoogleInSpec::AccessContextManager::Property::AccessLevelBasicConditionsDevicePolicy.new(args['devicePolicy'], to_s) - @regions = args['regions'] + @ip_subnetworks = args["ipSubnetworks"] + @required_access_levels = args["requiredAccessLevels"] + @members = args["members"] + @negate = args["negate"] + @device_policy = GoogleInSpec::AccessContextManager::Property::AccessLevelBasicConditionsDevicePolicy.new(args["devicePolicy"], to_s) + @regions = args["regions"] end def to_s diff --git a/libraries/google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy.rb b/libraries/google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy.rb index 8eabd8527..3801e3348 100644 --- a/libraries/google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy.rb +++ b/libraries/google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy_os_constraints' +require "google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy_os_constraints" module GoogleInSpec module AccessContextManager module Property @@ -33,12 +33,12 @@ class AccessLevelBasicConditionsDevicePolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @require_screen_lock = args['requireScreenlock'] - @allowed_encryption_statuses = args['allowedEncryptionStatuses'] - @allowed_device_management_levels = args['allowedDeviceManagementLevels'] - @os_constraints = GoogleInSpec::AccessContextManager::Property::AccessLevelBasicConditionsDevicePolicyOsConstraintsArray.parse(args['osConstraints'], to_s) - @require_admin_approval = args['requireAdminApproval'] - @require_corp_owned = args['requireCorpOwned'] + @require_screen_lock = args["requireScreenlock"] + @allowed_encryption_statuses = args["allowedEncryptionStatuses"] + @allowed_device_management_levels = args["allowedDeviceManagementLevels"] + @os_constraints = GoogleInSpec::AccessContextManager::Property::AccessLevelBasicConditionsDevicePolicyOsConstraintsArray.parse(args["osConstraints"], to_s) + @require_admin_approval = args["requireAdminApproval"] + @require_corp_owned = args["requireCorpOwned"] end def to_s diff --git a/libraries/google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy_os_constraints.rb b/libraries/google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy_os_constraints.rb index 5b2c3acff..94c952306 100644 --- a/libraries/google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy_os_constraints.rb +++ b/libraries/google/accesscontextmanager/property/accesslevel_basic_conditions_device_policy_os_constraints.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class AccessLevelBasicConditionsDevicePolicyOsConstraints def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @minimum_version = args['minimumVersion'] - @os_type = args['osType'] + @minimum_version = args["minimumVersion"] + @os_type = args["osType"] end def to_s diff --git a/libraries/google/accesscontextmanager/property/accesslevel_custom.rb b/libraries/google/accesscontextmanager/property/accesslevel_custom.rb index 106490aa2..876af3642 100644 --- a/libraries/google/accesscontextmanager/property/accesslevel_custom.rb +++ b/libraries/google/accesscontextmanager/property/accesslevel_custom.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/accesscontextmanager/property/accesslevel_custom_expr' +require "google/accesscontextmanager/property/accesslevel_custom_expr" module GoogleInSpec module AccessContextManager module Property @@ -23,7 +23,7 @@ class AccessLevelCustom def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @expr = GoogleInSpec::AccessContextManager::Property::AccessLevelCustomExpr.new(args['expr'], to_s) + @expr = GoogleInSpec::AccessContextManager::Property::AccessLevelCustomExpr.new(args["expr"], to_s) end def to_s diff --git a/libraries/google/accesscontextmanager/property/accesslevel_custom_expr.rb b/libraries/google/accesscontextmanager/property/accesslevel_custom_expr.rb index 7347e874d..db6a37105 100644 --- a/libraries/google/accesscontextmanager/property/accesslevel_custom_expr.rb +++ b/libraries/google/accesscontextmanager/property/accesslevel_custom_expr.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class AccessLevelCustomExpr def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @expression = args['expression'] - @title = args['title'] - @description = args['description'] - @location = args['location'] + @expression = args["expression"] + @title = args["title"] + @description = args["description"] + @location = args["location"] end def to_s diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_spec.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_spec.rb index 551f51978..2e98b57ec 100644 --- a/libraries/google/accesscontextmanager/property/serviceperimeter_spec.rb +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/accesscontextmanager/property/serviceperimeter_spec_vpc_accessible_services' +require "google/accesscontextmanager/property/serviceperimeter_spec_vpc_accessible_services" module GoogleInSpec module AccessContextManager module Property @@ -29,10 +29,10 @@ class ServicePerimeterSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @resources = args['resources'] - @access_levels = args['accessLevels'] - @restricted_services = args['restrictedServices'] - @vpc_accessible_services = GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpecVPCAccessibleServices.new(args['vpcAccessibleServices'], to_s) + @resources = args["resources"] + @access_levels = args["accessLevels"] + @restricted_services = args["restrictedServices"] + @vpc_accessible_services = GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpecVPCAccessibleServices.new(args["vpcAccessibleServices"], to_s) end def to_s diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_spec_vpc_accessible_services.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_vpc_accessible_services.rb index bf3d4d73b..e005a12a9 100644 --- a/libraries/google/accesscontextmanager/property/serviceperimeter_spec_vpc_accessible_services.rb +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_spec_vpc_accessible_services.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ServicePerimeterSpecVPCAccessibleServices def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enable_restriction = args['enableRestriction'] - @allowed_services = args['allowedServices'] + @enable_restriction = args["enableRestriction"] + @allowed_services = args["allowedServices"] end def to_s diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_status.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_status.rb index 68f156de7..0f4fd7f70 100644 --- a/libraries/google/accesscontextmanager/property/serviceperimeter_status.rb +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_status.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/accesscontextmanager/property/serviceperimeter_status_vpc_accessible_services' +require "google/accesscontextmanager/property/serviceperimeter_status_vpc_accessible_services" module GoogleInSpec module AccessContextManager module Property @@ -29,10 +29,10 @@ class ServicePerimeterStatus def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @resources = args['resources'] - @access_levels = args['accessLevels'] - @restricted_services = args['restrictedServices'] - @vpc_accessible_services = GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatusVPCAccessibleServices.new(args['vpcAccessibleServices'], to_s) + @resources = args["resources"] + @access_levels = args["accessLevels"] + @restricted_services = args["restrictedServices"] + @vpc_accessible_services = GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatusVPCAccessibleServices.new(args["vpcAccessibleServices"], to_s) end def to_s diff --git a/libraries/google/accesscontextmanager/property/serviceperimeter_status_vpc_accessible_services.rb b/libraries/google/accesscontextmanager/property/serviceperimeter_status_vpc_accessible_services.rb index 739ea306b..2062fab4b 100644 --- a/libraries/google/accesscontextmanager/property/serviceperimeter_status_vpc_accessible_services.rb +++ b/libraries/google/accesscontextmanager/property/serviceperimeter_status_vpc_accessible_services.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ServicePerimeterStatusVPCAccessibleServices def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enable_restriction = args['enableRestriction'] - @allowed_services = args['allowedServices'] + @enable_restriction = args["enableRestriction"] + @allowed_services = args["allowedServices"] end def to_s diff --git a/libraries/google/apigee/property/organization_addons_config.rb b/libraries/google/apigee/property/organization_addons_config.rb index bc1c96233..e070108b1 100644 --- a/libraries/google/apigee/property/organization_addons_config.rb +++ b/libraries/google/apigee/property/organization_addons_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,12 +13,12 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/apigee/property/organization_addons_config_advanced_api_ops_config' -require 'google/apigee/property/organization_addons_config_analytics_config' -require 'google/apigee/property/organization_addons_config_api_security_config' -require 'google/apigee/property/organization_addons_config_connectors_platform_config' -require 'google/apigee/property/organization_addons_config_integration_config' -require 'google/apigee/property/organization_addons_config_monetization_config' +require "google/apigee/property/organization_addons_config_advanced_api_ops_config" +require "google/apigee/property/organization_addons_config_analytics_config" +require "google/apigee/property/organization_addons_config_api_security_config" +require "google/apigee/property/organization_addons_config_connectors_platform_config" +require "google/apigee/property/organization_addons_config_integration_config" +require "google/apigee/property/organization_addons_config_monetization_config" module GoogleInSpec module Apigee module Property @@ -38,12 +38,12 @@ class OrganizationAddonsConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @integration_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfigIntegrationConfig.new(args['integrationConfig'], to_s) - @api_security_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfigApiSecurityConfig.new(args['apiSecurityConfig'], to_s) - @monetization_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfigMonetizationConfig.new(args['monetizationConfig'], to_s) - @connectors_platform_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfigConnectorsPlatformConfig.new(args['connectorsPlatformConfig'], to_s) - @analytics_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfigAnalyticsConfig.new(args['analyticsConfig'], to_s) - @advanced_api_ops_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfigAdvancedApiOpsConfig.new(args['advancedApiOpsConfig'], to_s) + @integration_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfigIntegrationConfig.new(args["integrationConfig"], to_s) + @api_security_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfigApiSecurityConfig.new(args["apiSecurityConfig"], to_s) + @monetization_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfigMonetizationConfig.new(args["monetizationConfig"], to_s) + @connectors_platform_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfigConnectorsPlatformConfig.new(args["connectorsPlatformConfig"], to_s) + @analytics_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfigAnalyticsConfig.new(args["analyticsConfig"], to_s) + @advanced_api_ops_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfigAdvancedApiOpsConfig.new(args["advancedApiOpsConfig"], to_s) end def to_s diff --git a/libraries/google/apigee/property/organization_addons_config_advanced_api_ops_config.rb b/libraries/google/apigee/property/organization_addons_config_advanced_api_ops_config.rb index ac7f25bbf..1b4f5e1b1 100644 --- a/libraries/google/apigee/property/organization_addons_config_advanced_api_ops_config.rb +++ b/libraries/google/apigee/property/organization_addons_config_advanced_api_ops_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class OrganizationAddonsConfigAdvancedApiOpsConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enabled = args['enabled'] + @enabled = args["enabled"] end def to_s diff --git a/libraries/google/apigee/property/organization_addons_config_analytics_config.rb b/libraries/google/apigee/property/organization_addons_config_analytics_config.rb index 463262af6..c56265b1e 100644 --- a/libraries/google/apigee/property/organization_addons_config_analytics_config.rb +++ b/libraries/google/apigee/property/organization_addons_config_analytics_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class OrganizationAddonsConfigAnalyticsConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @expire_time_millis = args['expireTimeMillis'] - @state = args['state'] - @enabled = args['enabled'] - @update_time = args['updateTime'] + @expire_time_millis = args["expireTimeMillis"] + @state = args["state"] + @enabled = args["enabled"] + @update_time = args["updateTime"] end def to_s diff --git a/libraries/google/apigee/property/organization_addons_config_api_security_config.rb b/libraries/google/apigee/property/organization_addons_config_api_security_config.rb index b9233f922..7f46ffe7d 100644 --- a/libraries/google/apigee/property/organization_addons_config_api_security_config.rb +++ b/libraries/google/apigee/property/organization_addons_config_api_security_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class OrganizationAddonsConfigApiSecurityConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enabled = args['enabled'] - @expires_at = args['expiresAt'] + @enabled = args["enabled"] + @expires_at = args["expiresAt"] end def to_s diff --git a/libraries/google/apigee/property/organization_addons_config_connectors_platform_config.rb b/libraries/google/apigee/property/organization_addons_config_connectors_platform_config.rb index 39c1744ed..ba66b5101 100644 --- a/libraries/google/apigee/property/organization_addons_config_connectors_platform_config.rb +++ b/libraries/google/apigee/property/organization_addons_config_connectors_platform_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class OrganizationAddonsConfigConnectorsPlatformConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @expires_at = args['expiresAt'] - @enabled = args['enabled'] + @expires_at = args["expiresAt"] + @enabled = args["enabled"] end def to_s diff --git a/libraries/google/apigee/property/organization_addons_config_integration_config.rb b/libraries/google/apigee/property/organization_addons_config_integration_config.rb index e9ba04960..003b20bc3 100644 --- a/libraries/google/apigee/property/organization_addons_config_integration_config.rb +++ b/libraries/google/apigee/property/organization_addons_config_integration_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class OrganizationAddonsConfigIntegrationConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enabled = args['enabled'] + @enabled = args["enabled"] end def to_s diff --git a/libraries/google/apigee/property/organization_addons_config_monetization_config.rb b/libraries/google/apigee/property/organization_addons_config_monetization_config.rb index 9e0c56149..8324abfd5 100644 --- a/libraries/google/apigee/property/organization_addons_config_monetization_config.rb +++ b/libraries/google/apigee/property/organization_addons_config_monetization_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class OrganizationAddonsConfigMonetizationConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enabled = args['enabled'] + @enabled = args["enabled"] end def to_s diff --git a/libraries/google/apigee/property/organization_properties.rb b/libraries/google/apigee/property/organization_properties.rb index 4a71ff057..b8dcd048e 100644 --- a/libraries/google/apigee/property/organization_properties.rb +++ b/libraries/google/apigee/property/organization_properties.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/apigee/property/organization_properties_property' +require "google/apigee/property/organization_properties_property" module GoogleInSpec module Apigee module Property @@ -23,7 +23,7 @@ class OrganizationProperties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @property = GoogleInSpec::Apigee::Property::OrganizationPropertiesPropertyArray.parse(args['property'], to_s) + @property = GoogleInSpec::Apigee::Property::OrganizationPropertiesPropertyArray.parse(args["property"], to_s) end def to_s diff --git a/libraries/google/apigee/property/organization_properties_property.rb b/libraries/google/apigee/property/organization_properties_property.rb index 784fd1251..ef310de1b 100644 --- a/libraries/google/apigee/property/organization_properties_property.rb +++ b/libraries/google/apigee/property/organization_properties_property.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class OrganizationPropertiesProperty def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @value = args['value'] - @name = args['name'] + @value = args["value"] + @name = args["name"] end def to_s diff --git a/libraries/google/appengine/property/standardappversion_automatic_scaling.rb b/libraries/google/appengine/property/standardappversion_automatic_scaling.rb index e8add01a0..fabc0eade 100644 --- a/libraries/google/appengine/property/standardappversion_automatic_scaling.rb +++ b/libraries/google/appengine/property/standardappversion_automatic_scaling.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/appengine/property/standardappversion_automatic_scaling_standard_scheduler_settings' +require "google/appengine/property/standardappversion_automatic_scaling_standard_scheduler_settings" module GoogleInSpec module AppEngine module Property @@ -33,12 +33,12 @@ class StandardAppVersionAutomaticScaling def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_concurrent_requests = args['maxConcurrentRequests'] - @max_idle_instances = args['maxIdleInstances'] - @max_pending_latency = args['maxPendingLatency'] - @min_idle_instances = args['minIdleInstances'] - @min_pending_latency = args['minPendingLatency'] - @standard_scheduler_settings = GoogleInSpec::AppEngine::Property::StandardAppVersionAutomaticScalingStandardSchedulerSettings.new(args['standardSchedulerSettings'], to_s) + @max_concurrent_requests = args["maxConcurrentRequests"] + @max_idle_instances = args["maxIdleInstances"] + @max_pending_latency = args["maxPendingLatency"] + @min_idle_instances = args["minIdleInstances"] + @min_pending_latency = args["minPendingLatency"] + @standard_scheduler_settings = GoogleInSpec::AppEngine::Property::StandardAppVersionAutomaticScalingStandardSchedulerSettings.new(args["standardSchedulerSettings"], to_s) end def to_s diff --git a/libraries/google/appengine/property/standardappversion_automatic_scaling_standard_scheduler_settings.rb b/libraries/google/appengine/property/standardappversion_automatic_scaling_standard_scheduler_settings.rb index 1aba8c921..71d9cbda2 100644 --- a/libraries/google/appengine/property/standardappversion_automatic_scaling_standard_scheduler_settings.rb +++ b/libraries/google/appengine/property/standardappversion_automatic_scaling_standard_scheduler_settings.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class StandardAppVersionAutomaticScalingStandardSchedulerSettings def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @target_cpu_utilization = args['targetCpuUtilization'] - @target_throughput_utilization = args['targetThroughputUtilization'] - @min_instances = args['minInstances'] - @max_instances = args['maxInstances'] + @target_cpu_utilization = args["targetCpuUtilization"] + @target_throughput_utilization = args["targetThroughputUtilization"] + @min_instances = args["minInstances"] + @max_instances = args["maxInstances"] end def to_s diff --git a/libraries/google/appengine/property/standardappversion_basic_scaling.rb b/libraries/google/appengine/property/standardappversion_basic_scaling.rb index b868095d6..8a43aae2c 100644 --- a/libraries/google/appengine/property/standardappversion_basic_scaling.rb +++ b/libraries/google/appengine/property/standardappversion_basic_scaling.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class StandardAppVersionBasicScaling def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @idle_timeout = args['idleTimeout'] - @max_instances = args['maxInstances'] + @idle_timeout = args["idleTimeout"] + @max_instances = args["maxInstances"] end def to_s diff --git a/libraries/google/appengine/property/standardappversion_manual_scaling.rb b/libraries/google/appengine/property/standardappversion_manual_scaling.rb index 0d53ab35b..e69ba92a9 100644 --- a/libraries/google/appengine/property/standardappversion_manual_scaling.rb +++ b/libraries/google/appengine/property/standardappversion_manual_scaling.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class StandardAppVersionManualScaling def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @instances = args['instances'] + @instances = args["instances"] end def to_s diff --git a/libraries/google/appengine/property/standardappversion_vpc_access_connector.rb b/libraries/google/appengine/property/standardappversion_vpc_access_connector.rb index 28c5b35e7..f3b43cdf5 100644 --- a/libraries/google/appengine/property/standardappversion_vpc_access_connector.rb +++ b/libraries/google/appengine/property/standardappversion_vpc_access_connector.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class StandardAppVersionVPCAccessConnector def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_cleanup_policies.rb b/libraries/google/artifactregistry/property/projectlocationrepository_cleanup_policies.rb index 5da86b6f9..3d9bde2d9 100644 --- a/libraries/google/artifactregistry/property/projectlocationrepository_cleanup_policies.rb +++ b/libraries/google/artifactregistry/property/projectlocationrepository_cleanup_policies.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ProjectLocationRepositoryCleanupPolicies def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_docker_config.rb b/libraries/google/artifactregistry/property/projectlocationrepository_docker_config.rb index 4786b0060..b861e2e06 100644 --- a/libraries/google/artifactregistry/property/projectlocationrepository_docker_config.rb +++ b/libraries/google/artifactregistry/property/projectlocationrepository_docker_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ProjectLocationRepositoryDockerConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @immutable_tags = args['immutableTags'] + @immutable_tags = args["immutableTags"] end def to_s diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_labels.rb b/libraries/google/artifactregistry/property/projectlocationrepository_labels.rb index 4aa2864e0..7e0939288 100644 --- a/libraries/google/artifactregistry/property/projectlocationrepository_labels.rb +++ b/libraries/google/artifactregistry/property/projectlocationrepository_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ProjectLocationRepositoryLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_maven_config.rb b/libraries/google/artifactregistry/property/projectlocationrepository_maven_config.rb index 4044b6e84..dfa20d6f8 100644 --- a/libraries/google/artifactregistry/property/projectlocationrepository_maven_config.rb +++ b/libraries/google/artifactregistry/property/projectlocationrepository_maven_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ProjectLocationRepositoryMavenConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @allow_snapshot_overwrites = args['allowSnapshotOverwrites'] - @version_policy = args['versionPolicy'] + @allow_snapshot_overwrites = args["allowSnapshotOverwrites"] + @version_policy = args["versionPolicy"] end def to_s diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config.rb index e71850413..9293e263e 100644 --- a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config.rb +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_docker_repository' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_maven_repository' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_npm_repository' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_python_repository' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials_username_password_credentials' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository' +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_docker_repository" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_maven_repository" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_npm_repository" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_python_repository" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials_username_password_credentials" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository" module GoogleInSpec module Artifactregistry module Property @@ -46,14 +46,14 @@ class ProjectLocationRepositoryRemoteRepositoryConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @docker_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigDockerRepository.new(args['dockerRepository'], to_s) - @maven_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigMavenRepository.new(args['mavenRepository'], to_s) - @npm_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigNpmRepository.new(args['npmRepository'], to_s) - @python_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigPythonRepository.new(args['pythonRepository'], to_s) - @apt_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigAptRepository.new(args['aptRepository'], to_s) - @yum_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigYumRepository.new(args['yumRepository'], to_s) - @description = args['description'] - @upstream_credentials = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigUpstreamCredentials.new(args['upstreamCredentials'], to_s) + @docker_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigDockerRepository.new(args["dockerRepository"], to_s) + @maven_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigMavenRepository.new(args["mavenRepository"], to_s) + @npm_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigNpmRepository.new(args["npmRepository"], to_s) + @python_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigPythonRepository.new(args["pythonRepository"], to_s) + @apt_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigAptRepository.new(args["aptRepository"], to_s) + @yum_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigYumRepository.new(args["yumRepository"], to_s) + @description = args["description"] + @upstream_credentials = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigUpstreamCredentials.new(args["upstreamCredentials"], to_s) end def to_s diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository.rb index 7ec93c9e8..6cfa0d457 100644 --- a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository.rb +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository' +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository" module GoogleInSpec module Artifactregistry module Property @@ -23,7 +23,7 @@ class ProjectLocationRepositoryRemoteRepositoryConfigAptRepository def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @public_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigAptRepositoryPublicRepository.new(args['publicRepository'], to_s) + @public_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigAptRepositoryPublicRepository.new(args["publicRepository"], to_s) end def to_s diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository.rb index ada74e082..3b8465dc5 100644 --- a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository.rb +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ProjectLocationRepositoryRemoteRepositoryConfigAptRepositoryPublicReposito def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @repository_base = args['repositoryBase'] - @repository_path = args['repositoryPath'] + @repository_base = args["repositoryBase"] + @repository_path = args["repositoryPath"] end def to_s diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_docker_repository.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_docker_repository.rb index b2b1b71e2..6d7615ea8 100644 --- a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_docker_repository.rb +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_docker_repository.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ProjectLocationRepositoryRemoteRepositoryConfigDockerRepository def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @public_repository = args['publicRepository'] + @public_repository = args["publicRepository"] end def to_s diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_maven_repository.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_maven_repository.rb index 6164f71ae..96bb5deeb 100644 --- a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_maven_repository.rb +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_maven_repository.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ProjectLocationRepositoryRemoteRepositoryConfigMavenRepository def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @public_repository = args['publicRepository'] + @public_repository = args["publicRepository"] end def to_s diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_npm_repository.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_npm_repository.rb index c3d3c8a47..a39a0a60f 100644 --- a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_npm_repository.rb +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_npm_repository.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ProjectLocationRepositoryRemoteRepositoryConfigNpmRepository def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @public_repository = args['publicRepository'] + @public_repository = args["publicRepository"] end def to_s diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_python_repository.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_python_repository.rb index 7653e1f70..2fc5400f8 100644 --- a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_python_repository.rb +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_python_repository.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ProjectLocationRepositoryRemoteRepositoryConfigPythonRepository def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @public_repository = args['publicRepository'] + @public_repository = args["publicRepository"] end def to_s diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials.rb index 4933f4063..03dd5d4aa 100644 --- a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials.rb +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials_username_password_credentials' +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials_username_password_credentials" module GoogleInSpec module Artifactregistry module Property @@ -23,7 +23,7 @@ class ProjectLocationRepositoryRemoteRepositoryConfigUpstreamCredentials def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @username_password_credentials = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentials.new(args['usernamePasswordCredentials'], to_s) + @username_password_credentials = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentials.new(args["usernamePasswordCredentials"], to_s) end def to_s diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials_username_password_credentials.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials_username_password_credentials.rb index 7fbf6dfea..be2d4c97b 100644 --- a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials_username_password_credentials.rb +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials_username_password_credentials.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ProjectLocationRepositoryRemoteRepositoryConfigUpstreamCredentialsUsername def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @username = args['username'] - @password_secret_version = args['passwordSecretVersion'] + @username = args["username"] + @password_secret_version = args["passwordSecretVersion"] end def to_s diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository.rb index d3edc0e89..e7c5b7958 100644 --- a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository.rb +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository' +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository" module GoogleInSpec module Artifactregistry module Property @@ -23,7 +23,7 @@ class ProjectLocationRepositoryRemoteRepositoryConfigYumRepository def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @public_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigYumRepositoryPublicRepository.new(args['publicRepository'], to_s) + @public_repository = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfigYumRepositoryPublicRepository.new(args["publicRepository"], to_s) end def to_s diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository.rb b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository.rb index f92864b49..717c8fe94 100644 --- a/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository.rb +++ b/libraries/google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ProjectLocationRepositoryRemoteRepositoryConfigYumRepositoryPublicReposito def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @repository_base = args['repositoryBase'] - @repository_path = args['repositoryPath'] + @repository_base = args["repositoryBase"] + @repository_path = args["repositoryPath"] end def to_s diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_virtual_repository_config.rb b/libraries/google/artifactregistry/property/projectlocationrepository_virtual_repository_config.rb index 0cd605ec5..98fdf72f4 100644 --- a/libraries/google/artifactregistry/property/projectlocationrepository_virtual_repository_config.rb +++ b/libraries/google/artifactregistry/property/projectlocationrepository_virtual_repository_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/artifactregistry/property/projectlocationrepository_virtual_repository_config_upstream_policies' +require "google/artifactregistry/property/projectlocationrepository_virtual_repository_config_upstream_policies" module GoogleInSpec module Artifactregistry module Property @@ -23,7 +23,7 @@ class ProjectLocationRepositoryVirtualRepositoryConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @upstream_policies = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryVirtualRepositoryConfigUpstreamPoliciesArray.parse(args['upstreamPolicies'], to_s) + @upstream_policies = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryVirtualRepositoryConfigUpstreamPoliciesArray.parse(args["upstreamPolicies"], to_s) end def to_s diff --git a/libraries/google/artifactregistry/property/projectlocationrepository_virtual_repository_config_upstream_policies.rb b/libraries/google/artifactregistry/property/projectlocationrepository_virtual_repository_config_upstream_policies.rb index 51f38d0c3..3743b0bb8 100644 --- a/libraries/google/artifactregistry/property/projectlocationrepository_virtual_repository_config_upstream_policies.rb +++ b/libraries/google/artifactregistry/property/projectlocationrepository_virtual_repository_config_upstream_policies.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ProjectLocationRepositoryVirtualRepositoryConfigUpstreamPolicies def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @id = args['id'] - @repository = args['repository'] - @priority = args['priority'] + @id = args["id"] + @repository = args["repository"] + @priority = args["priority"] end def to_s diff --git a/libraries/google/bigquery/property/dataset_access.rb b/libraries/google/bigquery/property/dataset_access.rb index b9e7ce6db..9685a19fe 100644 --- a/libraries/google/bigquery/property/dataset_access.rb +++ b/libraries/google/bigquery/property/dataset_access.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/bigquery/property/dataset_access_view' +require "google/bigquery/property/dataset_access_view" module GoogleInSpec module BigQuery module Property @@ -35,13 +35,13 @@ class DatasetAccess def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @domain = args['domain'] - @group_by_email = args['groupByEmail'] - @role = args['role'] - @special_group = args['specialGroup'] - @user_by_email = args['userByEmail'] - @iam_member = args['iamMember'] - @view = GoogleInSpec::BigQuery::Property::DatasetAccessView.new(args['view'], to_s) + @domain = args["domain"] + @group_by_email = args["groupByEmail"] + @role = args["role"] + @special_group = args["specialGroup"] + @user_by_email = args["userByEmail"] + @iam_member = args["iamMember"] + @view = GoogleInSpec::BigQuery::Property::DatasetAccessView.new(args["view"], to_s) end def to_s diff --git a/libraries/google/bigquery/property/dataset_access_view.rb b/libraries/google/bigquery/property/dataset_access_view.rb index d61f8fb23..292a46f3e 100644 --- a/libraries/google/bigquery/property/dataset_access_view.rb +++ b/libraries/google/bigquery/property/dataset_access_view.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class DatasetAccessView def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @dataset_id = args['datasetId'] - @project_id = args['projectId'] - @table_id = args['tableId'] + @dataset_id = args["datasetId"] + @project_id = args["projectId"] + @table_id = args["tableId"] end def to_s diff --git a/libraries/google/bigquery/property/dataset_dataset_reference.rb b/libraries/google/bigquery/property/dataset_dataset_reference.rb index 6be8ffc15..958199d60 100644 --- a/libraries/google/bigquery/property/dataset_dataset_reference.rb +++ b/libraries/google/bigquery/property/dataset_dataset_reference.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class DatasetDatasetReference def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @dataset_id = args['datasetId'] - @project_id = args['projectId'] + @dataset_id = args["datasetId"] + @project_id = args["projectId"] end def to_s diff --git a/libraries/google/bigquery/property/dataset_default_encryption_configuration.rb b/libraries/google/bigquery/property/dataset_default_encryption_configuration.rb index e4664bb6b..e75951b0d 100644 --- a/libraries/google/bigquery/property/dataset_default_encryption_configuration.rb +++ b/libraries/google/bigquery/property/dataset_default_encryption_configuration.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class DatasetDefaultEncryptionConfiguration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/bigquery/property/table_encryption_configuration.rb b/libraries/google/bigquery/property/table_encryption_configuration.rb index 9476f17f4..0fa5c78b3 100644 --- a/libraries/google/bigquery/property/table_encryption_configuration.rb +++ b/libraries/google/bigquery/property/table_encryption_configuration.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TableEncryptionConfiguration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/bigquery/property/table_external_data_configuration.rb b/libraries/google/bigquery/property/table_external_data_configuration.rb index 5453b8211..19faf7fbb 100644 --- a/libraries/google/bigquery/property/table_external_data_configuration.rb +++ b/libraries/google/bigquery/property/table_external_data_configuration.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,12 +13,12 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/bigquery/property/table_external_data_configuration_bigtable_options' -require 'google/bigquery/property/table_external_data_configuration_bigtable_options_column_families' -require 'google/bigquery/property/table_external_data_configuration_csv_options' -require 'google/bigquery/property/table_external_data_configuration_google_sheets_options' -require 'google/bigquery/property/table_external_data_configuration_schema' -require 'google/bigquery/property/table_external_data_configuration_schema_fields' +require "google/bigquery/property/table_external_data_configuration_bigtable_options" +require "google/bigquery/property/table_external_data_configuration_bigtable_options_column_families" +require "google/bigquery/property/table_external_data_configuration_csv_options" +require "google/bigquery/property/table_external_data_configuration_google_sheets_options" +require "google/bigquery/property/table_external_data_configuration_schema" +require "google/bigquery/property/table_external_data_configuration_schema_fields" module GoogleInSpec module BigQuery module Property @@ -46,16 +46,16 @@ class TableExternalDataConfiguration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @autodetect = args['autodetect'] - @compression = args['compression'] - @ignore_unknown_values = args['ignoreUnknownValues'] - @max_bad_records = args['maxBadRecords'] - @source_format = args['sourceFormat'] - @source_uris = args['sourceUris'] - @schema = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationSchema.new(args['schema'], to_s) - @google_sheets_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationGoogleSheetsOptions.new(args['googleSheetsOptions'], to_s) - @csv_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationCsvOptions.new(args['csvOptions'], to_s) - @bigtable_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptions.new(args['bigtableOptions'], to_s) + @autodetect = args["autodetect"] + @compression = args["compression"] + @ignore_unknown_values = args["ignoreUnknownValues"] + @max_bad_records = args["maxBadRecords"] + @source_format = args["sourceFormat"] + @source_uris = args["sourceUris"] + @schema = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationSchema.new(args["schema"], to_s) + @google_sheets_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationGoogleSheetsOptions.new(args["googleSheetsOptions"], to_s) + @csv_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationCsvOptions.new(args["csvOptions"], to_s) + @bigtable_options = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptions.new(args["bigtableOptions"], to_s) end def to_s diff --git a/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options.rb b/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options.rb index 508366b90..06de548e6 100644 --- a/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options.rb +++ b/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/bigquery/property/table_external_data_configuration_bigtable_options_column_families' +require "google/bigquery/property/table_external_data_configuration_bigtable_options_column_families" module GoogleInSpec module BigQuery module Property @@ -27,9 +27,9 @@ class TableExternalDataConfigurationBigtableOptions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @ignore_unspecified_column_families = args['ignoreUnspecifiedColumnFamilies'] - @read_rowkey_as_string = args['readRowkeyAsString'] - @column_families = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptionsColumnFamiliesArray.parse(args['columnFamilies'], to_s) + @ignore_unspecified_column_families = args["ignoreUnspecifiedColumnFamilies"] + @read_rowkey_as_string = args["readRowkeyAsString"] + @column_families = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptionsColumnFamiliesArray.parse(args["columnFamilies"], to_s) end def to_s diff --git a/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families.rb b/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families.rb index 3170112e3..71cc00a5a 100644 --- a/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families.rb +++ b/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/bigquery/property/table_external_data_configuration_bigtable_options_column_families_columns' +require "google/bigquery/property/table_external_data_configuration_bigtable_options_column_families_columns" module GoogleInSpec module BigQuery module Property @@ -31,11 +31,11 @@ class TableExternalDataConfigurationBigtableOptionsColumnFamilies def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @columns = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptionsColumnFamiliesColumnsArray.parse(args['columns'], to_s) - @encoding = args['encoding'] - @family_id = args['familyId'] - @only_read_latest = args['onlyReadLatest'] - @type = args['type'] + @columns = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationBigtableOptionsColumnFamiliesColumnsArray.parse(args["columns"], to_s) + @encoding = args["encoding"] + @family_id = args["familyId"] + @only_read_latest = args["onlyReadLatest"] + @type = args["type"] end def to_s diff --git a/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families_columns.rb b/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families_columns.rb index 3d9a91512..d4c2e7e91 100644 --- a/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families_columns.rb +++ b/libraries/google/bigquery/property/table_external_data_configuration_bigtable_options_column_families_columns.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class TableExternalDataConfigurationBigtableOptionsColumnFamiliesColumns def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @encoding = args['encoding'] - @field_name = args['fieldName'] - @only_read_latest = args['onlyReadLatest'] - @qualifier_string = args['qualifierString'] - @type = args['type'] + @encoding = args["encoding"] + @field_name = args["fieldName"] + @only_read_latest = args["onlyReadLatest"] + @qualifier_string = args["qualifierString"] + @type = args["type"] end def to_s diff --git a/libraries/google/bigquery/property/table_external_data_configuration_csv_options.rb b/libraries/google/bigquery/property/table_external_data_configuration_csv_options.rb index 97fd1b4b2..1da9cbecb 100644 --- a/libraries/google/bigquery/property/table_external_data_configuration_csv_options.rb +++ b/libraries/google/bigquery/property/table_external_data_configuration_csv_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -32,12 +32,12 @@ class TableExternalDataConfigurationCsvOptions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @allow_jagged_rows = args['allowJaggedRows'] - @allow_quoted_newlines = args['allowQuotedNewlines'] - @encoding = args['encoding'] - @field_delimiter = args['fieldDelimiter'] - @quote = args['quote'] - @skip_leading_rows = args['skipLeadingRows'] + @allow_jagged_rows = args["allowJaggedRows"] + @allow_quoted_newlines = args["allowQuotedNewlines"] + @encoding = args["encoding"] + @field_delimiter = args["fieldDelimiter"] + @quote = args["quote"] + @skip_leading_rows = args["skipLeadingRows"] end def to_s diff --git a/libraries/google/bigquery/property/table_external_data_configuration_google_sheets_options.rb b/libraries/google/bigquery/property/table_external_data_configuration_google_sheets_options.rb index 4e0341c09..740f64b75 100644 --- a/libraries/google/bigquery/property/table_external_data_configuration_google_sheets_options.rb +++ b/libraries/google/bigquery/property/table_external_data_configuration_google_sheets_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TableExternalDataConfigurationGoogleSheetsOptions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @skip_leading_rows = args['skipLeadingRows'] + @skip_leading_rows = args["skipLeadingRows"] end def to_s diff --git a/libraries/google/bigquery/property/table_external_data_configuration_schema.rb b/libraries/google/bigquery/property/table_external_data_configuration_schema.rb index 1f240562f..9dd5cdc3d 100644 --- a/libraries/google/bigquery/property/table_external_data_configuration_schema.rb +++ b/libraries/google/bigquery/property/table_external_data_configuration_schema.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/bigquery/property/table_external_data_configuration_schema_fields' +require "google/bigquery/property/table_external_data_configuration_schema_fields" module GoogleInSpec module BigQuery module Property @@ -23,7 +23,7 @@ class TableExternalDataConfigurationSchema def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @fields = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationSchemaFieldsArray.parse(args['fields'], to_s) + @fields = GoogleInSpec::BigQuery::Property::TableExternalDataConfigurationSchemaFieldsArray.parse(args["fields"], to_s) end def to_s diff --git a/libraries/google/bigquery/property/table_external_data_configuration_schema_fields.rb b/libraries/google/bigquery/property/table_external_data_configuration_schema_fields.rb index 145e8c0a0..b8d01e546 100644 --- a/libraries/google/bigquery/property/table_external_data_configuration_schema_fields.rb +++ b/libraries/google/bigquery/property/table_external_data_configuration_schema_fields.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class TableExternalDataConfigurationSchemaFields def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @description = args['description'] - @fields = args['fields'] - @mode = args['mode'] - @name = args['name'] - @type = args['type'] + @description = args["description"] + @fields = args["fields"] + @mode = args["mode"] + @name = args["name"] + @type = args["type"] end def to_s diff --git a/libraries/google/bigquery/property/table_schema.rb b/libraries/google/bigquery/property/table_schema.rb index 756743956..ebec9dddd 100644 --- a/libraries/google/bigquery/property/table_schema.rb +++ b/libraries/google/bigquery/property/table_schema.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/bigquery/property/table_schema_fields' +require "google/bigquery/property/table_schema_fields" module GoogleInSpec module BigQuery module Property @@ -23,7 +23,7 @@ class TableSchema def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @fields = GoogleInSpec::BigQuery::Property::TableSchemaFieldsArray.parse(args['fields'], to_s) + @fields = GoogleInSpec::BigQuery::Property::TableSchemaFieldsArray.parse(args["fields"], to_s) end def to_s diff --git a/libraries/google/bigquery/property/table_schema_fields.rb b/libraries/google/bigquery/property/table_schema_fields.rb index dc5a2cab4..68fe67a05 100644 --- a/libraries/google/bigquery/property/table_schema_fields.rb +++ b/libraries/google/bigquery/property/table_schema_fields.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class TableSchemaFields def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @description = args['description'] - @fields = args['fields'] - @mode = args['mode'] - @name = args['name'] - @type = args['type'] + @description = args["description"] + @fields = args["fields"] + @mode = args["mode"] + @name = args["name"] + @type = args["type"] end def to_s diff --git a/libraries/google/bigquery/property/table_streaming_buffer.rb b/libraries/google/bigquery/property/table_streaming_buffer.rb index 8a124242f..faa197a21 100644 --- a/libraries/google/bigquery/property/table_streaming_buffer.rb +++ b/libraries/google/bigquery/property/table_streaming_buffer.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class TableStreamingBuffer def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @estimated_bytes = args['estimatedBytes'] - @estimated_rows = args['estimatedRows'] - @oldest_entry_time = args['oldestEntryTime'] + @estimated_bytes = args["estimatedBytes"] + @estimated_rows = args["estimatedRows"] + @oldest_entry_time = args["oldestEntryTime"] end def to_s diff --git a/libraries/google/bigquery/property/table_table_reference.rb b/libraries/google/bigquery/property/table_table_reference.rb index 727ffc9bf..127dc67e4 100644 --- a/libraries/google/bigquery/property/table_table_reference.rb +++ b/libraries/google/bigquery/property/table_table_reference.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class TableTableReference def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @dataset_id = args['datasetId'] - @project_id = args['projectId'] - @table_id = args['tableId'] + @dataset_id = args["datasetId"] + @project_id = args["projectId"] + @table_id = args["tableId"] end def to_s diff --git a/libraries/google/bigquery/property/table_time_partitioning.rb b/libraries/google/bigquery/property/table_time_partitioning.rb index 8e92b1420..79fb37930 100644 --- a/libraries/google/bigquery/property/table_time_partitioning.rb +++ b/libraries/google/bigquery/property/table_time_partitioning.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class TableTimePartitioning def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @expiration_ms = args['expirationMs'] - @field = args['field'] - @type = args['type'] + @expiration_ms = args["expirationMs"] + @field = args["field"] + @type = args["type"] end def to_s diff --git a/libraries/google/bigquery/property/table_view.rb b/libraries/google/bigquery/property/table_view.rb index c5830e135..dbbe2bcf5 100644 --- a/libraries/google/bigquery/property/table_view.rb +++ b/libraries/google/bigquery/property/table_view.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/bigquery/property/table_view_user_defined_function_resources' +require "google/bigquery/property/table_view_user_defined_function_resources" module GoogleInSpec module BigQuery module Property @@ -25,8 +25,8 @@ class TableView def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @use_legacy_sql = args['useLegacySql'] - @user_defined_function_resources = GoogleInSpec::BigQuery::Property::TableViewUserDefinedFunctionResourcesArray.parse(args['userDefinedFunctionResources'], to_s) + @use_legacy_sql = args["useLegacySql"] + @user_defined_function_resources = GoogleInSpec::BigQuery::Property::TableViewUserDefinedFunctionResourcesArray.parse(args["userDefinedFunctionResources"], to_s) end def to_s diff --git a/libraries/google/bigquery/property/table_view_user_defined_function_resources.rb b/libraries/google/bigquery/property/table_view_user_defined_function_resources.rb index d3b12bdc0..d2c56bc53 100644 --- a/libraries/google/bigquery/property/table_view_user_defined_function_resources.rb +++ b/libraries/google/bigquery/property/table_view_user_defined_function_resources.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class TableViewUserDefinedFunctionResources def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @inline_code = args['inlineCode'] - @resource_uri = args['resourceUri'] + @inline_code = args["inlineCode"] + @resource_uri = args["resourceUri"] end def to_s diff --git a/libraries/google/cloudbuild/property/trigger_build.rb b/libraries/google/cloudbuild/property/trigger_build.rb index ba55fff08..82fc20b56 100644 --- a/libraries/google/cloudbuild/property/trigger_build.rb +++ b/libraries/google/cloudbuild/property/trigger_build.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/cloudbuild/property/trigger_build_artifacts' -require 'google/cloudbuild/property/trigger_build_artifacts_objects' -require 'google/cloudbuild/property/trigger_build_artifacts_objects_timing' -require 'google/cloudbuild/property/trigger_build_options' -require 'google/cloudbuild/property/trigger_build_options_volumes' -require 'google/cloudbuild/property/trigger_build_secrets' -require 'google/cloudbuild/property/trigger_build_source' -require 'google/cloudbuild/property/trigger_build_source_repo_source' -require 'google/cloudbuild/property/trigger_build_source_storage_source' -require 'google/cloudbuild/property/trigger_build_steps' +require "google/cloudbuild/property/trigger_build_artifacts" +require "google/cloudbuild/property/trigger_build_artifacts_objects" +require "google/cloudbuild/property/trigger_build_artifacts_objects_timing" +require "google/cloudbuild/property/trigger_build_options" +require "google/cloudbuild/property/trigger_build_options_volumes" +require "google/cloudbuild/property/trigger_build_secrets" +require "google/cloudbuild/property/trigger_build_source" +require "google/cloudbuild/property/trigger_build_source_repo_source" +require "google/cloudbuild/property/trigger_build_source_storage_source" +require "google/cloudbuild/property/trigger_build_steps" module GoogleInSpec module CloudBuild module Property @@ -52,17 +52,17 @@ class TriggerBuild def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @source = GoogleInSpec::CloudBuild::Property::TriggerBuildSource.new(args['source'], to_s) - @tags = args['tags'] - @images = args['images'] - @substitutions = args['substitutions'] - @queue_ttl = args['queueTtl'] - @logs_bucket = args['logsBucket'] - @timeout = args['timeout'] - @secrets = GoogleInSpec::CloudBuild::Property::TriggerBuildSecretsArray.parse(args['secrets'], to_s) - @steps = GoogleInSpec::CloudBuild::Property::TriggerBuildStepsArray.parse(args['steps'], to_s) - @artifacts = GoogleInSpec::CloudBuild::Property::TriggerBuildArtifacts.new(args['artifacts'], to_s) - @options = GoogleInSpec::CloudBuild::Property::TriggerBuildOptions.new(args['options'], to_s) + @source = GoogleInSpec::CloudBuild::Property::TriggerBuildSource.new(args["source"], to_s) + @tags = args["tags"] + @images = args["images"] + @substitutions = args["substitutions"] + @queue_ttl = args["queueTtl"] + @logs_bucket = args["logsBucket"] + @timeout = args["timeout"] + @secrets = GoogleInSpec::CloudBuild::Property::TriggerBuildSecretsArray.parse(args["secrets"], to_s) + @steps = GoogleInSpec::CloudBuild::Property::TriggerBuildStepsArray.parse(args["steps"], to_s) + @artifacts = GoogleInSpec::CloudBuild::Property::TriggerBuildArtifacts.new(args["artifacts"], to_s) + @options = GoogleInSpec::CloudBuild::Property::TriggerBuildOptions.new(args["options"], to_s) end def to_s diff --git a/libraries/google/cloudbuild/property/trigger_build_artifacts.rb b/libraries/google/cloudbuild/property/trigger_build_artifacts.rb index 58b91641c..b09bd1063 100644 --- a/libraries/google/cloudbuild/property/trigger_build_artifacts.rb +++ b/libraries/google/cloudbuild/property/trigger_build_artifacts.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/cloudbuild/property/trigger_build_artifacts_objects' -require 'google/cloudbuild/property/trigger_build_artifacts_objects_timing' +require "google/cloudbuild/property/trigger_build_artifacts_objects" +require "google/cloudbuild/property/trigger_build_artifacts_objects_timing" module GoogleInSpec module CloudBuild module Property @@ -26,8 +26,8 @@ class TriggerBuildArtifacts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @images = args['images'] - @objects = GoogleInSpec::CloudBuild::Property::TriggerBuildArtifactsObjects.new(args['objects'], to_s) + @images = args["images"] + @objects = GoogleInSpec::CloudBuild::Property::TriggerBuildArtifactsObjects.new(args["objects"], to_s) end def to_s diff --git a/libraries/google/cloudbuild/property/trigger_build_artifacts_objects.rb b/libraries/google/cloudbuild/property/trigger_build_artifacts_objects.rb index 4cbdcd469..fcb80c81b 100644 --- a/libraries/google/cloudbuild/property/trigger_build_artifacts_objects.rb +++ b/libraries/google/cloudbuild/property/trigger_build_artifacts_objects.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/cloudbuild/property/trigger_build_artifacts_objects_timing' +require "google/cloudbuild/property/trigger_build_artifacts_objects_timing" module GoogleInSpec module CloudBuild module Property @@ -27,9 +27,9 @@ class TriggerBuildArtifactsObjects def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @location = args['location'] - @paths = args['paths'] - @timing = GoogleInSpec::CloudBuild::Property::TriggerBuildArtifactsObjectsTiming.new(args['timing'], to_s) + @location = args["location"] + @paths = args["paths"] + @timing = GoogleInSpec::CloudBuild::Property::TriggerBuildArtifactsObjectsTiming.new(args["timing"], to_s) end def to_s diff --git a/libraries/google/cloudbuild/property/trigger_build_artifacts_objects_timing.rb b/libraries/google/cloudbuild/property/trigger_build_artifacts_objects_timing.rb index ea057e7fb..7260613e1 100644 --- a/libraries/google/cloudbuild/property/trigger_build_artifacts_objects_timing.rb +++ b/libraries/google/cloudbuild/property/trigger_build_artifacts_objects_timing.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class TriggerBuildArtifactsObjectsTiming def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @start_time = args['startTime'] - @end_time = args['endTime'] + @start_time = args["startTime"] + @end_time = args["endTime"] end def to_s diff --git a/libraries/google/cloudbuild/property/trigger_build_options.rb b/libraries/google/cloudbuild/property/trigger_build_options.rb index 7c09431f4..4d3c385a2 100644 --- a/libraries/google/cloudbuild/property/trigger_build_options.rb +++ b/libraries/google/cloudbuild/property/trigger_build_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/cloudbuild/property/trigger_build_options_volumes' +require "google/cloudbuild/property/trigger_build_options_volumes" module GoogleInSpec module CloudBuild module Property @@ -45,18 +45,18 @@ class TriggerBuildOptions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @source_provenance_hash = args['sourceProvenanceHash'] - @requested_verify_option = args['requestedVerifyOption'] - @machine_type = args['machineType'] - @disk_size_gb = args['diskSizeGb'] - @substitution_option = args['substitutionOption'] - @dynamic_substitutions = args['dynamicSubstitutions'] - @log_streaming_option = args['logStreamingOption'] - @worker_pool = args['workerPool'] - @logging = args['logging'] - @env = args['env'] - @secret_env = args['secretEnv'] - @volumes = GoogleInSpec::CloudBuild::Property::TriggerBuildOptionsVolumesArray.parse(args['volumes'], to_s) + @source_provenance_hash = args["sourceProvenanceHash"] + @requested_verify_option = args["requestedVerifyOption"] + @machine_type = args["machineType"] + @disk_size_gb = args["diskSizeGb"] + @substitution_option = args["substitutionOption"] + @dynamic_substitutions = args["dynamicSubstitutions"] + @log_streaming_option = args["logStreamingOption"] + @worker_pool = args["workerPool"] + @logging = args["logging"] + @env = args["env"] + @secret_env = args["secretEnv"] + @volumes = GoogleInSpec::CloudBuild::Property::TriggerBuildOptionsVolumesArray.parse(args["volumes"], to_s) end def to_s diff --git a/libraries/google/cloudbuild/property/trigger_build_options_volumes.rb b/libraries/google/cloudbuild/property/trigger_build_options_volumes.rb index fc720890f..64541ac8b 100644 --- a/libraries/google/cloudbuild/property/trigger_build_options_volumes.rb +++ b/libraries/google/cloudbuild/property/trigger_build_options_volumes.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class TriggerBuildOptionsVolumes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @path = args['path'] + @name = args["name"] + @path = args["path"] end def to_s diff --git a/libraries/google/cloudbuild/property/trigger_build_secrets.rb b/libraries/google/cloudbuild/property/trigger_build_secrets.rb index fe6c60933..53083b1f5 100644 --- a/libraries/google/cloudbuild/property/trigger_build_secrets.rb +++ b/libraries/google/cloudbuild/property/trigger_build_secrets.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class TriggerBuildSecrets def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] - @secret_env = args['secretEnv'] + @kms_key_name = args["kmsKeyName"] + @secret_env = args["secretEnv"] end def to_s diff --git a/libraries/google/cloudbuild/property/trigger_build_source.rb b/libraries/google/cloudbuild/property/trigger_build_source.rb index 9a660f389..5db4ddb4e 100644 --- a/libraries/google/cloudbuild/property/trigger_build_source.rb +++ b/libraries/google/cloudbuild/property/trigger_build_source.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/cloudbuild/property/trigger_build_source_repo_source' -require 'google/cloudbuild/property/trigger_build_source_storage_source' +require "google/cloudbuild/property/trigger_build_source_repo_source" +require "google/cloudbuild/property/trigger_build_source_storage_source" module GoogleInSpec module CloudBuild module Property @@ -26,8 +26,8 @@ class TriggerBuildSource def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @storage_source = GoogleInSpec::CloudBuild::Property::TriggerBuildSourceStorageSource.new(args['storageSource'], to_s) - @repo_source = GoogleInSpec::CloudBuild::Property::TriggerBuildSourceRepoSource.new(args['repoSource'], to_s) + @storage_source = GoogleInSpec::CloudBuild::Property::TriggerBuildSourceStorageSource.new(args["storageSource"], to_s) + @repo_source = GoogleInSpec::CloudBuild::Property::TriggerBuildSourceRepoSource.new(args["repoSource"], to_s) end def to_s diff --git a/libraries/google/cloudbuild/property/trigger_build_source_repo_source.rb b/libraries/google/cloudbuild/property/trigger_build_source_repo_source.rb index 0055b26e0..e38735d2a 100644 --- a/libraries/google/cloudbuild/property/trigger_build_source_repo_source.rb +++ b/libraries/google/cloudbuild/property/trigger_build_source_repo_source.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -36,14 +36,14 @@ class TriggerBuildSourceRepoSource def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @project_id = args['projectId'] - @repo_name = args['repoName'] - @dir = args['dir'] - @invert_regex = args['invertRegex'] - @substitutions = args['substitutions'] - @branch_name = args['branchName'] - @tag_name = args['tagName'] - @commit_sha = args['commitSha'] + @project_id = args["projectId"] + @repo_name = args["repoName"] + @dir = args["dir"] + @invert_regex = args["invertRegex"] + @substitutions = args["substitutions"] + @branch_name = args["branchName"] + @tag_name = args["tagName"] + @commit_sha = args["commitSha"] end def to_s diff --git a/libraries/google/cloudbuild/property/trigger_build_source_storage_source.rb b/libraries/google/cloudbuild/property/trigger_build_source_storage_source.rb index b62eacf9e..acdc688c9 100644 --- a/libraries/google/cloudbuild/property/trigger_build_source_storage_source.rb +++ b/libraries/google/cloudbuild/property/trigger_build_source_storage_source.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class TriggerBuildSourceStorageSource def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @bucket = args['bucket'] - @object = args['object'] - @generation = args['generation'] + @bucket = args["bucket"] + @object = args["object"] + @generation = args["generation"] end def to_s diff --git a/libraries/google/cloudbuild/property/trigger_build_steps.rb b/libraries/google/cloudbuild/property/trigger_build_steps.rb index 4b03ac08c..6fdc1f4fb 100644 --- a/libraries/google/cloudbuild/property/trigger_build_steps.rb +++ b/libraries/google/cloudbuild/property/trigger_build_steps.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/cloudbuild/property/trigger_build_steps_volumes' +require "google/cloudbuild/property/trigger_build_steps_volumes" module GoogleInSpec module CloudBuild module Property @@ -43,17 +43,17 @@ class TriggerBuildSteps def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @args = args['args'] - @env = args['env'] - @id = args['id'] - @entrypoint = args['entrypoint'] - @dir = args['dir'] - @secret_env = args['secretEnv'] - @timeout = args['timeout'] - @timing = args['timing'] - @volumes = GoogleInSpec::CloudBuild::Property::TriggerBuildStepsVolumesArray.parse(args['volumes'], to_s) - @wait_for = args['waitFor'] + @name = args["name"] + @args = args["args"] + @env = args["env"] + @id = args["id"] + @entrypoint = args["entrypoint"] + @dir = args["dir"] + @secret_env = args["secretEnv"] + @timeout = args["timeout"] + @timing = args["timing"] + @volumes = GoogleInSpec::CloudBuild::Property::TriggerBuildStepsVolumesArray.parse(args["volumes"], to_s) + @wait_for = args["waitFor"] end def to_s diff --git a/libraries/google/cloudbuild/property/trigger_build_steps_volumes.rb b/libraries/google/cloudbuild/property/trigger_build_steps_volumes.rb index 6fcda6ff6..9933e606d 100644 --- a/libraries/google/cloudbuild/property/trigger_build_steps_volumes.rb +++ b/libraries/google/cloudbuild/property/trigger_build_steps_volumes.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class TriggerBuildStepsVolumes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @path = args['path'] + @name = args["name"] + @path = args["path"] end def to_s diff --git a/libraries/google/cloudbuild/property/trigger_github.rb b/libraries/google/cloudbuild/property/trigger_github.rb index 90ab25dda..affdb7221 100644 --- a/libraries/google/cloudbuild/property/trigger_github.rb +++ b/libraries/google/cloudbuild/property/trigger_github.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/cloudbuild/property/trigger_github_pull_request' -require 'google/cloudbuild/property/trigger_github_push' +require "google/cloudbuild/property/trigger_github_pull_request" +require "google/cloudbuild/property/trigger_github_push" module GoogleInSpec module CloudBuild module Property @@ -30,10 +30,10 @@ class TriggerGithub def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @owner = args['owner'] - @name = args['name'] - @pull_request = GoogleInSpec::CloudBuild::Property::TriggerGithubPullRequest.new(args['pullRequest'], to_s) - @push = GoogleInSpec::CloudBuild::Property::TriggerGithubPush.new(args['push'], to_s) + @owner = args["owner"] + @name = args["name"] + @pull_request = GoogleInSpec::CloudBuild::Property::TriggerGithubPullRequest.new(args["pullRequest"], to_s) + @push = GoogleInSpec::CloudBuild::Property::TriggerGithubPush.new(args["push"], to_s) end def to_s diff --git a/libraries/google/cloudbuild/property/trigger_github_pull_request.rb b/libraries/google/cloudbuild/property/trigger_github_pull_request.rb index 49f4d50e7..5e46cbb98 100644 --- a/libraries/google/cloudbuild/property/trigger_github_pull_request.rb +++ b/libraries/google/cloudbuild/property/trigger_github_pull_request.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class TriggerGithubPullRequest def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @branch = args['branch'] - @comment_control = args['commentControl'] - @invert_regex = args['invertRegex'] + @branch = args["branch"] + @comment_control = args["commentControl"] + @invert_regex = args["invertRegex"] end def to_s diff --git a/libraries/google/cloudbuild/property/trigger_github_push.rb b/libraries/google/cloudbuild/property/trigger_github_push.rb index e1a923966..7cba91bf0 100644 --- a/libraries/google/cloudbuild/property/trigger_github_push.rb +++ b/libraries/google/cloudbuild/property/trigger_github_push.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class TriggerGithubPush def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @invert_regex = args['invertRegex'] - @branch = args['branch'] - @tag = args['tag'] + @invert_regex = args["invertRegex"] + @branch = args["branch"] + @tag = args["tag"] end def to_s diff --git a/libraries/google/cloudbuild/property/trigger_trigger_template.rb b/libraries/google/cloudbuild/property/trigger_trigger_template.rb index a83efe223..aeca328f2 100644 --- a/libraries/google/cloudbuild/property/trigger_trigger_template.rb +++ b/libraries/google/cloudbuild/property/trigger_trigger_template.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -34,13 +34,13 @@ class TriggerTriggerTemplate def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @project_id = args['projectId'] - @repo_name = args['repoName'] - @dir = args['dir'] - @invert_regex = args['invertRegex'] - @branch_name = args['branchName'] - @tag_name = args['tagName'] - @commit_sha = args['commitSha'] + @project_id = args["projectId"] + @repo_name = args["repoName"] + @dir = args["dir"] + @invert_regex = args["invertRegex"] + @branch_name = args["branchName"] + @tag_name = args["tagName"] + @commit_sha = args["commitSha"] end def to_s diff --git a/libraries/google/cloudfunctions/property/cloudfunction_event_trigger.rb b/libraries/google/cloudfunctions/property/cloudfunction_event_trigger.rb index a4a62b8cf..ad39044f6 100644 --- a/libraries/google/cloudfunctions/property/cloudfunction_event_trigger.rb +++ b/libraries/google/cloudfunctions/property/cloudfunction_event_trigger.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class CloudFunctionEventTrigger def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @event_type = args['eventType'] - @resource = args['resource'] - @service = args['service'] + @event_type = args["eventType"] + @resource = args["resource"] + @service = args["service"] end def to_s diff --git a/libraries/google/cloudfunctions/property/cloudfunction_https_trigger.rb b/libraries/google/cloudfunctions/property/cloudfunction_https_trigger.rb index 96bd69ad0..59d4a8d4a 100644 --- a/libraries/google/cloudfunctions/property/cloudfunction_https_trigger.rb +++ b/libraries/google/cloudfunctions/property/cloudfunction_https_trigger.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class CloudFunctionHttpsTrigger def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @url = args['url'] + @url = args["url"] end def to_s diff --git a/libraries/google/cloudfunctions/property/cloudfunction_source_repository.rb b/libraries/google/cloudfunctions/property/cloudfunction_source_repository.rb index 18ed63410..96eb38357 100644 --- a/libraries/google/cloudfunctions/property/cloudfunction_source_repository.rb +++ b/libraries/google/cloudfunctions/property/cloudfunction_source_repository.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class CloudFunctionSourceRepository def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @url = args['url'] - @deployed_url = args['deployedUrl'] + @url = args["url"] + @deployed_url = args["deployedUrl"] end def to_s diff --git a/libraries/google/cloudscheduler/property/job_app_engine_http_target.rb b/libraries/google/cloudscheduler/property/job_app_engine_http_target.rb index 16bd1cfb5..39cf4469f 100644 --- a/libraries/google/cloudscheduler/property/job_app_engine_http_target.rb +++ b/libraries/google/cloudscheduler/property/job_app_engine_http_target.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/cloudscheduler/property/job_app_engine_http_target_app_engine_routing' +require "google/cloudscheduler/property/job_app_engine_http_target_app_engine_routing" module GoogleInSpec module CloudScheduler module Property @@ -31,11 +31,11 @@ class JobAppEngineHttpTarget def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @http_method = args['httpMethod'] - @app_engine_routing = GoogleInSpec::CloudScheduler::Property::JobAppEngineHttpTargetAppEngineRouting.new(args['appEngineRouting'], to_s) - @relative_uri = args['relativeUri'] - @body = args['body'] - @headers = args['headers'] + @http_method = args["httpMethod"] + @app_engine_routing = GoogleInSpec::CloudScheduler::Property::JobAppEngineHttpTargetAppEngineRouting.new(args["appEngineRouting"], to_s) + @relative_uri = args["relativeUri"] + @body = args["body"] + @headers = args["headers"] end def to_s diff --git a/libraries/google/cloudscheduler/property/job_app_engine_http_target_app_engine_routing.rb b/libraries/google/cloudscheduler/property/job_app_engine_http_target_app_engine_routing.rb index 8dc98609c..e6da759ad 100644 --- a/libraries/google/cloudscheduler/property/job_app_engine_http_target_app_engine_routing.rb +++ b/libraries/google/cloudscheduler/property/job_app_engine_http_target_app_engine_routing.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class JobAppEngineHttpTargetAppEngineRouting def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @service = args['service'] - @version = args['version'] - @instance = args['instance'] + @service = args["service"] + @version = args["version"] + @instance = args["instance"] end def to_s diff --git a/libraries/google/cloudscheduler/property/job_http_target.rb b/libraries/google/cloudscheduler/property/job_http_target.rb index 1058f9ebf..3c2b83d5b 100644 --- a/libraries/google/cloudscheduler/property/job_http_target.rb +++ b/libraries/google/cloudscheduler/property/job_http_target.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/cloudscheduler/property/job_http_target_oauth_token' -require 'google/cloudscheduler/property/job_http_target_oidc_token' +require "google/cloudscheduler/property/job_http_target_oauth_token" +require "google/cloudscheduler/property/job_http_target_oidc_token" module GoogleInSpec module CloudScheduler module Property @@ -34,12 +34,12 @@ class JobHttpTarget def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @uri = args['uri'] - @http_method = args['httpMethod'] - @body = args['body'] - @headers = args['headers'] - @oauth_token = GoogleInSpec::CloudScheduler::Property::JobHttpTargetOauthToken.new(args['oauthToken'], to_s) - @oidc_token = GoogleInSpec::CloudScheduler::Property::JobHttpTargetOidcToken.new(args['oidcToken'], to_s) + @uri = args["uri"] + @http_method = args["httpMethod"] + @body = args["body"] + @headers = args["headers"] + @oauth_token = GoogleInSpec::CloudScheduler::Property::JobHttpTargetOauthToken.new(args["oauthToken"], to_s) + @oidc_token = GoogleInSpec::CloudScheduler::Property::JobHttpTargetOidcToken.new(args["oidcToken"], to_s) end def to_s diff --git a/libraries/google/cloudscheduler/property/job_http_target_oauth_token.rb b/libraries/google/cloudscheduler/property/job_http_target_oauth_token.rb index 0aed280e7..59f5ca738 100644 --- a/libraries/google/cloudscheduler/property/job_http_target_oauth_token.rb +++ b/libraries/google/cloudscheduler/property/job_http_target_oauth_token.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class JobHttpTargetOauthToken def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @service_account_email = args['serviceAccountEmail'] - @scope = args['scope'] + @service_account_email = args["serviceAccountEmail"] + @scope = args["scope"] end def to_s diff --git a/libraries/google/cloudscheduler/property/job_http_target_oidc_token.rb b/libraries/google/cloudscheduler/property/job_http_target_oidc_token.rb index bdd0f0709..402785bae 100644 --- a/libraries/google/cloudscheduler/property/job_http_target_oidc_token.rb +++ b/libraries/google/cloudscheduler/property/job_http_target_oidc_token.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class JobHttpTargetOidcToken def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @service_account_email = args['serviceAccountEmail'] - @audience = args['audience'] + @service_account_email = args["serviceAccountEmail"] + @audience = args["audience"] end def to_s diff --git a/libraries/google/cloudscheduler/property/job_pubsub_target.rb b/libraries/google/cloudscheduler/property/job_pubsub_target.rb index c359cea61..9c4fa7925 100644 --- a/libraries/google/cloudscheduler/property/job_pubsub_target.rb +++ b/libraries/google/cloudscheduler/property/job_pubsub_target.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class JobPubsubTarget def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @topic_name = args['topicName'] - @data = args['data'] - @attributes = args['attributes'] + @topic_name = args["topicName"] + @data = args["data"] + @attributes = args["attributes"] end def to_s diff --git a/libraries/google/cloudscheduler/property/job_retry_config.rb b/libraries/google/cloudscheduler/property/job_retry_config.rb index 3786d235c..667324a97 100644 --- a/libraries/google/cloudscheduler/property/job_retry_config.rb +++ b/libraries/google/cloudscheduler/property/job_retry_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class JobRetryConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @retry_count = args['retryCount'] - @max_retry_duration = args['maxRetryDuration'] - @min_backoff_duration = args['minBackoffDuration'] - @max_backoff_duration = args['maxBackoffDuration'] - @max_doublings = args['maxDoublings'] + @retry_count = args["retryCount"] + @max_retry_duration = args["maxRetryDuration"] + @min_backoff_duration = args["minBackoffDuration"] + @max_backoff_duration = args["maxBackoffDuration"] + @max_doublings = args["maxDoublings"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config.rb b/libraries/google/composer/property/projectlocationenvironment_config.rb index 728bbb763..b7a1b68bb 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,30 +13,30 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/composer/property/projectlocationenvironment_config_database_config' -require 'google/composer/property/projectlocationenvironment_config_encryption_config' -require 'google/composer/property/projectlocationenvironment_config_maintenance_window' -require 'google/composer/property/projectlocationenvironment_config_master_authorized_networks_config' -require 'google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks' -require 'google/composer/property/projectlocationenvironment_config_node_config' -require 'google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy' -require 'google/composer/property/projectlocationenvironment_config_private_environment_config' -require 'google/composer/property/projectlocationenvironment_config_private_environment_config_networking_config' -require 'google/composer/property/projectlocationenvironment_config_private_environment_config_private_cluster_config' -require 'google/composer/property/projectlocationenvironment_config_recovery_config' -require 'google/composer/property/projectlocationenvironment_config_recovery_config_scheduled_snapshots_config' -require 'google/composer/property/projectlocationenvironment_config_software_config' -require 'google/composer/property/projectlocationenvironment_config_software_config_airflow_config_overrides' -require 'google/composer/property/projectlocationenvironment_config_software_config_env_variables' -require 'google/composer/property/projectlocationenvironment_config_software_config_pypi_packages' -require 'google/composer/property/projectlocationenvironment_config_web_server_config' -require 'google/composer/property/projectlocationenvironment_config_web_server_network_access_control' -require 'google/composer/property/projectlocationenvironment_config_web_server_network_access_control_allowed_ip_ranges' -require 'google/composer/property/projectlocationenvironment_config_workloads_config' -require 'google/composer/property/projectlocationenvironment_config_workloads_config_scheduler' -require 'google/composer/property/projectlocationenvironment_config_workloads_config_triggerer' -require 'google/composer/property/projectlocationenvironment_config_workloads_config_web_server' -require 'google/composer/property/projectlocationenvironment_config_workloads_config_worker' +require "google/composer/property/projectlocationenvironment_config_database_config" +require "google/composer/property/projectlocationenvironment_config_encryption_config" +require "google/composer/property/projectlocationenvironment_config_maintenance_window" +require "google/composer/property/projectlocationenvironment_config_master_authorized_networks_config" +require "google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks" +require "google/composer/property/projectlocationenvironment_config_node_config" +require "google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy" +require "google/composer/property/projectlocationenvironment_config_private_environment_config" +require "google/composer/property/projectlocationenvironment_config_private_environment_config_networking_config" +require "google/composer/property/projectlocationenvironment_config_private_environment_config_private_cluster_config" +require "google/composer/property/projectlocationenvironment_config_recovery_config" +require "google/composer/property/projectlocationenvironment_config_recovery_config_scheduled_snapshots_config" +require "google/composer/property/projectlocationenvironment_config_software_config" +require "google/composer/property/projectlocationenvironment_config_software_config_airflow_config_overrides" +require "google/composer/property/projectlocationenvironment_config_software_config_env_variables" +require "google/composer/property/projectlocationenvironment_config_software_config_pypi_packages" +require "google/composer/property/projectlocationenvironment_config_web_server_config" +require "google/composer/property/projectlocationenvironment_config_web_server_network_access_control" +require "google/composer/property/projectlocationenvironment_config_web_server_network_access_control_allowed_ip_ranges" +require "google/composer/property/projectlocationenvironment_config_workloads_config" +require "google/composer/property/projectlocationenvironment_config_workloads_config_scheduler" +require "google/composer/property/projectlocationenvironment_config_workloads_config_triggerer" +require "google/composer/property/projectlocationenvironment_config_workloads_config_web_server" +require "google/composer/property/projectlocationenvironment_config_workloads_config_worker" module GoogleInSpec module Composer module Property @@ -80,24 +80,24 @@ class ProjectLocationEnvironmentConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @gke_cluster = args['gkeCluster'] - @dag_gcs_prefix = args['dagGcsPrefix'] - @node_count = args['nodeCount'] - @software_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigSoftwareConfig.new(args['softwareConfig'], to_s) - @node_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigNodeConfig.new(args['nodeConfig'], to_s) - @private_environment_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigPrivateEnvironmentConfig.new(args['privateEnvironmentConfig'], to_s) - @web_server_network_access_control = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWebServerNetworkAccessControl.new(args['webServerNetworkAccessControl'], to_s) - @database_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigDatabaseConfig.new(args['databaseConfig'], to_s) - @web_server_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWebServerConfig.new(args['webServerConfig'], to_s) - @encryption_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigEncryptionConfig.new(args['encryptionConfig'], to_s) - @maintenance_window = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigMaintenanceWindow.new(args['maintenanceWindow'], to_s) - @workloads_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWorkloadsConfig.new(args['workloadsConfig'], to_s) - @environment_size = args['environmentSize'] - @airflow_uri = args['airflowUri'] - @airflow_byoid_uri = args['airflowByoidUri'] - @master_authorized_networks_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfig.new(args['masterAuthorizedNetworksConfig'], to_s) - @recovery_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigRecoveryConfig.new(args['recoveryConfig'], to_s) - @resilience_mode = args['resilienceMode'] + @gke_cluster = args["gkeCluster"] + @dag_gcs_prefix = args["dagGcsPrefix"] + @node_count = args["nodeCount"] + @software_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigSoftwareConfig.new(args["softwareConfig"], to_s) + @node_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigNodeConfig.new(args["nodeConfig"], to_s) + @private_environment_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigPrivateEnvironmentConfig.new(args["privateEnvironmentConfig"], to_s) + @web_server_network_access_control = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWebServerNetworkAccessControl.new(args["webServerNetworkAccessControl"], to_s) + @database_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigDatabaseConfig.new(args["databaseConfig"], to_s) + @web_server_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWebServerConfig.new(args["webServerConfig"], to_s) + @encryption_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigEncryptionConfig.new(args["encryptionConfig"], to_s) + @maintenance_window = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigMaintenanceWindow.new(args["maintenanceWindow"], to_s) + @workloads_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWorkloadsConfig.new(args["workloadsConfig"], to_s) + @environment_size = args["environmentSize"] + @airflow_uri = args["airflowUri"] + @airflow_byoid_uri = args["airflowByoidUri"] + @master_authorized_networks_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfig.new(args["masterAuthorizedNetworksConfig"], to_s) + @recovery_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigRecoveryConfig.new(args["recoveryConfig"], to_s) + @resilience_mode = args["resilienceMode"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_database_config.rb b/libraries/google/composer/property/projectlocationenvironment_config_database_config.rb index 3bd003dcc..f4c62b16e 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_database_config.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_database_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ProjectLocationEnvironmentConfigDatabaseConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @machine_type = args['machineType'] - @zone = args['zone'] + @machine_type = args["machineType"] + @zone = args["zone"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_encryption_config.rb b/libraries/google/composer/property/projectlocationenvironment_config_encryption_config.rb index b9b5bbb10..71c4afb0a 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_encryption_config.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_encryption_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ProjectLocationEnvironmentConfigEncryptionConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_maintenance_window.rb b/libraries/google/composer/property/projectlocationenvironment_config_maintenance_window.rb index 71bbeabb9..fefc46eea 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_maintenance_window.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_maintenance_window.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ProjectLocationEnvironmentConfigMaintenanceWindow def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @start_time = args['startTime'] - @end_time = args['endTime'] - @recurrence = args['recurrence'] + @start_time = args["startTime"] + @end_time = args["endTime"] + @recurrence = args["recurrence"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_master_authorized_networks_config.rb b/libraries/google/composer/property/projectlocationenvironment_config_master_authorized_networks_config.rb index 4da07486a..23960b859 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_master_authorized_networks_config.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_master_authorized_networks_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks' +require "google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks" module GoogleInSpec module Composer module Property @@ -25,8 +25,8 @@ class ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enabled = args['enabled'] - @cidr_blocks = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfigCidrBlocksArray.parse(args['cidrBlocks'], to_s) + @enabled = args["enabled"] + @cidr_blocks = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfigCidrBlocksArray.parse(args["cidrBlocks"], to_s) end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks.rb b/libraries/google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks.rb index 2de397e69..83d564132 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfigCidrBlocks def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @display_name = args['displayName'] - @cidr_block = args['cidrBlock'] + @display_name = args["displayName"] + @cidr_block = args["cidrBlock"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_node_config.rb b/libraries/google/composer/property/projectlocationenvironment_config_node_config.rb index 6d5a6a773..266391231 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_node_config.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_node_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy' +require "google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy" module GoogleInSpec module Composer module Property @@ -41,16 +41,16 @@ class ProjectLocationEnvironmentConfigNodeConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @location = args['location'] - @machine_type = args['machineType'] - @network = args['network'] - @subnetwork = args['subnetwork'] - @disk_size_gb = args['diskSizeGb'] - @oauth_scopes = args['oauthScopes'] - @service_account = args['serviceAccount'] - @tags = args['tags'] - @ip_allocation_policy = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigNodeConfigIpAllocationPolicy.new(args['ipAllocationPolicy'], to_s) - @enable_ip_masq_agent = args['enableIpMasqAgent'] + @location = args["location"] + @machine_type = args["machineType"] + @network = args["network"] + @subnetwork = args["subnetwork"] + @disk_size_gb = args["diskSizeGb"] + @oauth_scopes = args["oauthScopes"] + @service_account = args["serviceAccount"] + @tags = args["tags"] + @ip_allocation_policy = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigNodeConfigIpAllocationPolicy.new(args["ipAllocationPolicy"], to_s) + @enable_ip_masq_agent = args["enableIpMasqAgent"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy.rb b/libraries/google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy.rb index 45c01c746..143faf649 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class ProjectLocationEnvironmentConfigNodeConfigIpAllocationPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @use_ip_aliases = args['useIpAliases'] - @cluster_secondary_range_name = args['clusterSecondaryRangeName'] - @cluster_ipv4_cidr_block = args['clusterIpv4CidrBlock'] - @services_secondary_range_name = args['servicesSecondaryRangeName'] - @services_ipv4_cidr_block = args['servicesIpv4CidrBlock'] + @use_ip_aliases = args["useIpAliases"] + @cluster_secondary_range_name = args["clusterSecondaryRangeName"] + @cluster_ipv4_cidr_block = args["clusterIpv4CidrBlock"] + @services_secondary_range_name = args["servicesSecondaryRangeName"] + @services_ipv4_cidr_block = args["servicesIpv4CidrBlock"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_private_environment_config.rb b/libraries/google/composer/property/projectlocationenvironment_config_private_environment_config.rb index 7e2f54162..566409290 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_private_environment_config.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_private_environment_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/composer/property/projectlocationenvironment_config_private_environment_config_networking_config' -require 'google/composer/property/projectlocationenvironment_config_private_environment_config_private_cluster_config' +require "google/composer/property/projectlocationenvironment_config_private_environment_config_networking_config" +require "google/composer/property/projectlocationenvironment_config_private_environment_config_private_cluster_config" module GoogleInSpec module Composer module Property @@ -42,16 +42,16 @@ class ProjectLocationEnvironmentConfigPrivateEnvironmentConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enable_private_environment = args['enablePrivateEnvironment'] - @private_cluster_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigPrivateEnvironmentConfigPrivateClusterConfig.new(args['privateClusterConfig'], to_s) - @web_server_ipv4_cidr_block = args['webServerIpv4CidrBlock'] - @cloud_sql_ipv4_cidr_block = args['cloudSqlIpv4CidrBlock'] - @web_server_ipv4_reserved_range = args['webServerIpv4ReservedRange'] - @cloud_composer_network_ipv4_cidr_block = args['cloudComposerNetworkIpv4CidrBlock'] - @cloud_composer_network_ipv4_reserved_range = args['cloudComposerNetworkIpv4ReservedRange'] - @enable_privately_used_public_ips = args['enablePrivatelyUsedPublicIps'] - @cloud_composer_connection_subnetwork = args['cloudComposerConnectionSubnetwork'] - @networking_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigPrivateEnvironmentConfigNetworkingConfig.new(args['networkingConfig'], to_s) + @enable_private_environment = args["enablePrivateEnvironment"] + @private_cluster_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigPrivateEnvironmentConfigPrivateClusterConfig.new(args["privateClusterConfig"], to_s) + @web_server_ipv4_cidr_block = args["webServerIpv4CidrBlock"] + @cloud_sql_ipv4_cidr_block = args["cloudSqlIpv4CidrBlock"] + @web_server_ipv4_reserved_range = args["webServerIpv4ReservedRange"] + @cloud_composer_network_ipv4_cidr_block = args["cloudComposerNetworkIpv4CidrBlock"] + @cloud_composer_network_ipv4_reserved_range = args["cloudComposerNetworkIpv4ReservedRange"] + @enable_privately_used_public_ips = args["enablePrivatelyUsedPublicIps"] + @cloud_composer_connection_subnetwork = args["cloudComposerConnectionSubnetwork"] + @networking_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigPrivateEnvironmentConfigNetworkingConfig.new(args["networkingConfig"], to_s) end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_private_environment_config_networking_config.rb b/libraries/google/composer/property/projectlocationenvironment_config_private_environment_config_networking_config.rb index ec6076c2f..841695929 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_private_environment_config_networking_config.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_private_environment_config_networking_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ProjectLocationEnvironmentConfigPrivateEnvironmentConfigNetworkingConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @connection_type = args['connectionType'] + @connection_type = args["connectionType"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_private_environment_config_private_cluster_config.rb b/libraries/google/composer/property/projectlocationenvironment_config_private_environment_config_private_cluster_config.rb index bef1a4f08..91e0763ae 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_private_environment_config_private_cluster_config.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_private_environment_config_private_cluster_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ProjectLocationEnvironmentConfigPrivateEnvironmentConfigPrivateClusterConf def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enable_private_endpoint = args['enablePrivateEndpoint'] - @master_ipv4_cidr_block = args['masterIpv4CidrBlock'] - @master_ipv4_reserved_range = args['masterIpv4ReservedRange'] + @enable_private_endpoint = args["enablePrivateEndpoint"] + @master_ipv4_cidr_block = args["masterIpv4CidrBlock"] + @master_ipv4_reserved_range = args["masterIpv4ReservedRange"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_recovery_config.rb b/libraries/google/composer/property/projectlocationenvironment_config_recovery_config.rb index a0a60f360..b9a77ed75 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_recovery_config.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_recovery_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/composer/property/projectlocationenvironment_config_recovery_config_scheduled_snapshots_config' +require "google/composer/property/projectlocationenvironment_config_recovery_config_scheduled_snapshots_config" module GoogleInSpec module Composer module Property @@ -23,7 +23,7 @@ class ProjectLocationEnvironmentConfigRecoveryConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @scheduled_snapshots_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigRecoveryConfigScheduledSnapshotsConfig.new(args['scheduledSnapshotsConfig'], to_s) + @scheduled_snapshots_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigRecoveryConfigScheduledSnapshotsConfig.new(args["scheduledSnapshotsConfig"], to_s) end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_recovery_config_scheduled_snapshots_config.rb b/libraries/google/composer/property/projectlocationenvironment_config_recovery_config_scheduled_snapshots_config.rb index 2d21d1ae3..8349fbc7d 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_recovery_config_scheduled_snapshots_config.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_recovery_config_scheduled_snapshots_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class ProjectLocationEnvironmentConfigRecoveryConfigScheduledSnapshotsConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enabled = args['enabled'] - @snapshot_location = args['snapshotLocation'] - @snapshot_creation_schedule = args['snapshotCreationSchedule'] - @time_zone = args['timeZone'] + @enabled = args["enabled"] + @snapshot_location = args["snapshotLocation"] + @snapshot_creation_schedule = args["snapshotCreationSchedule"] + @time_zone = args["timeZone"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_software_config.rb b/libraries/google/composer/property/projectlocationenvironment_config_software_config.rb index 32bbf91a9..947063435 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_software_config.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_software_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/composer/property/projectlocationenvironment_config_software_config_airflow_config_overrides' -require 'google/composer/property/projectlocationenvironment_config_software_config_env_variables' -require 'google/composer/property/projectlocationenvironment_config_software_config_pypi_packages' +require "google/composer/property/projectlocationenvironment_config_software_config_airflow_config_overrides" +require "google/composer/property/projectlocationenvironment_config_software_config_env_variables" +require "google/composer/property/projectlocationenvironment_config_software_config_pypi_packages" module GoogleInSpec module Composer module Property @@ -35,12 +35,12 @@ class ProjectLocationEnvironmentConfigSoftwareConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @image_version = args['imageVersion'] - @airflow_config_overrides = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigSoftwareConfigAirflowConfigOverrides.new(args['airflowConfigOverrides'], to_s) - @pypi_packages = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigSoftwareConfigPypiPackages.new(args['pypiPackages'], to_s) - @env_variables = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigSoftwareConfigEnvVariables.new(args['envVariables'], to_s) - @python_version = args['pythonVersion'] - @scheduler_count = args['schedulerCount'] + @image_version = args["imageVersion"] + @airflow_config_overrides = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigSoftwareConfigAirflowConfigOverrides.new(args["airflowConfigOverrides"], to_s) + @pypi_packages = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigSoftwareConfigPypiPackages.new(args["pypiPackages"], to_s) + @env_variables = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigSoftwareConfigEnvVariables.new(args["envVariables"], to_s) + @python_version = args["pythonVersion"] + @scheduler_count = args["schedulerCount"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_software_config_airflow_config_overrides.rb b/libraries/google/composer/property/projectlocationenvironment_config_software_config_airflow_config_overrides.rb index 0cfa1d9ab..bcbbbdd95 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_software_config_airflow_config_overrides.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_software_config_airflow_config_overrides.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ProjectLocationEnvironmentConfigSoftwareConfigAirflowConfigOverrides def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_software_config_env_variables.rb b/libraries/google/composer/property/projectlocationenvironment_config_software_config_env_variables.rb index 76458dc48..25ad4ff14 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_software_config_env_variables.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_software_config_env_variables.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ProjectLocationEnvironmentConfigSoftwareConfigEnvVariables def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_software_config_pypi_packages.rb b/libraries/google/composer/property/projectlocationenvironment_config_software_config_pypi_packages.rb index 879265b0b..988e677fa 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_software_config_pypi_packages.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_software_config_pypi_packages.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ProjectLocationEnvironmentConfigSoftwareConfigPypiPackages def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_web_server_config.rb b/libraries/google/composer/property/projectlocationenvironment_config_web_server_config.rb index f11e520c2..c7f881843 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_web_server_config.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_web_server_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ProjectLocationEnvironmentConfigWebServerConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @machine_type = args['machineType'] + @machine_type = args["machineType"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_web_server_network_access_control.rb b/libraries/google/composer/property/projectlocationenvironment_config_web_server_network_access_control.rb index 792e0be66..6bc372766 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_web_server_network_access_control.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_web_server_network_access_control.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/composer/property/projectlocationenvironment_config_web_server_network_access_control_allowed_ip_ranges' +require "google/composer/property/projectlocationenvironment_config_web_server_network_access_control_allowed_ip_ranges" module GoogleInSpec module Composer module Property @@ -23,7 +23,7 @@ class ProjectLocationEnvironmentConfigWebServerNetworkAccessControl def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @allowed_ip_ranges = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWebServerNetworkAccessControlAllowedIpRangesArray.parse(args['allowedIpRanges'], to_s) + @allowed_ip_ranges = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWebServerNetworkAccessControlAllowedIpRangesArray.parse(args["allowedIpRanges"], to_s) end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_web_server_network_access_control_allowed_ip_ranges.rb b/libraries/google/composer/property/projectlocationenvironment_config_web_server_network_access_control_allowed_ip_ranges.rb index f7afee094..e2930c55b 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_web_server_network_access_control_allowed_ip_ranges.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_web_server_network_access_control_allowed_ip_ranges.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ProjectLocationEnvironmentConfigWebServerNetworkAccessControlAllowedIpRang def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @value = args['value'] - @description = args['description'] + @value = args["value"] + @description = args["description"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_workloads_config.rb b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config.rb index f9740deae..193237fa1 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_workloads_config.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/composer/property/projectlocationenvironment_config_workloads_config_scheduler' -require 'google/composer/property/projectlocationenvironment_config_workloads_config_triggerer' -require 'google/composer/property/projectlocationenvironment_config_workloads_config_web_server' -require 'google/composer/property/projectlocationenvironment_config_workloads_config_worker' +require "google/composer/property/projectlocationenvironment_config_workloads_config_scheduler" +require "google/composer/property/projectlocationenvironment_config_workloads_config_triggerer" +require "google/composer/property/projectlocationenvironment_config_workloads_config_web_server" +require "google/composer/property/projectlocationenvironment_config_workloads_config_worker" module GoogleInSpec module Composer module Property @@ -32,10 +32,10 @@ class ProjectLocationEnvironmentConfigWorkloadsConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @scheduler = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWorkloadsConfigScheduler.new(args['scheduler'], to_s) - @web_server = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWorkloadsConfigWebServer.new(args['webServer'], to_s) - @worker = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWorkloadsConfigWorker.new(args['worker'], to_s) - @triggerer = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWorkloadsConfigTriggerer.new(args['triggerer'], to_s) + @scheduler = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWorkloadsConfigScheduler.new(args["scheduler"], to_s) + @web_server = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWorkloadsConfigWebServer.new(args["webServer"], to_s) + @worker = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWorkloadsConfigWorker.new(args["worker"], to_s) + @triggerer = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfigWorkloadsConfigTriggerer.new(args["triggerer"], to_s) end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_scheduler.rb b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_scheduler.rb index 40b2f1eaa..260de52db 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_scheduler.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_scheduler.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class ProjectLocationEnvironmentConfigWorkloadsConfigScheduler def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @cpu = args['cpu'] - @memory_gb = args['memoryGb'] - @storage_gb = args['storageGb'] - @count = args['count'] + @cpu = args["cpu"] + @memory_gb = args["memoryGb"] + @storage_gb = args["storageGb"] + @count = args["count"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_triggerer.rb b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_triggerer.rb index dec87cc6a..8f6c697bf 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_triggerer.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_triggerer.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ProjectLocationEnvironmentConfigWorkloadsConfigTriggerer def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @count = args['count'] - @cpu = args['cpu'] - @memory_gb = args['memoryGb'] + @count = args["count"] + @cpu = args["cpu"] + @memory_gb = args["memoryGb"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_web_server.rb b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_web_server.rb index 5d9b44dda..7443c90e9 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_web_server.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_web_server.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ProjectLocationEnvironmentConfigWorkloadsConfigWebServer def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @cpu = args['cpu'] - @memory_gb = args['memoryGb'] - @storage_gb = args['storageGb'] + @cpu = args["cpu"] + @memory_gb = args["memoryGb"] + @storage_gb = args["storageGb"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_worker.rb b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_worker.rb index 1560b6720..0b7bc436f 100644 --- a/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_worker.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_worker.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class ProjectLocationEnvironmentConfigWorkloadsConfigWorker def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @cpu = args['cpu'] - @memory_gb = args['memoryGb'] - @storage_gb = args['storageGb'] - @min_count = args['minCount'] - @max_count = args['maxCount'] + @cpu = args["cpu"] + @memory_gb = args["memoryGb"] + @storage_gb = args["storageGb"] + @min_count = args["minCount"] + @max_count = args["maxCount"] end def to_s diff --git a/libraries/google/composer/property/projectlocationenvironment_labels.rb b/libraries/google/composer/property/projectlocationenvironment_labels.rb index 6ff6720b7..9b5a66804 100644 --- a/libraries/google/composer/property/projectlocationenvironment_labels.rb +++ b/libraries/google/composer/property/projectlocationenvironment_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # diff --git a/libraries/google/composer/property/projectlocationenvironment_storage_config.rb b/libraries/google/composer/property/projectlocationenvironment_storage_config.rb index ff019714e..f827304d5 100644 --- a/libraries/google/composer/property/projectlocationenvironment_storage_config.rb +++ b/libraries/google/composer/property/projectlocationenvironment_storage_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ProjectLocationEnvironmentStorageConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @bucket = args['bucket'] + @bucket = args["bucket"] end def to_s diff --git a/libraries/google/compute/property/acceleratortype_deprecated.rb b/libraries/google/compute/property/acceleratortype_deprecated.rb index a7a3f4750..38e69e7a2 100644 --- a/libraries/google/compute/property/acceleratortype_deprecated.rb +++ b/libraries/google/compute/property/acceleratortype_deprecated.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,11 +28,11 @@ class AcceleratorTypeDeprecated def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @state = parse_time_string(args['state']) - @deprecated = parse_time_string(args['deprecated']) - @obsolete = parse_time_string(args['obsolete']) - @replacement = args['replacement'] - @state = args['state'] + @state = parse_time_string(args["state"]) + @deprecated = parse_time_string(args["deprecated"]) + @obsolete = parse_time_string(args["obsolete"]) + @replacement = args["replacement"] + @state = args["state"] end def to_s diff --git a/libraries/google/compute/property/autoscaler_autoscaling_policy.rb b/libraries/google/compute/property/autoscaler_autoscaling_policy.rb index 390f4f505..d6f063099 100644 --- a/libraries/google/compute/property/autoscaler_autoscaling_policy.rb +++ b/libraries/google/compute/property/autoscaler_autoscaling_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/autoscaler_autoscaling_policy_cpu_utilization' -require 'google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations' -require 'google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization' -require 'google/compute/property/autoscaler_autoscaling_policy_scale_down_control' -require 'google/compute/property/autoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas' -require 'google/compute/property/autoscaler_autoscaling_policy_scale_in_control' -require 'google/compute/property/autoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas' -require 'google/compute/property/autoscaler_autoscaling_policy_scaling_schedules' +require "google/compute/property/autoscaler_autoscaling_policy_cpu_utilization" +require "google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations" +require "google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization" +require "google/compute/property/autoscaler_autoscaling_policy_scale_down_control" +require "google/compute/property/autoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas" +require "google/compute/property/autoscaler_autoscaling_policy_scale_in_control" +require "google/compute/property/autoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas" +require "google/compute/property/autoscaler_autoscaling_policy_scaling_schedules" module GoogleInSpec module Compute module Property @@ -48,16 +48,16 @@ class AutoscalerAutoscalingPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @min_num_replicas = args['minNumReplicas'] - @max_num_replicas = args['maxNumReplicas'] - @cool_down_period_sec = args['coolDownPeriodSec'] - @mode = args['mode'] - @scale_down_control = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyScaleDownControl.new(args['scaleDownControl'], to_s) - @scale_in_control = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyScaleInControl.new(args['scaleInControl'], to_s) - @cpu_utilization = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyCpuUtilization.new(args['cpuUtilization'], to_s) - @custom_metric_utilizations = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyCustomMetricUtilizationsArray.parse(args['customMetricUtilizations'], to_s) - @load_balancing_utilization = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyLoadBalancingUtilization.new(args['loadBalancingUtilization'], to_s) - @scaling_schedules = args['scalingSchedules'] + @min_num_replicas = args["minNumReplicas"] + @max_num_replicas = args["maxNumReplicas"] + @cool_down_period_sec = args["coolDownPeriodSec"] + @mode = args["mode"] + @scale_down_control = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyScaleDownControl.new(args["scaleDownControl"], to_s) + @scale_in_control = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyScaleInControl.new(args["scaleInControl"], to_s) + @cpu_utilization = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyCpuUtilization.new(args["cpuUtilization"], to_s) + @custom_metric_utilizations = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyCustomMetricUtilizationsArray.parse(args["customMetricUtilizations"], to_s) + @load_balancing_utilization = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyLoadBalancingUtilization.new(args["loadBalancingUtilization"], to_s) + @scaling_schedules = args["scalingSchedules"] end def to_s diff --git a/libraries/google/compute/property/autoscaler_autoscaling_policy_cpu_utilization.rb b/libraries/google/compute/property/autoscaler_autoscaling_policy_cpu_utilization.rb index 3ea574485..a7bc26e46 100644 --- a/libraries/google/compute/property/autoscaler_autoscaling_policy_cpu_utilization.rb +++ b/libraries/google/compute/property/autoscaler_autoscaling_policy_cpu_utilization.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class AutoscalerAutoscalingPolicyCpuUtilization def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @utilization_target = args['utilizationTarget'] - @predictive_method = args['predictiveMethod'] + @utilization_target = args["utilizationTarget"] + @predictive_method = args["predictiveMethod"] end def to_s diff --git a/libraries/google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations.rb b/libraries/google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations.rb index 0d222e199..54d2694ad 100644 --- a/libraries/google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations.rb +++ b/libraries/google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class AutoscalerAutoscalingPolicyCustomMetricUtilizations def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @metric = args['metric'] - @single_instance_assignment = args['singleInstanceAssignment'] - @utilization_target = args['utilizationTarget'] - @utilization_target_type = args['utilizationTargetType'] - @filter = args['filter'] + @metric = args["metric"] + @single_instance_assignment = args["singleInstanceAssignment"] + @utilization_target = args["utilizationTarget"] + @utilization_target_type = args["utilizationTargetType"] + @filter = args["filter"] end def to_s diff --git a/libraries/google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization.rb b/libraries/google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization.rb index 9a942ab2b..2d0549698 100644 --- a/libraries/google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization.rb +++ b/libraries/google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class AutoscalerAutoscalingPolicyLoadBalancingUtilization def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @utilization_target = args['utilizationTarget'] + @utilization_target = args["utilizationTarget"] end def to_s diff --git a/libraries/google/compute/property/autoscaler_autoscaling_policy_scale_down_control.rb b/libraries/google/compute/property/autoscaler_autoscaling_policy_scale_down_control.rb index 96b564001..42d8b0f25 100644 --- a/libraries/google/compute/property/autoscaler_autoscaling_policy_scale_down_control.rb +++ b/libraries/google/compute/property/autoscaler_autoscaling_policy_scale_down_control.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/autoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas' +require "google/compute/property/autoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas" module GoogleInSpec module Compute module Property @@ -25,8 +25,8 @@ class AutoscalerAutoscalingPolicyScaleDownControl def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_scaled_down_replicas = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyScaleDownControlMaxScaledDownReplicas.new(args['maxScaledDownReplicas'], to_s) - @time_window_sec = args['timeWindowSec'] + @max_scaled_down_replicas = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyScaleDownControlMaxScaledDownReplicas.new(args["maxScaledDownReplicas"], to_s) + @time_window_sec = args["timeWindowSec"] end def to_s diff --git a/libraries/google/compute/property/autoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas.rb b/libraries/google/compute/property/autoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas.rb index 57233b705..0f237057c 100644 --- a/libraries/google/compute/property/autoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas.rb +++ b/libraries/google/compute/property/autoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class AutoscalerAutoscalingPolicyScaleDownControlMaxScaledDownReplicas def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @fixed = args['fixed'] - @percent = args['percent'] + @fixed = args["fixed"] + @percent = args["percent"] end def to_s diff --git a/libraries/google/compute/property/autoscaler_autoscaling_policy_scale_in_control.rb b/libraries/google/compute/property/autoscaler_autoscaling_policy_scale_in_control.rb index 861a2f89c..93b70dc9e 100644 --- a/libraries/google/compute/property/autoscaler_autoscaling_policy_scale_in_control.rb +++ b/libraries/google/compute/property/autoscaler_autoscaling_policy_scale_in_control.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/autoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas' +require "google/compute/property/autoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas" module GoogleInSpec module Compute module Property @@ -25,8 +25,8 @@ class AutoscalerAutoscalingPolicyScaleInControl def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_scaled_in_replicas = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicas.new(args['maxScaledInReplicas'], to_s) - @time_window_sec = args['timeWindowSec'] + @max_scaled_in_replicas = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicas.new(args["maxScaledInReplicas"], to_s) + @time_window_sec = args["timeWindowSec"] end def to_s diff --git a/libraries/google/compute/property/autoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas.rb b/libraries/google/compute/property/autoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas.rb index 61a343ac0..54409884f 100644 --- a/libraries/google/compute/property/autoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas.rb +++ b/libraries/google/compute/property/autoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class AutoscalerAutoscalingPolicyScaleInControlMaxScaledInReplicas def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @fixed = args['fixed'] - @percent = args['percent'] + @fixed = args["fixed"] + @percent = args["percent"] end def to_s diff --git a/libraries/google/compute/property/autoscaler_autoscaling_policy_scaling_schedules.rb b/libraries/google/compute/property/autoscaler_autoscaling_policy_scaling_schedules.rb index 4f2e4f76e..f370b7621 100644 --- a/libraries/google/compute/property/autoscaler_autoscaling_policy_scaling_schedules.rb +++ b/libraries/google/compute/property/autoscaler_autoscaling_policy_scaling_schedules.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -32,12 +32,12 @@ class AutoscalerAutoscalingPolicyScalingSchedules def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @min_required_replicas = args['minRequiredReplicas'] - @schedule = args['schedule'] - @time_zone = args['timeZone'] - @duration_sec = args['durationSec'] - @disabled = args['disabled'] - @description = args['description'] + @min_required_replicas = args["minRequiredReplicas"] + @schedule = args["schedule"] + @time_zone = args["timeZone"] + @duration_sec = args["durationSec"] + @disabled = args["disabled"] + @description = args["description"] end def to_s diff --git a/libraries/google/compute/property/backendbucket_cdn_policy.rb b/libraries/google/compute/property/backendbucket_cdn_policy.rb index 7b7886277..53b8267af 100644 --- a/libraries/google/compute/property/backendbucket_cdn_policy.rb +++ b/libraries/google/compute/property/backendbucket_cdn_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/backendbucket_cdn_policy_negative_caching_policy' +require "google/compute/property/backendbucket_cdn_policy_negative_caching_policy" module GoogleInSpec module Compute module Property @@ -37,14 +37,14 @@ class BackendBucketCdnPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @signed_url_cache_max_age_sec = args['signedUrlCacheMaxAgeSec'] - @default_ttl = args['defaultTtl'] - @max_ttl = args['maxTtl'] - @client_ttl = args['clientTtl'] - @negative_caching = args['negativeCaching'] - @negative_caching_policy = GoogleInSpec::Compute::Property::BackendBucketCdnPolicyNegativeCachingPolicyArray.parse(args['negativeCachingPolicy'], to_s) - @cache_mode = args['cacheMode'] - @serve_while_stale = args['serveWhileStale'] + @signed_url_cache_max_age_sec = args["signedUrlCacheMaxAgeSec"] + @default_ttl = args["defaultTtl"] + @max_ttl = args["maxTtl"] + @client_ttl = args["clientTtl"] + @negative_caching = args["negativeCaching"] + @negative_caching_policy = GoogleInSpec::Compute::Property::BackendBucketCdnPolicyNegativeCachingPolicyArray.parse(args["negativeCachingPolicy"], to_s) + @cache_mode = args["cacheMode"] + @serve_while_stale = args["serveWhileStale"] end def to_s diff --git a/libraries/google/compute/property/backendbucket_cdn_policy_negative_caching_policy.rb b/libraries/google/compute/property/backendbucket_cdn_policy_negative_caching_policy.rb index 90419928d..fb5b21ec4 100644 --- a/libraries/google/compute/property/backendbucket_cdn_policy_negative_caching_policy.rb +++ b/libraries/google/compute/property/backendbucket_cdn_policy_negative_caching_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class BackendBucketCdnPolicyNegativeCachingPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @code = args['code'] - @ttl = args['ttl'] + @code = args["code"] + @ttl = args["ttl"] end def to_s diff --git a/libraries/google/compute/property/backendservice_backends.rb b/libraries/google/compute/property/backendservice_backends.rb index 12db20701..90d457ba2 100644 --- a/libraries/google/compute/property/backendservice_backends.rb +++ b/libraries/google/compute/property/backendservice_backends.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -42,17 +42,17 @@ class BackendServiceBackends def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @balancing_mode = args['balancingMode'] - @capacity_scaler = args['capacityScaler'] - @description = args['description'] - @group = args['group'] - @max_connections = args['maxConnections'] - @max_connections_per_instance = args['maxConnectionsPerInstance'] - @max_connections_per_endpoint = args['maxConnectionsPerEndpoint'] - @max_rate = args['maxRate'] - @max_rate_per_instance = args['maxRatePerInstance'] - @max_rate_per_endpoint = args['maxRatePerEndpoint'] - @max_utilization = args['maxUtilization'] + @balancing_mode = args["balancingMode"] + @capacity_scaler = args["capacityScaler"] + @description = args["description"] + @group = args["group"] + @max_connections = args["maxConnections"] + @max_connections_per_instance = args["maxConnectionsPerInstance"] + @max_connections_per_endpoint = args["maxConnectionsPerEndpoint"] + @max_rate = args["maxRate"] + @max_rate_per_instance = args["maxRatePerInstance"] + @max_rate_per_endpoint = args["maxRatePerEndpoint"] + @max_utilization = args["maxUtilization"] end def to_s diff --git a/libraries/google/compute/property/backendservice_cdn_policy.rb b/libraries/google/compute/property/backendservice_cdn_policy.rb index 83a0114f9..1db150d71 100644 --- a/libraries/google/compute/property/backendservice_cdn_policy.rb +++ b/libraries/google/compute/property/backendservice_cdn_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/backendservice_cdn_policy_cache_key_policy' -require 'google/compute/property/backendservice_cdn_policy_negative_caching_policy' +require "google/compute/property/backendservice_cdn_policy_cache_key_policy" +require "google/compute/property/backendservice_cdn_policy_negative_caching_policy" module GoogleInSpec module Compute module Property @@ -40,15 +40,15 @@ class BackendServiceCdnPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @cache_key_policy = GoogleInSpec::Compute::Property::BackendServiceCdnPolicyCacheKeyPolicy.new(args['cacheKeyPolicy'], to_s) - @signed_url_cache_max_age_sec = args['signedUrlCacheMaxAgeSec'] - @default_ttl = args['defaultTtl'] - @max_ttl = args['maxTtl'] - @client_ttl = args['clientTtl'] - @negative_caching = args['negativeCaching'] - @negative_caching_policy = GoogleInSpec::Compute::Property::BackendServiceCdnPolicyNegativeCachingPolicyArray.parse(args['negativeCachingPolicy'], to_s) - @cache_mode = args['cacheMode'] - @serve_while_stale = args['serveWhileStale'] + @cache_key_policy = GoogleInSpec::Compute::Property::BackendServiceCdnPolicyCacheKeyPolicy.new(args["cacheKeyPolicy"], to_s) + @signed_url_cache_max_age_sec = args["signedUrlCacheMaxAgeSec"] + @default_ttl = args["defaultTtl"] + @max_ttl = args["maxTtl"] + @client_ttl = args["clientTtl"] + @negative_caching = args["negativeCaching"] + @negative_caching_policy = GoogleInSpec::Compute::Property::BackendServiceCdnPolicyNegativeCachingPolicyArray.parse(args["negativeCachingPolicy"], to_s) + @cache_mode = args["cacheMode"] + @serve_while_stale = args["serveWhileStale"] end def to_s diff --git a/libraries/google/compute/property/backendservice_cdn_policy_cache_key_policy.rb b/libraries/google/compute/property/backendservice_cdn_policy_cache_key_policy.rb index 1e95d38f5..1d876cfbb 100644 --- a/libraries/google/compute/property/backendservice_cdn_policy_cache_key_policy.rb +++ b/libraries/google/compute/property/backendservice_cdn_policy_cache_key_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class BackendServiceCdnPolicyCacheKeyPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @include_host = args['includeHost'] - @include_protocol = args['includeProtocol'] - @include_query_string = args['includeQueryString'] - @query_string_blacklist = args['queryStringBlacklist'] - @query_string_whitelist = args['queryStringWhitelist'] + @include_host = args["includeHost"] + @include_protocol = args["includeProtocol"] + @include_query_string = args["includeQueryString"] + @query_string_blacklist = args["queryStringBlacklist"] + @query_string_whitelist = args["queryStringWhitelist"] end def to_s diff --git a/libraries/google/compute/property/backendservice_cdn_policy_negative_caching_policy.rb b/libraries/google/compute/property/backendservice_cdn_policy_negative_caching_policy.rb index 0e2f48f61..e14813340 100644 --- a/libraries/google/compute/property/backendservice_cdn_policy_negative_caching_policy.rb +++ b/libraries/google/compute/property/backendservice_cdn_policy_negative_caching_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class BackendServiceCdnPolicyNegativeCachingPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @code = args['code'] - @ttl = args['ttl'] + @code = args["code"] + @ttl = args["ttl"] end def to_s diff --git a/libraries/google/compute/property/backendservice_circuit_breakers.rb b/libraries/google/compute/property/backendservice_circuit_breakers.rb index 6bfbe795d..2ea9d52f1 100644 --- a/libraries/google/compute/property/backendservice_circuit_breakers.rb +++ b/libraries/google/compute/property/backendservice_circuit_breakers.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/backendservice_circuit_breakers_connect_timeout' +require "google/compute/property/backendservice_circuit_breakers_connect_timeout" module GoogleInSpec module Compute module Property @@ -33,12 +33,12 @@ class BackendServiceCircuitBreakers def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @connect_timeout = GoogleInSpec::Compute::Property::BackendServiceCircuitBreakersConnectTimeout.new(args['connectTimeout'], to_s) - @max_requests_per_connection = args['maxRequestsPerConnection'] - @max_connections = args['maxConnections'] - @max_pending_requests = args['maxPendingRequests'] - @max_requests = args['maxRequests'] - @max_retries = args['maxRetries'] + @connect_timeout = GoogleInSpec::Compute::Property::BackendServiceCircuitBreakersConnectTimeout.new(args["connectTimeout"], to_s) + @max_requests_per_connection = args["maxRequestsPerConnection"] + @max_connections = args["maxConnections"] + @max_pending_requests = args["maxPendingRequests"] + @max_requests = args["maxRequests"] + @max_retries = args["maxRetries"] end def to_s diff --git a/libraries/google/compute/property/backendservice_circuit_breakers_connect_timeout.rb b/libraries/google/compute/property/backendservice_circuit_breakers_connect_timeout.rb index e9c2a0682..389c4796e 100644 --- a/libraries/google/compute/property/backendservice_circuit_breakers_connect_timeout.rb +++ b/libraries/google/compute/property/backendservice_circuit_breakers_connect_timeout.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class BackendServiceCircuitBreakersConnectTimeout def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @seconds = args['seconds'] - @nanos = args['nanos'] + @seconds = args["seconds"] + @nanos = args["nanos"] end def to_s diff --git a/libraries/google/compute/property/backendservice_connection_draining.rb b/libraries/google/compute/property/backendservice_connection_draining.rb index 0234527a1..a33c84cd3 100644 --- a/libraries/google/compute/property/backendservice_connection_draining.rb +++ b/libraries/google/compute/property/backendservice_connection_draining.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class BackendServiceConnectionDraining def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @draining_timeout_sec = args['drainingTimeoutSec'] + @draining_timeout_sec = args["drainingTimeoutSec"] end def to_s diff --git a/libraries/google/compute/property/backendservice_consistent_hash.rb b/libraries/google/compute/property/backendservice_consistent_hash.rb index 817fb02b7..28d4a48e0 100644 --- a/libraries/google/compute/property/backendservice_consistent_hash.rb +++ b/libraries/google/compute/property/backendservice_consistent_hash.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/backendservice_consistent_hash_http_cookie' -require 'google/compute/property/backendservice_consistent_hash_http_cookie_ttl' +require "google/compute/property/backendservice_consistent_hash_http_cookie" +require "google/compute/property/backendservice_consistent_hash_http_cookie_ttl" module GoogleInSpec module Compute module Property @@ -28,9 +28,9 @@ class BackendServiceConsistentHash def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @http_cookie = GoogleInSpec::Compute::Property::BackendServiceConsistentHashHttpCookie.new(args['httpCookie'], to_s) - @http_header_name = args['httpHeaderName'] - @minimum_ring_size = args['minimumRingSize'] + @http_cookie = GoogleInSpec::Compute::Property::BackendServiceConsistentHashHttpCookie.new(args["httpCookie"], to_s) + @http_header_name = args["httpHeaderName"] + @minimum_ring_size = args["minimumRingSize"] end def to_s diff --git a/libraries/google/compute/property/backendservice_consistent_hash_http_cookie.rb b/libraries/google/compute/property/backendservice_consistent_hash_http_cookie.rb index 1bb7e11a4..d559b1f04 100644 --- a/libraries/google/compute/property/backendservice_consistent_hash_http_cookie.rb +++ b/libraries/google/compute/property/backendservice_consistent_hash_http_cookie.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/backendservice_consistent_hash_http_cookie_ttl' +require "google/compute/property/backendservice_consistent_hash_http_cookie_ttl" module GoogleInSpec module Compute module Property @@ -27,9 +27,9 @@ class BackendServiceConsistentHashHttpCookie def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @ttl = GoogleInSpec::Compute::Property::BackendServiceConsistentHashHttpCookieTtl.new(args['ttl'], to_s) - @name = args['name'] - @path = args['path'] + @ttl = GoogleInSpec::Compute::Property::BackendServiceConsistentHashHttpCookieTtl.new(args["ttl"], to_s) + @name = args["name"] + @path = args["path"] end def to_s diff --git a/libraries/google/compute/property/backendservice_consistent_hash_http_cookie_ttl.rb b/libraries/google/compute/property/backendservice_consistent_hash_http_cookie_ttl.rb index d7021d39d..09e4619b7 100644 --- a/libraries/google/compute/property/backendservice_consistent_hash_http_cookie_ttl.rb +++ b/libraries/google/compute/property/backendservice_consistent_hash_http_cookie_ttl.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class BackendServiceConsistentHashHttpCookieTtl def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @seconds = args['seconds'] - @nanos = args['nanos'] + @seconds = args["seconds"] + @nanos = args["nanos"] end def to_s diff --git a/libraries/google/compute/property/backendservice_iap.rb b/libraries/google/compute/property/backendservice_iap.rb index a45e3e2ef..766595fa8 100644 --- a/libraries/google/compute/property/backendservice_iap.rb +++ b/libraries/google/compute/property/backendservice_iap.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class BackendServiceIap def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enabled = args['enabled'] - @oauth2_client_id = args['oauth2ClientId'] - @oauth2_client_secret = args['oauth2ClientSecret'] - @oauth2_client_secret_sha256 = args['oauth2ClientSecretSha256'] + @enabled = args["enabled"] + @oauth2_client_id = args["oauth2ClientId"] + @oauth2_client_secret = args["oauth2ClientSecret"] + @oauth2_client_secret_sha256 = args["oauth2ClientSecretSha256"] end def to_s diff --git a/libraries/google/compute/property/backendservice_log_config.rb b/libraries/google/compute/property/backendservice_log_config.rb index 0c126fbd5..d19758a0e 100644 --- a/libraries/google/compute/property/backendservice_log_config.rb +++ b/libraries/google/compute/property/backendservice_log_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class BackendServiceLogConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enable = args['enable'] - @sample_rate = args['sampleRate'] + @enable = args["enable"] + @sample_rate = args["sampleRate"] end def to_s diff --git a/libraries/google/compute/property/backendservice_outlier_detection.rb b/libraries/google/compute/property/backendservice_outlier_detection.rb index a448ca293..a9812c8ce 100644 --- a/libraries/google/compute/property/backendservice_outlier_detection.rb +++ b/libraries/google/compute/property/backendservice_outlier_detection.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/backendservice_outlier_detection_base_ejection_time' -require 'google/compute/property/backendservice_outlier_detection_interval' +require "google/compute/property/backendservice_outlier_detection_base_ejection_time" +require "google/compute/property/backendservice_outlier_detection_interval" module GoogleInSpec module Compute module Property @@ -44,17 +44,17 @@ class BackendServiceOutlierDetection def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @base_ejection_time = GoogleInSpec::Compute::Property::BackendServiceOutlierDetectionBaseEjectionTime.new(args['baseEjectionTime'], to_s) - @consecutive_errors = args['consecutiveErrors'] - @consecutive_gateway_failure = args['consecutiveGatewayFailure'] - @enforcing_consecutive_errors = args['enforcingConsecutiveErrors'] - @enforcing_consecutive_gateway_failure = args['enforcingConsecutiveGatewayFailure'] - @enforcing_success_rate = args['enforcingSuccessRate'] - @interval = GoogleInSpec::Compute::Property::BackendServiceOutlierDetectionInterval.new(args['interval'], to_s) - @max_ejection_percent = args['maxEjectionPercent'] - @success_rate_minimum_hosts = args['successRateMinimumHosts'] - @success_rate_request_volume = args['successRateRequestVolume'] - @success_rate_stdev_factor = args['successRateStdevFactor'] + @base_ejection_time = GoogleInSpec::Compute::Property::BackendServiceOutlierDetectionBaseEjectionTime.new(args["baseEjectionTime"], to_s) + @consecutive_errors = args["consecutiveErrors"] + @consecutive_gateway_failure = args["consecutiveGatewayFailure"] + @enforcing_consecutive_errors = args["enforcingConsecutiveErrors"] + @enforcing_consecutive_gateway_failure = args["enforcingConsecutiveGatewayFailure"] + @enforcing_success_rate = args["enforcingSuccessRate"] + @interval = GoogleInSpec::Compute::Property::BackendServiceOutlierDetectionInterval.new(args["interval"], to_s) + @max_ejection_percent = args["maxEjectionPercent"] + @success_rate_minimum_hosts = args["successRateMinimumHosts"] + @success_rate_request_volume = args["successRateRequestVolume"] + @success_rate_stdev_factor = args["successRateStdevFactor"] end def to_s diff --git a/libraries/google/compute/property/backendservice_outlier_detection_base_ejection_time.rb b/libraries/google/compute/property/backendservice_outlier_detection_base_ejection_time.rb index bb8f62693..8bdc58c2b 100644 --- a/libraries/google/compute/property/backendservice_outlier_detection_base_ejection_time.rb +++ b/libraries/google/compute/property/backendservice_outlier_detection_base_ejection_time.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class BackendServiceOutlierDetectionBaseEjectionTime def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @seconds = args['seconds'] - @nanos = args['nanos'] + @seconds = args["seconds"] + @nanos = args["nanos"] end def to_s diff --git a/libraries/google/compute/property/backendservice_outlier_detection_interval.rb b/libraries/google/compute/property/backendservice_outlier_detection_interval.rb index 6fa8478d7..9809b7479 100644 --- a/libraries/google/compute/property/backendservice_outlier_detection_interval.rb +++ b/libraries/google/compute/property/backendservice_outlier_detection_interval.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class BackendServiceOutlierDetectionInterval def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @seconds = args['seconds'] - @nanos = args['nanos'] + @seconds = args["seconds"] + @nanos = args["nanos"] end def to_s diff --git a/libraries/google/compute/property/disk_disk_encryption_key.rb b/libraries/google/compute/property/disk_disk_encryption_key.rb index a977ddab4..b230b03b1 100644 --- a/libraries/google/compute/property/disk_disk_encryption_key.rb +++ b/libraries/google/compute/property/disk_disk_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class DiskDiskEncryptionKey def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @raw_key = args['rawKey'] - @sha256 = args['sha256'] - @kms_key_name = args['kmsKeyName'] - @kms_key_service_account = args['kmsKeyServiceAccount'] + @raw_key = args["rawKey"] + @sha256 = args["sha256"] + @kms_key_name = args["kmsKeyName"] + @kms_key_service_account = args["kmsKeyServiceAccount"] end def to_s diff --git a/libraries/google/compute/property/disk_source_image_encryption_key.rb b/libraries/google/compute/property/disk_source_image_encryption_key.rb index e52893eaa..af4ba6189 100644 --- a/libraries/google/compute/property/disk_source_image_encryption_key.rb +++ b/libraries/google/compute/property/disk_source_image_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class DiskSourceImageEncryptionKey def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @raw_key = args['rawKey'] - @sha256 = args['sha256'] - @kms_key_name = args['kmsKeyName'] - @kms_key_service_account = args['kmsKeyServiceAccount'] + @raw_key = args["rawKey"] + @sha256 = args["sha256"] + @kms_key_name = args["kmsKeyName"] + @kms_key_service_account = args["kmsKeyServiceAccount"] end def to_s diff --git a/libraries/google/compute/property/disk_source_snapshot_encryption_key.rb b/libraries/google/compute/property/disk_source_snapshot_encryption_key.rb index c4c207b3b..756fdf86d 100644 --- a/libraries/google/compute/property/disk_source_snapshot_encryption_key.rb +++ b/libraries/google/compute/property/disk_source_snapshot_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class DiskSourceSnapshotEncryptionKey def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @raw_key = args['rawKey'] - @kms_key_name = args['kmsKeyName'] - @sha256 = args['sha256'] - @kms_key_service_account = args['kmsKeyServiceAccount'] + @raw_key = args["rawKey"] + @kms_key_name = args["kmsKeyName"] + @sha256 = args["sha256"] + @kms_key_service_account = args["kmsKeyServiceAccount"] end def to_s diff --git a/libraries/google/compute/property/disktype_deprecated.rb b/libraries/google/compute/property/disktype_deprecated.rb index 67e80aaf6..72a96715d 100644 --- a/libraries/google/compute/property/disktype_deprecated.rb +++ b/libraries/google/compute/property/disktype_deprecated.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class DiskTypeDeprecated def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @deleted = parse_time_string(args['deleted']) - @deprecated = parse_time_string(args['deprecated']) - @obsolete = parse_time_string(args['obsolete']) - @replacement = args['replacement'] - @state = args['state'] + @deleted = parse_time_string(args["deleted"]) + @deprecated = parse_time_string(args["deprecated"]) + @obsolete = parse_time_string(args["obsolete"]) + @replacement = args["replacement"] + @state = args["state"] end def to_s diff --git a/libraries/google/compute/property/externalvpngateway_interfaces.rb b/libraries/google/compute/property/externalvpngateway_interfaces.rb index 52994b688..d25aa1a2c 100644 --- a/libraries/google/compute/property/externalvpngateway_interfaces.rb +++ b/libraries/google/compute/property/externalvpngateway_interfaces.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ExternalVpnGatewayInterfaces def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @id = args['id'] - @ip_address = args['ipAddress'] + @id = args["id"] + @ip_address = args["ipAddress"] end def to_s diff --git a/libraries/google/compute/property/firewall_allowed.rb b/libraries/google/compute/property/firewall_allowed.rb index c6066e0ee..8358a2526 100644 --- a/libraries/google/compute/property/firewall_allowed.rb +++ b/libraries/google/compute/property/firewall_allowed.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class FirewallAllowed def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @ip_protocol = args['IPProtocol'] - @ports = args['ports'] + @ip_protocol = args["IPProtocol"] + @ports = args["ports"] end def to_s diff --git a/libraries/google/compute/property/firewall_denied.rb b/libraries/google/compute/property/firewall_denied.rb index 71fcf3dc0..eb4bf2762 100644 --- a/libraries/google/compute/property/firewall_denied.rb +++ b/libraries/google/compute/property/firewall_denied.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class FirewallDenied def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @ip_protocol = args['IPProtocol'] - @ports = args['ports'] + @ip_protocol = args["IPProtocol"] + @ports = args["ports"] end def to_s diff --git a/libraries/google/compute/property/firewall_log_config.rb b/libraries/google/compute/property/firewall_log_config.rb index b259f059d..27ee2f978 100644 --- a/libraries/google/compute/property/firewall_log_config.rb +++ b/libraries/google/compute/property/firewall_log_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class FirewallLogConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enable = args['enable'] - @metadata = args['metadata'] + @enable = args["enable"] + @metadata = args["metadata"] end def to_s diff --git a/libraries/google/compute/property/globalforwardingrule_metadata_filters.rb b/libraries/google/compute/property/globalforwardingrule_metadata_filters.rb index e3b3a4c11..c4bf89065 100644 --- a/libraries/google/compute/property/globalforwardingrule_metadata_filters.rb +++ b/libraries/google/compute/property/globalforwardingrule_metadata_filters.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/globalforwardingrule_metadata_filters_filter_labels' +require "google/compute/property/globalforwardingrule_metadata_filters_filter_labels" module GoogleInSpec module Compute module Property @@ -25,8 +25,8 @@ class GlobalForwardingRuleMetadataFilters def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @filter_match_criteria = args['filterMatchCriteria'] - @filter_labels = GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersFilterLabelsArray.parse(args['filterLabels'], to_s) + @filter_match_criteria = args["filterMatchCriteria"] + @filter_labels = GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersFilterLabelsArray.parse(args["filterLabels"], to_s) end def to_s diff --git a/libraries/google/compute/property/globalforwardingrule_metadata_filters_filter_labels.rb b/libraries/google/compute/property/globalforwardingrule_metadata_filters_filter_labels.rb index b926a3575..83f1adacc 100644 --- a/libraries/google/compute/property/globalforwardingrule_metadata_filters_filter_labels.rb +++ b/libraries/google/compute/property/globalforwardingrule_metadata_filters_filter_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class GlobalForwardingRuleMetadataFiltersFilterLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @value = args['value'] + @name = args["name"] + @value = args["value"] end def to_s diff --git a/libraries/google/compute/property/healthcheck_grpc_health_check.rb b/libraries/google/compute/property/healthcheck_grpc_health_check.rb index 4eeceb2ed..13ce0d5f6 100644 --- a/libraries/google/compute/property/healthcheck_grpc_health_check.rb +++ b/libraries/google/compute/property/healthcheck_grpc_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class HealthCheckGrpcHealthCheck def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @port = args['port'] - @port_name = args['portName'] - @port_specification = args['portSpecification'] - @grpc_service_name = args['grpcServiceName'] + @port = args["port"] + @port_name = args["portName"] + @port_specification = args["portSpecification"] + @grpc_service_name = args["grpcServiceName"] end def to_s diff --git a/libraries/google/compute/property/healthcheck_http2_health_check.rb b/libraries/google/compute/property/healthcheck_http2_health_check.rb index d2074c094..3eb868b9a 100644 --- a/libraries/google/compute/property/healthcheck_http2_health_check.rb +++ b/libraries/google/compute/property/healthcheck_http2_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -34,13 +34,13 @@ class HealthCheckHttp2HealthCheck def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @host = args['host'] - @request_path = args['requestPath'] - @response = args['response'] - @port = args['port'] - @port_name = args['portName'] - @proxy_header = args['proxyHeader'] - @port_specification = args['portSpecification'] + @host = args["host"] + @request_path = args["requestPath"] + @response = args["response"] + @port = args["port"] + @port_name = args["portName"] + @proxy_header = args["proxyHeader"] + @port_specification = args["portSpecification"] end def to_s diff --git a/libraries/google/compute/property/healthcheck_http_health_check.rb b/libraries/google/compute/property/healthcheck_http_health_check.rb index 65337c7e8..9d6b0ba15 100644 --- a/libraries/google/compute/property/healthcheck_http_health_check.rb +++ b/libraries/google/compute/property/healthcheck_http_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -34,13 +34,13 @@ class HealthCheckHttpHealthCheck def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @host = args['host'] - @request_path = args['requestPath'] - @response = args['response'] - @port = args['port'] - @port_name = args['portName'] - @proxy_header = args['proxyHeader'] - @port_specification = args['portSpecification'] + @host = args["host"] + @request_path = args["requestPath"] + @response = args["response"] + @port = args["port"] + @port_name = args["portName"] + @proxy_header = args["proxyHeader"] + @port_specification = args["portSpecification"] end def to_s diff --git a/libraries/google/compute/property/healthcheck_https_health_check.rb b/libraries/google/compute/property/healthcheck_https_health_check.rb index 6a0b94fd3..1a97ade4a 100644 --- a/libraries/google/compute/property/healthcheck_https_health_check.rb +++ b/libraries/google/compute/property/healthcheck_https_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -34,13 +34,13 @@ class HealthCheckHttpsHealthCheck def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @host = args['host'] - @request_path = args['requestPath'] - @response = args['response'] - @port = args['port'] - @port_name = args['portName'] - @proxy_header = args['proxyHeader'] - @port_specification = args['portSpecification'] + @host = args["host"] + @request_path = args["requestPath"] + @response = args["response"] + @port = args["port"] + @port_name = args["portName"] + @proxy_header = args["proxyHeader"] + @port_specification = args["portSpecification"] end def to_s diff --git a/libraries/google/compute/property/healthcheck_log_config.rb b/libraries/google/compute/property/healthcheck_log_config.rb index 4b71157d8..b15bbc1f8 100644 --- a/libraries/google/compute/property/healthcheck_log_config.rb +++ b/libraries/google/compute/property/healthcheck_log_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class HealthCheckLogConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enable = args['enable'] + @enable = args["enable"] end def to_s diff --git a/libraries/google/compute/property/healthcheck_ssl_health_check.rb b/libraries/google/compute/property/healthcheck_ssl_health_check.rb index cf8783442..2e5e4789b 100644 --- a/libraries/google/compute/property/healthcheck_ssl_health_check.rb +++ b/libraries/google/compute/property/healthcheck_ssl_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -32,12 +32,12 @@ class HealthCheckSslHealthCheck def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @request = args['request'] - @response = args['response'] - @port = args['port'] - @port_name = args['portName'] - @proxy_header = args['proxyHeader'] - @port_specification = args['portSpecification'] + @request = args["request"] + @response = args["response"] + @port = args["port"] + @port_name = args["portName"] + @proxy_header = args["proxyHeader"] + @port_specification = args["portSpecification"] end def to_s diff --git a/libraries/google/compute/property/healthcheck_tcp_health_check.rb b/libraries/google/compute/property/healthcheck_tcp_health_check.rb index dedbebbb7..340ec2de2 100644 --- a/libraries/google/compute/property/healthcheck_tcp_health_check.rb +++ b/libraries/google/compute/property/healthcheck_tcp_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -32,12 +32,12 @@ class HealthCheckTcpHealthCheck def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @request = args['request'] - @response = args['response'] - @port = args['port'] - @port_name = args['portName'] - @proxy_header = args['proxyHeader'] - @port_specification = args['portSpecification'] + @request = args["request"] + @response = args["response"] + @port = args["port"] + @port_name = args["portName"] + @proxy_header = args["proxyHeader"] + @port_specification = args["portSpecification"] end def to_s diff --git a/libraries/google/compute/property/image_deprecated.rb b/libraries/google/compute/property/image_deprecated.rb index d1142499c..6731bcc21 100644 --- a/libraries/google/compute/property/image_deprecated.rb +++ b/libraries/google/compute/property/image_deprecated.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class ImageDeprecated def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @deleted = parse_time_string(args['deleted']) - @deprecated = parse_time_string(args['deprecated']) - @obsolete = parse_time_string(args['obsolete']) - @replacement = args['replacement'] - @state = args['state'] + @deleted = parse_time_string(args["deleted"]) + @deprecated = parse_time_string(args["deprecated"]) + @obsolete = parse_time_string(args["obsolete"]) + @replacement = args["replacement"] + @state = args["state"] end def to_s diff --git a/libraries/google/compute/property/image_guest_os_features.rb b/libraries/google/compute/property/image_guest_os_features.rb index addb3cd29..730db5cdf 100644 --- a/libraries/google/compute/property/image_guest_os_features.rb +++ b/libraries/google/compute/property/image_guest_os_features.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ImageGuestOsFeatures def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @type = args['type'] + @type = args["type"] end def to_s diff --git a/libraries/google/compute/property/image_image_encryption_key.rb b/libraries/google/compute/property/image_image_encryption_key.rb index b83ed01ab..14405b371 100644 --- a/libraries/google/compute/property/image_image_encryption_key.rb +++ b/libraries/google/compute/property/image_image_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ImageImageEncryptionKey def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @raw_key = args['rawKey'] - @sha256 = args['sha256'] - @kms_key_name = args['kmsKeyName'] + @raw_key = args["rawKey"] + @sha256 = args["sha256"] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/compute/property/image_raw_disk.rb b/libraries/google/compute/property/image_raw_disk.rb index dd03fd93d..dc59316e7 100644 --- a/libraries/google/compute/property/image_raw_disk.rb +++ b/libraries/google/compute/property/image_raw_disk.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ImageRawDisk def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @container_type = args['containerType'] - @sha1_checksum = args['sha1Checksum'] - @source = args['source'] + @container_type = args["containerType"] + @sha1_checksum = args["sha1Checksum"] + @source = args["source"] end def to_s diff --git a/libraries/google/compute/property/image_source_disk_encryption_key.rb b/libraries/google/compute/property/image_source_disk_encryption_key.rb index c93af7d7e..b7e84ba97 100644 --- a/libraries/google/compute/property/image_source_disk_encryption_key.rb +++ b/libraries/google/compute/property/image_source_disk_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ImageSourceDiskEncryptionKey def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @raw_key = args['rawKey'] - @sha256 = args['sha256'] - @kms_key_name = args['kmsKeyName'] + @raw_key = args["rawKey"] + @sha256 = args["sha256"] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/compute/property/imagefamilyview_image.rb b/libraries/google/compute/property/imagefamilyview_image.rb index ff6257d9e..00cf7d7ff 100644 --- a/libraries/google/compute/property/imagefamilyview_image.rb +++ b/libraries/google/compute/property/imagefamilyview_image.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/imagefamilyview_image_deprecated' -require 'google/compute/property/imagefamilyview_image_image_encryption_key' -require 'google/compute/property/imagefamilyview_image_raw_disk' -require 'google/compute/property/imagefamilyview_image_source_disk_encryption_key' -require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key' -require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbs' -require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbxs' -require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_keks' -require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_pk' +require "google/compute/property/imagefamilyview_image_deprecated" +require "google/compute/property/imagefamilyview_image_image_encryption_key" +require "google/compute/property/imagefamilyview_image_raw_disk" +require "google/compute/property/imagefamilyview_image_source_disk_encryption_key" +require "google/compute/property/imagefamilyview_image_source_snapshot_encryption_key" +require "google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbs" +require "google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbxs" +require "google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_keks" +require "google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_pk" module GoogleInSpec module Compute module Property @@ -65,24 +65,24 @@ class ImageFamilyViewImage def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @creation_timestamp = parse_time_string(args['creationTimestamp']) - @description = args['description'] - @id = args['id'] - @name = args['name'] - @source_type = args['sourceType'] - @deprecated = GoogleInSpec::Compute::Property::ImageFamilyViewImageDeprecated.new(args['deprecated'], to_s) - @raw_disk = GoogleInSpec::Compute::Property::ImageFamilyViewImageRawDisk.new(args['rawDisk'], to_s) - @status = args['status'] - @archive_size_bytes = args['archiveSizeBytes'] - @disk_size_gb = args['diskSizeGb'] - @source_disk = args['sourceDisk'] - @source_disk_id = args['sourceDiskId'] - @licenses = args['licenses'] - @storage_locations = args['storageLocations'] - @family = args['family'] - @image_encryption_key = GoogleInSpec::Compute::Property::ImageFamilyViewImageImageEncryptionKey.new(args['imageEncryptionKey'], to_s) - @source_disk_encryption_key = GoogleInSpec::Compute::Property::ImageFamilyViewImageSourceDiskEncryptionKey.new(args['sourceDiskEncryptionKey'], to_s) - @source_snapshot_encryption_key = GoogleInSpec::Compute::Property::ImageFamilyViewImageSourceSnapshotEncryptionKey.new(args['sourceSnapshotEncryptionKey'], to_s) + @creation_timestamp = parse_time_string(args["creationTimestamp"]) + @description = args["description"] + @id = args["id"] + @name = args["name"] + @source_type = args["sourceType"] + @deprecated = GoogleInSpec::Compute::Property::ImageFamilyViewImageDeprecated.new(args["deprecated"], to_s) + @raw_disk = GoogleInSpec::Compute::Property::ImageFamilyViewImageRawDisk.new(args["rawDisk"], to_s) + @status = args["status"] + @archive_size_bytes = args["archiveSizeBytes"] + @disk_size_gb = args["diskSizeGb"] + @source_disk = args["sourceDisk"] + @source_disk_id = args["sourceDiskId"] + @licenses = args["licenses"] + @storage_locations = args["storageLocations"] + @family = args["family"] + @image_encryption_key = GoogleInSpec::Compute::Property::ImageFamilyViewImageImageEncryptionKey.new(args["imageEncryptionKey"], to_s) + @source_disk_encryption_key = GoogleInSpec::Compute::Property::ImageFamilyViewImageSourceDiskEncryptionKey.new(args["sourceDiskEncryptionKey"], to_s) + @source_snapshot_encryption_key = GoogleInSpec::Compute::Property::ImageFamilyViewImageSourceSnapshotEncryptionKey.new(args["sourceSnapshotEncryptionKey"], to_s) end def to_s diff --git a/libraries/google/compute/property/imagefamilyview_image_deprecated.rb b/libraries/google/compute/property/imagefamilyview_image_deprecated.rb index 8ab778c58..2653027dc 100644 --- a/libraries/google/compute/property/imagefamilyview_image_deprecated.rb +++ b/libraries/google/compute/property/imagefamilyview_image_deprecated.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class ImageFamilyViewImageDeprecated def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @deleted = parse_time_string(args['deleted']) - @deprecated = parse_time_string(args['deprecated']) - @obsolete = parse_time_string(args['obsolete']) - @replacement = args['replacement'] - @state = args['state'] + @deleted = parse_time_string(args["deleted"]) + @deprecated = parse_time_string(args["deprecated"]) + @obsolete = parse_time_string(args["obsolete"]) + @replacement = args["replacement"] + @state = args["state"] end def to_s diff --git a/libraries/google/compute/property/imagefamilyview_image_image_encryption_key.rb b/libraries/google/compute/property/imagefamilyview_image_image_encryption_key.rb index 6410c1800..6a233e7aa 100644 --- a/libraries/google/compute/property/imagefamilyview_image_image_encryption_key.rb +++ b/libraries/google/compute/property/imagefamilyview_image_image_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class ImageFamilyViewImageImageEncryptionKey def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @sha256 = args['sha256'] - @kms_key_service_account = args['kmsKeyServiceAccount'] - @raw_key = args['rawKey'] - @rsa_encrypted_key = args['rsaEncryptedKey'] - @kms_key_name = args['kmsKeyName'] + @sha256 = args["sha256"] + @kms_key_service_account = args["kmsKeyServiceAccount"] + @raw_key = args["rawKey"] + @rsa_encrypted_key = args["rsaEncryptedKey"] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/compute/property/imagefamilyview_image_raw_disk.rb b/libraries/google/compute/property/imagefamilyview_image_raw_disk.rb index a67e90f44..258044eac 100644 --- a/libraries/google/compute/property/imagefamilyview_image_raw_disk.rb +++ b/libraries/google/compute/property/imagefamilyview_image_raw_disk.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ImageFamilyViewImageRawDisk def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @source = args['source'] - @sha1_checksum = args['sha1Checksum'] - @container_type = args['containerType'] + @source = args["source"] + @sha1_checksum = args["sha1Checksum"] + @container_type = args["containerType"] end def to_s diff --git a/libraries/google/compute/property/imagefamilyview_image_source_disk_encryption_key.rb b/libraries/google/compute/property/imagefamilyview_image_source_disk_encryption_key.rb index 3029fff27..2621bb241 100644 --- a/libraries/google/compute/property/imagefamilyview_image_source_disk_encryption_key.rb +++ b/libraries/google/compute/property/imagefamilyview_image_source_disk_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class ImageFamilyViewImageSourceDiskEncryptionKey def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @sha256 = args['sha256'] - @kms_key_service_account = args['kmsKeyServiceAccount'] - @raw_key = args['rawKey'] - @rsa_encrypted_key = args['rsaEncryptedKey'] - @kms_key_name = args['kmsKeyName'] + @sha256 = args["sha256"] + @kms_key_service_account = args["kmsKeyServiceAccount"] + @raw_key = args["rawKey"] + @rsa_encrypted_key = args["rsaEncryptedKey"] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key.rb b/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key.rb index 2b1d1098c..6111dca38 100644 --- a/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key.rb +++ b/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbs' -require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbxs' -require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_keks' -require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_pk' +require "google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbs" +require "google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbxs" +require "google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_keks" +require "google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_pk" module GoogleInSpec module Compute module Property @@ -32,10 +32,10 @@ class ImageFamilyViewImageSourceSnapshotEncryptionKey def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @pk = GoogleInSpec::Compute::Property::ImageFamilyViewImageSourceSnapshotEncryptionKeyPk.new(args['pk'], to_s) - @keks = GoogleInSpec::Compute::Property::ImageFamilyViewImageSourceSnapshotEncryptionKeyKeksArray.parse(args['keks'], to_s) - @dbs = GoogleInSpec::Compute::Property::ImageFamilyViewImageSourceSnapshotEncryptionKeyDbsArray.parse(args['dbs'], to_s) - @dbxs = GoogleInSpec::Compute::Property::ImageFamilyViewImageSourceSnapshotEncryptionKeyDbxsArray.parse(args['dbxs'], to_s) + @pk = GoogleInSpec::Compute::Property::ImageFamilyViewImageSourceSnapshotEncryptionKeyPk.new(args["pk"], to_s) + @keks = GoogleInSpec::Compute::Property::ImageFamilyViewImageSourceSnapshotEncryptionKeyKeksArray.parse(args["keks"], to_s) + @dbs = GoogleInSpec::Compute::Property::ImageFamilyViewImageSourceSnapshotEncryptionKeyDbsArray.parse(args["dbs"], to_s) + @dbxs = GoogleInSpec::Compute::Property::ImageFamilyViewImageSourceSnapshotEncryptionKeyDbxsArray.parse(args["dbxs"], to_s) end def to_s diff --git a/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbs.rb b/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbs.rb index 69ee8c62c..df236b0e1 100644 --- a/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbs.rb +++ b/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ImageFamilyViewImageSourceSnapshotEncryptionKeyDbs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @content = args['content'] - @file_type = args['fileType'] + @content = args["content"] + @file_type = args["fileType"] end def to_s diff --git a/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbxs.rb b/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbxs.rb index 4be339a87..d29e02006 100644 --- a/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbxs.rb +++ b/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbxs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ImageFamilyViewImageSourceSnapshotEncryptionKeyDbxs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @content = args['content'] - @file_type = args['fileType'] + @content = args["content"] + @file_type = args["fileType"] end def to_s diff --git a/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_keks.rb b/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_keks.rb index 9875d3952..46d5288f2 100644 --- a/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_keks.rb +++ b/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_keks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ImageFamilyViewImageSourceSnapshotEncryptionKeyKeks def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @content = args['content'] - @file_type = args['fileType'] + @content = args["content"] + @file_type = args["fileType"] end def to_s diff --git a/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_pk.rb b/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_pk.rb index 4b74b1977..764c4315e 100644 --- a/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_pk.rb +++ b/libraries/google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_pk.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ImageFamilyViewImageSourceSnapshotEncryptionKeyPk def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @content = args['content'] - @file_type = args['fileType'] + @content = args["content"] + @file_type = args["fileType"] end def to_s diff --git a/libraries/google/compute/property/instance_disks.rb b/libraries/google/compute/property/instance_disks.rb index b1c5e159e..eb2009a50 100644 --- a/libraries/google/compute/property/instance_disks.rb +++ b/libraries/google/compute/property/instance_disks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/instance_disks_disk_encryption_key' -require 'google/compute/property/instance_disks_initialize_params' -require 'google/compute/property/instance_disks_initialize_params_source_image_encryption_key' +require "google/compute/property/instance_disks_disk_encryption_key" +require "google/compute/property/instance_disks_initialize_params" +require "google/compute/property/instance_disks_initialize_params_source_image_encryption_key" module GoogleInSpec module Compute module Property @@ -45,17 +45,17 @@ class InstanceDisks def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @auto_delete = args['autoDelete'] - @boot = args['boot'] - @device_name = args['deviceName'] - @disk_encryption_key = GoogleInSpec::Compute::Property::InstanceDisksDiskEncryptionKey.new(args['diskEncryptionKey'], to_s) - @index = args['index'] - @initialize_params = GoogleInSpec::Compute::Property::InstanceDisksInitializeParams.new(args['initializeParams'], to_s) - @interface = args['interface'] - @mode = args['mode'] - @source = args['source'] - @type = args['type'] - @licenses = args['licenses'] + @auto_delete = args["autoDelete"] + @boot = args["boot"] + @device_name = args["deviceName"] + @disk_encryption_key = GoogleInSpec::Compute::Property::InstanceDisksDiskEncryptionKey.new(args["diskEncryptionKey"], to_s) + @index = args["index"] + @initialize_params = GoogleInSpec::Compute::Property::InstanceDisksInitializeParams.new(args["initializeParams"], to_s) + @interface = args["interface"] + @mode = args["mode"] + @source = args["source"] + @type = args["type"] + @licenses = args["licenses"] end def to_s diff --git a/libraries/google/compute/property/instance_disks_disk_encryption_key.rb b/libraries/google/compute/property/instance_disks_disk_encryption_key.rb index 86021f08a..b96c90eae 100644 --- a/libraries/google/compute/property/instance_disks_disk_encryption_key.rb +++ b/libraries/google/compute/property/instance_disks_disk_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class InstanceDisksDiskEncryptionKey def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @raw_key = args['rawKey'] - @rsa_encrypted_key = args['rsaEncryptedKey'] - @sha256 = args['sha256'] + @raw_key = args["rawKey"] + @rsa_encrypted_key = args["rsaEncryptedKey"] + @sha256 = args["sha256"] end def to_s diff --git a/libraries/google/compute/property/instance_disks_initialize_params.rb b/libraries/google/compute/property/instance_disks_initialize_params.rb index 5e0063a3b..d68cc51d7 100644 --- a/libraries/google/compute/property/instance_disks_initialize_params.rb +++ b/libraries/google/compute/property/instance_disks_initialize_params.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/instance_disks_initialize_params_source_image_encryption_key' +require "google/compute/property/instance_disks_initialize_params_source_image_encryption_key" module GoogleInSpec module Compute module Property @@ -31,11 +31,11 @@ class InstanceDisksInitializeParams def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @disk_name = args['diskName'] - @disk_size_gb = args['diskSizeGb'] - @disk_type = args['diskType'] - @source_image = args['sourceImage'] - @source_image_encryption_key = GoogleInSpec::Compute::Property::InstanceDisksInitializeParamsSourceImageEncryptionKey.new(args['sourceImageEncryptionKey'], to_s) + @disk_name = args["diskName"] + @disk_size_gb = args["diskSizeGb"] + @disk_type = args["diskType"] + @source_image = args["sourceImage"] + @source_image_encryption_key = GoogleInSpec::Compute::Property::InstanceDisksInitializeParamsSourceImageEncryptionKey.new(args["sourceImageEncryptionKey"], to_s) end def to_s diff --git a/libraries/google/compute/property/instance_disks_initialize_params_source_image_encryption_key.rb b/libraries/google/compute/property/instance_disks_initialize_params_source_image_encryption_key.rb index 29d930a69..7b4e1fc4d 100644 --- a/libraries/google/compute/property/instance_disks_initialize_params_source_image_encryption_key.rb +++ b/libraries/google/compute/property/instance_disks_initialize_params_source_image_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InstanceDisksInitializeParamsSourceImageEncryptionKey def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @raw_key = args['rawKey'] - @sha256 = args['sha256'] + @raw_key = args["rawKey"] + @sha256 = args["sha256"] end def to_s diff --git a/libraries/google/compute/property/instance_guest_accelerators.rb b/libraries/google/compute/property/instance_guest_accelerators.rb index c63aea6d4..f73f54b25 100644 --- a/libraries/google/compute/property/instance_guest_accelerators.rb +++ b/libraries/google/compute/property/instance_guest_accelerators.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InstanceGuestAccelerators def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @accelerator_count = args['acceleratorCount'] - @accelerator_type = args['acceleratorType'] + @accelerator_count = args["acceleratorCount"] + @accelerator_type = args["acceleratorType"] end def to_s diff --git a/libraries/google/compute/property/instance_network_interfaces.rb b/libraries/google/compute/property/instance_network_interfaces.rb index 3c1e369af..4966794e3 100644 --- a/libraries/google/compute/property/instance_network_interfaces.rb +++ b/libraries/google/compute/property/instance_network_interfaces.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/instance_network_interfaces_access_configs' -require 'google/compute/property/instance_network_interfaces_alias_ip_ranges' +require "google/compute/property/instance_network_interfaces_access_configs" +require "google/compute/property/instance_network_interfaces_alias_ip_ranges" module GoogleInSpec module Compute module Property @@ -34,12 +34,12 @@ class InstanceNetworkInterfaces def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @access_configs = GoogleInSpec::Compute::Property::InstanceNetworkInterfacesAccessConfigsArray.parse(args['accessConfigs'], to_s) - @alias_ip_ranges = GoogleInSpec::Compute::Property::InstanceNetworkInterfacesAliasIpRangesArray.parse(args['aliasIpRanges'], to_s) - @name = args['name'] - @network = args['network'] - @network_ip = args['networkIP'] - @subnetwork = args['subnetwork'] + @access_configs = GoogleInSpec::Compute::Property::InstanceNetworkInterfacesAccessConfigsArray.parse(args["accessConfigs"], to_s) + @alias_ip_ranges = GoogleInSpec::Compute::Property::InstanceNetworkInterfacesAliasIpRangesArray.parse(args["aliasIpRanges"], to_s) + @name = args["name"] + @network = args["network"] + @network_ip = args["networkIP"] + @subnetwork = args["subnetwork"] end def to_s diff --git a/libraries/google/compute/property/instance_network_interfaces_access_configs.rb b/libraries/google/compute/property/instance_network_interfaces_access_configs.rb index e96d335ef..9245151aa 100644 --- a/libraries/google/compute/property/instance_network_interfaces_access_configs.rb +++ b/libraries/google/compute/property/instance_network_interfaces_access_configs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -32,12 +32,12 @@ class InstanceNetworkInterfacesAccessConfigs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @nat_ip = args['natIP'] - @type = args['type'] - @set_public_ptr = args['setPublicPtr'] - @public_ptr_domain_name = args['publicPtrDomainName'] - @network_tier = args['networkTier'] + @name = args["name"] + @nat_ip = args["natIP"] + @type = args["type"] + @set_public_ptr = args["setPublicPtr"] + @public_ptr_domain_name = args["publicPtrDomainName"] + @network_tier = args["networkTier"] end def to_s diff --git a/libraries/google/compute/property/instance_network_interfaces_alias_ip_ranges.rb b/libraries/google/compute/property/instance_network_interfaces_alias_ip_ranges.rb index c01437d10..6e120da1f 100644 --- a/libraries/google/compute/property/instance_network_interfaces_alias_ip_ranges.rb +++ b/libraries/google/compute/property/instance_network_interfaces_alias_ip_ranges.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InstanceNetworkInterfacesAliasIpRanges def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @ip_cidr_range = args['ipCidrRange'] - @subnetwork_range_name = args['subnetworkRangeName'] + @ip_cidr_range = args["ipCidrRange"] + @subnetwork_range_name = args["subnetworkRangeName"] end def to_s diff --git a/libraries/google/compute/property/instance_scheduling.rb b/libraries/google/compute/property/instance_scheduling.rb index 8526447cd..5c799d239 100644 --- a/libraries/google/compute/property/instance_scheduling.rb +++ b/libraries/google/compute/property/instance_scheduling.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class InstanceScheduling def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @automatic_restart = args['automaticRestart'] - @on_host_maintenance = args['onHostMaintenance'] - @preemptible = args['preemptible'] + @automatic_restart = args["automaticRestart"] + @on_host_maintenance = args["onHostMaintenance"] + @preemptible = args["preemptible"] end def to_s diff --git a/libraries/google/compute/property/instance_service_accounts.rb b/libraries/google/compute/property/instance_service_accounts.rb index 65b209e0a..27cc69deb 100644 --- a/libraries/google/compute/property/instance_service_accounts.rb +++ b/libraries/google/compute/property/instance_service_accounts.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InstanceServiceAccounts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @email = args['email'] - @scopes = args['scopes'] + @email = args["email"] + @scopes = args["scopes"] end def to_s diff --git a/libraries/google/compute/property/instance_shielded_instance_config.rb b/libraries/google/compute/property/instance_shielded_instance_config.rb index 1bb36fbcf..2a5569413 100644 --- a/libraries/google/compute/property/instance_shielded_instance_config.rb +++ b/libraries/google/compute/property/instance_shielded_instance_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class InstanceShieldedInstanceConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enable_secure_boot = args['enableSecureBoot'] - @enable_vtpm = args['enableVtpm'] - @enable_integrity_monitoring = args['enableIntegrityMonitoring'] + @enable_secure_boot = args["enableSecureBoot"] + @enable_vtpm = args["enableVtpm"] + @enable_integrity_monitoring = args["enableIntegrityMonitoring"] end def to_s diff --git a/libraries/google/compute/property/instance_tags.rb b/libraries/google/compute/property/instance_tags.rb index 19707eab9..5cce843cd 100644 --- a/libraries/google/compute/property/instance_tags.rb +++ b/libraries/google/compute/property/instance_tags.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InstanceTags def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @fingerprint = args['fingerprint'] - @items = args['items'] + @fingerprint = args["fingerprint"] + @items = args["items"] end def to_s diff --git a/libraries/google/compute/property/instancegroup_named_ports.rb b/libraries/google/compute/property/instancegroup_named_ports.rb index 35ca95554..08fc74cdf 100644 --- a/libraries/google/compute/property/instancegroup_named_ports.rb +++ b/libraries/google/compute/property/instancegroup_named_ports.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InstanceGroupNamedPorts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @port = args['port'] + @name = args["name"] + @port = args["port"] end def to_s diff --git a/libraries/google/compute/property/instancegroupmanager_current_actions.rb b/libraries/google/compute/property/instancegroupmanager_current_actions.rb index b4e766866..c49798eae 100644 --- a/libraries/google/compute/property/instancegroupmanager_current_actions.rb +++ b/libraries/google/compute/property/instancegroupmanager_current_actions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -36,14 +36,14 @@ class InstanceGroupManagerCurrentActions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @abandoning = args['abandoning'] - @creating = args['creating'] - @creating_without_retries = args['creatingWithoutRetries'] - @deleting = args['deleting'] - @none = args['none'] - @recreating = args['recreating'] - @refreshing = args['refreshing'] - @restarting = args['restarting'] + @abandoning = args["abandoning"] + @creating = args["creating"] + @creating_without_retries = args["creatingWithoutRetries"] + @deleting = args["deleting"] + @none = args["none"] + @recreating = args["recreating"] + @refreshing = args["refreshing"] + @restarting = args["restarting"] end def to_s diff --git a/libraries/google/compute/property/instancegroupmanager_named_ports.rb b/libraries/google/compute/property/instancegroupmanager_named_ports.rb index 1482a38f7..cfe1a37e6 100644 --- a/libraries/google/compute/property/instancegroupmanager_named_ports.rb +++ b/libraries/google/compute/property/instancegroupmanager_named_ports.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InstanceGroupManagerNamedPorts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @port = args['port'] + @name = args["name"] + @port = args["port"] end def to_s diff --git a/libraries/google/compute/property/instancetemplate_properties.rb b/libraries/google/compute/property/instancetemplate_properties.rb index 347a8c0f9..59d779375 100644 --- a/libraries/google/compute/property/instancetemplate_properties.rb +++ b/libraries/google/compute/property/instancetemplate_properties.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,12 +13,12 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/instancetemplate_properties_disks' -require 'google/compute/property/instancetemplate_properties_guest_accelerators' -require 'google/compute/property/instancetemplate_properties_network_interfaces' -require 'google/compute/property/instancetemplate_properties_scheduling' -require 'google/compute/property/instancetemplate_properties_service_accounts' -require 'google/compute/property/instancetemplate_properties_tags' +require "google/compute/property/instancetemplate_properties_disks" +require "google/compute/property/instancetemplate_properties_guest_accelerators" +require "google/compute/property/instancetemplate_properties_network_interfaces" +require "google/compute/property/instancetemplate_properties_scheduling" +require "google/compute/property/instancetemplate_properties_service_accounts" +require "google/compute/property/instancetemplate_properties_tags" module GoogleInSpec module Compute module Property @@ -50,18 +50,18 @@ class InstanceTemplateProperties def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @can_ip_forward = args['canIpForward'] - @description = args['description'] - @disks = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksArray.parse(args['disks'], to_s) - @labels = args['labels'] - @machine_type = args['machineType'] - @min_cpu_platform = args['minCpuPlatform'] - @metadata = args['metadata'] - @guest_accelerators = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesGuestAcceleratorsArray.parse(args['guestAccelerators'], to_s) - @network_interfaces = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesNetworkInterfacesArray.parse(args['networkInterfaces'], to_s) - @scheduling = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesScheduling.new(args['scheduling'], to_s) - @service_accounts = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesServiceAccountsArray.parse(args['serviceAccounts'], to_s) - @tags = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesTags.new(args['tags'], to_s) + @can_ip_forward = args["canIpForward"] + @description = args["description"] + @disks = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksArray.parse(args["disks"], to_s) + @labels = args["labels"] + @machine_type = args["machineType"] + @min_cpu_platform = args["minCpuPlatform"] + @metadata = args["metadata"] + @guest_accelerators = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesGuestAcceleratorsArray.parse(args["guestAccelerators"], to_s) + @network_interfaces = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesNetworkInterfacesArray.parse(args["networkInterfaces"], to_s) + @scheduling = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesScheduling.new(args["scheduling"], to_s) + @service_accounts = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesServiceAccountsArray.parse(args["serviceAccounts"], to_s) + @tags = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesTags.new(args["tags"], to_s) end def to_s diff --git a/libraries/google/compute/property/instancetemplate_properties_disks.rb b/libraries/google/compute/property/instancetemplate_properties_disks.rb index 8e71e0512..6bc18d97f 100644 --- a/libraries/google/compute/property/instancetemplate_properties_disks.rb +++ b/libraries/google/compute/property/instancetemplate_properties_disks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/instancetemplate_properties_disks_disk_encryption_key' -require 'google/compute/property/instancetemplate_properties_disks_initialize_params' -require 'google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key' +require "google/compute/property/instancetemplate_properties_disks_disk_encryption_key" +require "google/compute/property/instancetemplate_properties_disks_initialize_params" +require "google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key" module GoogleInSpec module Compute module Property @@ -45,17 +45,17 @@ class InstanceTemplatePropertiesDisks def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @licenses = args['licenses'] - @auto_delete = args['autoDelete'] - @boot = args['boot'] - @device_name = args['deviceName'] - @disk_encryption_key = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksDiskEncryptionKey.new(args['diskEncryptionKey'], to_s) - @index = args['index'] - @initialize_params = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksInitializeParams.new(args['initializeParams'], to_s) - @interface = args['interface'] - @mode = args['mode'] - @source = args['source'] - @type = args['type'] + @licenses = args["licenses"] + @auto_delete = args["autoDelete"] + @boot = args["boot"] + @device_name = args["deviceName"] + @disk_encryption_key = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksDiskEncryptionKey.new(args["diskEncryptionKey"], to_s) + @index = args["index"] + @initialize_params = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksInitializeParams.new(args["initializeParams"], to_s) + @interface = args["interface"] + @mode = args["mode"] + @source = args["source"] + @type = args["type"] end def to_s diff --git a/libraries/google/compute/property/instancetemplate_properties_disks_disk_encryption_key.rb b/libraries/google/compute/property/instancetemplate_properties_disks_disk_encryption_key.rb index bcf9c8f6f..8ed29a2bf 100644 --- a/libraries/google/compute/property/instancetemplate_properties_disks_disk_encryption_key.rb +++ b/libraries/google/compute/property/instancetemplate_properties_disks_disk_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class InstanceTemplatePropertiesDisksDiskEncryptionKey def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @raw_key = args['rawKey'] - @rsa_encrypted_key = args['rsaEncryptedKey'] - @sha256 = args['sha256'] + @raw_key = args["rawKey"] + @rsa_encrypted_key = args["rsaEncryptedKey"] + @sha256 = args["sha256"] end def to_s diff --git a/libraries/google/compute/property/instancetemplate_properties_disks_initialize_params.rb b/libraries/google/compute/property/instancetemplate_properties_disks_initialize_params.rb index 6e35f0910..06fb0cf9e 100644 --- a/libraries/google/compute/property/instancetemplate_properties_disks_initialize_params.rb +++ b/libraries/google/compute/property/instancetemplate_properties_disks_initialize_params.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key' +require "google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key" module GoogleInSpec module Compute module Property @@ -31,11 +31,11 @@ class InstanceTemplatePropertiesDisksInitializeParams def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @disk_name = args['diskName'] - @disk_size_gb = args['diskSizeGb'] - @disk_type = args['diskType'] - @source_image = args['sourceImage'] - @source_image_encryption_key = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksInitializeParamsSourceImageEncryptionKey.new(args['sourceImageEncryptionKey'], to_s) + @disk_name = args["diskName"] + @disk_size_gb = args["diskSizeGb"] + @disk_type = args["diskType"] + @source_image = args["sourceImage"] + @source_image_encryption_key = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksInitializeParamsSourceImageEncryptionKey.new(args["sourceImageEncryptionKey"], to_s) end def to_s diff --git a/libraries/google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key.rb b/libraries/google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key.rb index 022236927..a219d502e 100644 --- a/libraries/google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key.rb +++ b/libraries/google/compute/property/instancetemplate_properties_disks_initialize_params_source_image_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InstanceTemplatePropertiesDisksInitializeParamsSourceImageEncryptionKey def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @raw_key = args['rawKey'] - @sha256 = args['sha256'] + @raw_key = args["rawKey"] + @sha256 = args["sha256"] end def to_s diff --git a/libraries/google/compute/property/instancetemplate_properties_guest_accelerators.rb b/libraries/google/compute/property/instancetemplate_properties_guest_accelerators.rb index 8f1271d6d..b501bf288 100644 --- a/libraries/google/compute/property/instancetemplate_properties_guest_accelerators.rb +++ b/libraries/google/compute/property/instancetemplate_properties_guest_accelerators.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InstanceTemplatePropertiesGuestAccelerators def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @accelerator_count = args['acceleratorCount'] - @accelerator_type = args['acceleratorType'] + @accelerator_count = args["acceleratorCount"] + @accelerator_type = args["acceleratorType"] end def to_s diff --git a/libraries/google/compute/property/instancetemplate_properties_network_interfaces.rb b/libraries/google/compute/property/instancetemplate_properties_network_interfaces.rb index 73f83a631..6cfafb847 100644 --- a/libraries/google/compute/property/instancetemplate_properties_network_interfaces.rb +++ b/libraries/google/compute/property/instancetemplate_properties_network_interfaces.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/instancetemplate_properties_network_interfaces_access_configs' -require 'google/compute/property/instancetemplate_properties_network_interfaces_alias_ip_ranges' +require "google/compute/property/instancetemplate_properties_network_interfaces_access_configs" +require "google/compute/property/instancetemplate_properties_network_interfaces_alias_ip_ranges" module GoogleInSpec module Compute module Property @@ -34,12 +34,12 @@ class InstanceTemplatePropertiesNetworkInterfaces def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @access_configs = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesNetworkInterfacesAccessConfigsArray.parse(args['accessConfigs'], to_s) - @alias_ip_ranges = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesNetworkInterfacesAliasIpRangesArray.parse(args['aliasIpRanges'], to_s) - @name = args['name'] - @network = args['network'] - @network_ip = args['networkIP'] - @subnetwork = args['subnetwork'] + @access_configs = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesNetworkInterfacesAccessConfigsArray.parse(args["accessConfigs"], to_s) + @alias_ip_ranges = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesNetworkInterfacesAliasIpRangesArray.parse(args["aliasIpRanges"], to_s) + @name = args["name"] + @network = args["network"] + @network_ip = args["networkIP"] + @subnetwork = args["subnetwork"] end def to_s diff --git a/libraries/google/compute/property/instancetemplate_properties_network_interfaces_access_configs.rb b/libraries/google/compute/property/instancetemplate_properties_network_interfaces_access_configs.rb index 7d8cc89d8..b11b08ec5 100644 --- a/libraries/google/compute/property/instancetemplate_properties_network_interfaces_access_configs.rb +++ b/libraries/google/compute/property/instancetemplate_properties_network_interfaces_access_configs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -32,12 +32,12 @@ class InstanceTemplatePropertiesNetworkInterfacesAccessConfigs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @nat_ip = args['natIP'] - @type = args['type'] - @set_public_ptr = args['setPublicPtr'] - @public_ptr_domain_name = args['publicPtrDomainName'] - @network_tier = args['networkTier'] + @name = args["name"] + @nat_ip = args["natIP"] + @type = args["type"] + @set_public_ptr = args["setPublicPtr"] + @public_ptr_domain_name = args["publicPtrDomainName"] + @network_tier = args["networkTier"] end def to_s diff --git a/libraries/google/compute/property/instancetemplate_properties_network_interfaces_alias_ip_ranges.rb b/libraries/google/compute/property/instancetemplate_properties_network_interfaces_alias_ip_ranges.rb index f4205d742..167941b06 100644 --- a/libraries/google/compute/property/instancetemplate_properties_network_interfaces_alias_ip_ranges.rb +++ b/libraries/google/compute/property/instancetemplate_properties_network_interfaces_alias_ip_ranges.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InstanceTemplatePropertiesNetworkInterfacesAliasIpRanges def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @ip_cidr_range = args['ipCidrRange'] - @subnetwork_range_name = args['subnetworkRangeName'] + @ip_cidr_range = args["ipCidrRange"] + @subnetwork_range_name = args["subnetworkRangeName"] end def to_s diff --git a/libraries/google/compute/property/instancetemplate_properties_scheduling.rb b/libraries/google/compute/property/instancetemplate_properties_scheduling.rb index cf909758e..9e004ecf5 100644 --- a/libraries/google/compute/property/instancetemplate_properties_scheduling.rb +++ b/libraries/google/compute/property/instancetemplate_properties_scheduling.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class InstanceTemplatePropertiesScheduling def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @automatic_restart = args['automaticRestart'] - @on_host_maintenance = args['onHostMaintenance'] - @preemptible = args['preemptible'] + @automatic_restart = args["automaticRestart"] + @on_host_maintenance = args["onHostMaintenance"] + @preemptible = args["preemptible"] end def to_s diff --git a/libraries/google/compute/property/instancetemplate_properties_service_accounts.rb b/libraries/google/compute/property/instancetemplate_properties_service_accounts.rb index 85ca02e7b..b6661e481 100644 --- a/libraries/google/compute/property/instancetemplate_properties_service_accounts.rb +++ b/libraries/google/compute/property/instancetemplate_properties_service_accounts.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InstanceTemplatePropertiesServiceAccounts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @email = args['email'] - @scopes = args['scopes'] + @email = args["email"] + @scopes = args["scopes"] end def to_s diff --git a/libraries/google/compute/property/instancetemplate_properties_tags.rb b/libraries/google/compute/property/instancetemplate_properties_tags.rb index 6c42aa693..c3b8cd837 100644 --- a/libraries/google/compute/property/instancetemplate_properties_tags.rb +++ b/libraries/google/compute/property/instancetemplate_properties_tags.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InstanceTemplatePropertiesTags def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @fingerprint = args['fingerprint'] - @items = args['items'] + @fingerprint = args["fingerprint"] + @items = args["items"] end def to_s diff --git a/libraries/google/compute/property/interconnect_circuit_infos.rb b/libraries/google/compute/property/interconnect_circuit_infos.rb index a7f5fd746..d9e3c8808 100644 --- a/libraries/google/compute/property/interconnect_circuit_infos.rb +++ b/libraries/google/compute/property/interconnect_circuit_infos.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class InterconnectCircuitInfos def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @google_circuit_id = args['googleCircuitId'] - @google_demarc_id = args['googleDemarcId'] - @customer_demarc_id = args['customerDemarcId'] + @google_circuit_id = args["googleCircuitId"] + @google_demarc_id = args["googleDemarcId"] + @customer_demarc_id = args["customerDemarcId"] end def to_s diff --git a/libraries/google/compute/property/interconnect_expected_outages.rb b/libraries/google/compute/property/interconnect_expected_outages.rb index 130bc8bc0..dac3c0b37 100644 --- a/libraries/google/compute/property/interconnect_expected_outages.rb +++ b/libraries/google/compute/property/interconnect_expected_outages.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -36,14 +36,14 @@ class InterconnectExpectedOutages def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @description = args['description'] - @source = args['source'] - @state = args['state'] - @issue_type = args['issueType'] - @affected_circuits = args['affectedCircuits'] - @start_time = parse_time_string(args['startTime']) - @end_time = parse_time_string(args['endTime']) + @name = args["name"] + @description = args["description"] + @source = args["source"] + @state = args["state"] + @issue_type = args["issueType"] + @affected_circuits = args["affectedCircuits"] + @start_time = parse_time_string(args["startTime"]) + @end_time = parse_time_string(args["endTime"]) end def to_s diff --git a/libraries/google/compute/property/licensecode_license_alias.rb b/libraries/google/compute/property/licensecode_license_alias.rb index 2e4505f29..2cf845f71 100644 --- a/libraries/google/compute/property/licensecode_license_alias.rb +++ b/libraries/google/compute/property/licensecode_license_alias.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class LicenseCodeLicenseAlias def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @self_link = args['selfLink'] - @description = args['description'] + @self_link = args["selfLink"] + @description = args["description"] end def to_s diff --git a/libraries/google/compute/property/network_peerings.rb b/libraries/google/compute/property/network_peerings.rb index 499a519fd..2dd0f01cf 100644 --- a/libraries/google/compute/property/network_peerings.rb +++ b/libraries/google/compute/property/network_peerings.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -34,13 +34,13 @@ class NetworkPeerings def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @state = args['state'] - @state_details = args['stateDetails'] - @network = args['network'] - @export_custom_routes = args['exportCustomRoutes'] - @import_custom_routes = args['importCustomRoutes'] - @peer_mtu = args['peerMtu'] + @name = args["name"] + @state = args["state"] + @state_details = args["stateDetails"] + @network = args["network"] + @export_custom_routes = args["exportCustomRoutes"] + @import_custom_routes = args["importCustomRoutes"] + @peer_mtu = args["peerMtu"] end def to_s diff --git a/libraries/google/compute/property/network_routing_config.rb b/libraries/google/compute/property/network_routing_config.rb index 92d60fe73..87f65040f 100644 --- a/libraries/google/compute/property/network_routing_config.rb +++ b/libraries/google/compute/property/network_routing_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class NetworkRoutingConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @routing_mode = args['routingMode'] + @routing_mode = args["routingMode"] end def to_s diff --git a/libraries/google/compute/property/nodegroup_autoscaling_policy.rb b/libraries/google/compute/property/nodegroup_autoscaling_policy.rb index c4f18d046..753db5782 100644 --- a/libraries/google/compute/property/nodegroup_autoscaling_policy.rb +++ b/libraries/google/compute/property/nodegroup_autoscaling_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class NodeGroupAutoscalingPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @mode = args['mode'] - @min_nodes = args['minNodes'] - @max_nodes = args['maxNodes'] + @mode = args["mode"] + @min_nodes = args["minNodes"] + @max_nodes = args["maxNodes"] end def to_s diff --git a/libraries/google/compute/property/nodetemplate_node_type_flexibility.rb b/libraries/google/compute/property/nodetemplate_node_type_flexibility.rb index 2f5947a25..683d32089 100644 --- a/libraries/google/compute/property/nodetemplate_node_type_flexibility.rb +++ b/libraries/google/compute/property/nodetemplate_node_type_flexibility.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class NodeTemplateNodeTypeFlexibility def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @cpus = args['cpus'] - @memory = args['memory'] - @local_ssd = args['localSsd'] + @cpus = args["cpus"] + @memory = args["memory"] + @local_ssd = args["localSsd"] end def to_s diff --git a/libraries/google/compute/property/nodetemplate_server_binding.rb b/libraries/google/compute/property/nodetemplate_server_binding.rb index f60d5870e..c97747a1c 100644 --- a/libraries/google/compute/property/nodetemplate_server_binding.rb +++ b/libraries/google/compute/property/nodetemplate_server_binding.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class NodeTemplateServerBinding def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @type = args['type'] + @type = args["type"] end def to_s diff --git a/libraries/google/compute/property/projectinfo_common_instance_metadata.rb b/libraries/google/compute/property/projectinfo_common_instance_metadata.rb index bcd1ad1ed..e5fa7f38f 100644 --- a/libraries/google/compute/property/projectinfo_common_instance_metadata.rb +++ b/libraries/google/compute/property/projectinfo_common_instance_metadata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/projectinfo_common_instance_metadata_items' +require "google/compute/property/projectinfo_common_instance_metadata_items" module GoogleInSpec module Compute module Property @@ -23,7 +23,7 @@ class ProjectInfoCommonInstanceMetadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @items = GoogleInSpec::Compute::Property::ProjectInfoCommonInstanceMetadataItemsArray.parse(args['items'], to_s) + @items = GoogleInSpec::Compute::Property::ProjectInfoCommonInstanceMetadataItemsArray.parse(args["items"], to_s) end def to_s diff --git a/libraries/google/compute/property/projectinfo_common_instance_metadata_items.rb b/libraries/google/compute/property/projectinfo_common_instance_metadata_items.rb index 22ab9f6d1..e6562b4d3 100644 --- a/libraries/google/compute/property/projectinfo_common_instance_metadata_items.rb +++ b/libraries/google/compute/property/projectinfo_common_instance_metadata_items.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ProjectInfoCommonInstanceMetadataItems def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @key = args['key'] - @value = args['value'] + @key = args["key"] + @value = args["value"] end def to_s diff --git a/libraries/google/compute/property/projectinfo_quotas.rb b/libraries/google/compute/property/projectinfo_quotas.rb index c6c7b8b47..cd57dbd96 100644 --- a/libraries/google/compute/property/projectinfo_quotas.rb +++ b/libraries/google/compute/property/projectinfo_quotas.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class ProjectInfoQuotas def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @metric = args['metric'] - @limit = args['limit'] - @usage = args['usage'] - @owner = args['owner'] + @metric = args["metric"] + @limit = args["limit"] + @usage = args["usage"] + @owner = args["owner"] end def to_s diff --git a/libraries/google/compute/property/region_deprecated.rb b/libraries/google/compute/property/region_deprecated.rb index 9f473738b..0a874eefc 100644 --- a/libraries/google/compute/property/region_deprecated.rb +++ b/libraries/google/compute/property/region_deprecated.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class RegionDeprecated def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @deleted = parse_time_string(args['deleted']) - @deprecated = parse_time_string(args['deprecated']) - @obsolete = parse_time_string(args['obsolete']) - @replacement = args['replacement'] - @state = args['state'] + @deleted = parse_time_string(args["deleted"]) + @deprecated = parse_time_string(args["deprecated"]) + @obsolete = parse_time_string(args["obsolete"]) + @replacement = args["replacement"] + @state = args["state"] end def to_s diff --git a/libraries/google/compute/property/region_quotas.rb b/libraries/google/compute/property/region_quotas.rb index 2d8b60ac9..e9c54157f 100644 --- a/libraries/google/compute/property/region_quotas.rb +++ b/libraries/google/compute/property/region_quotas.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class RegionQuotas def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @metric = args['metric'] - @limit = args['limit'] - @usage = args['usage'] - @owner = args['owner'] + @metric = args["metric"] + @limit = args["limit"] + @usage = args["usage"] + @owner = args["owner"] end def to_s diff --git a/libraries/google/compute/property/regionbackendservice_backends.rb b/libraries/google/compute/property/regionbackendservice_backends.rb index 813305a27..9e52350c5 100644 --- a/libraries/google/compute/property/regionbackendservice_backends.rb +++ b/libraries/google/compute/property/regionbackendservice_backends.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -44,18 +44,18 @@ class RegionBackendServiceBackends def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @balancing_mode = args['balancingMode'] - @capacity_scaler = args['capacityScaler'] - @description = args['description'] - @failover = args['failover'] - @group = args['group'] - @max_connections = args['maxConnections'] - @max_connections_per_instance = args['maxConnectionsPerInstance'] - @max_connections_per_endpoint = args['maxConnectionsPerEndpoint'] - @max_rate = args['maxRate'] - @max_rate_per_instance = args['maxRatePerInstance'] - @max_rate_per_endpoint = args['maxRatePerEndpoint'] - @max_utilization = args['maxUtilization'] + @balancing_mode = args["balancingMode"] + @capacity_scaler = args["capacityScaler"] + @description = args["description"] + @failover = args["failover"] + @group = args["group"] + @max_connections = args["maxConnections"] + @max_connections_per_instance = args["maxConnectionsPerInstance"] + @max_connections_per_endpoint = args["maxConnectionsPerEndpoint"] + @max_rate = args["maxRate"] + @max_rate_per_instance = args["maxRatePerInstance"] + @max_rate_per_endpoint = args["maxRatePerEndpoint"] + @max_utilization = args["maxUtilization"] end def to_s diff --git a/libraries/google/compute/property/regionbackendservice_cdn_policy.rb b/libraries/google/compute/property/regionbackendservice_cdn_policy.rb index 217a92b91..5d182b3fb 100644 --- a/libraries/google/compute/property/regionbackendservice_cdn_policy.rb +++ b/libraries/google/compute/property/regionbackendservice_cdn_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/regionbackendservice_cdn_policy_cache_key_policy' -require 'google/compute/property/regionbackendservice_cdn_policy_negative_caching_policy' +require "google/compute/property/regionbackendservice_cdn_policy_cache_key_policy" +require "google/compute/property/regionbackendservice_cdn_policy_negative_caching_policy" module GoogleInSpec module Compute module Property @@ -40,15 +40,15 @@ class RegionBackendServiceCdnPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @cache_key_policy = GoogleInSpec::Compute::Property::RegionBackendServiceCdnPolicyCacheKeyPolicy.new(args['cacheKeyPolicy'], to_s) - @signed_url_cache_max_age_sec = args['signedUrlCacheMaxAgeSec'] - @default_ttl = args['defaultTtl'] - @max_ttl = args['maxTtl'] - @client_ttl = args['clientTtl'] - @negative_caching = args['negativeCaching'] - @negative_caching_policy = GoogleInSpec::Compute::Property::RegionBackendServiceCdnPolicyNegativeCachingPolicyArray.parse(args['negativeCachingPolicy'], to_s) - @cache_mode = args['cacheMode'] - @serve_while_stale = args['serveWhileStale'] + @cache_key_policy = GoogleInSpec::Compute::Property::RegionBackendServiceCdnPolicyCacheKeyPolicy.new(args["cacheKeyPolicy"], to_s) + @signed_url_cache_max_age_sec = args["signedUrlCacheMaxAgeSec"] + @default_ttl = args["defaultTtl"] + @max_ttl = args["maxTtl"] + @client_ttl = args["clientTtl"] + @negative_caching = args["negativeCaching"] + @negative_caching_policy = GoogleInSpec::Compute::Property::RegionBackendServiceCdnPolicyNegativeCachingPolicyArray.parse(args["negativeCachingPolicy"], to_s) + @cache_mode = args["cacheMode"] + @serve_while_stale = args["serveWhileStale"] end def to_s diff --git a/libraries/google/compute/property/regionbackendservice_cdn_policy_cache_key_policy.rb b/libraries/google/compute/property/regionbackendservice_cdn_policy_cache_key_policy.rb index 4fe1d3706..2c280e5fb 100644 --- a/libraries/google/compute/property/regionbackendservice_cdn_policy_cache_key_policy.rb +++ b/libraries/google/compute/property/regionbackendservice_cdn_policy_cache_key_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class RegionBackendServiceCdnPolicyCacheKeyPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @include_host = args['includeHost'] - @include_protocol = args['includeProtocol'] - @include_query_string = args['includeQueryString'] - @query_string_blacklist = args['queryStringBlacklist'] - @query_string_whitelist = args['queryStringWhitelist'] + @include_host = args["includeHost"] + @include_protocol = args["includeProtocol"] + @include_query_string = args["includeQueryString"] + @query_string_blacklist = args["queryStringBlacklist"] + @query_string_whitelist = args["queryStringWhitelist"] end def to_s diff --git a/libraries/google/compute/property/regionbackendservice_cdn_policy_negative_caching_policy.rb b/libraries/google/compute/property/regionbackendservice_cdn_policy_negative_caching_policy.rb index 31b813d41..faea46838 100644 --- a/libraries/google/compute/property/regionbackendservice_cdn_policy_negative_caching_policy.rb +++ b/libraries/google/compute/property/regionbackendservice_cdn_policy_negative_caching_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionBackendServiceCdnPolicyNegativeCachingPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @code = args['code'] - @ttl = args['ttl'] + @code = args["code"] + @ttl = args["ttl"] end def to_s diff --git a/libraries/google/compute/property/regionbackendservice_circuit_breakers.rb b/libraries/google/compute/property/regionbackendservice_circuit_breakers.rb index d7317ad03..77a95877e 100644 --- a/libraries/google/compute/property/regionbackendservice_circuit_breakers.rb +++ b/libraries/google/compute/property/regionbackendservice_circuit_breakers.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/regionbackendservice_circuit_breakers_connect_timeout' +require "google/compute/property/regionbackendservice_circuit_breakers_connect_timeout" module GoogleInSpec module Compute module Property @@ -33,12 +33,12 @@ class RegionBackendServiceCircuitBreakers def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @connect_timeout = GoogleInSpec::Compute::Property::RegionBackendServiceCircuitBreakersConnectTimeout.new(args['connectTimeout'], to_s) - @max_requests_per_connection = args['maxRequestsPerConnection'] - @max_connections = args['maxConnections'] - @max_pending_requests = args['maxPendingRequests'] - @max_requests = args['maxRequests'] - @max_retries = args['maxRetries'] + @connect_timeout = GoogleInSpec::Compute::Property::RegionBackendServiceCircuitBreakersConnectTimeout.new(args["connectTimeout"], to_s) + @max_requests_per_connection = args["maxRequestsPerConnection"] + @max_connections = args["maxConnections"] + @max_pending_requests = args["maxPendingRequests"] + @max_requests = args["maxRequests"] + @max_retries = args["maxRetries"] end def to_s diff --git a/libraries/google/compute/property/regionbackendservice_circuit_breakers_connect_timeout.rb b/libraries/google/compute/property/regionbackendservice_circuit_breakers_connect_timeout.rb index cdbbc90f6..57389398d 100644 --- a/libraries/google/compute/property/regionbackendservice_circuit_breakers_connect_timeout.rb +++ b/libraries/google/compute/property/regionbackendservice_circuit_breakers_connect_timeout.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionBackendServiceCircuitBreakersConnectTimeout def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @seconds = args['seconds'] - @nanos = args['nanos'] + @seconds = args["seconds"] + @nanos = args["nanos"] end def to_s diff --git a/libraries/google/compute/property/regionbackendservice_connection_draining.rb b/libraries/google/compute/property/regionbackendservice_connection_draining.rb index 27c6c6fe0..b2abe2848 100644 --- a/libraries/google/compute/property/regionbackendservice_connection_draining.rb +++ b/libraries/google/compute/property/regionbackendservice_connection_draining.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class RegionBackendServiceConnectionDraining def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @draining_timeout_sec = args['drainingTimeoutSec'] + @draining_timeout_sec = args["drainingTimeoutSec"] end def to_s diff --git a/libraries/google/compute/property/regionbackendservice_consistent_hash.rb b/libraries/google/compute/property/regionbackendservice_consistent_hash.rb index 7fc5af4c8..8b09e77a9 100644 --- a/libraries/google/compute/property/regionbackendservice_consistent_hash.rb +++ b/libraries/google/compute/property/regionbackendservice_consistent_hash.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/regionbackendservice_consistent_hash_http_cookie' -require 'google/compute/property/regionbackendservice_consistent_hash_http_cookie_ttl' +require "google/compute/property/regionbackendservice_consistent_hash_http_cookie" +require "google/compute/property/regionbackendservice_consistent_hash_http_cookie_ttl" module GoogleInSpec module Compute module Property @@ -28,9 +28,9 @@ class RegionBackendServiceConsistentHash def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @http_cookie = GoogleInSpec::Compute::Property::RegionBackendServiceConsistentHashHttpCookie.new(args['httpCookie'], to_s) - @http_header_name = args['httpHeaderName'] - @minimum_ring_size = args['minimumRingSize'] + @http_cookie = GoogleInSpec::Compute::Property::RegionBackendServiceConsistentHashHttpCookie.new(args["httpCookie"], to_s) + @http_header_name = args["httpHeaderName"] + @minimum_ring_size = args["minimumRingSize"] end def to_s diff --git a/libraries/google/compute/property/regionbackendservice_consistent_hash_http_cookie.rb b/libraries/google/compute/property/regionbackendservice_consistent_hash_http_cookie.rb index b89dd8554..19da83c80 100644 --- a/libraries/google/compute/property/regionbackendservice_consistent_hash_http_cookie.rb +++ b/libraries/google/compute/property/regionbackendservice_consistent_hash_http_cookie.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/regionbackendservice_consistent_hash_http_cookie_ttl' +require "google/compute/property/regionbackendservice_consistent_hash_http_cookie_ttl" module GoogleInSpec module Compute module Property @@ -27,9 +27,9 @@ class RegionBackendServiceConsistentHashHttpCookie def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @ttl = GoogleInSpec::Compute::Property::RegionBackendServiceConsistentHashHttpCookieTtl.new(args['ttl'], to_s) - @name = args['name'] - @path = args['path'] + @ttl = GoogleInSpec::Compute::Property::RegionBackendServiceConsistentHashHttpCookieTtl.new(args["ttl"], to_s) + @name = args["name"] + @path = args["path"] end def to_s diff --git a/libraries/google/compute/property/regionbackendservice_consistent_hash_http_cookie_ttl.rb b/libraries/google/compute/property/regionbackendservice_consistent_hash_http_cookie_ttl.rb index 81fde2d61..017487aa5 100644 --- a/libraries/google/compute/property/regionbackendservice_consistent_hash_http_cookie_ttl.rb +++ b/libraries/google/compute/property/regionbackendservice_consistent_hash_http_cookie_ttl.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionBackendServiceConsistentHashHttpCookieTtl def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @seconds = args['seconds'] - @nanos = args['nanos'] + @seconds = args["seconds"] + @nanos = args["nanos"] end def to_s diff --git a/libraries/google/compute/property/regionbackendservice_failover_policy.rb b/libraries/google/compute/property/regionbackendservice_failover_policy.rb index 6cd2bee39..0431e12b0 100644 --- a/libraries/google/compute/property/regionbackendservice_failover_policy.rb +++ b/libraries/google/compute/property/regionbackendservice_failover_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class RegionBackendServiceFailoverPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @disable_connection_drain_on_failover = args['disableConnectionDrainOnFailover'] - @drop_traffic_if_unhealthy = args['dropTrafficIfUnhealthy'] - @failover_ratio = args['failoverRatio'] + @disable_connection_drain_on_failover = args["disableConnectionDrainOnFailover"] + @drop_traffic_if_unhealthy = args["dropTrafficIfUnhealthy"] + @failover_ratio = args["failoverRatio"] end def to_s diff --git a/libraries/google/compute/property/regionbackendservice_log_config.rb b/libraries/google/compute/property/regionbackendservice_log_config.rb index 0d9369cba..70b3c6e51 100644 --- a/libraries/google/compute/property/regionbackendservice_log_config.rb +++ b/libraries/google/compute/property/regionbackendservice_log_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionBackendServiceLogConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enable = args['enable'] - @sample_rate = args['sampleRate'] + @enable = args["enable"] + @sample_rate = args["sampleRate"] end def to_s diff --git a/libraries/google/compute/property/regionbackendservice_outlier_detection.rb b/libraries/google/compute/property/regionbackendservice_outlier_detection.rb index 5b0e2f374..78d0f09fa 100644 --- a/libraries/google/compute/property/regionbackendservice_outlier_detection.rb +++ b/libraries/google/compute/property/regionbackendservice_outlier_detection.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/regionbackendservice_outlier_detection_base_ejection_time' -require 'google/compute/property/regionbackendservice_outlier_detection_interval' +require "google/compute/property/regionbackendservice_outlier_detection_base_ejection_time" +require "google/compute/property/regionbackendservice_outlier_detection_interval" module GoogleInSpec module Compute module Property @@ -44,17 +44,17 @@ class RegionBackendServiceOutlierDetection def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @base_ejection_time = GoogleInSpec::Compute::Property::RegionBackendServiceOutlierDetectionBaseEjectionTime.new(args['baseEjectionTime'], to_s) - @consecutive_errors = args['consecutiveErrors'] - @consecutive_gateway_failure = args['consecutiveGatewayFailure'] - @enforcing_consecutive_errors = args['enforcingConsecutiveErrors'] - @enforcing_consecutive_gateway_failure = args['enforcingConsecutiveGatewayFailure'] - @enforcing_success_rate = args['enforcingSuccessRate'] - @interval = GoogleInSpec::Compute::Property::RegionBackendServiceOutlierDetectionInterval.new(args['interval'], to_s) - @max_ejection_percent = args['maxEjectionPercent'] - @success_rate_minimum_hosts = args['successRateMinimumHosts'] - @success_rate_request_volume = args['successRateRequestVolume'] - @success_rate_stdev_factor = args['successRateStdevFactor'] + @base_ejection_time = GoogleInSpec::Compute::Property::RegionBackendServiceOutlierDetectionBaseEjectionTime.new(args["baseEjectionTime"], to_s) + @consecutive_errors = args["consecutiveErrors"] + @consecutive_gateway_failure = args["consecutiveGatewayFailure"] + @enforcing_consecutive_errors = args["enforcingConsecutiveErrors"] + @enforcing_consecutive_gateway_failure = args["enforcingConsecutiveGatewayFailure"] + @enforcing_success_rate = args["enforcingSuccessRate"] + @interval = GoogleInSpec::Compute::Property::RegionBackendServiceOutlierDetectionInterval.new(args["interval"], to_s) + @max_ejection_percent = args["maxEjectionPercent"] + @success_rate_minimum_hosts = args["successRateMinimumHosts"] + @success_rate_request_volume = args["successRateRequestVolume"] + @success_rate_stdev_factor = args["successRateStdevFactor"] end def to_s diff --git a/libraries/google/compute/property/regionbackendservice_outlier_detection_base_ejection_time.rb b/libraries/google/compute/property/regionbackendservice_outlier_detection_base_ejection_time.rb index 133cb360d..aa35e12e4 100644 --- a/libraries/google/compute/property/regionbackendservice_outlier_detection_base_ejection_time.rb +++ b/libraries/google/compute/property/regionbackendservice_outlier_detection_base_ejection_time.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionBackendServiceOutlierDetectionBaseEjectionTime def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @seconds = args['seconds'] - @nanos = args['nanos'] + @seconds = args["seconds"] + @nanos = args["nanos"] end def to_s diff --git a/libraries/google/compute/property/regionbackendservice_outlier_detection_interval.rb b/libraries/google/compute/property/regionbackendservice_outlier_detection_interval.rb index 3d181f2a2..db4fdcdc8 100644 --- a/libraries/google/compute/property/regionbackendservice_outlier_detection_interval.rb +++ b/libraries/google/compute/property/regionbackendservice_outlier_detection_interval.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionBackendServiceOutlierDetectionInterval def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @seconds = args['seconds'] - @nanos = args['nanos'] + @seconds = args["seconds"] + @nanos = args["nanos"] end def to_s diff --git a/libraries/google/compute/property/regionhealthcheck_grpc_health_check.rb b/libraries/google/compute/property/regionhealthcheck_grpc_health_check.rb index 23427d428..76cc6b0c9 100644 --- a/libraries/google/compute/property/regionhealthcheck_grpc_health_check.rb +++ b/libraries/google/compute/property/regionhealthcheck_grpc_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class RegionHealthCheckGrpcHealthCheck def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @port = args['port'] - @port_name = args['portName'] - @port_specification = args['portSpecification'] - @grpc_service_name = args['grpcServiceName'] + @port = args["port"] + @port_name = args["portName"] + @port_specification = args["portSpecification"] + @grpc_service_name = args["grpcServiceName"] end def to_s diff --git a/libraries/google/compute/property/regionhealthcheck_http2_health_check.rb b/libraries/google/compute/property/regionhealthcheck_http2_health_check.rb index f66d288ba..601fab547 100644 --- a/libraries/google/compute/property/regionhealthcheck_http2_health_check.rb +++ b/libraries/google/compute/property/regionhealthcheck_http2_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -34,13 +34,13 @@ class RegionHealthCheckHttp2HealthCheck def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @host = args['host'] - @request_path = args['requestPath'] - @response = args['response'] - @port = args['port'] - @port_name = args['portName'] - @proxy_header = args['proxyHeader'] - @port_specification = args['portSpecification'] + @host = args["host"] + @request_path = args["requestPath"] + @response = args["response"] + @port = args["port"] + @port_name = args["portName"] + @proxy_header = args["proxyHeader"] + @port_specification = args["portSpecification"] end def to_s diff --git a/libraries/google/compute/property/regionhealthcheck_http_health_check.rb b/libraries/google/compute/property/regionhealthcheck_http_health_check.rb index e26872deb..f78494e76 100644 --- a/libraries/google/compute/property/regionhealthcheck_http_health_check.rb +++ b/libraries/google/compute/property/regionhealthcheck_http_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -34,13 +34,13 @@ class RegionHealthCheckHttpHealthCheck def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @host = args['host'] - @request_path = args['requestPath'] - @response = args['response'] - @port = args['port'] - @port_name = args['portName'] - @proxy_header = args['proxyHeader'] - @port_specification = args['portSpecification'] + @host = args["host"] + @request_path = args["requestPath"] + @response = args["response"] + @port = args["port"] + @port_name = args["portName"] + @proxy_header = args["proxyHeader"] + @port_specification = args["portSpecification"] end def to_s diff --git a/libraries/google/compute/property/regionhealthcheck_https_health_check.rb b/libraries/google/compute/property/regionhealthcheck_https_health_check.rb index 3d50d76b2..b530385e5 100644 --- a/libraries/google/compute/property/regionhealthcheck_https_health_check.rb +++ b/libraries/google/compute/property/regionhealthcheck_https_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -34,13 +34,13 @@ class RegionHealthCheckHttpsHealthCheck def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @host = args['host'] - @request_path = args['requestPath'] - @response = args['response'] - @port = args['port'] - @port_name = args['portName'] - @proxy_header = args['proxyHeader'] - @port_specification = args['portSpecification'] + @host = args["host"] + @request_path = args["requestPath"] + @response = args["response"] + @port = args["port"] + @port_name = args["portName"] + @proxy_header = args["proxyHeader"] + @port_specification = args["portSpecification"] end def to_s diff --git a/libraries/google/compute/property/regionhealthcheck_log_config.rb b/libraries/google/compute/property/regionhealthcheck_log_config.rb index ef2403f36..afa4b27c8 100644 --- a/libraries/google/compute/property/regionhealthcheck_log_config.rb +++ b/libraries/google/compute/property/regionhealthcheck_log_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class RegionHealthCheckLogConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enable = args['enable'] + @enable = args["enable"] end def to_s diff --git a/libraries/google/compute/property/regionhealthcheck_ssl_health_check.rb b/libraries/google/compute/property/regionhealthcheck_ssl_health_check.rb index 0afb33a42..4b7f036d2 100644 --- a/libraries/google/compute/property/regionhealthcheck_ssl_health_check.rb +++ b/libraries/google/compute/property/regionhealthcheck_ssl_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -32,12 +32,12 @@ class RegionHealthCheckSslHealthCheck def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @request = args['request'] - @response = args['response'] - @port = args['port'] - @port_name = args['portName'] - @proxy_header = args['proxyHeader'] - @port_specification = args['portSpecification'] + @request = args["request"] + @response = args["response"] + @port = args["port"] + @port_name = args["portName"] + @proxy_header = args["proxyHeader"] + @port_specification = args["portSpecification"] end def to_s diff --git a/libraries/google/compute/property/regionhealthcheck_tcp_health_check.rb b/libraries/google/compute/property/regionhealthcheck_tcp_health_check.rb index e12e4f689..6fb0d9be7 100644 --- a/libraries/google/compute/property/regionhealthcheck_tcp_health_check.rb +++ b/libraries/google/compute/property/regionhealthcheck_tcp_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -32,12 +32,12 @@ class RegionHealthCheckTcpHealthCheck def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @request = args['request'] - @response = args['response'] - @port = args['port'] - @port_name = args['portName'] - @proxy_header = args['proxyHeader'] - @port_specification = args['portSpecification'] + @request = args["request"] + @response = args["response"] + @port = args["port"] + @port_name = args["portName"] + @proxy_header = args["proxyHeader"] + @port_specification = args["portSpecification"] end def to_s diff --git a/libraries/google/compute/property/regioninstancegroup_named_ports.rb b/libraries/google/compute/property/regioninstancegroup_named_ports.rb index de0188e67..d1de6483a 100644 --- a/libraries/google/compute/property/regioninstancegroup_named_ports.rb +++ b/libraries/google/compute/property/regioninstancegroup_named_ports.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionInstanceGroupNamedPorts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @port = args['port'] + @name = args["name"] + @port = args["port"] end def to_s diff --git a/libraries/google/compute/property/regioninstancegroupmanager_auto_healing_policies.rb b/libraries/google/compute/property/regioninstancegroupmanager_auto_healing_policies.rb index c58e2e993..a442e8a20 100644 --- a/libraries/google/compute/property/regioninstancegroupmanager_auto_healing_policies.rb +++ b/libraries/google/compute/property/regioninstancegroupmanager_auto_healing_policies.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionInstanceGroupManagerAutoHealingPolicies def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @health_check = args['healthCheck'] - @initial_delay_sec = args['initialDelaySec'] + @health_check = args["healthCheck"] + @initial_delay_sec = args["initialDelaySec"] end def to_s diff --git a/libraries/google/compute/property/regioninstancegroupmanager_current_actions.rb b/libraries/google/compute/property/regioninstancegroupmanager_current_actions.rb index d924fff5a..2fe05395b 100644 --- a/libraries/google/compute/property/regioninstancegroupmanager_current_actions.rb +++ b/libraries/google/compute/property/regioninstancegroupmanager_current_actions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -36,14 +36,14 @@ class RegionInstanceGroupManagerCurrentActions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @abandoning = args['abandoning'] - @creating = args['creating'] - @creating_without_retries = args['creatingWithoutRetries'] - @deleting = args['deleting'] - @none = args['none'] - @recreating = args['recreating'] - @refreshing = args['refreshing'] - @restarting = args['restarting'] + @abandoning = args["abandoning"] + @creating = args["creating"] + @creating_without_retries = args["creatingWithoutRetries"] + @deleting = args["deleting"] + @none = args["none"] + @recreating = args["recreating"] + @refreshing = args["refreshing"] + @restarting = args["restarting"] end def to_s diff --git a/libraries/google/compute/property/regioninstancegroupmanager_named_ports.rb b/libraries/google/compute/property/regioninstancegroupmanager_named_ports.rb index 8cf716676..5f450b02d 100644 --- a/libraries/google/compute/property/regioninstancegroupmanager_named_ports.rb +++ b/libraries/google/compute/property/regioninstancegroupmanager_named_ports.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionInstanceGroupManagerNamedPorts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @port = args['port'] + @name = args["name"] + @port = args["port"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_adaptive_protection_config.rb b/libraries/google/compute/property/regionsecuritypolicy_adaptive_protection_config.rb index be77bf9c2..385954714 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_adaptive_protection_config.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_adaptive_protection_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config' -require 'google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config_threshold_configs' +require "google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config" +require "google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config_threshold_configs" module GoogleInSpec module Compute module Property @@ -24,7 +24,7 @@ class RegionSecurityPolicyAdaptiveProtectionConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @layer7_ddos_defense_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig.new(args['layer7DdosDefenseConfig'], to_s) + @layer7_ddos_defense_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig.new(args["layer7DdosDefenseConfig"], to_s) end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config.rb b/libraries/google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config.rb index 96a6d5055..d6a40aebf 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config_threshold_configs' +require "google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config_threshold_configs" module GoogleInSpec module Compute module Property @@ -27,9 +27,9 @@ class RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enable = args['enable'] - @rule_visibility = args['ruleVisibility'] - @threshold_configs = GoogleInSpec::Compute::Property::RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigsArray.parse(args['thresholdConfigs'], to_s) + @enable = args["enable"] + @rule_visibility = args["ruleVisibility"] + @threshold_configs = GoogleInSpec::Compute::Property::RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigsArray.parse(args["thresholdConfigs"], to_s) end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config_threshold_configs.rb b/libraries/google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config_threshold_configs.rb index 7709d6f6d..34693d7c1 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config_threshold_configs.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config_threshold_configs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class RegionSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresho def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @auto_deploy_load_threshold = args['autoDeployLoadThreshold'] - @auto_deploy_confidence_threshold = args['autoDeployConfidenceThreshold'] - @auto_deploy_impacted_baseline_threshold = args['autoDeployImpactedBaselineThreshold'] - @auto_deploy_expiration_sec = args['autoDeployExpirationSec'] + @name = args["name"] + @auto_deploy_load_threshold = args["autoDeployLoadThreshold"] + @auto_deploy_confidence_threshold = args["autoDeployConfidenceThreshold"] + @auto_deploy_impacted_baseline_threshold = args["autoDeployImpactedBaselineThreshold"] + @auto_deploy_expiration_sec = args["autoDeployExpirationSec"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_advanced_options_config.rb b/libraries/google/compute/property/regionsecuritypolicy_advanced_options_config.rb index c9a13602f..773c42032 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_advanced_options_config.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_advanced_options_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/regionsecuritypolicy_advanced_options_config_json_custom_config' +require "google/compute/property/regionsecuritypolicy_advanced_options_config_json_custom_config" module GoogleInSpec module Compute module Property @@ -27,9 +27,9 @@ class RegionSecurityPolicyAdvancedOptionsConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @json_parsing = args['jsonParsing'] - @json_custom_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyAdvancedOptionsConfigJsonCustomConfig.new(args['jsonCustomConfig'], to_s) - @log_level = args['logLevel'] + @json_parsing = args["jsonParsing"] + @json_custom_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyAdvancedOptionsConfigJsonCustomConfig.new(args["jsonCustomConfig"], to_s) + @log_level = args["logLevel"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_advanced_options_config_json_custom_config.rb b/libraries/google/compute/property/regionsecuritypolicy_advanced_options_config_json_custom_config.rb index 704f8be6e..145c54f72 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_advanced_options_config_json_custom_config.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_advanced_options_config_json_custom_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class RegionSecurityPolicyAdvancedOptionsConfigJsonCustomConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @content_types = args['contentTypes'] + @content_types = args["contentTypes"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_ddos_protection_config.rb b/libraries/google/compute/property/regionsecuritypolicy_ddos_protection_config.rb index 51c5490ba..7ec86e799 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_ddos_protection_config.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_ddos_protection_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class RegionSecurityPolicyDdosProtectionConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @ddos_protection = args['ddosProtection'] + @ddos_protection = args["ddosProtection"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_labels.rb b/libraries/google/compute/property/regionsecuritypolicy_labels.rb index 7c149d8b3..0c8478e55 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_labels.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class RegionSecurityPolicyLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @string = args['string'] + @string = args["string"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_recaptcha_options_config.rb b/libraries/google/compute/property/regionsecuritypolicy_recaptcha_options_config.rb index 507d3ede8..2eeb0a3a9 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_recaptcha_options_config.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_recaptcha_options_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class RegionSecurityPolicyRecaptchaOptionsConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @redirect_site_key = args['redirectSiteKey'] + @redirect_site_key = args["redirectSiteKey"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_rules.rb b/libraries/google/compute/property/regionsecuritypolicy_rules.rb index a5afc1273..fabcfb6c3 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_rules.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_rules.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,19 +13,19 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/regionsecuritypolicy_rules_header_action' -require 'google/compute/property/regionsecuritypolicy_rules_header_action_request_headers_to_adds' -require 'google/compute/property/regionsecuritypolicy_rules_match' -require 'google/compute/property/regionsecuritypolicy_rules_match_config' -require 'google/compute/property/regionsecuritypolicy_rules_match_expr' -require 'google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config' -require 'google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions' -require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options' -require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_ban_threshold' -require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_enforce_on_key_configs' -require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_exceed_redirect_options' -require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_rate_limit_threshold' -require 'google/compute/property/regionsecuritypolicy_rules_redirect_options' +require "google/compute/property/regionsecuritypolicy_rules_header_action" +require "google/compute/property/regionsecuritypolicy_rules_header_action_request_headers_to_adds" +require "google/compute/property/regionsecuritypolicy_rules_match" +require "google/compute/property/regionsecuritypolicy_rules_match_config" +require "google/compute/property/regionsecuritypolicy_rules_match_expr" +require "google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config" +require "google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions" +require "google/compute/property/regionsecuritypolicy_rules_rate_limit_options" +require "google/compute/property/regionsecuritypolicy_rules_rate_limit_options_ban_threshold" +require "google/compute/property/regionsecuritypolicy_rules_rate_limit_options_enforce_on_key_configs" +require "google/compute/property/regionsecuritypolicy_rules_rate_limit_options_exceed_redirect_options" +require "google/compute/property/regionsecuritypolicy_rules_rate_limit_options_rate_limit_threshold" +require "google/compute/property/regionsecuritypolicy_rules_redirect_options" module GoogleInSpec module Compute module Property @@ -53,16 +53,16 @@ class RegionSecurityPolicyRules def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kind = args['kind'] - @description = args['description'] - @priority = args['priority'] - @match = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesMatch.new(args['match'], to_s) - @action = args['action'] - @preview = args['preview'] - @rate_limit_options = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptions.new(args['rateLimitOptions'], to_s) - @header_action = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesHeaderAction.new(args['headerAction'], to_s) - @redirect_options = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRedirectOptions.new(args['redirectOptions'], to_s) - @preconfigured_waf_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesPreconfiguredWafConfig.new(args['preconfiguredWafConfig'], to_s) + @kind = args["kind"] + @description = args["description"] + @priority = args["priority"] + @match = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesMatch.new(args["match"], to_s) + @action = args["action"] + @preview = args["preview"] + @rate_limit_options = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptions.new(args["rateLimitOptions"], to_s) + @header_action = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesHeaderAction.new(args["headerAction"], to_s) + @redirect_options = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRedirectOptions.new(args["redirectOptions"], to_s) + @preconfigured_waf_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesPreconfiguredWafConfig.new(args["preconfiguredWafConfig"], to_s) end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_rules_header_action.rb b/libraries/google/compute/property/regionsecuritypolicy_rules_header_action.rb index 35b531419..b5962c210 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_rules_header_action.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_rules_header_action.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/regionsecuritypolicy_rules_header_action_request_headers_to_adds' +require "google/compute/property/regionsecuritypolicy_rules_header_action_request_headers_to_adds" module GoogleInSpec module Compute module Property @@ -23,7 +23,7 @@ class RegionSecurityPolicyRulesHeaderAction def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @request_headers_to_adds = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesHeaderActionRequestHeadersToAddsArray.parse(args['requestHeadersToAdds'], to_s) + @request_headers_to_adds = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesHeaderActionRequestHeadersToAddsArray.parse(args["requestHeadersToAdds"], to_s) end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_rules_header_action_request_headers_to_adds.rb b/libraries/google/compute/property/regionsecuritypolicy_rules_header_action_request_headers_to_adds.rb index 33f17df1f..84168e64c 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_rules_header_action_request_headers_to_adds.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_rules_header_action_request_headers_to_adds.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionSecurityPolicyRulesHeaderActionRequestHeadersToAdds def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @header_name = args['headerName'] - @header_value = args['headerValue'] + @header_name = args["headerName"] + @header_value = args["headerValue"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_rules_match.rb b/libraries/google/compute/property/regionsecuritypolicy_rules_match.rb index b2b195e6f..874b796eb 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_rules_match.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_rules_match.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/regionsecuritypolicy_rules_match_config' -require 'google/compute/property/regionsecuritypolicy_rules_match_expr' +require "google/compute/property/regionsecuritypolicy_rules_match_config" +require "google/compute/property/regionsecuritypolicy_rules_match_expr" module GoogleInSpec module Compute module Property @@ -28,9 +28,9 @@ class RegionSecurityPolicyRulesMatch def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @expr = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesMatchExpr.new(args['expr'], to_s) - @versioned_expr = args['versionedExpr'] - @config = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesMatchConfig.new(args['config'], to_s) + @expr = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesMatchExpr.new(args["expr"], to_s) + @versioned_expr = args["versionedExpr"] + @config = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesMatchConfig.new(args["config"], to_s) end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_rules_match_config.rb b/libraries/google/compute/property/regionsecuritypolicy_rules_match_config.rb index b85d75c95..7e9b237c3 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_rules_match_config.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_rules_match_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class RegionSecurityPolicyRulesMatchConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @src_ip_ranges = args['srcIpRanges'] + @src_ip_ranges = args["srcIpRanges"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_rules_match_expr.rb b/libraries/google/compute/property/regionsecuritypolicy_rules_match_expr.rb index 50b15cf61..8e9a7a83e 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_rules_match_expr.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_rules_match_expr.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class RegionSecurityPolicyRulesMatchExpr def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @expression = args['expression'] - @title = args['title'] - @description = args['description'] - @location = args['location'] + @expression = args["expression"] + @title = args["title"] + @description = args["description"] + @location = args["location"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config.rb b/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config.rb index 929808acf..fd5a931e8 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions' +require "google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions" module GoogleInSpec module Compute module Property @@ -23,7 +23,7 @@ class RegionSecurityPolicyRulesPreconfiguredWafConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @exclusions = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsArray.parse(args['exclusions'], to_s) + @exclusions = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsArray.parse(args["exclusions"], to_s) end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions.rb b/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions.rb index ea431b6da..6bd8f2b1e 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_cookies_to_exclude' -require 'google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_headers_to_exclude' -require 'google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_query_params_to_exclude' -require 'google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_uris_to_exclude' +require "google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_cookies_to_exclude" +require "google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_headers_to_exclude" +require "google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_query_params_to_exclude" +require "google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_uris_to_exclude" module GoogleInSpec module Compute module Property @@ -36,12 +36,12 @@ class RegionSecurityPolicyRulesPreconfiguredWafConfigExclusions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @target_rule_set = args['targetRuleSet'] - @target_rule_ids = args['targetRuleIds'] - @request_headers_to_exclude = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestHeadersToExcludeArray.parse(args['requestHeadersToExclude'], to_s) - @request_cookies_to_exclude = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestCookiesToExcludeArray.parse(args['requestCookiesToExclude'], to_s) - @request_query_params_to_exclude = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestQueryParamsToExcludeArray.parse(args['requestQueryParamsToExclude'], to_s) - @request_uris_to_exclude = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestUrisToExcludeArray.parse(args['requestUrisToExclude'], to_s) + @target_rule_set = args["targetRuleSet"] + @target_rule_ids = args["targetRuleIds"] + @request_headers_to_exclude = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestHeadersToExcludeArray.parse(args["requestHeadersToExclude"], to_s) + @request_cookies_to_exclude = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestCookiesToExcludeArray.parse(args["requestCookiesToExclude"], to_s) + @request_query_params_to_exclude = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestQueryParamsToExcludeArray.parse(args["requestQueryParamsToExclude"], to_s) + @request_uris_to_exclude = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestUrisToExcludeArray.parse(args["requestUrisToExclude"], to_s) end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_cookies_to_exclude.rb b/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_cookies_to_exclude.rb index 08a48b115..bd042333a 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_cookies_to_exclude.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_cookies_to_exclude.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestCookiesToE def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @val = args['val'] - @op = args['op'] + @val = args["val"] + @op = args["op"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_headers_to_exclude.rb b/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_headers_to_exclude.rb index 602ae1fbd..c1c7fc7ef 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_headers_to_exclude.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_headers_to_exclude.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestHeadersToE def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @val = args['val'] - @op = args['op'] + @val = args["val"] + @op = args["op"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_query_params_to_exclude.rb b/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_query_params_to_exclude.rb index dab81c776..e29a47d37 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_query_params_to_exclude.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_query_params_to_exclude.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestQueryParam def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @val = args['val'] - @op = args['op'] + @val = args["val"] + @op = args["op"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_uris_to_exclude.rb b/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_uris_to_exclude.rb index f597f3a87..f2e07e596 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_uris_to_exclude.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_rules_preconfigured_waf_config_exclusions_request_uris_to_exclude.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionSecurityPolicyRulesPreconfiguredWafConfigExclusionsRequestUrisToExcl def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @val = args['val'] - @op = args['op'] + @val = args["val"] + @op = args["op"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options.rb b/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options.rb index 69f46ec3a..06c70fbbb 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_ban_threshold' -require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_enforce_on_key_configs' -require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_exceed_redirect_options' -require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_rate_limit_threshold' +require "google/compute/property/regionsecuritypolicy_rules_rate_limit_options_ban_threshold" +require "google/compute/property/regionsecuritypolicy_rules_rate_limit_options_enforce_on_key_configs" +require "google/compute/property/regionsecuritypolicy_rules_rate_limit_options_exceed_redirect_options" +require "google/compute/property/regionsecuritypolicy_rules_rate_limit_options_rate_limit_threshold" module GoogleInSpec module Compute module Property @@ -42,15 +42,15 @@ class RegionSecurityPolicyRulesRateLimitOptions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @rate_limit_threshold = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptionsRateLimitThreshold.new(args['rateLimitThreshold'], to_s) - @conform_action = args['conformAction'] - @exceed_action = args['exceedAction'] - @exceed_redirect_options = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptionsExceedRedirectOptions.new(args['exceedRedirectOptions'], to_s) - @enforce_on_key = args['enforceOnKey'] - @enforce_on_key_name = args['enforceOnKeyName'] - @enforce_on_key_configs = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptionsEnforceOnKeyConfigsArray.parse(args['enforceOnKeyConfigs'], to_s) - @ban_threshold = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptionsBanThreshold.new(args['banThreshold'], to_s) - @ban_duration_sec = args['banDurationSec'] + @rate_limit_threshold = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptionsRateLimitThreshold.new(args["rateLimitThreshold"], to_s) + @conform_action = args["conformAction"] + @exceed_action = args["exceedAction"] + @exceed_redirect_options = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptionsExceedRedirectOptions.new(args["exceedRedirectOptions"], to_s) + @enforce_on_key = args["enforceOnKey"] + @enforce_on_key_name = args["enforceOnKeyName"] + @enforce_on_key_configs = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptionsEnforceOnKeyConfigsArray.parse(args["enforceOnKeyConfigs"], to_s) + @ban_threshold = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptionsBanThreshold.new(args["banThreshold"], to_s) + @ban_duration_sec = args["banDurationSec"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_ban_threshold.rb b/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_ban_threshold.rb index 8fcb81068..40c66ac70 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_ban_threshold.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_ban_threshold.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionSecurityPolicyRulesRateLimitOptionsBanThreshold def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @count = args['count'] - @interval_sec = args['intervalSec'] + @count = args["count"] + @interval_sec = args["intervalSec"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_enforce_on_key_configs.rb b/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_enforce_on_key_configs.rb index e8d5cd338..c74e07cf8 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_enforce_on_key_configs.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_enforce_on_key_configs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionSecurityPolicyRulesRateLimitOptionsEnforceOnKeyConfigs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enforce_on_key_type = args['enforceOnKeyType'] - @enforce_on_key_name = args['enforceOnKeyName'] + @enforce_on_key_type = args["enforceOnKeyType"] + @enforce_on_key_name = args["enforceOnKeyName"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_exceed_redirect_options.rb b/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_exceed_redirect_options.rb index f51f91abb..7ef5645fa 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_exceed_redirect_options.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_exceed_redirect_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionSecurityPolicyRulesRateLimitOptionsExceedRedirectOptions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @type = args['type'] - @target = args['target'] + @type = args["type"] + @target = args["target"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_rate_limit_threshold.rb b/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_rate_limit_threshold.rb index 3fab964a9..35c6ca583 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_rate_limit_threshold.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_rules_rate_limit_options_rate_limit_threshold.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionSecurityPolicyRulesRateLimitOptionsRateLimitThreshold def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @count = args['count'] - @interval_sec = args['intervalSec'] + @count = args["count"] + @interval_sec = args["intervalSec"] end def to_s diff --git a/libraries/google/compute/property/regionsecuritypolicy_rules_redirect_options.rb b/libraries/google/compute/property/regionsecuritypolicy_rules_redirect_options.rb index 314578f40..fa4d0dc64 100644 --- a/libraries/google/compute/property/regionsecuritypolicy_rules_redirect_options.rb +++ b/libraries/google/compute/property/regionsecuritypolicy_rules_redirect_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RegionSecurityPolicyRulesRedirectOptions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @type = args['type'] - @target = args['target'] + @type = args["type"] + @target = args["target"] end def to_s diff --git a/libraries/google/compute/property/router_bgp.rb b/libraries/google/compute/property/router_bgp.rb index 4d3603743..6c0a24fc4 100644 --- a/libraries/google/compute/property/router_bgp.rb +++ b/libraries/google/compute/property/router_bgp.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/router_bgp_advertised_ip_ranges' +require "google/compute/property/router_bgp_advertised_ip_ranges" module GoogleInSpec module Compute module Property @@ -29,10 +29,10 @@ class RouterBgp def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @asn = args['asn'] - @advertise_mode = args['advertiseMode'] - @advertised_groups = args['advertisedGroups'] - @advertised_ip_ranges = GoogleInSpec::Compute::Property::RouterBgpAdvertisedIpRangesArray.parse(args['advertisedIpRanges'], to_s) + @asn = args["asn"] + @advertise_mode = args["advertiseMode"] + @advertised_groups = args["advertisedGroups"] + @advertised_ip_ranges = GoogleInSpec::Compute::Property::RouterBgpAdvertisedIpRangesArray.parse(args["advertisedIpRanges"], to_s) end def to_s diff --git a/libraries/google/compute/property/router_bgp_advertised_ip_ranges.rb b/libraries/google/compute/property/router_bgp_advertised_ip_ranges.rb index 5b13e7153..8fe704500 100644 --- a/libraries/google/compute/property/router_bgp_advertised_ip_ranges.rb +++ b/libraries/google/compute/property/router_bgp_advertised_ip_ranges.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RouterBgpAdvertisedIpRanges def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @range = args['range'] - @description = args['description'] + @range = args["range"] + @description = args["description"] end def to_s diff --git a/libraries/google/compute/property/routernat_log_config.rb b/libraries/google/compute/property/routernat_log_config.rb index 5b562a257..5f4106bbb 100644 --- a/libraries/google/compute/property/routernat_log_config.rb +++ b/libraries/google/compute/property/routernat_log_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RouterNatLogConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enable = args['enable'] - @filter = args['filter'] + @enable = args["enable"] + @filter = args["filter"] end def to_s diff --git a/libraries/google/compute/property/routernat_subnetwork.rb b/libraries/google/compute/property/routernat_subnetwork.rb index 43942822f..511a5da9b 100644 --- a/libraries/google/compute/property/routernat_subnetwork.rb +++ b/libraries/google/compute/property/routernat_subnetwork.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class RouterNatSubnetwork def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @source_ip_ranges_to_nat = args['sourceIpRangesToNat'] - @secondary_ip_range_names = args['secondaryIpRangeNames'] + @name = args["name"] + @source_ip_ranges_to_nat = args["sourceIpRangesToNat"] + @secondary_ip_range_names = args["secondaryIpRangeNames"] end def to_s diff --git a/libraries/google/compute/property/securitypolicy_rules.rb b/libraries/google/compute/property/securitypolicy_rules.rb index ea945da6d..e49ed50ae 100644 --- a/libraries/google/compute/property/securitypolicy_rules.rb +++ b/libraries/google/compute/property/securitypolicy_rules.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/securitypolicy_rules_match' -require 'google/compute/property/securitypolicy_rules_match_config' -require 'google/compute/property/securitypolicy_rules_match_expr' +require "google/compute/property/securitypolicy_rules_match" +require "google/compute/property/securitypolicy_rules_match_config" +require "google/compute/property/securitypolicy_rules_match_expr" module GoogleInSpec module Compute module Property @@ -33,11 +33,11 @@ class SecurityPolicyRules def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @description = args['description'] - @priority = args['priority'] - @action = args['action'] - @preview = args['preview'] - @match = GoogleInSpec::Compute::Property::SecurityPolicyRulesMatch.new(args['match'], to_s) + @description = args["description"] + @priority = args["priority"] + @action = args["action"] + @preview = args["preview"] + @match = GoogleInSpec::Compute::Property::SecurityPolicyRulesMatch.new(args["match"], to_s) end def to_s diff --git a/libraries/google/compute/property/securitypolicy_rules_match.rb b/libraries/google/compute/property/securitypolicy_rules_match.rb index 4ccabaade..db5321088 100644 --- a/libraries/google/compute/property/securitypolicy_rules_match.rb +++ b/libraries/google/compute/property/securitypolicy_rules_match.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/securitypolicy_rules_match_config' -require 'google/compute/property/securitypolicy_rules_match_expr' +require "google/compute/property/securitypolicy_rules_match_config" +require "google/compute/property/securitypolicy_rules_match_expr" module GoogleInSpec module Compute module Property @@ -30,10 +30,10 @@ class SecurityPolicyRulesMatch def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @description = args['description'] - @expr = GoogleInSpec::Compute::Property::SecurityPolicyRulesMatchExpr.new(args['expr'], to_s) - @versioned_expr = args['versionedExpr'] - @config = GoogleInSpec::Compute::Property::SecurityPolicyRulesMatchConfig.new(args['config'], to_s) + @description = args["description"] + @expr = GoogleInSpec::Compute::Property::SecurityPolicyRulesMatchExpr.new(args["expr"], to_s) + @versioned_expr = args["versionedExpr"] + @config = GoogleInSpec::Compute::Property::SecurityPolicyRulesMatchConfig.new(args["config"], to_s) end def to_s diff --git a/libraries/google/compute/property/securitypolicy_rules_match_config.rb b/libraries/google/compute/property/securitypolicy_rules_match_config.rb index 2a5c7a468..c72ad11b7 100644 --- a/libraries/google/compute/property/securitypolicy_rules_match_config.rb +++ b/libraries/google/compute/property/securitypolicy_rules_match_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class SecurityPolicyRulesMatchConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @src_ip_ranges = args['srcIpRanges'] + @src_ip_ranges = args["srcIpRanges"] end def to_s diff --git a/libraries/google/compute/property/securitypolicy_rules_match_expr.rb b/libraries/google/compute/property/securitypolicy_rules_match_expr.rb index 4f2f2e6b6..ff8c14e9b 100644 --- a/libraries/google/compute/property/securitypolicy_rules_match_expr.rb +++ b/libraries/google/compute/property/securitypolicy_rules_match_expr.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class SecurityPolicyRulesMatchExpr def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @expression = args['expression'] - @title = args['title'] - @description = args['description'] - @location = args['location'] + @expression = args["expression"] + @title = args["title"] + @description = args["description"] + @location = args["location"] end def to_s diff --git a/libraries/google/compute/property/serviceattachment_connected_endpoints.rb b/libraries/google/compute/property/serviceattachment_connected_endpoints.rb index 36f4fc710..e616fa960 100644 --- a/libraries/google/compute/property/serviceattachment_connected_endpoints.rb +++ b/libraries/google/compute/property/serviceattachment_connected_endpoints.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class ServiceAttachmentConnectedEndpoints def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @status = args['status'] - @psc_connection_id = args['pscConnectionId'] - @endpoint = args['endpoint'] - @consumer_network = args['consumerNetwork'] + @status = args["status"] + @psc_connection_id = args["pscConnectionId"] + @endpoint = args["endpoint"] + @consumer_network = args["consumerNetwork"] end def to_s diff --git a/libraries/google/compute/property/serviceattachment_consumer_accept_lists.rb b/libraries/google/compute/property/serviceattachment_consumer_accept_lists.rb index a7edc9c60..ec7bcd6b6 100644 --- a/libraries/google/compute/property/serviceattachment_consumer_accept_lists.rb +++ b/libraries/google/compute/property/serviceattachment_consumer_accept_lists.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ServiceAttachmentConsumerAcceptLists def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @project_id_or_num = args['projectIdOrNum'] - @network_url = args['networkUrl'] - @connection_limit = args['connectionLimit'] + @project_id_or_num = args["projectIdOrNum"] + @network_url = args["networkUrl"] + @connection_limit = args["connectionLimit"] end def to_s diff --git a/libraries/google/compute/property/serviceattachment_psc_service_attachment_id.rb b/libraries/google/compute/property/serviceattachment_psc_service_attachment_id.rb index a01521a07..5a4e9f769 100644 --- a/libraries/google/compute/property/serviceattachment_psc_service_attachment_id.rb +++ b/libraries/google/compute/property/serviceattachment_psc_service_attachment_id.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ServiceAttachmentPscServiceAttachmentId def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @high = args['high'] - @low = args['low'] + @high = args["high"] + @low = args["low"] end def to_s diff --git a/libraries/google/compute/property/snapshot_snapshot_encryption_key.rb b/libraries/google/compute/property/snapshot_snapshot_encryption_key.rb index 6483173a2..f10c5134c 100644 --- a/libraries/google/compute/property/snapshot_snapshot_encryption_key.rb +++ b/libraries/google/compute/property/snapshot_snapshot_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class SnapshotSnapshotEncryptionKey def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @raw_key = args['rawKey'] - @sha256 = args['sha256'] - @kms_key_name = args['kmsKeyName'] - @kms_key_service_account = args['kmsKeyServiceAccount'] + @raw_key = args["rawKey"] + @sha256 = args["sha256"] + @kms_key_name = args["kmsKeyName"] + @kms_key_service_account = args["kmsKeyServiceAccount"] end def to_s diff --git a/libraries/google/compute/property/snapshot_source_disk_encryption_key.rb b/libraries/google/compute/property/snapshot_source_disk_encryption_key.rb index c6e35fc50..3b4a29b79 100644 --- a/libraries/google/compute/property/snapshot_source_disk_encryption_key.rb +++ b/libraries/google/compute/property/snapshot_source_disk_encryption_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class SnapshotSourceDiskEncryptionKey def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @raw_key = args['rawKey'] - @kms_key_name = args['kmsKeyName'] - @kms_key_service_account = args['kmsKeyServiceAccount'] + @raw_key = args["rawKey"] + @kms_key_name = args["kmsKeyName"] + @kms_key_service_account = args["kmsKeyServiceAccount"] end def to_s diff --git a/libraries/google/compute/property/sslpolicy_warnings.rb b/libraries/google/compute/property/sslpolicy_warnings.rb index 6a37431ac..89391dfa4 100644 --- a/libraries/google/compute/property/sslpolicy_warnings.rb +++ b/libraries/google/compute/property/sslpolicy_warnings.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class SslPolicyWarnings def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @code = args['code'] - @message = args['message'] + @code = args["code"] + @message = args["message"] end def to_s diff --git a/libraries/google/compute/property/subnetwork_log_config.rb b/libraries/google/compute/property/subnetwork_log_config.rb index 90b370d01..deaeff8b6 100644 --- a/libraries/google/compute/property/subnetwork_log_config.rb +++ b/libraries/google/compute/property/subnetwork_log_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -32,12 +32,12 @@ class SubnetworkLogConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enable = args['enable'] - @aggregation_interval = args['aggregationInterval'] - @flow_sampling = args['flowSampling'] - @metadata = args['metadata'] - @metadata_fields = args['metadataFields'] - @filter_expr = args['filterExpr'] + @enable = args["enable"] + @aggregation_interval = args["aggregationInterval"] + @flow_sampling = args["flowSampling"] + @metadata = args["metadata"] + @metadata_fields = args["metadataFields"] + @filter_expr = args["filterExpr"] end def to_s diff --git a/libraries/google/compute/property/subnetwork_secondary_ip_ranges.rb b/libraries/google/compute/property/subnetwork_secondary_ip_ranges.rb index 1d887119a..b5db06a60 100644 --- a/libraries/google/compute/property/subnetwork_secondary_ip_ranges.rb +++ b/libraries/google/compute/property/subnetwork_secondary_ip_ranges.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class SubnetworkSecondaryIpRanges def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @range_name = args['rangeName'] - @ip_cidr_range = args['ipCidrRange'] + @range_name = args["rangeName"] + @ip_cidr_range = args["ipCidrRange"] end def to_s diff --git a/libraries/google/compute/property/urlmap_default_route_action.rb b/libraries/google/compute/property/urlmap_default_route_action.rb index 895efcd32..789326286 100644 --- a/libraries/google/compute/property/urlmap_default_route_action.rb +++ b/libraries/google/compute/property/urlmap_default_route_action.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,17 +13,17 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/urlmap_default_route_action_cors_policy' -require 'google/compute/property/urlmap_default_route_action_fault_injection_policy' -require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_abort' -require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_delay' -require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_delay_fixed_delay' -require 'google/compute/property/urlmap_default_route_action_request_mirror_policy' -require 'google/compute/property/urlmap_default_route_action_retry_policy' -require 'google/compute/property/urlmap_default_route_action_retry_policy_per_try_timeout' -require 'google/compute/property/urlmap_default_route_action_timeout' -require 'google/compute/property/urlmap_default_route_action_url_rewrite' -require 'google/compute/property/urlmap_default_route_action_weighted_backend_services' +require "google/compute/property/urlmap_default_route_action_cors_policy" +require "google/compute/property/urlmap_default_route_action_fault_injection_policy" +require "google/compute/property/urlmap_default_route_action_fault_injection_policy_abort" +require "google/compute/property/urlmap_default_route_action_fault_injection_policy_delay" +require "google/compute/property/urlmap_default_route_action_fault_injection_policy_delay_fixed_delay" +require "google/compute/property/urlmap_default_route_action_request_mirror_policy" +require "google/compute/property/urlmap_default_route_action_retry_policy" +require "google/compute/property/urlmap_default_route_action_retry_policy_per_try_timeout" +require "google/compute/property/urlmap_default_route_action_timeout" +require "google/compute/property/urlmap_default_route_action_url_rewrite" +require "google/compute/property/urlmap_default_route_action_weighted_backend_services" module GoogleInSpec module Compute module Property @@ -45,13 +45,13 @@ class UrlMapDefaultRouteAction def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @weighted_backend_services = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionWeightedBackendServicesArray.parse(args['weightedBackendServices'], to_s) - @url_rewrite = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionUrlRewrite.new(args['urlRewrite'], to_s) - @timeout = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionTimeout.new(args['timeout'], to_s) - @retry_policy = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionRetryPolicy.new(args['retryPolicy'], to_s) - @request_mirror_policy = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionRequestMirrorPolicy.new(args['requestMirrorPolicy'], to_s) - @cors_policy = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionCorsPolicy.new(args['corsPolicy'], to_s) - @fault_injection_policy = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionFaultInjectionPolicy.new(args['faultInjectionPolicy'], to_s) + @weighted_backend_services = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionWeightedBackendServicesArray.parse(args["weightedBackendServices"], to_s) + @url_rewrite = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionUrlRewrite.new(args["urlRewrite"], to_s) + @timeout = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionTimeout.new(args["timeout"], to_s) + @retry_policy = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionRetryPolicy.new(args["retryPolicy"], to_s) + @request_mirror_policy = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionRequestMirrorPolicy.new(args["requestMirrorPolicy"], to_s) + @cors_policy = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionCorsPolicy.new(args["corsPolicy"], to_s) + @fault_injection_policy = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionFaultInjectionPolicy.new(args["faultInjectionPolicy"], to_s) end def to_s diff --git a/libraries/google/compute/property/urlmap_default_route_action_cors_policy.rb b/libraries/google/compute/property/urlmap_default_route_action_cors_policy.rb index 012b63ec0..edf2e1d36 100644 --- a/libraries/google/compute/property/urlmap_default_route_action_cors_policy.rb +++ b/libraries/google/compute/property/urlmap_default_route_action_cors_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -36,14 +36,14 @@ class UrlMapDefaultRouteActionCorsPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @allow_origins = args['allowOrigins'] - @allow_origin_regexes = args['allowOriginRegexes'] - @allow_methods = args['allowMethods'] - @allow_headers = args['allowHeaders'] - @expose_headers = args['exposeHeaders'] - @max_age = args['maxAge'] - @allow_credentials = args['allowCredentials'] - @disabled = args['disabled'] + @allow_origins = args["allowOrigins"] + @allow_origin_regexes = args["allowOriginRegexes"] + @allow_methods = args["allowMethods"] + @allow_headers = args["allowHeaders"] + @expose_headers = args["exposeHeaders"] + @max_age = args["maxAge"] + @allow_credentials = args["allowCredentials"] + @disabled = args["disabled"] end def to_s diff --git a/libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy.rb b/libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy.rb index 448022046..90725ceec 100644 --- a/libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy.rb +++ b/libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_abort' -require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_delay' -require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_delay_fixed_delay' +require "google/compute/property/urlmap_default_route_action_fault_injection_policy_abort" +require "google/compute/property/urlmap_default_route_action_fault_injection_policy_delay" +require "google/compute/property/urlmap_default_route_action_fault_injection_policy_delay_fixed_delay" module GoogleInSpec module Compute module Property @@ -27,8 +27,8 @@ class UrlMapDefaultRouteActionFaultInjectionPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @delay = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionFaultInjectionPolicyDelay.new(args['delay'], to_s) - @abort = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionFaultInjectionPolicyAbort.new(args['abort'], to_s) + @delay = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionFaultInjectionPolicyDelay.new(args["delay"], to_s) + @abort = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionFaultInjectionPolicyAbort.new(args["abort"], to_s) end def to_s diff --git a/libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy_abort.rb b/libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy_abort.rb index e5f572a73..825ed7e60 100644 --- a/libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy_abort.rb +++ b/libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy_abort.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class UrlMapDefaultRouteActionFaultInjectionPolicyAbort def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @http_status = args['httpStatus'] - @percentage = args['percentage'] + @http_status = args["httpStatus"] + @percentage = args["percentage"] end def to_s diff --git a/libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy_delay.rb b/libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy_delay.rb index 9c4150090..8620fc44a 100644 --- a/libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy_delay.rb +++ b/libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy_delay.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_delay_fixed_delay' +require "google/compute/property/urlmap_default_route_action_fault_injection_policy_delay_fixed_delay" module GoogleInSpec module Compute module Property @@ -25,8 +25,8 @@ class UrlMapDefaultRouteActionFaultInjectionPolicyDelay def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @fixed_delay = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionFaultInjectionPolicyDelayFixedDelay.new(args['fixedDelay'], to_s) - @percentage = args['percentage'] + @fixed_delay = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionFaultInjectionPolicyDelayFixedDelay.new(args["fixedDelay"], to_s) + @percentage = args["percentage"] end def to_s diff --git a/libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy_delay_fixed_delay.rb b/libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy_delay_fixed_delay.rb index 16d4405b0..82ddd65e1 100644 --- a/libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy_delay_fixed_delay.rb +++ b/libraries/google/compute/property/urlmap_default_route_action_fault_injection_policy_delay_fixed_delay.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class UrlMapDefaultRouteActionFaultInjectionPolicyDelayFixedDelay def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @seconds = args['seconds'] - @nanos = args['nanos'] + @seconds = args["seconds"] + @nanos = args["nanos"] end def to_s diff --git a/libraries/google/compute/property/urlmap_default_route_action_request_mirror_policy.rb b/libraries/google/compute/property/urlmap_default_route_action_request_mirror_policy.rb index 872f38048..c440d5d0f 100644 --- a/libraries/google/compute/property/urlmap_default_route_action_request_mirror_policy.rb +++ b/libraries/google/compute/property/urlmap_default_route_action_request_mirror_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class UrlMapDefaultRouteActionRequestMirrorPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @backend_service = args['backendService'] + @backend_service = args["backendService"] end def to_s diff --git a/libraries/google/compute/property/urlmap_default_route_action_retry_policy.rb b/libraries/google/compute/property/urlmap_default_route_action_retry_policy.rb index 07588e522..1f1b465e7 100644 --- a/libraries/google/compute/property/urlmap_default_route_action_retry_policy.rb +++ b/libraries/google/compute/property/urlmap_default_route_action_retry_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/urlmap_default_route_action_retry_policy_per_try_timeout' +require "google/compute/property/urlmap_default_route_action_retry_policy_per_try_timeout" module GoogleInSpec module Compute module Property @@ -27,9 +27,9 @@ class UrlMapDefaultRouteActionRetryPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @retry_conditions = args['retryConditions'] - @num_retries = args['numRetries'] - @per_try_timeout = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionRetryPolicyPerTryTimeout.new(args['perTryTimeout'], to_s) + @retry_conditions = args["retryConditions"] + @num_retries = args["numRetries"] + @per_try_timeout = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionRetryPolicyPerTryTimeout.new(args["perTryTimeout"], to_s) end def to_s diff --git a/libraries/google/compute/property/urlmap_default_route_action_retry_policy_per_try_timeout.rb b/libraries/google/compute/property/urlmap_default_route_action_retry_policy_per_try_timeout.rb index afb5bb6fc..4f7850a1b 100644 --- a/libraries/google/compute/property/urlmap_default_route_action_retry_policy_per_try_timeout.rb +++ b/libraries/google/compute/property/urlmap_default_route_action_retry_policy_per_try_timeout.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class UrlMapDefaultRouteActionRetryPolicyPerTryTimeout def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @seconds = args['seconds'] - @nanos = args['nanos'] + @seconds = args["seconds"] + @nanos = args["nanos"] end def to_s diff --git a/libraries/google/compute/property/urlmap_default_route_action_timeout.rb b/libraries/google/compute/property/urlmap_default_route_action_timeout.rb index 34161cd97..bb444e95b 100644 --- a/libraries/google/compute/property/urlmap_default_route_action_timeout.rb +++ b/libraries/google/compute/property/urlmap_default_route_action_timeout.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class UrlMapDefaultRouteActionTimeout def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @seconds = args['seconds'] - @nanos = args['nanos'] + @seconds = args["seconds"] + @nanos = args["nanos"] end def to_s diff --git a/libraries/google/compute/property/urlmap_default_route_action_url_rewrite.rb b/libraries/google/compute/property/urlmap_default_route_action_url_rewrite.rb index 50385ba5f..d6ca8f1e4 100644 --- a/libraries/google/compute/property/urlmap_default_route_action_url_rewrite.rb +++ b/libraries/google/compute/property/urlmap_default_route_action_url_rewrite.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class UrlMapDefaultRouteActionUrlRewrite def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @path_prefix_rewrite = args['pathPrefixRewrite'] - @host_rewrite = args['hostRewrite'] + @path_prefix_rewrite = args["pathPrefixRewrite"] + @host_rewrite = args["hostRewrite"] end def to_s diff --git a/libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services.rb b/libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services.rb index f954881f1..9eaf32efa 100644 --- a/libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services.rb +++ b/libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action' -require 'google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_request_headers_to_add' -require 'google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_response_headers_to_add' +require "google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action" +require "google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_request_headers_to_add" +require "google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_response_headers_to_add" module GoogleInSpec module Compute module Property @@ -29,9 +29,9 @@ class UrlMapDefaultRouteActionWeightedBackendServices def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @backend_service = args['backendService'] - @weight = args['weight'] - @header_action = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionWeightedBackendServicesHeaderAction.new(args['headerAction'], to_s) + @backend_service = args["backendService"] + @weight = args["weight"] + @header_action = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionWeightedBackendServicesHeaderAction.new(args["headerAction"], to_s) end def to_s diff --git a/libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action.rb b/libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action.rb index f18a56d16..0369c4711 100644 --- a/libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action.rb +++ b/libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_request_headers_to_add' -require 'google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_response_headers_to_add' +require "google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_request_headers_to_add" +require "google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_response_headers_to_add" module GoogleInSpec module Compute module Property @@ -30,10 +30,10 @@ class UrlMapDefaultRouteActionWeightedBackendServicesHeaderAction def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @request_headers_to_remove = args['requestHeadersToRemove'] - @request_headers_to_add = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) - @response_headers_to_remove = args['responseHeadersToRemove'] - @response_headers_to_add = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) + @request_headers_to_remove = args["requestHeadersToRemove"] + @request_headers_to_add = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAddArray.parse(args["requestHeadersToAdd"], to_s) + @response_headers_to_remove = args["responseHeadersToRemove"] + @response_headers_to_add = GoogleInSpec::Compute::Property::UrlMapDefaultRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAddArray.parse(args["responseHeadersToAdd"], to_s) end def to_s diff --git a/libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_request_headers_to_add.rb b/libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_request_headers_to_add.rb index 81749abdc..a3a158503 100644 --- a/libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_request_headers_to_add.rb +++ b/libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_request_headers_to_add.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class UrlMapDefaultRouteActionWeightedBackendServicesHeaderActionRequestHeadersT def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @header_name = args['headerName'] - @header_value = args['headerValue'] - @replace = args['replace'] + @header_name = args["headerName"] + @header_value = args["headerValue"] + @replace = args["replace"] end def to_s diff --git a/libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_response_headers_to_add.rb b/libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_response_headers_to_add.rb index 51425d4f3..81fcf2662 100644 --- a/libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_response_headers_to_add.rb +++ b/libraries/google/compute/property/urlmap_default_route_action_weighted_backend_services_header_action_response_headers_to_add.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class UrlMapDefaultRouteActionWeightedBackendServicesHeaderActionResponseHeaders def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @header_name = args['headerName'] - @header_value = args['headerValue'] - @replace = args['replace'] + @header_name = args["headerName"] + @header_value = args["headerValue"] + @replace = args["replace"] end def to_s diff --git a/libraries/google/compute/property/urlmap_default_url_redirect.rb b/libraries/google/compute/property/urlmap_default_url_redirect.rb index c313247f0..6b95129ca 100644 --- a/libraries/google/compute/property/urlmap_default_url_redirect.rb +++ b/libraries/google/compute/property/urlmap_default_url_redirect.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -32,12 +32,12 @@ class UrlMapDefaultUrlRedirect def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @host_redirect = args['hostRedirect'] - @https_redirect = args['httpsRedirect'] - @path_redirect = args['pathRedirect'] - @prefix_redirect = args['prefixRedirect'] - @redirect_response_code = args['redirectResponseCode'] - @strip_query = args['stripQuery'] + @host_redirect = args["hostRedirect"] + @https_redirect = args["httpsRedirect"] + @path_redirect = args["pathRedirect"] + @prefix_redirect = args["prefixRedirect"] + @redirect_response_code = args["redirectResponseCode"] + @strip_query = args["stripQuery"] end def to_s diff --git a/libraries/google/compute/property/urlmap_header_action.rb b/libraries/google/compute/property/urlmap_header_action.rb index 39393dbca..d3788fa57 100644 --- a/libraries/google/compute/property/urlmap_header_action.rb +++ b/libraries/google/compute/property/urlmap_header_action.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/urlmap_header_action_request_headers_to_add' -require 'google/compute/property/urlmap_header_action_response_headers_to_add' +require "google/compute/property/urlmap_header_action_request_headers_to_add" +require "google/compute/property/urlmap_header_action_response_headers_to_add" module GoogleInSpec module Compute module Property @@ -30,10 +30,10 @@ class UrlMapHeaderAction def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @request_headers_to_add = GoogleInSpec::Compute::Property::UrlMapHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) - @request_headers_to_remove = args['requestHeadersToRemove'] - @response_headers_to_add = GoogleInSpec::Compute::Property::UrlMapHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) - @response_headers_to_remove = args['responseHeadersToRemove'] + @request_headers_to_add = GoogleInSpec::Compute::Property::UrlMapHeaderActionRequestHeadersToAddArray.parse(args["requestHeadersToAdd"], to_s) + @request_headers_to_remove = args["requestHeadersToRemove"] + @response_headers_to_add = GoogleInSpec::Compute::Property::UrlMapHeaderActionResponseHeadersToAddArray.parse(args["responseHeadersToAdd"], to_s) + @response_headers_to_remove = args["responseHeadersToRemove"] end def to_s diff --git a/libraries/google/compute/property/urlmap_header_action_request_headers_to_add.rb b/libraries/google/compute/property/urlmap_header_action_request_headers_to_add.rb index 491868a0f..3ea023bd2 100644 --- a/libraries/google/compute/property/urlmap_header_action_request_headers_to_add.rb +++ b/libraries/google/compute/property/urlmap_header_action_request_headers_to_add.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class UrlMapHeaderActionRequestHeadersToAdd def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @header_name = args['headerName'] - @header_value = args['headerValue'] - @replace = args['replace'] + @header_name = args["headerName"] + @header_value = args["headerValue"] + @replace = args["replace"] end def to_s diff --git a/libraries/google/compute/property/urlmap_header_action_response_headers_to_add.rb b/libraries/google/compute/property/urlmap_header_action_response_headers_to_add.rb index 73ceb8a02..1f531d97d 100644 --- a/libraries/google/compute/property/urlmap_header_action_response_headers_to_add.rb +++ b/libraries/google/compute/property/urlmap_header_action_response_headers_to_add.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class UrlMapHeaderActionResponseHeadersToAdd def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @header_name = args['headerName'] - @header_value = args['headerValue'] - @replace = args['replace'] + @header_name = args["headerName"] + @header_value = args["headerValue"] + @replace = args["replace"] end def to_s diff --git a/libraries/google/compute/property/urlmap_host_rules.rb b/libraries/google/compute/property/urlmap_host_rules.rb index eab09df9c..a965b596e 100644 --- a/libraries/google/compute/property/urlmap_host_rules.rb +++ b/libraries/google/compute/property/urlmap_host_rules.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class UrlMapHostRules def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @description = args['description'] - @hosts = args['hosts'] - @path_matcher = args['pathMatcher'] + @description = args["description"] + @hosts = args["hosts"] + @path_matcher = args["pathMatcher"] end def to_s diff --git a/libraries/google/compute/property/urlmap_path_matchers.rb b/libraries/google/compute/property/urlmap_path_matchers.rb index 641dfb3ec..a876c370d 100644 --- a/libraries/google/compute/property/urlmap_path_matchers.rb +++ b/libraries/google/compute/property/urlmap_path_matchers.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,21 +13,21 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/urlmap_path_matchers_default_route_action' -require 'google/compute/property/urlmap_path_matchers_default_route_action_cors_policy' -require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy' -require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_abort' -require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay' -require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay' -require 'google/compute/property/urlmap_path_matchers_default_route_action_request_mirror_policy' -require 'google/compute/property/urlmap_path_matchers_default_route_action_retry_policy' -require 'google/compute/property/urlmap_path_matchers_default_route_action_retry_policy_per_try_timeout' -require 'google/compute/property/urlmap_path_matchers_default_route_action_timeout' -require 'google/compute/property/urlmap_path_matchers_default_route_action_url_rewrite' -require 'google/compute/property/urlmap_path_matchers_default_url_redirect' -require 'google/compute/property/urlmap_path_matchers_header_action' -require 'google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add' -require 'google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add' +require "google/compute/property/urlmap_path_matchers_default_route_action" +require "google/compute/property/urlmap_path_matchers_default_route_action_cors_policy" +require "google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy" +require "google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_abort" +require "google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay" +require "google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay" +require "google/compute/property/urlmap_path_matchers_default_route_action_request_mirror_policy" +require "google/compute/property/urlmap_path_matchers_default_route_action_retry_policy" +require "google/compute/property/urlmap_path_matchers_default_route_action_retry_policy_per_try_timeout" +require "google/compute/property/urlmap_path_matchers_default_route_action_timeout" +require "google/compute/property/urlmap_path_matchers_default_route_action_url_rewrite" +require "google/compute/property/urlmap_path_matchers_default_url_redirect" +require "google/compute/property/urlmap_path_matchers_header_action" +require "google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add" +require "google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add" module GoogleInSpec module Compute module Property @@ -47,12 +47,12 @@ class UrlMapPathMatchers def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @default_service = args['defaultService'] - @description = args['description'] - @header_action = GoogleInSpec::Compute::Property::UrlMapPathMatchersHeaderAction.new(args['headerAction'], to_s) - @name = args['name'] - @default_url_redirect = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultUrlRedirect.new(args['defaultUrlRedirect'], to_s) - @default_route_action = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteAction.new(args['defaultRouteAction'], to_s) + @default_service = args["defaultService"] + @description = args["description"] + @header_action = GoogleInSpec::Compute::Property::UrlMapPathMatchersHeaderAction.new(args["headerAction"], to_s) + @name = args["name"] + @default_url_redirect = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultUrlRedirect.new(args["defaultUrlRedirect"], to_s) + @default_route_action = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteAction.new(args["defaultRouteAction"], to_s) end def to_s diff --git a/libraries/google/compute/property/urlmap_path_matchers_default_route_action.rb b/libraries/google/compute/property/urlmap_path_matchers_default_route_action.rb index 708f08bb9..ad312ebd9 100644 --- a/libraries/google/compute/property/urlmap_path_matchers_default_route_action.rb +++ b/libraries/google/compute/property/urlmap_path_matchers_default_route_action.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/urlmap_path_matchers_default_route_action_cors_policy' -require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy' -require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_abort' -require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay' -require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay' -require 'google/compute/property/urlmap_path_matchers_default_route_action_request_mirror_policy' -require 'google/compute/property/urlmap_path_matchers_default_route_action_retry_policy' -require 'google/compute/property/urlmap_path_matchers_default_route_action_retry_policy_per_try_timeout' -require 'google/compute/property/urlmap_path_matchers_default_route_action_timeout' -require 'google/compute/property/urlmap_path_matchers_default_route_action_url_rewrite' +require "google/compute/property/urlmap_path_matchers_default_route_action_cors_policy" +require "google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy" +require "google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_abort" +require "google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay" +require "google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay" +require "google/compute/property/urlmap_path_matchers_default_route_action_request_mirror_policy" +require "google/compute/property/urlmap_path_matchers_default_route_action_retry_policy" +require "google/compute/property/urlmap_path_matchers_default_route_action_retry_policy_per_try_timeout" +require "google/compute/property/urlmap_path_matchers_default_route_action_timeout" +require "google/compute/property/urlmap_path_matchers_default_route_action_url_rewrite" module GoogleInSpec module Compute module Property @@ -42,12 +42,12 @@ class UrlMapPathMatchersDefaultRouteAction def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @url_rewrite = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionUrlRewrite.new(args['urlRewrite'], to_s) - @timeout = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionTimeout.new(args['timeout'], to_s) - @retry_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionRetryPolicy.new(args['retryPolicy'], to_s) - @request_mirror_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionRequestMirrorPolicy.new(args['requestMirrorPolicy'], to_s) - @cors_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionCorsPolicy.new(args['corsPolicy'], to_s) - @fault_injection_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicy.new(args['faultInjectionPolicy'], to_s) + @url_rewrite = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionUrlRewrite.new(args["urlRewrite"], to_s) + @timeout = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionTimeout.new(args["timeout"], to_s) + @retry_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionRetryPolicy.new(args["retryPolicy"], to_s) + @request_mirror_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionRequestMirrorPolicy.new(args["requestMirrorPolicy"], to_s) + @cors_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionCorsPolicy.new(args["corsPolicy"], to_s) + @fault_injection_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicy.new(args["faultInjectionPolicy"], to_s) end def to_s diff --git a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_cors_policy.rb b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_cors_policy.rb index c6365abdc..58f7e766c 100644 --- a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_cors_policy.rb +++ b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_cors_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -36,14 +36,14 @@ class UrlMapPathMatchersDefaultRouteActionCorsPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @allow_origins = args['allowOrigins'] - @allow_origin_regexes = args['allowOriginRegexes'] - @allow_methods = args['allowMethods'] - @allow_headers = args['allowHeaders'] - @expose_headers = args['exposeHeaders'] - @max_age = args['maxAge'] - @allow_credentials = args['allowCredentials'] - @disabled = args['disabled'] + @allow_origins = args["allowOrigins"] + @allow_origin_regexes = args["allowOriginRegexes"] + @allow_methods = args["allowMethods"] + @allow_headers = args["allowHeaders"] + @expose_headers = args["exposeHeaders"] + @max_age = args["maxAge"] + @allow_credentials = args["allowCredentials"] + @disabled = args["disabled"] end def to_s diff --git a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy.rb b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy.rb index 3d4881e60..35a8fc404 100644 --- a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy.rb +++ b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_abort' -require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay' -require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay' +require "google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_abort" +require "google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay" +require "google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay" module GoogleInSpec module Compute module Property @@ -27,8 +27,8 @@ class UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @delay = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyDelay.new(args['delay'], to_s) - @abort = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyAbort.new(args['abort'], to_s) + @delay = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyDelay.new(args["delay"], to_s) + @abort = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyAbort.new(args["abort"], to_s) end def to_s diff --git a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_abort.rb b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_abort.rb index aa86dbf7c..afc9ace88 100644 --- a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_abort.rb +++ b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_abort.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyAbort def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @http_status = args['httpStatus'] - @percentage = args['percentage'] + @http_status = args["httpStatus"] + @percentage = args["percentage"] end def to_s diff --git a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay.rb b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay.rb index 7d60d3548..12a130b8a 100644 --- a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay.rb +++ b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay' +require "google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay" module GoogleInSpec module Compute module Property @@ -25,8 +25,8 @@ class UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyDelay def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @fixed_delay = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyDelayFixedDelay.new(args['fixedDelay'], to_s) - @percentage = args['percentage'] + @fixed_delay = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyDelayFixedDelay.new(args["fixedDelay"], to_s) + @percentage = args["percentage"] end def to_s diff --git a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay.rb b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay.rb index a31731202..202bdb51e 100644 --- a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay.rb +++ b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_fault_injection_policy_delay_fixed_delay.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class UrlMapPathMatchersDefaultRouteActionFaultInjectionPolicyDelayFixedDelay def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @seconds = args['seconds'] - @nanos = args['nanos'] + @seconds = args["seconds"] + @nanos = args["nanos"] end def to_s diff --git a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_request_mirror_policy.rb b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_request_mirror_policy.rb index 72edbc9d9..b4ef38954 100644 --- a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_request_mirror_policy.rb +++ b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_request_mirror_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class UrlMapPathMatchersDefaultRouteActionRequestMirrorPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @backend_service = args['backendService'] + @backend_service = args["backendService"] end def to_s diff --git a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_retry_policy.rb b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_retry_policy.rb index 6bee41ccd..9c13339c4 100644 --- a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_retry_policy.rb +++ b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_retry_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/urlmap_path_matchers_default_route_action_retry_policy_per_try_timeout' +require "google/compute/property/urlmap_path_matchers_default_route_action_retry_policy_per_try_timeout" module GoogleInSpec module Compute module Property @@ -27,9 +27,9 @@ class UrlMapPathMatchersDefaultRouteActionRetryPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @retry_conditions = args['retryConditions'] - @num_retries = args['numRetries'] - @per_try_timeout = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionRetryPolicyPerTryTimeout.new(args['perTryTimeout'], to_s) + @retry_conditions = args["retryConditions"] + @num_retries = args["numRetries"] + @per_try_timeout = GoogleInSpec::Compute::Property::UrlMapPathMatchersDefaultRouteActionRetryPolicyPerTryTimeout.new(args["perTryTimeout"], to_s) end def to_s diff --git a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_retry_policy_per_try_timeout.rb b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_retry_policy_per_try_timeout.rb index a38240ee4..478a10746 100644 --- a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_retry_policy_per_try_timeout.rb +++ b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_retry_policy_per_try_timeout.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class UrlMapPathMatchersDefaultRouteActionRetryPolicyPerTryTimeout def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @seconds = args['seconds'] - @nanos = args['nanos'] + @seconds = args["seconds"] + @nanos = args["nanos"] end def to_s diff --git a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_timeout.rb b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_timeout.rb index 25b6912b8..82ac9abe0 100644 --- a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_timeout.rb +++ b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_timeout.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class UrlMapPathMatchersDefaultRouteActionTimeout def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @seconds = args['seconds'] - @nanos = args['nanos'] + @seconds = args["seconds"] + @nanos = args["nanos"] end def to_s diff --git a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_url_rewrite.rb b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_url_rewrite.rb index a89f800ae..68da260b1 100644 --- a/libraries/google/compute/property/urlmap_path_matchers_default_route_action_url_rewrite.rb +++ b/libraries/google/compute/property/urlmap_path_matchers_default_route_action_url_rewrite.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class UrlMapPathMatchersDefaultRouteActionUrlRewrite def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @path_prefix_rewrite = args['pathPrefixRewrite'] - @host_rewrite = args['hostRewrite'] + @path_prefix_rewrite = args["pathPrefixRewrite"] + @host_rewrite = args["hostRewrite"] end def to_s diff --git a/libraries/google/compute/property/urlmap_path_matchers_default_url_redirect.rb b/libraries/google/compute/property/urlmap_path_matchers_default_url_redirect.rb index 7ce658271..fa8b33467 100644 --- a/libraries/google/compute/property/urlmap_path_matchers_default_url_redirect.rb +++ b/libraries/google/compute/property/urlmap_path_matchers_default_url_redirect.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -32,12 +32,12 @@ class UrlMapPathMatchersDefaultUrlRedirect def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @host_redirect = args['hostRedirect'] - @https_redirect = args['httpsRedirect'] - @path_redirect = args['pathRedirect'] - @prefix_redirect = args['prefixRedirect'] - @redirect_response_code = args['redirectResponseCode'] - @strip_query = args['stripQuery'] + @host_redirect = args["hostRedirect"] + @https_redirect = args["httpsRedirect"] + @path_redirect = args["pathRedirect"] + @prefix_redirect = args["prefixRedirect"] + @redirect_response_code = args["redirectResponseCode"] + @strip_query = args["stripQuery"] end def to_s diff --git a/libraries/google/compute/property/urlmap_path_matchers_header_action.rb b/libraries/google/compute/property/urlmap_path_matchers_header_action.rb index 88c9a6b50..c25da367a 100644 --- a/libraries/google/compute/property/urlmap_path_matchers_header_action.rb +++ b/libraries/google/compute/property/urlmap_path_matchers_header_action.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add' -require 'google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add' +require "google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add" +require "google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add" module GoogleInSpec module Compute module Property @@ -30,10 +30,10 @@ class UrlMapPathMatchersHeaderAction def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @request_headers_to_add = GoogleInSpec::Compute::Property::UrlMapPathMatchersHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) - @request_headers_to_remove = args['requestHeadersToRemove'] - @response_headers_to_add = GoogleInSpec::Compute::Property::UrlMapPathMatchersHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) - @response_headers_to_remove = args['responseHeadersToRemove'] + @request_headers_to_add = GoogleInSpec::Compute::Property::UrlMapPathMatchersHeaderActionRequestHeadersToAddArray.parse(args["requestHeadersToAdd"], to_s) + @request_headers_to_remove = args["requestHeadersToRemove"] + @response_headers_to_add = GoogleInSpec::Compute::Property::UrlMapPathMatchersHeaderActionResponseHeadersToAddArray.parse(args["responseHeadersToAdd"], to_s) + @response_headers_to_remove = args["responseHeadersToRemove"] end def to_s diff --git a/libraries/google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add.rb b/libraries/google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add.rb index d03feaf82..9fe2de11e 100644 --- a/libraries/google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add.rb +++ b/libraries/google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class UrlMapPathMatchersHeaderActionRequestHeadersToAdd def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @header_name = args['headerName'] - @header_value = args['headerValue'] - @replace = args['replace'] + @header_name = args["headerName"] + @header_value = args["headerValue"] + @replace = args["replace"] end def to_s diff --git a/libraries/google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add.rb b/libraries/google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add.rb index 4d0325474..f629f0620 100644 --- a/libraries/google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add.rb +++ b/libraries/google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class UrlMapPathMatchersHeaderActionResponseHeadersToAdd def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @header_name = args['headerName'] - @header_value = args['headerValue'] - @replace = args['replace'] + @header_name = args["headerName"] + @header_value = args["headerValue"] + @replace = args["replace"] end def to_s diff --git a/libraries/google/compute/property/urlmap_tests.rb b/libraries/google/compute/property/urlmap_tests.rb index 33d91fa02..b75da5ae0 100644 --- a/libraries/google/compute/property/urlmap_tests.rb +++ b/libraries/google/compute/property/urlmap_tests.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class UrlMapTests def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @description = args['description'] - @host = args['host'] - @path = args['path'] - @service = args['service'] + @description = args["description"] + @host = args["host"] + @path = args["path"] + @service = args["service"] end def to_s diff --git a/libraries/google/compute/property/vpngateway_labels.rb b/libraries/google/compute/property/vpngateway_labels.rb index f28c34ae0..d56e2248c 100644 --- a/libraries/google/compute/property/vpngateway_labels.rb +++ b/libraries/google/compute/property/vpngateway_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class VpnGatewayLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/compute/property/vpngateway_vpn_interfaces.rb b/libraries/google/compute/property/vpngateway_vpn_interfaces.rb index 7119879e8..13ad7418e 100644 --- a/libraries/google/compute/property/vpngateway_vpn_interfaces.rb +++ b/libraries/google/compute/property/vpngateway_vpn_interfaces.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class VpnGatewayVpnInterfaces def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @id = args['id'] - @ip_address = args['ipAddress'] - @interconnect_attachment = args['interconnectAttachment'] + @id = args["id"] + @ip_address = args["ipAddress"] + @interconnect_attachment = args["interconnectAttachment"] end def to_s diff --git a/libraries/google/compute/property/zone_deprecated.rb b/libraries/google/compute/property/zone_deprecated.rb index 263636681..603e9b648 100644 --- a/libraries/google/compute/property/zone_deprecated.rb +++ b/libraries/google/compute/property/zone_deprecated.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class ZoneDeprecated def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @deleted = parse_time_string(args['deleted']) - @deprecated = parse_time_string(args['deprecated']) - @obsolete = parse_time_string(args['obsolete']) - @replacement = args['replacement'] - @state = args['state'] + @deleted = parse_time_string(args["deleted"]) + @deprecated = parse_time_string(args["deprecated"]) + @obsolete = parse_time_string(args["obsolete"]) + @replacement = args["replacement"] + @state = args["state"] end def to_s diff --git a/libraries/google/container/property/cluster_addons_config.rb b/libraries/google/container/property/cluster_addons_config.rb index e28767f46..d4ac388c1 100644 --- a/libraries/google/container/property/cluster_addons_config.rb +++ b/libraries/google/container/property/cluster_addons_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/container/property/cluster_addons_config_gce_persistent_disk_csi_driver_config' -require 'google/container/property/cluster_addons_config_horizontal_pod_autoscaling' -require 'google/container/property/cluster_addons_config_http_load_balancing' -require 'google/container/property/cluster_addons_config_kubernetes_dashboard' -require 'google/container/property/cluster_addons_config_network_policy_config' +require "google/container/property/cluster_addons_config_gce_persistent_disk_csi_driver_config" +require "google/container/property/cluster_addons_config_horizontal_pod_autoscaling" +require "google/container/property/cluster_addons_config_http_load_balancing" +require "google/container/property/cluster_addons_config_kubernetes_dashboard" +require "google/container/property/cluster_addons_config_network_policy_config" module GoogleInSpec module Container module Property @@ -35,11 +35,11 @@ class ClusterAddonsConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @http_load_balancing = GoogleInSpec::Container::Property::ClusterAddonsConfigHttpLoadBalancing.new(args['httpLoadBalancing'], to_s) - @horizontal_pod_autoscaling = GoogleInSpec::Container::Property::ClusterAddonsConfigHorizontalPodAutoscaling.new(args['horizontalPodAutoscaling'], to_s) - @kubernetes_dashboard = GoogleInSpec::Container::Property::ClusterAddonsConfigKubernetesDashboard.new(args['kubernetesDashboard'], to_s) - @network_policy_config = GoogleInSpec::Container::Property::ClusterAddonsConfigNetworkPolicyConfig.new(args['networkPolicyConfig'], to_s) - @gce_persistent_disk_csi_driver_config = GoogleInSpec::Container::Property::ClusterAddonsConfigGcePersistentDiskCsiDriverConfig.new(args['gcePersistentDiskCsiDriverConfig'], to_s) + @http_load_balancing = GoogleInSpec::Container::Property::ClusterAddonsConfigHttpLoadBalancing.new(args["httpLoadBalancing"], to_s) + @horizontal_pod_autoscaling = GoogleInSpec::Container::Property::ClusterAddonsConfigHorizontalPodAutoscaling.new(args["horizontalPodAutoscaling"], to_s) + @kubernetes_dashboard = GoogleInSpec::Container::Property::ClusterAddonsConfigKubernetesDashboard.new(args["kubernetesDashboard"], to_s) + @network_policy_config = GoogleInSpec::Container::Property::ClusterAddonsConfigNetworkPolicyConfig.new(args["networkPolicyConfig"], to_s) + @gce_persistent_disk_csi_driver_config = GoogleInSpec::Container::Property::ClusterAddonsConfigGcePersistentDiskCsiDriverConfig.new(args["gcePersistentDiskCsiDriverConfig"], to_s) end def to_s diff --git a/libraries/google/container/property/cluster_addons_config_gce_persistent_disk_csi_driver_config.rb b/libraries/google/container/property/cluster_addons_config_gce_persistent_disk_csi_driver_config.rb index e94e17e82..187ce856e 100644 --- a/libraries/google/container/property/cluster_addons_config_gce_persistent_disk_csi_driver_config.rb +++ b/libraries/google/container/property/cluster_addons_config_gce_persistent_disk_csi_driver_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ClusterAddonsConfigGcePersistentDiskCsiDriverConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enabled = args['enabled'] + @enabled = args["enabled"] end def to_s diff --git a/libraries/google/container/property/cluster_addons_config_horizontal_pod_autoscaling.rb b/libraries/google/container/property/cluster_addons_config_horizontal_pod_autoscaling.rb index dd18df8f1..7cf490666 100644 --- a/libraries/google/container/property/cluster_addons_config_horizontal_pod_autoscaling.rb +++ b/libraries/google/container/property/cluster_addons_config_horizontal_pod_autoscaling.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ClusterAddonsConfigHorizontalPodAutoscaling def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @disabled = args['disabled'] + @disabled = args["disabled"] end def to_s diff --git a/libraries/google/container/property/cluster_addons_config_http_load_balancing.rb b/libraries/google/container/property/cluster_addons_config_http_load_balancing.rb index d828781e6..8790c1b90 100644 --- a/libraries/google/container/property/cluster_addons_config_http_load_balancing.rb +++ b/libraries/google/container/property/cluster_addons_config_http_load_balancing.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ClusterAddonsConfigHttpLoadBalancing def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @disabled = args['disabled'] + @disabled = args["disabled"] end def to_s diff --git a/libraries/google/container/property/cluster_addons_config_kubernetes_dashboard.rb b/libraries/google/container/property/cluster_addons_config_kubernetes_dashboard.rb index aa03ad742..bc26c9e04 100644 --- a/libraries/google/container/property/cluster_addons_config_kubernetes_dashboard.rb +++ b/libraries/google/container/property/cluster_addons_config_kubernetes_dashboard.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ClusterAddonsConfigKubernetesDashboard def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @disabled = args['disabled'] + @disabled = args["disabled"] end def to_s diff --git a/libraries/google/container/property/cluster_addons_config_network_policy_config.rb b/libraries/google/container/property/cluster_addons_config_network_policy_config.rb index 122448abf..253175cbb 100644 --- a/libraries/google/container/property/cluster_addons_config_network_policy_config.rb +++ b/libraries/google/container/property/cluster_addons_config_network_policy_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ClusterAddonsConfigNetworkPolicyConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @disabled = args['disabled'] + @disabled = args["disabled"] end def to_s diff --git a/libraries/google/container/property/cluster_binary_authorization.rb b/libraries/google/container/property/cluster_binary_authorization.rb index c0dc2cc2d..705e716ad 100644 --- a/libraries/google/container/property/cluster_binary_authorization.rb +++ b/libraries/google/container/property/cluster_binary_authorization.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ClusterBinaryAuthorization def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enabled = args['enabled'] + @enabled = args["enabled"] end def to_s diff --git a/libraries/google/container/property/cluster_conditions.rb b/libraries/google/container/property/cluster_conditions.rb index aeddd42b6..36384dd65 100644 --- a/libraries/google/container/property/cluster_conditions.rb +++ b/libraries/google/container/property/cluster_conditions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ClusterConditions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @code = args['code'] - @message = args['message'] + @code = args["code"] + @message = args["message"] end def to_s diff --git a/libraries/google/container/property/cluster_database_encryption.rb b/libraries/google/container/property/cluster_database_encryption.rb index 8cad3e4df..49d353609 100644 --- a/libraries/google/container/property/cluster_database_encryption.rb +++ b/libraries/google/container/property/cluster_database_encryption.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ClusterDatabaseEncryption def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @state = args['state'] - @key_name = args['keyName'] + @state = args["state"] + @key_name = args["keyName"] end def to_s diff --git a/libraries/google/container/property/cluster_default_max_pods_constraint.rb b/libraries/google/container/property/cluster_default_max_pods_constraint.rb index 45f65292e..b2bd3191b 100644 --- a/libraries/google/container/property/cluster_default_max_pods_constraint.rb +++ b/libraries/google/container/property/cluster_default_max_pods_constraint.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ClusterDefaultMaxPodsConstraint def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_pods_per_node = args['maxPodsPerNode'] + @max_pods_per_node = args["maxPodsPerNode"] end def to_s diff --git a/libraries/google/container/property/cluster_ip_allocation_policy.rb b/libraries/google/container/property/cluster_ip_allocation_policy.rb index a4f862775..1e2f80a96 100644 --- a/libraries/google/container/property/cluster_ip_allocation_policy.rb +++ b/libraries/google/container/property/cluster_ip_allocation_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -38,15 +38,15 @@ class ClusterIpAllocationPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @use_ip_aliases = args['useIpAliases'] - @create_subnetwork = args['createSubnetwork'] - @subnetwork_name = args['subnetworkName'] - @cluster_secondary_range_name = args['clusterSecondaryRangeName'] - @services_secondary_range_name = args['servicesSecondaryRangeName'] - @cluster_ipv4_cidr_block = args['clusterIpv4CidrBlock'] - @node_ipv4_cidr_block = args['nodeIpv4CidrBlock'] - @services_ipv4_cidr_block = args['servicesIpv4CidrBlock'] - @tpu_ipv4_cidr_block = args['tpuIpv4CidrBlock'] + @use_ip_aliases = args["useIpAliases"] + @create_subnetwork = args["createSubnetwork"] + @subnetwork_name = args["subnetworkName"] + @cluster_secondary_range_name = args["clusterSecondaryRangeName"] + @services_secondary_range_name = args["servicesSecondaryRangeName"] + @cluster_ipv4_cidr_block = args["clusterIpv4CidrBlock"] + @node_ipv4_cidr_block = args["nodeIpv4CidrBlock"] + @services_ipv4_cidr_block = args["servicesIpv4CidrBlock"] + @tpu_ipv4_cidr_block = args["tpuIpv4CidrBlock"] end def to_s diff --git a/libraries/google/container/property/cluster_legacy_abac.rb b/libraries/google/container/property/cluster_legacy_abac.rb index 117d60769..dcca47a09 100644 --- a/libraries/google/container/property/cluster_legacy_abac.rb +++ b/libraries/google/container/property/cluster_legacy_abac.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ClusterLegacyAbac def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enabled = args['enabled'] + @enabled = args["enabled"] end def to_s diff --git a/libraries/google/container/property/cluster_master_auth.rb b/libraries/google/container/property/cluster_master_auth.rb index ae918c423..f0f56f50d 100644 --- a/libraries/google/container/property/cluster_master_auth.rb +++ b/libraries/google/container/property/cluster_master_auth.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/container/property/cluster_master_auth_client_certificate_config' +require "google/container/property/cluster_master_auth_client_certificate_config" module GoogleInSpec module Container module Property @@ -33,12 +33,12 @@ class ClusterMasterAuth def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @username = args['username'] - @password = args['password'] - @client_certificate_config = GoogleInSpec::Container::Property::ClusterMasterAuthClientCertificateConfig.new(args['clientCertificateConfig'], to_s) - @cluster_ca_certificate = args['clusterCaCertificate'] - @client_certificate = args['clientCertificate'] - @client_key = args['clientKey'] + @username = args["username"] + @password = args["password"] + @client_certificate_config = GoogleInSpec::Container::Property::ClusterMasterAuthClientCertificateConfig.new(args["clientCertificateConfig"], to_s) + @cluster_ca_certificate = args["clusterCaCertificate"] + @client_certificate = args["clientCertificate"] + @client_key = args["clientKey"] end def to_s diff --git a/libraries/google/container/property/cluster_master_auth_client_certificate_config.rb b/libraries/google/container/property/cluster_master_auth_client_certificate_config.rb index 4d78f4d1e..d700a9c72 100644 --- a/libraries/google/container/property/cluster_master_auth_client_certificate_config.rb +++ b/libraries/google/container/property/cluster_master_auth_client_certificate_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ClusterMasterAuthClientCertificateConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @issue_client_certificate = args['issueClientCertificate'] + @issue_client_certificate = args["issueClientCertificate"] end def to_s diff --git a/libraries/google/container/property/cluster_master_authorized_networks_config.rb b/libraries/google/container/property/cluster_master_authorized_networks_config.rb index 1c736417a..ca7a525ba 100644 --- a/libraries/google/container/property/cluster_master_authorized_networks_config.rb +++ b/libraries/google/container/property/cluster_master_authorized_networks_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/container/property/cluster_master_authorized_networks_config_cidr_blocks' +require "google/container/property/cluster_master_authorized_networks_config_cidr_blocks" module GoogleInSpec module Container module Property @@ -25,8 +25,8 @@ class ClusterMasterAuthorizedNetworksConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enabled = args['enabled'] - @cidr_blocks = GoogleInSpec::Container::Property::ClusterMasterAuthorizedNetworksConfigCidrBlocksArray.parse(args['cidrBlocks'], to_s) + @enabled = args["enabled"] + @cidr_blocks = GoogleInSpec::Container::Property::ClusterMasterAuthorizedNetworksConfigCidrBlocksArray.parse(args["cidrBlocks"], to_s) end def to_s diff --git a/libraries/google/container/property/cluster_master_authorized_networks_config_cidr_blocks.rb b/libraries/google/container/property/cluster_master_authorized_networks_config_cidr_blocks.rb index 9290103fe..b4cf1db60 100644 --- a/libraries/google/container/property/cluster_master_authorized_networks_config_cidr_blocks.rb +++ b/libraries/google/container/property/cluster_master_authorized_networks_config_cidr_blocks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ClusterMasterAuthorizedNetworksConfigCidrBlocks def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @display_name = args['displayName'] - @cidr_block = args['cidrBlock'] + @display_name = args["displayName"] + @cidr_block = args["cidrBlock"] end def to_s diff --git a/libraries/google/container/property/cluster_network_config.rb b/libraries/google/container/property/cluster_network_config.rb index 9b8f317e4..3f74f5ebc 100644 --- a/libraries/google/container/property/cluster_network_config.rb +++ b/libraries/google/container/property/cluster_network_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class ClusterNetworkConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enable_intra_node_visibility = args['enableIntraNodeVisibility'] - @network = args['network'] - @subnetwork = args['subnetwork'] - @default_snat_status = args['defaultSnatStatus'] + @enable_intra_node_visibility = args["enableIntraNodeVisibility"] + @network = args["network"] + @subnetwork = args["subnetwork"] + @default_snat_status = args["defaultSnatStatus"] end def to_s diff --git a/libraries/google/container/property/cluster_network_policy.rb b/libraries/google/container/property/cluster_network_policy.rb index 930c1e5f1..c0e52e675 100644 --- a/libraries/google/container/property/cluster_network_policy.rb +++ b/libraries/google/container/property/cluster_network_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ClusterNetworkPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @provider = args['provider'] - @enabled = args['enabled'] + @provider = args["provider"] + @enabled = args["enabled"] end def to_s diff --git a/libraries/google/container/property/cluster_node_config.rb b/libraries/google/container/property/cluster_node_config.rb index 307b5d864..7ebc32b0c 100644 --- a/libraries/google/container/property/cluster_node_config.rb +++ b/libraries/google/container/property/cluster_node_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/container/property/cluster_node_config_accelerators' -require 'google/container/property/cluster_node_config_shielded_instance_config' -require 'google/container/property/cluster_node_config_taints' +require "google/container/property/cluster_node_config_accelerators" +require "google/container/property/cluster_node_config_shielded_instance_config" +require "google/container/property/cluster_node_config_taints" module GoogleInSpec module Container module Property @@ -53,21 +53,21 @@ class ClusterNodeConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @machine_type = args['machineType'] - @disk_size_gb = args['diskSizeGb'] - @oauth_scopes = args['oauthScopes'] - @service_account = args['serviceAccount'] - @metadata = args['metadata'] - @image_type = args['imageType'] - @labels = args['labels'] - @local_ssd_count = args['localSsdCount'] - @tags = args['tags'] - @preemptible = args['preemptible'] - @accelerators = GoogleInSpec::Container::Property::ClusterNodeConfigAcceleratorsArray.parse(args['accelerators'], to_s) - @disk_type = args['diskType'] - @min_cpu_platform = args['minCpuPlatform'] - @taints = GoogleInSpec::Container::Property::ClusterNodeConfigTaintsArray.parse(args['taints'], to_s) - @shielded_instance_config = GoogleInSpec::Container::Property::ClusterNodeConfigShieldedInstanceConfig.new(args['shieldedInstanceConfig'], to_s) + @machine_type = args["machineType"] + @disk_size_gb = args["diskSizeGb"] + @oauth_scopes = args["oauthScopes"] + @service_account = args["serviceAccount"] + @metadata = args["metadata"] + @image_type = args["imageType"] + @labels = args["labels"] + @local_ssd_count = args["localSsdCount"] + @tags = args["tags"] + @preemptible = args["preemptible"] + @accelerators = GoogleInSpec::Container::Property::ClusterNodeConfigAcceleratorsArray.parse(args["accelerators"], to_s) + @disk_type = args["diskType"] + @min_cpu_platform = args["minCpuPlatform"] + @taints = GoogleInSpec::Container::Property::ClusterNodeConfigTaintsArray.parse(args["taints"], to_s) + @shielded_instance_config = GoogleInSpec::Container::Property::ClusterNodeConfigShieldedInstanceConfig.new(args["shieldedInstanceConfig"], to_s) end def to_s diff --git a/libraries/google/container/property/cluster_node_config_accelerators.rb b/libraries/google/container/property/cluster_node_config_accelerators.rb index a7dbdd905..effb5b445 100644 --- a/libraries/google/container/property/cluster_node_config_accelerators.rb +++ b/libraries/google/container/property/cluster_node_config_accelerators.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ClusterNodeConfigAccelerators def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @accelerator_count = args['acceleratorCount'] - @accelerator_type = args['acceleratorType'] + @accelerator_count = args["acceleratorCount"] + @accelerator_type = args["acceleratorType"] end def to_s diff --git a/libraries/google/container/property/cluster_node_config_shielded_instance_config.rb b/libraries/google/container/property/cluster_node_config_shielded_instance_config.rb index 50ea6a62c..6d871ff45 100644 --- a/libraries/google/container/property/cluster_node_config_shielded_instance_config.rb +++ b/libraries/google/container/property/cluster_node_config_shielded_instance_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ClusterNodeConfigShieldedInstanceConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enable_secure_boot = args['enableSecureBoot'] - @enable_integrity_monitoring = args['enableIntegrityMonitoring'] + @enable_secure_boot = args["enableSecureBoot"] + @enable_integrity_monitoring = args["enableIntegrityMonitoring"] end def to_s diff --git a/libraries/google/container/property/cluster_node_config_taints.rb b/libraries/google/container/property/cluster_node_config_taints.rb index a6b8bbd46..5bc36527a 100644 --- a/libraries/google/container/property/cluster_node_config_taints.rb +++ b/libraries/google/container/property/cluster_node_config_taints.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ClusterNodeConfigTaints def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @key = args['key'] - @value = args['value'] - @effect = args['effect'] + @key = args["key"] + @value = args["value"] + @effect = args["effect"] end def to_s diff --git a/libraries/google/container/property/cluster_node_pools.rb b/libraries/google/container/property/cluster_node_pools.rb index abecc890d..b74a95dc1 100644 --- a/libraries/google/container/property/cluster_node_pools.rb +++ b/libraries/google/container/property/cluster_node_pools.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ClusterNodePools def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/container/property/cluster_pod_security_policy_config.rb b/libraries/google/container/property/cluster_pod_security_policy_config.rb index d706956f1..5619f8f24 100644 --- a/libraries/google/container/property/cluster_pod_security_policy_config.rb +++ b/libraries/google/container/property/cluster_pod_security_policy_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ClusterPodSecurityPolicyConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enabled = args['enabled'] + @enabled = args["enabled"] end def to_s diff --git a/libraries/google/container/property/cluster_private_cluster_config.rb b/libraries/google/container/property/cluster_private_cluster_config.rb index acad704e2..f4295f35a 100644 --- a/libraries/google/container/property/cluster_private_cluster_config.rb +++ b/libraries/google/container/property/cluster_private_cluster_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class ClusterPrivateClusterConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enable_private_nodes = args['enablePrivateNodes'] - @enable_private_endpoint = args['enablePrivateEndpoint'] - @master_ipv4_cidr_block = args['masterIpv4CidrBlock'] - @private_endpoint = args['privateEndpoint'] - @public_endpoint = args['publicEndpoint'] + @enable_private_nodes = args["enablePrivateNodes"] + @enable_private_endpoint = args["enablePrivateEndpoint"] + @master_ipv4_cidr_block = args["masterIpv4CidrBlock"] + @private_endpoint = args["privateEndpoint"] + @public_endpoint = args["publicEndpoint"] end def to_s diff --git a/libraries/google/container/property/cluster_release_channel.rb b/libraries/google/container/property/cluster_release_channel.rb index dd5a4b507..be09b1ef7 100644 --- a/libraries/google/container/property/cluster_release_channel.rb +++ b/libraries/google/container/property/cluster_release_channel.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ClusterReleaseChannel def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @channel = args['channel'] + @channel = args["channel"] end def to_s diff --git a/libraries/google/container/property/cluster_shielded_nodes.rb b/libraries/google/container/property/cluster_shielded_nodes.rb index a1aeb8ec0..398169c62 100644 --- a/libraries/google/container/property/cluster_shielded_nodes.rb +++ b/libraries/google/container/property/cluster_shielded_nodes.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ClusterShieldedNodes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enabled = args['enabled'] + @enabled = args["enabled"] end def to_s diff --git a/libraries/google/container/property/nodepool_autoscaling.rb b/libraries/google/container/property/nodepool_autoscaling.rb index 274b9cbf2..d79a0f288 100644 --- a/libraries/google/container/property/nodepool_autoscaling.rb +++ b/libraries/google/container/property/nodepool_autoscaling.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class NodePoolAutoscaling def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enabled = args['enabled'] - @min_node_count = args['minNodeCount'] - @max_node_count = args['maxNodeCount'] + @enabled = args["enabled"] + @min_node_count = args["minNodeCount"] + @max_node_count = args["maxNodeCount"] end def to_s diff --git a/libraries/google/container/property/nodepool_conditions.rb b/libraries/google/container/property/nodepool_conditions.rb index 0d5bc28c6..c02b87bf7 100644 --- a/libraries/google/container/property/nodepool_conditions.rb +++ b/libraries/google/container/property/nodepool_conditions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class NodePoolConditions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @code = args['code'] + @code = args["code"] end def to_s diff --git a/libraries/google/container/property/nodepool_config.rb b/libraries/google/container/property/nodepool_config.rb index 6742578cf..8b01e1fba 100644 --- a/libraries/google/container/property/nodepool_config.rb +++ b/libraries/google/container/property/nodepool_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/container/property/nodepool_config_accelerators' -require 'google/container/property/nodepool_config_shielded_instance_config' -require 'google/container/property/nodepool_config_taints' -require 'google/container/property/nodepool_config_workload_meta_config' +require "google/container/property/nodepool_config_accelerators" +require "google/container/property/nodepool_config_shielded_instance_config" +require "google/container/property/nodepool_config_taints" +require "google/container/property/nodepool_config_workload_meta_config" module GoogleInSpec module Container module Property @@ -56,22 +56,22 @@ class NodePoolConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @machine_type = args['machineType'] - @disk_size_gb = args['diskSizeGb'] - @oauth_scopes = args['oauthScopes'] - @service_account = args['serviceAccount'] - @metadata = args['metadata'] - @image_type = args['imageType'] - @labels = args['labels'] - @local_ssd_count = args['localSsdCount'] - @tags = args['tags'] - @preemptible = args['preemptible'] - @accelerators = GoogleInSpec::Container::Property::NodePoolConfigAcceleratorsArray.parse(args['accelerators'], to_s) - @disk_type = args['diskType'] - @min_cpu_platform = args['minCpuPlatform'] - @taints = GoogleInSpec::Container::Property::NodePoolConfigTaintsArray.parse(args['taints'], to_s) - @shielded_instance_config = GoogleInSpec::Container::Property::NodePoolConfigShieldedInstanceConfig.new(args['shieldedInstanceConfig'], to_s) - @workload_meta_config = GoogleInSpec::Container::Property::NodePoolConfigWorkloadMetaConfig.new(args['workloadMetadataConfig'], to_s) + @machine_type = args["machineType"] + @disk_size_gb = args["diskSizeGb"] + @oauth_scopes = args["oauthScopes"] + @service_account = args["serviceAccount"] + @metadata = args["metadata"] + @image_type = args["imageType"] + @labels = args["labels"] + @local_ssd_count = args["localSsdCount"] + @tags = args["tags"] + @preemptible = args["preemptible"] + @accelerators = GoogleInSpec::Container::Property::NodePoolConfigAcceleratorsArray.parse(args["accelerators"], to_s) + @disk_type = args["diskType"] + @min_cpu_platform = args["minCpuPlatform"] + @taints = GoogleInSpec::Container::Property::NodePoolConfigTaintsArray.parse(args["taints"], to_s) + @shielded_instance_config = GoogleInSpec::Container::Property::NodePoolConfigShieldedInstanceConfig.new(args["shieldedInstanceConfig"], to_s) + @workload_meta_config = GoogleInSpec::Container::Property::NodePoolConfigWorkloadMetaConfig.new(args["workloadMetadataConfig"], to_s) end def to_s diff --git a/libraries/google/container/property/nodepool_config_accelerators.rb b/libraries/google/container/property/nodepool_config_accelerators.rb index fc2ca1f25..9df7f158b 100644 --- a/libraries/google/container/property/nodepool_config_accelerators.rb +++ b/libraries/google/container/property/nodepool_config_accelerators.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class NodePoolConfigAccelerators def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @accelerator_count = args['acceleratorCount'] - @accelerator_type = args['acceleratorType'] + @accelerator_count = args["acceleratorCount"] + @accelerator_type = args["acceleratorType"] end def to_s diff --git a/libraries/google/container/property/nodepool_config_shielded_instance_config.rb b/libraries/google/container/property/nodepool_config_shielded_instance_config.rb index a4e585a7a..0172e7166 100644 --- a/libraries/google/container/property/nodepool_config_shielded_instance_config.rb +++ b/libraries/google/container/property/nodepool_config_shielded_instance_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class NodePoolConfigShieldedInstanceConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enable_secure_boot = args['enableSecureBoot'] - @enable_integrity_monitoring = args['enableIntegrityMonitoring'] + @enable_secure_boot = args["enableSecureBoot"] + @enable_integrity_monitoring = args["enableIntegrityMonitoring"] end def to_s diff --git a/libraries/google/container/property/nodepool_config_taints.rb b/libraries/google/container/property/nodepool_config_taints.rb index beca04ce6..5bed01da0 100644 --- a/libraries/google/container/property/nodepool_config_taints.rb +++ b/libraries/google/container/property/nodepool_config_taints.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class NodePoolConfigTaints def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @key = args['key'] - @value = args['value'] - @effect = args['effect'] + @key = args["key"] + @value = args["value"] + @effect = args["effect"] end def to_s diff --git a/libraries/google/container/property/nodepool_config_workload_meta_config.rb b/libraries/google/container/property/nodepool_config_workload_meta_config.rb index d99a9541a..daec88f21 100644 --- a/libraries/google/container/property/nodepool_config_workload_meta_config.rb +++ b/libraries/google/container/property/nodepool_config_workload_meta_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class NodePoolConfigWorkloadMetaConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @mode = args['mode'] + @mode = args["mode"] end def to_s diff --git a/libraries/google/container/property/nodepool_management.rb b/libraries/google/container/property/nodepool_management.rb index dd3387b3e..d1246c64e 100644 --- a/libraries/google/container/property/nodepool_management.rb +++ b/libraries/google/container/property/nodepool_management.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/container/property/nodepool_management_upgrade_options' +require "google/container/property/nodepool_management_upgrade_options" module GoogleInSpec module Container module Property @@ -27,9 +27,9 @@ class NodePoolManagement def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @auto_upgrade = args['autoUpgrade'] - @auto_repair = args['autoRepair'] - @upgrade_options = GoogleInSpec::Container::Property::NodePoolManagementUpgradeOptions.new(args['upgradeOptions'], to_s) + @auto_upgrade = args["autoUpgrade"] + @auto_repair = args["autoRepair"] + @upgrade_options = GoogleInSpec::Container::Property::NodePoolManagementUpgradeOptions.new(args["upgradeOptions"], to_s) end def to_s diff --git a/libraries/google/container/property/nodepool_management_upgrade_options.rb b/libraries/google/container/property/nodepool_management_upgrade_options.rb index 4b0ca9894..8120c1c0d 100644 --- a/libraries/google/container/property/nodepool_management_upgrade_options.rb +++ b/libraries/google/container/property/nodepool_management_upgrade_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class NodePoolManagementUpgradeOptions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @auto_upgrade_start_time = parse_time_string(args['autoUpgradeStartTime']) - @description = args['description'] + @auto_upgrade_start_time = parse_time_string(args["autoUpgradeStartTime"]) + @description = args["description"] end def to_s diff --git a/libraries/google/container/property/nodepool_max_pods_constraint.rb b/libraries/google/container/property/nodepool_max_pods_constraint.rb index 67019818d..0215edb23 100644 --- a/libraries/google/container/property/nodepool_max_pods_constraint.rb +++ b/libraries/google/container/property/nodepool_max_pods_constraint.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class NodePoolMaxPodsConstraint def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_pods_per_node = args['maxPodsPerNode'] + @max_pods_per_node = args["maxPodsPerNode"] end def to_s diff --git a/libraries/google/container/property/serverconfig_channels.rb b/libraries/google/container/property/serverconfig_channels.rb index a1e88bf0e..c53c9b03e 100644 --- a/libraries/google/container/property/serverconfig_channels.rb +++ b/libraries/google/container/property/serverconfig_channels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ServerConfigChannels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @channel = args['channel'] - @default_version = args['defaultVersion'] - @valid_versions = args['validVersions'] + @channel = args["channel"] + @default_version = args["defaultVersion"] + @valid_versions = args["validVersions"] end def to_s diff --git a/libraries/google/dataproc/property/cluster_config.rb b/libraries/google/dataproc/property/cluster_config.rb index 3275170a6..64ddcebaf 100644 --- a/libraries/google/dataproc/property/cluster_config.rb +++ b/libraries/google/dataproc/property/cluster_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,21 +13,21 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataproc/property/cluster_config_encryption_config' -require 'google/dataproc/property/cluster_config_gce_cluster_config' -require 'google/dataproc/property/cluster_config_initialization_actions' -require 'google/dataproc/property/cluster_config_master_config' -require 'google/dataproc/property/cluster_config_master_config_disk_config' -require 'google/dataproc/property/cluster_config_master_config_managed_group_config' -require 'google/dataproc/property/cluster_config_secondary_worker_config' -require 'google/dataproc/property/cluster_config_secondary_worker_config_disk_config' -require 'google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config' -require 'google/dataproc/property/cluster_config_security_config' -require 'google/dataproc/property/cluster_config_security_config_kerberos_config' -require 'google/dataproc/property/cluster_config_software_config' -require 'google/dataproc/property/cluster_config_worker_config' -require 'google/dataproc/property/cluster_config_worker_config_disk_config' -require 'google/dataproc/property/cluster_config_worker_config_managed_group_config' +require "google/dataproc/property/cluster_config_encryption_config" +require "google/dataproc/property/cluster_config_gce_cluster_config" +require "google/dataproc/property/cluster_config_initialization_actions" +require "google/dataproc/property/cluster_config_master_config" +require "google/dataproc/property/cluster_config_master_config_disk_config" +require "google/dataproc/property/cluster_config_master_config_managed_group_config" +require "google/dataproc/property/cluster_config_secondary_worker_config" +require "google/dataproc/property/cluster_config_secondary_worker_config_disk_config" +require "google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config" +require "google/dataproc/property/cluster_config_security_config" +require "google/dataproc/property/cluster_config_security_config_kerberos_config" +require "google/dataproc/property/cluster_config_software_config" +require "google/dataproc/property/cluster_config_worker_config" +require "google/dataproc/property/cluster_config_worker_config_disk_config" +require "google/dataproc/property/cluster_config_worker_config_managed_group_config" module GoogleInSpec module Dataproc module Property @@ -53,15 +53,15 @@ class ClusterConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @config_bucket = args['configBucket'] - @gce_cluster_config = GoogleInSpec::Dataproc::Property::ClusterConfigGceClusterConfig.new(args['gceClusterConfig'], to_s) - @master_config = GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfig.new(args['masterConfig'], to_s) - @worker_config = GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfig.new(args['workerConfig'], to_s) - @secondary_worker_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfig.new(args['secondaryWorkerConfig'], to_s) - @software_config = GoogleInSpec::Dataproc::Property::ClusterConfigSoftwareConfig.new(args['softwareConfig'], to_s) - @initialization_actions = GoogleInSpec::Dataproc::Property::ClusterConfigInitializationActionsArray.parse(args['initializationActions'], to_s) - @encryption_config = GoogleInSpec::Dataproc::Property::ClusterConfigEncryptionConfig.new(args['encryptionConfig'], to_s) - @security_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecurityConfig.new(args['securityConfig'], to_s) + @config_bucket = args["configBucket"] + @gce_cluster_config = GoogleInSpec::Dataproc::Property::ClusterConfigGceClusterConfig.new(args["gceClusterConfig"], to_s) + @master_config = GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfig.new(args["masterConfig"], to_s) + @worker_config = GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfig.new(args["workerConfig"], to_s) + @secondary_worker_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfig.new(args["secondaryWorkerConfig"], to_s) + @software_config = GoogleInSpec::Dataproc::Property::ClusterConfigSoftwareConfig.new(args["softwareConfig"], to_s) + @initialization_actions = GoogleInSpec::Dataproc::Property::ClusterConfigInitializationActionsArray.parse(args["initializationActions"], to_s) + @encryption_config = GoogleInSpec::Dataproc::Property::ClusterConfigEncryptionConfig.new(args["encryptionConfig"], to_s) + @security_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecurityConfig.new(args["securityConfig"], to_s) end def to_s diff --git a/libraries/google/dataproc/property/cluster_config_encryption_config.rb b/libraries/google/dataproc/property/cluster_config_encryption_config.rb index 7b186be61..4ccfe1a99 100644 --- a/libraries/google/dataproc/property/cluster_config_encryption_config.rb +++ b/libraries/google/dataproc/property/cluster_config_encryption_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ClusterConfigEncryptionConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @gce_pd_kms_key_name = args['gcePdKmsKeyName'] + @gce_pd_kms_key_name = args["gcePdKmsKeyName"] end def to_s diff --git a/libraries/google/dataproc/property/cluster_config_gce_cluster_config.rb b/libraries/google/dataproc/property/cluster_config_gce_cluster_config.rb index 3705d5314..bc8dd95e1 100644 --- a/libraries/google/dataproc/property/cluster_config_gce_cluster_config.rb +++ b/libraries/google/dataproc/property/cluster_config_gce_cluster_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -34,13 +34,13 @@ class ClusterConfigGceClusterConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @zone_uri = args['zoneUri'] - @network_uri = args['networkUri'] - @subnetwork_uri = args['subnetworkUri'] - @internal_ip_only = args['internalIpOnly'] - @service_account_scopes = args['serviceAccountScopes'] - @tags = args['tags'] - @metadata = args['metadata'] + @zone_uri = args["zoneUri"] + @network_uri = args["networkUri"] + @subnetwork_uri = args["subnetworkUri"] + @internal_ip_only = args["internalIpOnly"] + @service_account_scopes = args["serviceAccountScopes"] + @tags = args["tags"] + @metadata = args["metadata"] end def to_s diff --git a/libraries/google/dataproc/property/cluster_config_initialization_actions.rb b/libraries/google/dataproc/property/cluster_config_initialization_actions.rb index eec2818e4..45f38d14f 100644 --- a/libraries/google/dataproc/property/cluster_config_initialization_actions.rb +++ b/libraries/google/dataproc/property/cluster_config_initialization_actions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ClusterConfigInitializationActions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @executable_file = args['executableFile'] - @execution_timeout = args['executionTimeout'] + @executable_file = args["executableFile"] + @execution_timeout = args["executionTimeout"] end def to_s diff --git a/libraries/google/dataproc/property/cluster_config_master_config.rb b/libraries/google/dataproc/property/cluster_config_master_config.rb index d76f54acd..8e4229cac 100644 --- a/libraries/google/dataproc/property/cluster_config_master_config.rb +++ b/libraries/google/dataproc/property/cluster_config_master_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataproc/property/cluster_config_master_config_disk_config' -require 'google/dataproc/property/cluster_config_master_config_managed_group_config' +require "google/dataproc/property/cluster_config_master_config_disk_config" +require "google/dataproc/property/cluster_config_master_config_managed_group_config" module GoogleInSpec module Dataproc module Property @@ -36,13 +36,13 @@ class ClusterConfigMasterConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @num_instances = args['numInstances'] - @instance_names = args['instanceNames'] - @image_uri = args['imageUri'] - @machine_type_uri = args['machineTypeUri'] - @disk_config = GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfigDiskConfig.new(args['diskConfig'], to_s) - @is_preemptible = args['isPreemptible'] - @managed_group_config = GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfigManagedGroupConfig.new(args['managedGroupConfig'], to_s) + @num_instances = args["numInstances"] + @instance_names = args["instanceNames"] + @image_uri = args["imageUri"] + @machine_type_uri = args["machineTypeUri"] + @disk_config = GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfigDiskConfig.new(args["diskConfig"], to_s) + @is_preemptible = args["isPreemptible"] + @managed_group_config = GoogleInSpec::Dataproc::Property::ClusterConfigMasterConfigManagedGroupConfig.new(args["managedGroupConfig"], to_s) end def to_s diff --git a/libraries/google/dataproc/property/cluster_config_master_config_disk_config.rb b/libraries/google/dataproc/property/cluster_config_master_config_disk_config.rb index 8b80d68dd..a20ff8155 100644 --- a/libraries/google/dataproc/property/cluster_config_master_config_disk_config.rb +++ b/libraries/google/dataproc/property/cluster_config_master_config_disk_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ClusterConfigMasterConfigDiskConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @boot_disk_type = args['bootDiskType'] - @boot_disk_size_gb = args['bootDiskSizeGb'] - @num_local_ssds = args['numLocalSsds'] + @boot_disk_type = args["bootDiskType"] + @boot_disk_size_gb = args["bootDiskSizeGb"] + @num_local_ssds = args["numLocalSsds"] end def to_s diff --git a/libraries/google/dataproc/property/cluster_config_master_config_managed_group_config.rb b/libraries/google/dataproc/property/cluster_config_master_config_managed_group_config.rb index 2d89eefcc..bf3646822 100644 --- a/libraries/google/dataproc/property/cluster_config_master_config_managed_group_config.rb +++ b/libraries/google/dataproc/property/cluster_config_master_config_managed_group_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ClusterConfigMasterConfigManagedGroupConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @instance_template_name = args['instanceTemplateName'] - @instance_group_manager_name = args['instanceGroupManagerName'] + @instance_template_name = args["instanceTemplateName"] + @instance_group_manager_name = args["instanceGroupManagerName"] end def to_s diff --git a/libraries/google/dataproc/property/cluster_config_secondary_worker_config.rb b/libraries/google/dataproc/property/cluster_config_secondary_worker_config.rb index 6ae091f66..65e17e6f3 100644 --- a/libraries/google/dataproc/property/cluster_config_secondary_worker_config.rb +++ b/libraries/google/dataproc/property/cluster_config_secondary_worker_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataproc/property/cluster_config_secondary_worker_config_disk_config' -require 'google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config' +require "google/dataproc/property/cluster_config_secondary_worker_config_disk_config" +require "google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config" module GoogleInSpec module Dataproc module Property @@ -36,13 +36,13 @@ class ClusterConfigSecondaryWorkerConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @num_instances = args['numInstances'] - @instance_names = args['instanceNames'] - @image_uri = args['imageUri'] - @machine_type_uri = args['machineTypeUri'] - @disk_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfigDiskConfig.new(args['diskConfig'], to_s) - @is_preemptible = args['isPreemptible'] - @managed_group_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfigManagedGroupConfig.new(args['managedGroupConfig'], to_s) + @num_instances = args["numInstances"] + @instance_names = args["instanceNames"] + @image_uri = args["imageUri"] + @machine_type_uri = args["machineTypeUri"] + @disk_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfigDiskConfig.new(args["diskConfig"], to_s) + @is_preemptible = args["isPreemptible"] + @managed_group_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecondaryWorkerConfigManagedGroupConfig.new(args["managedGroupConfig"], to_s) end def to_s diff --git a/libraries/google/dataproc/property/cluster_config_secondary_worker_config_disk_config.rb b/libraries/google/dataproc/property/cluster_config_secondary_worker_config_disk_config.rb index a04fcf966..103f25e65 100644 --- a/libraries/google/dataproc/property/cluster_config_secondary_worker_config_disk_config.rb +++ b/libraries/google/dataproc/property/cluster_config_secondary_worker_config_disk_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ClusterConfigSecondaryWorkerConfigDiskConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @boot_disk_type = args['bootDiskType'] - @boot_disk_size_gb = args['bootDiskSizeGb'] - @num_local_ssds = args['numLocalSsds'] + @boot_disk_type = args["bootDiskType"] + @boot_disk_size_gb = args["bootDiskSizeGb"] + @num_local_ssds = args["numLocalSsds"] end def to_s diff --git a/libraries/google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config.rb b/libraries/google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config.rb index b9333fa4b..c3757ae87 100644 --- a/libraries/google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config.rb +++ b/libraries/google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ClusterConfigSecondaryWorkerConfigManagedGroupConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @instance_template_name = args['instanceTemplateName'] - @instance_group_manager_name = args['instanceGroupManagerName'] + @instance_template_name = args["instanceTemplateName"] + @instance_group_manager_name = args["instanceGroupManagerName"] end def to_s diff --git a/libraries/google/dataproc/property/cluster_config_security_config.rb b/libraries/google/dataproc/property/cluster_config_security_config.rb index a07ddd650..b2707d680 100644 --- a/libraries/google/dataproc/property/cluster_config_security_config.rb +++ b/libraries/google/dataproc/property/cluster_config_security_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataproc/property/cluster_config_security_config_kerberos_config' +require "google/dataproc/property/cluster_config_security_config_kerberos_config" module GoogleInSpec module Dataproc module Property @@ -23,7 +23,7 @@ class ClusterConfigSecurityConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kerberos_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecurityConfigKerberosConfig.new(args['kerberosConfig'], to_s) + @kerberos_config = GoogleInSpec::Dataproc::Property::ClusterConfigSecurityConfigKerberosConfig.new(args["kerberosConfig"], to_s) end def to_s diff --git a/libraries/google/dataproc/property/cluster_config_security_config_kerberos_config.rb b/libraries/google/dataproc/property/cluster_config_security_config_kerberos_config.rb index 253a1b2c4..4ab68155b 100644 --- a/libraries/google/dataproc/property/cluster_config_security_config_kerberos_config.rb +++ b/libraries/google/dataproc/property/cluster_config_security_config_kerberos_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -46,19 +46,19 @@ class ClusterConfigSecurityConfigKerberosConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enable_kerberos = args['enableKerberos'] - @rootprincipal_password_uri = args['rootprincipalPasswordUri'] - @kms_key_uri = args['kmsKeyUri'] - @keystore_uri = args['keystoreUri'] - @truststore_uri = args['truststoreUri'] - @key_password_uri = args['keyPasswordUri'] - @truststore_password_uri = args['truststorePasswordUri'] - @cross_realm_trust_realm = args['crossRealmTrustRealm'] - @cross_realm_trust_admin_server = args['crossRealmTrustAdminServer'] - @cross_realm_trust_shared_password_uri = args['crossRealmTrustSharedPasswordUri'] - @kdc_db_key_uri = args['kdcDbKeyUri'] - @tgt_lifetime_hours = args['tgtLifetimeHours'] - @realm = args['realm'] + @enable_kerberos = args["enableKerberos"] + @rootprincipal_password_uri = args["rootprincipalPasswordUri"] + @kms_key_uri = args["kmsKeyUri"] + @keystore_uri = args["keystoreUri"] + @truststore_uri = args["truststoreUri"] + @key_password_uri = args["keyPasswordUri"] + @truststore_password_uri = args["truststorePasswordUri"] + @cross_realm_trust_realm = args["crossRealmTrustRealm"] + @cross_realm_trust_admin_server = args["crossRealmTrustAdminServer"] + @cross_realm_trust_shared_password_uri = args["crossRealmTrustSharedPasswordUri"] + @kdc_db_key_uri = args["kdcDbKeyUri"] + @tgt_lifetime_hours = args["tgtLifetimeHours"] + @realm = args["realm"] end def to_s diff --git a/libraries/google/dataproc/property/cluster_config_software_config.rb b/libraries/google/dataproc/property/cluster_config_software_config.rb index 9a4924ba3..669582ed1 100644 --- a/libraries/google/dataproc/property/cluster_config_software_config.rb +++ b/libraries/google/dataproc/property/cluster_config_software_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ClusterConfigSoftwareConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @image_version = args['imageVersion'] - @properties = args['properties'] - @optional_components = args['optionalComponents'] + @image_version = args["imageVersion"] + @properties = args["properties"] + @optional_components = args["optionalComponents"] end def to_s diff --git a/libraries/google/dataproc/property/cluster_config_worker_config.rb b/libraries/google/dataproc/property/cluster_config_worker_config.rb index ae4097526..4c99ca9c9 100644 --- a/libraries/google/dataproc/property/cluster_config_worker_config.rb +++ b/libraries/google/dataproc/property/cluster_config_worker_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataproc/property/cluster_config_worker_config_disk_config' -require 'google/dataproc/property/cluster_config_worker_config_managed_group_config' +require "google/dataproc/property/cluster_config_worker_config_disk_config" +require "google/dataproc/property/cluster_config_worker_config_managed_group_config" module GoogleInSpec module Dataproc module Property @@ -36,13 +36,13 @@ class ClusterConfigWorkerConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @num_instances = args['numInstances'] - @instance_names = args['instanceNames'] - @image_uri = args['imageUri'] - @machine_type_uri = args['machineTypeUri'] - @disk_config = GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfigDiskConfig.new(args['diskConfig'], to_s) - @is_preemptible = args['isPreemptible'] - @managed_group_config = GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfigManagedGroupConfig.new(args['managedGroupConfig'], to_s) + @num_instances = args["numInstances"] + @instance_names = args["instanceNames"] + @image_uri = args["imageUri"] + @machine_type_uri = args["machineTypeUri"] + @disk_config = GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfigDiskConfig.new(args["diskConfig"], to_s) + @is_preemptible = args["isPreemptible"] + @managed_group_config = GoogleInSpec::Dataproc::Property::ClusterConfigWorkerConfigManagedGroupConfig.new(args["managedGroupConfig"], to_s) end def to_s diff --git a/libraries/google/dataproc/property/cluster_config_worker_config_disk_config.rb b/libraries/google/dataproc/property/cluster_config_worker_config_disk_config.rb index 465d91b2b..485c7043f 100644 --- a/libraries/google/dataproc/property/cluster_config_worker_config_disk_config.rb +++ b/libraries/google/dataproc/property/cluster_config_worker_config_disk_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ClusterConfigWorkerConfigDiskConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @boot_disk_type = args['bootDiskType'] - @boot_disk_size_gb = args['bootDiskSizeGb'] - @num_local_ssds = args['numLocalSsds'] + @boot_disk_type = args["bootDiskType"] + @boot_disk_size_gb = args["bootDiskSizeGb"] + @num_local_ssds = args["numLocalSsds"] end def to_s diff --git a/libraries/google/dataproc/property/cluster_config_worker_config_managed_group_config.rb b/libraries/google/dataproc/property/cluster_config_worker_config_managed_group_config.rb index 3d864f147..96e41ad0e 100644 --- a/libraries/google/dataproc/property/cluster_config_worker_config_managed_group_config.rb +++ b/libraries/google/dataproc/property/cluster_config_worker_config_managed_group_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ClusterConfigWorkerConfigManagedGroupConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @instance_template_name = args['instanceTemplateName'] - @instance_group_manager_name = args['instanceGroupManagerName'] + @instance_template_name = args["instanceTemplateName"] + @instance_group_manager_name = args["instanceGroupManagerName"] end def to_s diff --git a/libraries/google/dlp/property/dt_config.rb b/libraries/google/dlp/property/dt_config.rb index 31e357a90..1cb6ec15a 100644 --- a/libraries/google/dlp/property/dt_config.rb +++ b/libraries/google/dlp/property/dt_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/dt_config_info_type_tf' -require 'google/dlp/property/dt_config_info_type_tf_tf' +require "google/dlp/property/dt_config_info_type_tf" +require "google/dlp/property/dt_config_info_type_tf_tf" module GoogleInSpec module DLP module Property @@ -24,7 +24,7 @@ class DTConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @info_type_tf = GoogleInSpec::DLP::Property::DTConfigInfoTypeTf.new(args['infoTypeTf'], to_s) + @info_type_tf = GoogleInSpec::DLP::Property::DTConfigInfoTypeTf.new(args["infoTypeTf"], to_s) end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf.rb b/libraries/google/dlp/property/dt_config_info_type_tf.rb index 1560c7f9b..92529a493 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/dt_config_info_type_tf_tf' +require "google/dlp/property/dt_config_info_type_tf_tf" module GoogleInSpec module DLP module Property @@ -23,7 +23,7 @@ class DTConfigInfoTypeTf def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @tf = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfArray.parse(args['tf'], to_s) + @tf = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfArray.parse(args["tf"], to_s) end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf.rb index f3e996393..e983a281b 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,28 +13,28 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/dt_config_info_type_tf_tf_info_types' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config_characters_to_ignore' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_context' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_kms_wrapped' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_transient' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_unwrapped' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_surrogate_info_type' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_context' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_transient' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_unwrapped' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_surrogate_info_type' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_date_value' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_time_value' +require "google/dlp/property/dt_config_info_type_tf_tf_info_types" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config_characters_to_ignore" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_context" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_kms_wrapped" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_transient" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_unwrapped" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_surrogate_info_type" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_context" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_transient" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_unwrapped" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_surrogate_info_type" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_date_value" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_time_value" module GoogleInSpec module DLP module Property @@ -46,8 +46,8 @@ class DTConfigInfoTypeTfTf def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @info_types = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfInfoTypesArray.parse(args['infoTypes'], to_s) - @primitive_tf = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTf.new(args['primitiveTf'], to_s) + @info_types = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfInfoTypesArray.parse(args["infoTypes"], to_s) + @primitive_tf = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTf.new(args["primitiveTf"], to_s) end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_info_types.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_info_types.rb index b5dbb7343..cbaa53fc7 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_info_types.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_info_types.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class DTConfigInfoTypeTfTfInfoTypes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf.rb index a088c6e58..f62d6e781 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,26 +13,26 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config_characters_to_ignore' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_context' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_kms_wrapped' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_transient' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_unwrapped' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_surrogate_info_type' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_context' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_transient' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_unwrapped' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_surrogate_info_type' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_date_value' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_time_value' +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config_characters_to_ignore" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_context" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_kms_wrapped" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_transient" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_unwrapped" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_surrogate_info_type" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_context" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_transient" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_unwrapped" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_surrogate_info_type" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_date_value" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_time_value" module GoogleInSpec module DLP module Property @@ -50,11 +50,11 @@ class DTConfigInfoTypeTfTfPrimitiveTf def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @replace_config = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfReplaceConfig.new(args['replaceConfig'], to_s) - @replace_with_info_type_config = args['replaceWithInfoTypeConfig'] - @character_mask_config = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCharacterMaskConfig.new(args['characterMaskConfig'], to_s) - @crypto_deterministic_config = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfig.new(args['cryptoDeterministicConfig'], to_s) - @crypto_replace_ffx_fpe_config = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfig.new(args['cryptoReplaceFfxFpeConfig'], to_s) + @replace_config = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfReplaceConfig.new(args["replaceConfig"], to_s) + @replace_with_info_type_config = args["replaceWithInfoTypeConfig"] + @character_mask_config = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCharacterMaskConfig.new(args["characterMaskConfig"], to_s) + @crypto_deterministic_config = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfig.new(args["cryptoDeterministicConfig"], to_s) + @crypto_replace_ffx_fpe_config = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfig.new(args["cryptoReplaceFfxFpeConfig"], to_s) end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config.rb index ca98af679..1c6562993 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config_characters_to_ignore' +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config_characters_to_ignore" module GoogleInSpec module DLP module Property @@ -29,10 +29,10 @@ class DTConfigInfoTypeTfTfPrimitiveTfCharacterMaskConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @masking_character = args['maskingCharacter'] - @number_to_mask = args['numberToMask'] - @reverse_order = args['reverseOrder'] - @characters_to_ignore = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCharacterMaskConfigCharactersToIgnoreArray.parse(args['charactersToIgnore'], to_s) + @masking_character = args["maskingCharacter"] + @number_to_mask = args["numberToMask"] + @reverse_order = args["reverseOrder"] + @characters_to_ignore = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCharacterMaskConfigCharactersToIgnoreArray.parse(args["charactersToIgnore"], to_s) end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config_characters_to_ignore.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config_characters_to_ignore.rb index 10b9d9401..58036948f 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config_characters_to_ignore.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_character_mask_config_characters_to_ignore.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class DTConfigInfoTypeTfTfPrimitiveTfCharacterMaskConfigCharactersToIgnore def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @characters_to_skip = args['charactersToSkip'] - @common_characters_to_ignore = args['commonCharactersToIgnore'] + @characters_to_skip = args["charactersToSkip"] + @common_characters_to_ignore = args["commonCharactersToIgnore"] end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config.rb index 7d17857fc..049d048fe 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,12 +13,12 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_context' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_kms_wrapped' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_transient' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_unwrapped' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_surrogate_info_type' +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_context" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_kms_wrapped" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_transient" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_unwrapped" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_surrogate_info_type" module GoogleInSpec module DLP module Property @@ -32,9 +32,9 @@ class DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @crypto_key = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKey.new(args['cryptoKey'], to_s) - @surrogate_info_type = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigSurrogateInfoType.new(args['surrogateInfoType'], to_s) - @context = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigContext.new(args['context'], to_s) + @crypto_key = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKey.new(args["cryptoKey"], to_s) + @surrogate_info_type = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigSurrogateInfoType.new(args["surrogateInfoType"], to_s) + @context = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigContext.new(args["context"], to_s) end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_context.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_context.rb index 960797712..d0800953f 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_context.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_context.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigContext def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key.rb index e01722386..3f9ac9d8c 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_kms_wrapped' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_transient' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_unwrapped' +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_kms_wrapped" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_transient" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_unwrapped" module GoogleInSpec module DLP module Property @@ -29,9 +29,9 @@ class DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKey def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @transient = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKeyTransient.new(args['transient'], to_s) - @unwrapped = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKeyUnwrapped.new(args['unwrapped'], to_s) - @kms_wrapped = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKeyKmsWrapped.new(args['kmsWrapped'], to_s) + @transient = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKeyTransient.new(args["transient"], to_s) + @unwrapped = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKeyUnwrapped.new(args["unwrapped"], to_s) + @kms_wrapped = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKeyKmsWrapped.new(args["kmsWrapped"], to_s) end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_kms_wrapped.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_kms_wrapped.rb index 5dd20b692..68a255ffe 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_kms_wrapped.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_kms_wrapped.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKeyKmsWrappe def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @wrapped_key = args['wrappedKey'] - @crypto_key_name = args['cryptoKeyName'] + @wrapped_key = args["wrappedKey"] + @crypto_key_name = args["cryptoKeyName"] end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_transient.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_transient.rb index 2861cbafe..a30834c18 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_transient.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_transient.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKeyTransient def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_unwrapped.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_unwrapped.rb index 92896523e..8476bc923 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_unwrapped.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_crypto_key_unwrapped.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigCryptoKeyUnwrapped def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @key = args['key'] + @key = args["key"] end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_surrogate_info_type.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_surrogate_info_type.rb index c5d145ba2..b8d3ae33c 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_surrogate_info_type.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_deterministic_config_surrogate_info_type.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class DTConfigInfoTypeTfTfPrimitiveTfCryptoDeterministicConfigSurrogateInfoType def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config.rb index 9ed7f311f..0517844d3 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,12 +13,12 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_context' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_transient' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_unwrapped' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_surrogate_info_type' +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_context" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_transient" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_unwrapped" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_surrogate_info_type" module GoogleInSpec module DLP module Property @@ -38,12 +38,12 @@ class DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @crypto_key = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKey.new(args['cryptoKey'], to_s) - @context = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigContext.new(args['context'], to_s) - @surrogate_info_type = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigSurrogateInfoType.new(args['surrogateInfoType'], to_s) - @common_alphabet = args['commonAlphabet'] - @custom_alphabet = args['customAlphabet'] - @radix = args['radix'] + @crypto_key = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKey.new(args["cryptoKey"], to_s) + @context = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigContext.new(args["context"], to_s) + @surrogate_info_type = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigSurrogateInfoType.new(args["surrogateInfoType"], to_s) + @common_alphabet = args["commonAlphabet"] + @custom_alphabet = args["customAlphabet"] + @radix = args["radix"] end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_context.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_context.rb index 1f459a94d..6f9f77815 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_context.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_context.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigContext def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key.rb index f8e2660ca..9ac891306 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_transient' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_unwrapped' +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_transient" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_unwrapped" module GoogleInSpec module DLP module Property @@ -29,9 +29,9 @@ class DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKey def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @transient = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKeyTransient.new(args['transient'], to_s) - @unwrapped = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKeyUnwrapped.new(args['unwrapped'], to_s) - @kms_wrapped = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKeyKmsWrapped.new(args['kmsWrapped'], to_s) + @transient = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKeyTransient.new(args["transient"], to_s) + @unwrapped = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKeyUnwrapped.new(args["unwrapped"], to_s) + @kms_wrapped = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKeyKmsWrapped.new(args["kmsWrapped"], to_s) end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped.rb index 59d1b50f7..9f9995423 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKeyKmsWrappe def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @wrapped_key = args['wrappedKey'] - @crypto_key_name = args['cryptoKeyName'] + @wrapped_key = args["wrappedKey"] + @crypto_key_name = args["cryptoKeyName"] end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_transient.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_transient.rb index dcfa89509..a4049352e 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_transient.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_transient.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKeyTransient def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_unwrapped.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_unwrapped.rb index 4b41953f1..e30e95554 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_unwrapped.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_crypto_key_unwrapped.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigCryptoKeyUnwrapped def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @key = args['key'] + @key = args["key"] end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_surrogate_info_type.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_surrogate_info_type.rb index 447f40b98..d9fdfab71 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_surrogate_info_type.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_crypto_replace_ffx_fpe_config_surrogate_info_type.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class DTConfigInfoTypeTfTfPrimitiveTfCryptoReplaceFfxFpeConfigSurrogateInfoType def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config.rb index 9c3c971da..4b33c0bcd 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_date_value' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_time_value' +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_date_value" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_time_value" module GoogleInSpec module DLP module Property @@ -25,7 +25,7 @@ class DTConfigInfoTypeTfTfPrimitiveTfReplaceConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @new_value = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfReplaceConfigNewValue.new(args['newValue'], to_s) + @new_value = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfReplaceConfigNewValue.new(args["newValue"], to_s) end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value.rb index 0639aaaf1..60501a34d 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_date_value' -require 'google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_time_value' +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_date_value" +require "google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_time_value" module GoogleInSpec module DLP module Property @@ -38,14 +38,14 @@ class DTConfigInfoTypeTfTfPrimitiveTfReplaceConfigNewValue def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @integer_value = args['integerValue'] - @float_value = args['floatValue'] - @string_value = args['stringValue'] - @boolean_value = args['booleanValue'] - @timestamp_value = args['timestampValue'] - @time_value = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfReplaceConfigNewValueTimeValue.new(args['timeValue'], to_s) - @date_value = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfReplaceConfigNewValueDateValue.new(args['dateValue'], to_s) - @day_of_week_value = args['dayOfWeekValue'] + @integer_value = args["integerValue"] + @float_value = args["floatValue"] + @string_value = args["stringValue"] + @boolean_value = args["booleanValue"] + @timestamp_value = args["timestampValue"] + @time_value = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfReplaceConfigNewValueTimeValue.new(args["timeValue"], to_s) + @date_value = GoogleInSpec::DLP::Property::DTConfigInfoTypeTfTfPrimitiveTfReplaceConfigNewValueDateValue.new(args["dateValue"], to_s) + @day_of_week_value = args["dayOfWeekValue"] end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_date_value.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_date_value.rb index ad95da5c4..ee4aca4e9 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_date_value.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_date_value.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class DTConfigInfoTypeTfTfPrimitiveTfReplaceConfigNewValueDateValue def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @year = args['year'] - @month = args['month'] - @day = args['day'] + @year = args["year"] + @month = args["month"] + @day = args["day"] end def to_s diff --git a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_time_value.rb b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_time_value.rb index 01199b086..2915591af 100644 --- a/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_time_value.rb +++ b/libraries/google/dlp/property/dt_config_info_type_tf_tf_primitive_tf_replace_config_new_value_time_value.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class DTConfigInfoTypeTfTfPrimitiveTfReplaceConfigNewValueTimeValue def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @hours = args['hours'] - @minutes = args['minutes'] - @seconds = args['seconds'] - @nanos = args['nanos'] + @hours = args["hours"] + @minutes = args["minutes"] + @seconds = args["seconds"] + @nanos = args["nanos"] end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config.rb index 0927d75d0..47e017949 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types' -require 'google/dlp/property/inspecttemplate_inspect_config_info_types' -require 'google/dlp/property/inspecttemplate_inspect_config_limits' -require 'google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set' +require "google/dlp/property/inspecttemplate_inspect_config_custom_info_types" +require "google/dlp/property/inspecttemplate_inspect_config_info_types" +require "google/dlp/property/inspecttemplate_inspect_config_limits" +require "google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set" module GoogleInSpec module DLP module Property @@ -41,14 +41,14 @@ class InspectTemplateInspectConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @exclude_info_types = args['excludeInfoTypes'] - @include_quote = args['includeQuote'] - @min_likelihood = args['minLikelihood'] - @limits = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigLimits.new(args['limits'], to_s) - @info_types = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigInfoTypesArray.parse(args['infoTypes'], to_s) - @content_options = args['contentOptions'] - @rule_set = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetArray.parse(args['ruleSet'], to_s) - @custom_info_types = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesArray.parse(args['customInfoTypes'], to_s) + @exclude_info_types = args["excludeInfoTypes"] + @include_quote = args["includeQuote"] + @min_likelihood = args["minLikelihood"] + @limits = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigLimits.new(args["limits"], to_s) + @info_types = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigInfoTypesArray.parse(args["infoTypes"], to_s) + @content_options = args["contentOptions"] + @rule_set = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetArray.parse(args["ruleSet"], to_s) + @custom_info_types = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesArray.parse(args["customInfoTypes"], to_s) end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types.rb index caaa4faf4..2ca1c8acf 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,12 +13,12 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary' -require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_cloud_storage_path' -require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_word_list' -require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types_info_type' -require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types_regex' -require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types_stored_type' +require "google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary" +require "google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_cloud_storage_path" +require "google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_word_list" +require "google/dlp/property/inspecttemplate_inspect_config_custom_info_types_info_type" +require "google/dlp/property/inspecttemplate_inspect_config_custom_info_types_regex" +require "google/dlp/property/inspecttemplate_inspect_config_custom_info_types_stored_type" module GoogleInSpec module DLP module Property @@ -38,12 +38,12 @@ class InspectTemplateInspectConfigCustomInfoTypes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @info_type = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesInfoType.new(args['infoType'], to_s) - @likelihood = args['likelihood'] - @exclusion_type = args['exclusionType'] - @regex = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesRegex.new(args['regex'], to_s) - @dictionary = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesDictionary.new(args['dictionary'], to_s) - @stored_type = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesStoredType.new(args['storedType'], to_s) + @info_type = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesInfoType.new(args["infoType"], to_s) + @likelihood = args["likelihood"] + @exclusion_type = args["exclusionType"] + @regex = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesRegex.new(args["regex"], to_s) + @dictionary = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesDictionary.new(args["dictionary"], to_s) + @stored_type = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesStoredType.new(args["storedType"], to_s) end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary.rb index 0f23e4b2b..39a676159 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_cloud_storage_path' -require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_word_list' +require "google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_cloud_storage_path" +require "google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_word_list" module GoogleInSpec module DLP module Property @@ -26,8 +26,8 @@ class InspectTemplateInspectConfigCustomInfoTypesDictionary def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @word_list = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesDictionaryWordList.new(args['wordList'], to_s) - @cloud_storage_path = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesDictionaryCloudStoragePath.new(args['cloudStoragePath'], to_s) + @word_list = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesDictionaryWordList.new(args["wordList"], to_s) + @cloud_storage_path = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigCustomInfoTypesDictionaryCloudStoragePath.new(args["cloudStoragePath"], to_s) end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_cloud_storage_path.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_cloud_storage_path.rb index abf6dbf3d..62235d907 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_cloud_storage_path.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_cloud_storage_path.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class InspectTemplateInspectConfigCustomInfoTypesDictionaryCloudStoragePath def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @path = args['path'] + @path = args["path"] end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_word_list.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_word_list.rb index e30482de9..c6bfbe4d8 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_word_list.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_dictionary_word_list.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class InspectTemplateInspectConfigCustomInfoTypesDictionaryWordList def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @words = args['words'] + @words = args["words"] end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_info_type.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_info_type.rb index 839548e12..9193eb572 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_info_type.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_info_type.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class InspectTemplateInspectConfigCustomInfoTypesInfoType def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_regex.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_regex.rb index 33863a97f..b12bc49be 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_regex.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_regex.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InspectTemplateInspectConfigCustomInfoTypesRegex def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @pattern = args['pattern'] - @group_indexes = args['groupIndexes'] + @pattern = args["pattern"] + @group_indexes = args["groupIndexes"] end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_stored_type.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_stored_type.rb index 0c03cac3c..d8cef2d4c 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_stored_type.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_custom_info_types_stored_type.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class InspectTemplateInspectConfigCustomInfoTypesStoredType def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_info_types.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_info_types.rb index 08e359d5a..8f3da8221 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_info_types.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_info_types.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class InspectTemplateInspectConfigInfoTypes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_limits.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_limits.rb index fa58997d0..56329a894 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_limits.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_limits.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type' +require "google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type" module GoogleInSpec module DLP module Property @@ -27,9 +27,9 @@ class InspectTemplateInspectConfigLimits def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_findings_per_item = args['maxFindingsPerItem'] - @max_findings_per_request = args['maxFindingsPerRequest'] - @max_findings_per_info_type = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigLimitsMaxFindingsPerInfoTypeArray.parse(args['maxFindingsPerInfoType'], to_s) + @max_findings_per_item = args["maxFindingsPerItem"] + @max_findings_per_request = args["maxFindingsPerRequest"] + @max_findings_per_info_type = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigLimitsMaxFindingsPerInfoTypeArray.parse(args["maxFindingsPerInfoType"], to_s) end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type.rb index 38c7a5635..258ad8679 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type_info_type' +require "google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type_info_type" module GoogleInSpec module DLP module Property @@ -25,8 +25,8 @@ class InspectTemplateInspectConfigLimitsMaxFindingsPerInfoType def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @info_type = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigLimitsMaxFindingsPerInfoTypeInfoType.new(args['infoType'], to_s) - @max_findings = args['maxFindings'] + @info_type = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigLimitsMaxFindingsPerInfoTypeInfoType.new(args["infoType"], to_s) + @max_findings = args["maxFindings"] end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type_info_type.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type_info_type.rb index 489a774de..90df348bd 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type_info_type.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type_info_type.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class InspectTemplateInspectConfigLimitsMaxFindingsPerInfoTypeInfoType def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set.rb index db4490a46..292b4bd95 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_info_types' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules' +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_info_types" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules" module GoogleInSpec module DLP module Property @@ -26,8 +26,8 @@ class InspectTemplateInspectConfigRuleSet def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @info_types = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetInfoTypesArray.parse(args['infoTypes'], to_s) - @rules = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesArray.parse(args['rules'], to_s) + @info_types = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetInfoTypesArray.parse(args["infoTypes"], to_s) + @rules = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesArray.parse(args["rules"], to_s) end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_info_types.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_info_types.rb index 00f1819cd..77780fab2 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_info_types.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_info_types.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class InspectTemplateInspectConfigRuleSetInfoTypes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules.rb index 0d221aae0..638d6efe0 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,17 +13,17 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_cloud_storage_path' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_word_list' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_regex' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_hotword_regex' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_likelihood_adjustment' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_proximity' +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_cloud_storage_path" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_word_list" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_regex" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_hotword_regex" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_likelihood_adjustment" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_proximity" module GoogleInSpec module DLP module Property @@ -35,8 +35,8 @@ class InspectTemplateInspectConfigRuleSetRules def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @hotword_rule = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesHotwordRule.new(args['hotwordRule'], to_s) - @exclusion_rule = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRule.new(args['exclusionRule'], to_s) + @hotword_rule = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesHotwordRule.new(args["hotwordRule"], to_s) + @exclusion_rule = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRule.new(args["exclusionRule"], to_s) end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule.rb index 66bf8caa7..770a4a014 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,12 +13,12 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_cloud_storage_path' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_word_list' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_regex' +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_cloud_storage_path" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_word_list" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_regex" module GoogleInSpec module DLP module Property @@ -34,10 +34,10 @@ class InspectTemplateInspectConfigRuleSetRulesExclusionRule def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @matching_type = args['matchingType'] - @dictionary = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRuleDictionary.new(args['dictionary'], to_s) - @regex = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRuleRegex.new(args['regex'], to_s) - @exclude_info_types = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRuleExcludeInfoTypes.new(args['excludeInfoTypes'], to_s) + @matching_type = args["matchingType"] + @dictionary = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRuleDictionary.new(args["dictionary"], to_s) + @regex = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRuleRegex.new(args["regex"], to_s) + @exclude_info_types = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRuleExcludeInfoTypes.new(args["excludeInfoTypes"], to_s) end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary.rb index f2ce2100b..3b2b9b53e 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_cloud_storage_path' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_word_list' +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_cloud_storage_path" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_word_list" module GoogleInSpec module DLP module Property @@ -26,8 +26,8 @@ class InspectTemplateInspectConfigRuleSetRulesExclusionRuleDictionary def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @word_list = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRuleDictionaryWordList.new(args['wordList'], to_s) - @cloud_storage_path = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRuleDictionaryCloudStoragePath.new(args['cloudStoragePath'], to_s) + @word_list = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRuleDictionaryWordList.new(args["wordList"], to_s) + @cloud_storage_path = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRuleDictionaryCloudStoragePath.new(args["cloudStoragePath"], to_s) end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_cloud_storage_path.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_cloud_storage_path.rb index 2013b08cc..e98fd6995 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_cloud_storage_path.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_cloud_storage_path.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class InspectTemplateInspectConfigRuleSetRulesExclusionRuleDictionaryCloudStorag def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @path = args['path'] + @path = args["path"] end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_word_list.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_word_list.rb index c362993ab..90567088b 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_word_list.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_word_list.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class InspectTemplateInspectConfigRuleSetRulesExclusionRuleDictionaryWordList def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @words = args['words'] + @words = args["words"] end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types.rb index 67ecc9f5c..df279a507 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types' +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types" module GoogleInSpec module DLP module Property @@ -23,7 +23,7 @@ class InspectTemplateInspectConfigRuleSetRulesExclusionRuleExcludeInfoTypes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @info_types = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRuleExcludeInfoTypesInfoTypesArray.parse(args['infoTypes'], to_s) + @info_types = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRuleExcludeInfoTypesInfoTypesArray.parse(args["infoTypes"], to_s) end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types.rb index 9bb1b16e7..8c68a9b0d 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class InspectTemplateInspectConfigRuleSetRulesExclusionRuleExcludeInfoTypesInfoT def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_regex.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_regex.rb index 034573eb9..ac70e1c46 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_regex.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_regex.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InspectTemplateInspectConfigRuleSetRulesExclusionRuleRegex def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @pattern = args['pattern'] - @group_indexes = args['groupIndexes'] + @pattern = args["pattern"] + @group_indexes = args["groupIndexes"] end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule.rb index f4acef30b..6348dc5ee 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_hotword_regex' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_likelihood_adjustment' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_proximity' +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_hotword_regex" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_likelihood_adjustment" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_proximity" module GoogleInSpec module DLP module Property @@ -29,9 +29,9 @@ class InspectTemplateInspectConfigRuleSetRulesHotwordRule def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @hotword_regex = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesHotwordRuleHotwordRegex.new(args['hotwordRegex'], to_s) - @proximity = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesHotwordRuleProximity.new(args['proximity'], to_s) - @likelihood_adjustment = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesHotwordRuleLikelihoodAdjustment.new(args['likelihoodAdjustment'], to_s) + @hotword_regex = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesHotwordRuleHotwordRegex.new(args["hotwordRegex"], to_s) + @proximity = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesHotwordRuleProximity.new(args["proximity"], to_s) + @likelihood_adjustment = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesHotwordRuleLikelihoodAdjustment.new(args["likelihoodAdjustment"], to_s) end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_hotword_regex.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_hotword_regex.rb index 45eb63c1a..c497ad577 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_hotword_regex.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_hotword_regex.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InspectTemplateInspectConfigRuleSetRulesHotwordRuleHotwordRegex def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @pattern = args['pattern'] - @group_indexes = args['groupIndexes'] + @pattern = args["pattern"] + @group_indexes = args["groupIndexes"] end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_likelihood_adjustment.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_likelihood_adjustment.rb index 5888c6734..1f5633ab0 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_likelihood_adjustment.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_likelihood_adjustment.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InspectTemplateInspectConfigRuleSetRulesHotwordRuleLikelihoodAdjustment def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @fixed_likelihood = args['fixedLikelihood'] - @relative_likelihood = args['relativeLikelihood'] + @fixed_likelihood = args["fixedLikelihood"] + @relative_likelihood = args["relativeLikelihood"] end def to_s diff --git a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_proximity.rb b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_proximity.rb index 6425c09ad..726ac8113 100644 --- a/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_proximity.rb +++ b/libraries/google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_proximity.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InspectTemplateInspectConfigRuleSetRulesHotwordRuleProximity def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @window_before = args['windowBefore'] - @window_after = args['windowAfter'] + @window_before = args["windowBefore"] + @window_after = args["windowAfter"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det.rb b/libraries/google/dlp/property/job_act_det.rb index 72e58cdf0..29c76866f 100644 --- a/libraries/google/dlp/property/job_act_det.rb +++ b/libraries/google/dlp/property/job_act_det.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,28 +13,28 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_deidentify_stats' -require 'google/dlp/property/job_act_det_deidentify_stats_requested_options' -require 'google/dlp/property/job_act_det_deidentify_stats_requested_options_details' -require 'google/dlp/property/job_act_det_dt_det' -require 'google/dlp/property/job_act_det_dt_det_de_stats' -require 'google/dlp/property/job_act_det_dt_det_req_opt' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt_config' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt_deidentify_config' +require "google/dlp/property/job_act_det_deidentify_stats" +require "google/dlp/property/job_act_det_deidentify_stats_requested_options" +require "google/dlp/property/job_act_det_deidentify_stats_requested_options_details" +require "google/dlp/property/job_act_det_dt_det" +require "google/dlp/property/job_act_det_dt_det_de_stats" +require "google/dlp/property/job_act_det_dt_det_req_opt" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt_config" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt_deidentify_config" module GoogleInSpec module DLP module Property @@ -46,8 +46,8 @@ class JobActDet def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @dt_det = GoogleInSpec::DLP::Property::JobActDetDtDet.new(args['dtDet'], to_s) - @deidentify_stats = GoogleInSpec::DLP::Property::JobActDetDeidentifyStats.new(args['deidentifyStats'], to_s) + @dt_det = GoogleInSpec::DLP::Property::JobActDetDtDet.new(args["dtDet"], to_s) + @deidentify_stats = GoogleInSpec::DLP::Property::JobActDetDeidentifyStats.new(args["deidentifyStats"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_deidentify_stats.rb b/libraries/google/dlp/property/job_act_det_deidentify_stats.rb index db705d99a..f4d51ed94 100644 --- a/libraries/google/dlp/property/job_act_det_deidentify_stats.rb +++ b/libraries/google/dlp/property/job_act_det_deidentify_stats.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_deidentify_stats_requested_options' -require 'google/dlp/property/job_act_det_deidentify_stats_requested_options_details' +require "google/dlp/property/job_act_det_deidentify_stats_requested_options" +require "google/dlp/property/job_act_det_deidentify_stats_requested_options_details" module GoogleInSpec module DLP module Property @@ -24,7 +24,7 @@ class JobActDetDeidentifyStats def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @requested_options = GoogleInSpec::DLP::Property::JobActDetDeidentifyStatsRequestedOptions.new(args['requestedOptions'], to_s) + @requested_options = GoogleInSpec::DLP::Property::JobActDetDeidentifyStatsRequestedOptions.new(args["requestedOptions"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_deidentify_stats_requested_options.rb b/libraries/google/dlp/property/job_act_det_deidentify_stats_requested_options.rb index 26cf5bad6..98199523f 100644 --- a/libraries/google/dlp/property/job_act_det_deidentify_stats_requested_options.rb +++ b/libraries/google/dlp/property/job_act_det_deidentify_stats_requested_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_deidentify_stats_requested_options_details' +require "google/dlp/property/job_act_det_deidentify_stats_requested_options_details" module GoogleInSpec module DLP module Property @@ -27,9 +27,9 @@ class JobActDetDeidentifyStatsRequestedOptions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @code = args['code'] - @message = args['message'] - @details = GoogleInSpec::DLP::Property::JobActDetDeidentifyStatsRequestedOptionsDetailsArray.parse(args['details'], to_s) + @code = args["code"] + @message = args["message"] + @details = GoogleInSpec::DLP::Property::JobActDetDeidentifyStatsRequestedOptionsDetailsArray.parse(args["details"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_deidentify_stats_requested_options_details.rb b/libraries/google/dlp/property/job_act_det_deidentify_stats_requested_options_details.rb index afc4b2a93..e9c2c1f92 100644 --- a/libraries/google/dlp/property/job_act_det_deidentify_stats_requested_options_details.rb +++ b/libraries/google/dlp/property/job_act_det_deidentify_stats_requested_options_details.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class JobActDetDeidentifyStatsRequestedOptionsDetails def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @type = args['type'] - @field1 = args['field1'] + @type = args["type"] + @field1 = args["field1"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det.rb b/libraries/google/dlp/property/job_act_det_dt_det.rb index 81354b236..395f2b23d 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,24 +13,24 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_de_stats' -require 'google/dlp/property/job_act_det_dt_det_req_opt' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt_config' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt_deidentify_config' +require "google/dlp/property/job_act_det_dt_det_de_stats" +require "google/dlp/property/job_act_det_dt_det_req_opt" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt_config" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt_deidentify_config" module GoogleInSpec module DLP module Property @@ -42,8 +42,8 @@ class JobActDetDtDet def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @de_stats = GoogleInSpec::DLP::Property::JobActDetDtDetDeStats.new(args['deStats'], to_s) - @req_opt = GoogleInSpec::DLP::Property::JobActDetDtDetReqOpt.new(args['req_Opt'], to_s) + @de_stats = GoogleInSpec::DLP::Property::JobActDetDtDetDeStats.new(args["deStats"], to_s) + @req_opt = GoogleInSpec::DLP::Property::JobActDetDtDetReqOpt.new(args["req_Opt"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_de_stats.rb b/libraries/google/dlp/property/job_act_det_dt_det_de_stats.rb index 3cd14de03..74d52a627 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_de_stats.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_de_stats.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class JobActDetDtDetDeStats def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @transformed_bytes = args['transformedBytes'] - @transformation_count = args['transformationCount'] - @transformation_error_count = args['transformationErrorCount'] + @transformed_bytes = args["transformedBytes"] + @transformation_count = args["transformationCount"] + @transformation_error_count = args["transformationErrorCount"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt.rb index e736444d7..a45de0373 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,22 +13,22 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt_config' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt_deidentify_config' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt_config" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt_deidentify_config" module GoogleInSpec module DLP module Property @@ -42,9 +42,9 @@ class JobActDetDtDetReqOpt def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @snapshot_dt = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotDt.new(args['snapshotDT'], to_s) - @snapshot_structured_dt = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotStructuredDt.new(args['snapshotStructuredDT'], to_s) - @snapshot_img_rt = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRt.new(args['snapshotImgRT'], to_s) + @snapshot_dt = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotDt.new(args["snapshotDT"], to_s) + @snapshot_structured_dt = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotStructuredDt.new(args["snapshotStructuredDT"], to_s) + @snapshot_img_rt = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRt.new(args["snapshotImgRT"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_di_template.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_di_template.rb index 8eae542df..2b8988788 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_di_template.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_di_template.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_di_template_config' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_di_template_config" module GoogleInSpec module DLP module Property @@ -33,12 +33,12 @@ class JobActDetDtDetReqOptSnapshotDiTemplate def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @display_name = args['displayName'] - @description = args['description'] - @create_time = args['createTime'] - @update_time = args['updateTime'] - @config = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotDiTemplateConfig.new(args['config'], to_s) + @name = args["name"] + @display_name = args["displayName"] + @description = args["description"] + @create_time = args["createTime"] + @update_time = args["updateTime"] + @config = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotDiTemplateConfig.new(args["config"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_di_template_config.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_di_template_config.rb index 2a20694be..648cd4121 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_di_template_config.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_di_template_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class JobActDetDtDetReqOptSnapshotDiTemplateConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @tf_error_handling = args['tfErrorHandling'] + @tf_error_handling = args["tfErrorHandling"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt.rb index c5b7a6f75..0f205649c 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt_config' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt_config" module GoogleInSpec module DLP module Property @@ -33,12 +33,12 @@ class JobActDetDtDetReqOptSnapshotDt def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @display_name = args['displayName'] - @description = args['description'] - @create_time = args['createTime'] - @update_time = args['updateTime'] - @config = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotDtConfig.new(args['config'], to_s) + @name = args["name"] + @display_name = args["displayName"] + @description = args["description"] + @create_time = args["createTime"] + @update_time = args["updateTime"] + @config = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotDtConfig.new(args["config"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt_config.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt_config.rb index 2ed106cbc..78d1af687 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt_config.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_dt_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class JobActDetDtDetReqOptSnapshotDtConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @tf_error_handling = args['tfErrorHandling'] + @tf_error_handling = args["tfErrorHandling"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt.rb index 8a85e7c03..9ebe73ce9 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,17 +13,17 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup" module GoogleInSpec module DLP module Property @@ -43,12 +43,12 @@ class JobActDetDtDetReqOptSnapshotImgRt def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @display_name = args['displayName'] - @description = args['description'] - @create_time = args['createTime'] - @update_time = args['updateTime'] - @dt_con = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtCon.new(args['dtCon'], to_s) + @name = args["name"] + @display_name = args["displayName"] + @description = args["description"] + @create_time = args["createTime"] + @update_time = args["updateTime"] + @dt_con = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtCon.new(args["dtCon"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con.rb index ce8312529..8895b424b 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup" module GoogleInSpec module DLP module Property @@ -38,10 +38,10 @@ class JobActDetDtDetReqOptSnapshotImgRtDtCon def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @tf_error_handling = args['tfErrorHandling'] - @info_type_tf = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTf.new(args['infoTypeTf'], to_s) - @rec_tf = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTf.new(args['recTf'], to_s) - @image_tf = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConImageTf.new(args['ImageTf'], to_s) + @tf_error_handling = args["tfErrorHandling"] + @info_type_tf = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTf.new(args["infoTypeTf"], to_s) + @rec_tf = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTf.new(args["recTf"], to_s) + @image_tf = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConImageTf.new(args["ImageTf"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf.rb index 37cb569cb..71392ee68 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types" module GoogleInSpec module DLP module Property @@ -32,10 +32,10 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConImageTf def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @redaction_color = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConImageTfRedactionColor.new(args['redactionColor'], to_s) - @selected_info_types = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConImageTfSelectedInfoTypesArray.parse(args['selectedInfoTypes'], to_s) - @all_info_types = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConImageTfAllInfoTypesArray.parse(args['allInfoTypes'], to_s) - @all_text = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConImageTfAllText.new(args['allText'], to_s) + @redaction_color = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConImageTfRedactionColor.new(args["redactionColor"], to_s) + @selected_info_types = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConImageTfSelectedInfoTypesArray.parse(args["selectedInfoTypes"], to_s) + @all_info_types = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConImageTfAllInfoTypesArray.parse(args["allInfoTypes"], to_s) + @all_text = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConImageTfAllText.new(args["allText"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types.rb index 736397de7..efcd87439 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_info_types.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConImageTfAllInfoTypes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text.rb index 5cc8d8459..5c25f580f 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_all_text.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConImageTfAllText def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @red = args['red'] - @green = args['green'] - @blue = args['blue'] + @red = args["red"] + @green = args["green"] + @blue = args["blue"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color.rb index cc444270d..3cf614788 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_redaction_color.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConImageTfRedactionColor def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @red = args['red'] - @green = args['green'] - @blue = args['blue'] + @red = args["red"] + @green = args["green"] + @blue = args["blue"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types.rb index 1e8090c8f..3f183907f 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_image_tf_selected_info_types.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConImageTfSelectedInfoTypes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf.rb index 4905605b9..8650ac6b9 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf" module GoogleInSpec module DLP module Property @@ -23,7 +23,7 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTf def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @tf = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfArray.parse(args['tf'], to_s) + @tf = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfArray.parse(args["tf"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf.rb index 3c46ec875..c895ce9ef 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf_info_types' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf_info_types" module GoogleInSpec module DLP module Property @@ -23,7 +23,7 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTf def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @info_types = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfInfoTypesArray.parse(args['infoTypes'], to_s) + @info_types = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfInfoTypesArray.parse(args["infoTypes"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf_info_types.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf_info_types.rb index a4fc227a9..5a0db5e54 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf_info_types.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf_info_types.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf_info_types_sensitivity_score' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf_info_types_sensitivity_score" module GoogleInSpec module DLP module Property @@ -27,9 +27,9 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfInfoTypes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @version = args['version'] - @sensitivity_score = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfInfoTypesSensitivityScore.new(args['sensitivityScore'], to_s) + @name = args["name"] + @version = args["version"] + @sensitivity_score = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfInfoTypesSensitivityScore.new(args["sensitivityScore"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf_info_types_sensitivity_score.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf_info_types_sensitivity_score.rb index 9fb53e716..10fe3b1d3 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf_info_types_sensitivity_score.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_info_type_tf_tf_info_types_sensitivity_score.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConInfoTypeTfTfInfoTypesSensitivityScor def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @score = args['score'] + @score = args["score"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf.rb index 74d305e42..312da6527 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup" module GoogleInSpec module DLP module Property @@ -26,8 +26,8 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTf def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @field_tf = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfArray.parse(args['fieldTf'], to_s) - @rec_sup = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupArray.parse(args['recSup'], to_s) + @field_tf = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfArray.parse(args["fieldTf"], to_s) + @rec_sup = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupArray.parse(args["recSup"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf.rb index 09ae2ba3b..e90237c35 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_fields' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_fields" module GoogleInSpec module DLP module Property @@ -29,8 +29,8 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTf def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @fields = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfFieldsArray.parse(args['fields'], to_s) - @con = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfCon.new(args['con'], to_s) + @fields = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfFieldsArray.parse(args["fields"], to_s) + @con = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfCon.new(args["con"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con.rb index 8d2303120..7796ac789 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond" module GoogleInSpec module DLP module Property @@ -25,7 +25,7 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfCon def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @exps = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExps.new(args['exps'], to_s) + @exps = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExps.new(args["exps"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps.rb index d76b0e53d..766a328c3 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond" module GoogleInSpec module DLP module Property @@ -26,8 +26,8 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExps def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @logical_operator = args['logicalOperator'] - @con = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsCon.new(args['con'], to_s) + @logical_operator = args["logicalOperator"] + @con = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsCon.new(args["con"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con.rb index 6fc2c99ea..3bac37c66 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond" module GoogleInSpec module DLP module Property @@ -23,7 +23,7 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsCon def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @cond = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondArray.parse(args['cond'], to_s) + @cond = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondArray.parse(args["cond"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond.rb index 2a67d2f0d..078c8eecb 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_field' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val_date_val' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val_time_val' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_field" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val_date_val" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val_time_val" module GoogleInSpec module DLP module Property @@ -30,9 +30,9 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCond def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @field = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondField.new(args['field'], to_s) - @operator = args['operator'] - @new_val = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondNewVal.new(args['newVal'], to_s) + @field = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondField.new(args["field"], to_s) + @operator = args["operator"] + @new_val = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondNewVal.new(args["newVal"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_field.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_field.rb index b5165a8d0..6f941ba55 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_field.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_field.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondField def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val.rb index 40433caa1..ec24ba4e9 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val_date_val' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val_time_val' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val_date_val" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val_time_val" module GoogleInSpec module DLP module Property @@ -38,14 +38,14 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondNewVal def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @integer_value = args['integerValue'] - @float_value = args['floatValue'] - @string_value = args['stringValue'] - @boolean_value = args['booleanValue'] - @timestamp_value = args['timestampValue'] - @time_val = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondNewValTimeVal.new(args['timeVal'], to_s) - @date_val = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondNewValDateVal.new(args['dateVal'], to_s) - @day_of_week_val = args['dayOfWeekVal'] + @integer_value = args["integerValue"] + @float_value = args["floatValue"] + @string_value = args["stringValue"] + @boolean_value = args["booleanValue"] + @timestamp_value = args["timestampValue"] + @time_val = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondNewValTimeVal.new(args["timeVal"], to_s) + @date_val = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondNewValDateVal.new(args["dateVal"], to_s) + @day_of_week_val = args["dayOfWeekVal"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val_date_val.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val_date_val.rb index 1faacf2a7..39b0e7c40 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val_date_val.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val_date_val.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondNewValDate def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @year = args['year'] - @month = args['month'] - @day = args['day'] + @year = args["year"] + @month = args["month"] + @day = args["day"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val_time_val.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val_time_val.rb index 49faefdf3..b1151b3e4 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val_time_val.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_con_exps_con_cond_new_val_time_val.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfConExpsConCondNewValTime def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @hours = args['hours'] - @minutes = args['minutes'] - @seconds = args['seconds'] - @nanos = args['nanos'] + @hours = args["hours"] + @minutes = args["minutes"] + @seconds = args["seconds"] + @nanos = args["nanos"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_fields.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_fields.rb index 9d403fb8d..51480c4dd 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_fields.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_field_tf_fields.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfFieldTfFields def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup.rb index 05f549b3d..28ca46e0b 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con" module GoogleInSpec module DLP module Property @@ -26,7 +26,7 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSup def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @con = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupCon.new(args['con'], to_s) + @con = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupCon.new(args["con"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con.rb index a3a1be28c..94d4b20d9 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con" module GoogleInSpec module DLP module Property @@ -25,7 +25,7 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupCon def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @exp = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExp.new(args['exp'], to_s) + @exp = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExp.new(args["exp"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp.rb index 0eae9356a..8d10685a0 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con" module GoogleInSpec module DLP module Property @@ -26,8 +26,8 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExp def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @logical_operator = args['logicalOperator'] - @con = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpCon.new(args['con'], to_s) + @logical_operator = args["logicalOperator"] + @con = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpCon.new(args["con"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con.rb index cf2f7b62b..6b9ff9a0f 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con" module GoogleInSpec module DLP module Property @@ -23,7 +23,7 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpCon def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @con = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConArray.parse(args['con'], to_s) + @con = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConArray.parse(args["con"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con.rb index 27c2c4b8a..550bb679b 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_field' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_date_val' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_time_val' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_field" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_date_val" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_time_val" module GoogleInSpec module DLP module Property @@ -30,9 +30,9 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConCon def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @field = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConField.new(args['field'], to_s) - @operator = args['operator'] - @new_val = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConNewVal.new(args['newVal'], to_s) + @field = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConField.new(args["field"], to_s) + @operator = args["operator"] + @new_val = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConNewVal.new(args["newVal"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_field.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_field.rb index c976056db..238224399 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_field.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_field.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConField def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val.rb index b1e7dbe6a..0b4f1e9fb 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_date_val' -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_time_val' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_date_val" +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_time_val" module GoogleInSpec module DLP module Property @@ -38,14 +38,14 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConNewVal def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @integer_val = args['integerVal'] - @float_val = args['floatVal'] - @string_val = args['stringVal'] - @boolean_val = args['booleanVal'] - @timestamp_val = args['timestampVal'] - @time_val = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConNewValTimeVal.new(args['timeVal'], to_s) - @date_val = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConNewValDateVal.new(args['dateVal'], to_s) - @day_of_week_val = args['dayOfWeekVal'] + @integer_val = args["integerVal"] + @float_val = args["floatVal"] + @string_val = args["stringVal"] + @boolean_val = args["booleanVal"] + @timestamp_val = args["timestampVal"] + @time_val = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConNewValTimeVal.new(args["timeVal"], to_s) + @date_val = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConNewValDateVal.new(args["dateVal"], to_s) + @day_of_week_val = args["dayOfWeekVal"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_date_val.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_date_val.rb index 70edaba8b..0d5611794 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_date_val.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_date_val.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConNewValDateVal def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @year = args['year'] - @month = args['month'] - @day = args['day'] + @year = args["year"] + @month = args["month"] + @day = args["day"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_time_val.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_time_val.rb index a76cba116..dfef517f5 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_time_val.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_img_rt_dt_con_rec_tf_rec_sup_con_exp_con_con_new_val_time_val.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class JobActDetDtDetReqOptSnapshotImgRtDtConRecTfRecSupConExpConConNewValTimeVal def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @hours = args['hours'] - @minutes = args['minutes'] - @seconds = args['seconds'] - @nanos = args['nanos'] + @hours = args["hours"] + @minutes = args["minutes"] + @seconds = args["seconds"] + @nanos = args["nanos"] end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt.rb index bf8782211..5dba09978 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt_deidentify_config' +require "google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt_deidentify_config" module GoogleInSpec module DLP module Property @@ -33,12 +33,12 @@ class JobActDetDtDetReqOptSnapshotStructuredDt def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @display_name = args['displayName'] - @description = args['description'] - @create_time = args['createTime'] - @update_time = args['updateTime'] - @deidentify_config = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotStructuredDtDeidentifyConfig.new(args['deidentifyConfig'], to_s) + @name = args["name"] + @display_name = args["displayName"] + @description = args["description"] + @create_time = args["createTime"] + @update_time = args["updateTime"] + @deidentify_config = GoogleInSpec::DLP::Property::JobActDetDtDetReqOptSnapshotStructuredDtDeidentifyConfig.new(args["deidentifyConfig"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt_deidentify_config.rb b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt_deidentify_config.rb index 982c1f1b9..777021feb 100644 --- a/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt_deidentify_config.rb +++ b/libraries/google/dlp/property/job_act_det_dt_det_req_opt_snapshot_structured_dt_deidentify_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class JobActDetDtDetReqOptSnapshotStructuredDtDeidentifyConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @tf_error_handling = args['tfErrorHandling'] + @tf_error_handling = args["tfErrorHandling"] end def to_s diff --git a/libraries/google/dlp/property/job_errors.rb b/libraries/google/dlp/property/job_errors.rb index 38bcb4b43..518314887 100644 --- a/libraries/google/dlp/property/job_errors.rb +++ b/libraries/google/dlp/property/job_errors.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_errors_details' -require 'google/dlp/property/job_errors_details_status' -require 'google/dlp/property/job_errors_details_status_details' +require "google/dlp/property/job_errors_details" +require "google/dlp/property/job_errors_details_status" +require "google/dlp/property/job_errors_details_status_details" module GoogleInSpec module DLP module Property @@ -25,7 +25,7 @@ class JobErrors def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @details = GoogleInSpec::DLP::Property::JobErrorsDetails.new(args['details'], to_s) + @details = GoogleInSpec::DLP::Property::JobErrorsDetails.new(args["details"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_errors_details.rb b/libraries/google/dlp/property/job_errors_details.rb index e75d08152..85cb8794e 100644 --- a/libraries/google/dlp/property/job_errors_details.rb +++ b/libraries/google/dlp/property/job_errors_details.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_errors_details_status' -require 'google/dlp/property/job_errors_details_status_details' +require "google/dlp/property/job_errors_details_status" +require "google/dlp/property/job_errors_details_status_details" module GoogleInSpec module DLP module Property @@ -24,7 +24,7 @@ class JobErrorsDetails def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @status = GoogleInSpec::DLP::Property::JobErrorsDetailsStatus.new(args['status'], to_s) + @status = GoogleInSpec::DLP::Property::JobErrorsDetailsStatus.new(args["status"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_errors_details_status.rb b/libraries/google/dlp/property/job_errors_details_status.rb index e752e1c9b..cf39df677 100644 --- a/libraries/google/dlp/property/job_errors_details_status.rb +++ b/libraries/google/dlp/property/job_errors_details_status.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/job_errors_details_status_details' +require "google/dlp/property/job_errors_details_status_details" module GoogleInSpec module DLP module Property @@ -27,9 +27,9 @@ class JobErrorsDetailsStatus def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @code = args['code'] - @message = args['message'] - @details = GoogleInSpec::DLP::Property::JobErrorsDetailsStatusDetailsArray.parse(args['details'], to_s) + @code = args["code"] + @message = args["message"] + @details = GoogleInSpec::DLP::Property::JobErrorsDetailsStatusDetailsArray.parse(args["details"], to_s) end def to_s diff --git a/libraries/google/dlp/property/job_errors_details_status_details.rb b/libraries/google/dlp/property/job_errors_details_status_details.rb index eca13eaaf..b151cc038 100644 --- a/libraries/google/dlp/property/job_errors_details_status_details.rb +++ b/libraries/google/dlp/property/job_errors_details_status_details.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class JobErrorsDetailsStatusDetails def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @type = args['type'] - @field1 = args['field1'] + @type = args["type"] + @field1 = args["field1"] end def to_s diff --git a/libraries/google/dlp/property/jobtrigger_inspect_job.rb b/libraries/google/dlp/property/jobtrigger_inspect_job.rb index f8c9a603f..6495fa25d 100644 --- a/libraries/google/dlp/property/jobtrigger_inspect_job.rb +++ b/libraries/google/dlp/property/jobtrigger_inspect_job.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,18 +13,18 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/jobtrigger_inspect_job_actions' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options_table_reference' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_kind' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_partition_id' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config_timestamp_field' +require "google/dlp/property/jobtrigger_inspect_job_actions" +require "google/dlp/property/jobtrigger_inspect_job_storage_config" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options_table_reference" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_kind" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_partition_id" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config_timestamp_field" module GoogleInSpec module DLP module Property @@ -38,9 +38,9 @@ class JobTriggerInspectJob def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @inspect_template_name = args['inspectTemplateName'] - @storage_config = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfig.new(args['storageConfig'], to_s) - @actions = GoogleInSpec::DLP::Property::JobTriggerInspectJobActionsArray.parse(args['actions'], to_s) + @inspect_template_name = args["inspectTemplateName"] + @storage_config = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfig.new(args["storageConfig"], to_s) + @actions = GoogleInSpec::DLP::Property::JobTriggerInspectJobActionsArray.parse(args["actions"], to_s) end def to_s diff --git a/libraries/google/dlp/property/jobtrigger_inspect_job_actions.rb b/libraries/google/dlp/property/jobtrigger_inspect_job_actions.rb index e97195c96..fcd622b73 100644 --- a/libraries/google/dlp/property/jobtrigger_inspect_job_actions.rb +++ b/libraries/google/dlp/property/jobtrigger_inspect_job_actions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/jobtrigger_inspect_job_actions_save_findings' -require 'google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config' -require 'google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config_table' +require "google/dlp/property/jobtrigger_inspect_job_actions_save_findings" +require "google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config" +require "google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config_table" module GoogleInSpec module DLP module Property @@ -25,7 +25,7 @@ class JobTriggerInspectJobActions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @save_findings = GoogleInSpec::DLP::Property::JobTriggerInspectJobActionsSaveFindings.new(args['saveFindings'], to_s) + @save_findings = GoogleInSpec::DLP::Property::JobTriggerInspectJobActionsSaveFindings.new(args["saveFindings"], to_s) end def to_s diff --git a/libraries/google/dlp/property/jobtrigger_inspect_job_actions_save_findings.rb b/libraries/google/dlp/property/jobtrigger_inspect_job_actions_save_findings.rb index 75fda5496..f2683d679 100644 --- a/libraries/google/dlp/property/jobtrigger_inspect_job_actions_save_findings.rb +++ b/libraries/google/dlp/property/jobtrigger_inspect_job_actions_save_findings.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config' -require 'google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config_table' +require "google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config" +require "google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config_table" module GoogleInSpec module DLP module Property @@ -24,7 +24,7 @@ class JobTriggerInspectJobActionsSaveFindings def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_config = GoogleInSpec::DLP::Property::JobTriggerInspectJobActionsSaveFindingsOutputConfig.new(args['outputConfig'], to_s) + @output_config = GoogleInSpec::DLP::Property::JobTriggerInspectJobActionsSaveFindingsOutputConfig.new(args["outputConfig"], to_s) end def to_s diff --git a/libraries/google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config.rb b/libraries/google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config.rb index 8648a1512..6507e782c 100644 --- a/libraries/google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config.rb +++ b/libraries/google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config_table' +require "google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config_table" module GoogleInSpec module DLP module Property @@ -25,8 +25,8 @@ class JobTriggerInspectJobActionsSaveFindingsOutputConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @table = GoogleInSpec::DLP::Property::JobTriggerInspectJobActionsSaveFindingsOutputConfigTable.new(args['table'], to_s) - @output_schema = args['outputSchema'] + @table = GoogleInSpec::DLP::Property::JobTriggerInspectJobActionsSaveFindingsOutputConfigTable.new(args["table"], to_s) + @output_schema = args["outputSchema"] end def to_s diff --git a/libraries/google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config_table.rb b/libraries/google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config_table.rb index a4cb79c32..d3d45f718 100644 --- a/libraries/google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config_table.rb +++ b/libraries/google/dlp/property/jobtrigger_inspect_job_actions_save_findings_output_config_table.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class JobTriggerInspectJobActionsSaveFindingsOutputConfigTable def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @project_id = args['projectId'] - @dataset_id = args['datasetId'] - @table_id = args['tableId'] + @project_id = args["projectId"] + @dataset_id = args["datasetId"] + @table_id = args["tableId"] end def to_s diff --git a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config.rb b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config.rb index d76230af1..a1120e3b1 100644 --- a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config.rb +++ b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options_table_reference' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_kind' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_partition_id' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config_timestamp_field' +require "google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options_table_reference" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_kind" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_partition_id" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config_timestamp_field" module GoogleInSpec module DLP module Property @@ -38,10 +38,10 @@ class JobTriggerInspectJobStorageConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @timespan_config = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigTimespanConfig.new(args['timespanConfig'], to_s) - @datastore_options = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigDatastoreOptions.new(args['datastoreOptions'], to_s) - @cloud_storage_options = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigCloudStorageOptions.new(args['cloudStorageOptions'], to_s) - @big_query_options = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigBigQueryOptions.new(args['bigQueryOptions'], to_s) + @timespan_config = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigTimespanConfig.new(args["timespanConfig"], to_s) + @datastore_options = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigDatastoreOptions.new(args["datastoreOptions"], to_s) + @cloud_storage_options = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigCloudStorageOptions.new(args["cloudStorageOptions"], to_s) + @big_query_options = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigBigQueryOptions.new(args["bigQueryOptions"], to_s) end def to_s diff --git a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options.rb b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options.rb index 41e151205..b639428ea 100644 --- a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options.rb +++ b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options_table_reference' +require "google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options_table_reference" module GoogleInSpec module DLP module Property @@ -23,7 +23,7 @@ class JobTriggerInspectJobStorageConfigBigQueryOptions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @table_reference = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigBigQueryOptionsTableReference.new(args['tableReference'], to_s) + @table_reference = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigBigQueryOptionsTableReference.new(args["tableReference"], to_s) end def to_s diff --git a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options_table_reference.rb b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options_table_reference.rb index b5599c600..f9ec0bf90 100644 --- a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options_table_reference.rb +++ b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options_table_reference.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class JobTriggerInspectJobStorageConfigBigQueryOptionsTableReference def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @project_id = args['projectId'] - @dataset_id = args['datasetId'] - @table_id = args['tableId'] + @project_id = args["projectId"] + @dataset_id = args["datasetId"] + @table_id = args["tableId"] end def to_s diff --git a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options.rb b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options.rb index efc8b4070..c3e1dfb0d 100644 --- a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options.rb +++ b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set' +require "google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set" module GoogleInSpec module DLP module Property @@ -34,12 +34,12 @@ class JobTriggerInspectJobStorageConfigCloudStorageOptions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @file_set = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigCloudStorageOptionsFileSet.new(args['fileSet'], to_s) - @bytes_limit_per_file = args['bytesLimitPerFile'] - @bytes_limit_per_file_percent = args['bytesLimitPerFilePercent'] - @files_limit_percent = args['filesLimitPercent'] - @file_types = args['fileTypes'] - @sample_method = args['sampleMethod'] + @file_set = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigCloudStorageOptionsFileSet.new(args["fileSet"], to_s) + @bytes_limit_per_file = args["bytesLimitPerFile"] + @bytes_limit_per_file_percent = args["bytesLimitPerFilePercent"] + @files_limit_percent = args["filesLimitPercent"] + @file_types = args["fileTypes"] + @sample_method = args["sampleMethod"] end def to_s diff --git a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set.rb b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set.rb index ba4b41218..97818ac71 100644 --- a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set.rb +++ b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set' +require "google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set" module GoogleInSpec module DLP module Property @@ -25,8 +25,8 @@ class JobTriggerInspectJobStorageConfigCloudStorageOptionsFileSet def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @url = args['url'] - @regex_file_set = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigCloudStorageOptionsFileSetRegexFileSet.new(args['regexFileSet'], to_s) + @url = args["url"] + @regex_file_set = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigCloudStorageOptionsFileSetRegexFileSet.new(args["regexFileSet"], to_s) end def to_s diff --git a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set.rb b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set.rb index 7eee3378b..7c2800b0c 100644 --- a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set.rb +++ b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class JobTriggerInspectJobStorageConfigCloudStorageOptionsFileSetRegexFileSet def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @bucket_name = args['bucketName'] - @include_regex = args['includeRegex'] - @exclude_regex = args['excludeRegex'] + @bucket_name = args["bucketName"] + @include_regex = args["includeRegex"] + @exclude_regex = args["excludeRegex"] end def to_s diff --git a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options.rb b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options.rb index 400ebc2d4..1fc1b8433 100644 --- a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options.rb +++ b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_kind' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_partition_id' +require "google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_kind" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_partition_id" module GoogleInSpec module DLP module Property @@ -26,8 +26,8 @@ class JobTriggerInspectJobStorageConfigDatastoreOptions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @partition_id = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigDatastoreOptionsPartitionId.new(args['partitionId'], to_s) - @kind = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigDatastoreOptionsKind.new(args['kind'], to_s) + @partition_id = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigDatastoreOptionsPartitionId.new(args["partitionId"], to_s) + @kind = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigDatastoreOptionsKind.new(args["kind"], to_s) end def to_s diff --git a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_kind.rb b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_kind.rb index 7b0e44f6e..a1843ba72 100644 --- a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_kind.rb +++ b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_kind.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class JobTriggerInspectJobStorageConfigDatastoreOptionsKind def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_partition_id.rb b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_partition_id.rb index c7228a11e..a47b728d7 100644 --- a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_partition_id.rb +++ b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_partition_id.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class JobTriggerInspectJobStorageConfigDatastoreOptionsPartitionId def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @project_id = args['projectId'] - @namespace_id = args['namespaceId'] + @project_id = args["projectId"] + @namespace_id = args["namespaceId"] end def to_s diff --git a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config.rb b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config.rb index df0ec567e..a922a46d8 100644 --- a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config.rb +++ b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config_timestamp_field' +require "google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config_timestamp_field" module GoogleInSpec module DLP module Property @@ -29,10 +29,10 @@ class JobTriggerInspectJobStorageConfigTimespanConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @start_time = args['startTime'] - @end_time = args['endTime'] - @enable_auto_population_of_timespan_config = args['enableAutoPopulationOfTimespanConfig'] - @timestamp_field = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigTimespanConfigTimestampField.new(args['timestampField'], to_s) + @start_time = args["startTime"] + @end_time = args["endTime"] + @enable_auto_population_of_timespan_config = args["enableAutoPopulationOfTimespanConfig"] + @timestamp_field = GoogleInSpec::DLP::Property::JobTriggerInspectJobStorageConfigTimespanConfigTimestampField.new(args["timestampField"], to_s) end def to_s diff --git a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config_timestamp_field.rb b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config_timestamp_field.rb index ce3801793..034280c6b 100644 --- a/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config_timestamp_field.rb +++ b/libraries/google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config_timestamp_field.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class JobTriggerInspectJobStorageConfigTimespanConfigTimestampField def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/jobtrigger_triggers.rb b/libraries/google/dlp/property/jobtrigger_triggers.rb index 452f569bf..345f78ef5 100644 --- a/libraries/google/dlp/property/jobtrigger_triggers.rb +++ b/libraries/google/dlp/property/jobtrigger_triggers.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/jobtrigger_triggers_schedule' +require "google/dlp/property/jobtrigger_triggers_schedule" module GoogleInSpec module DLP module Property @@ -23,7 +23,7 @@ class JobTriggerTriggers def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @schedule = GoogleInSpec::DLP::Property::JobTriggerTriggersSchedule.new(args['schedule'], to_s) + @schedule = GoogleInSpec::DLP::Property::JobTriggerTriggersSchedule.new(args["schedule"], to_s) end def to_s diff --git a/libraries/google/dlp/property/jobtrigger_triggers_schedule.rb b/libraries/google/dlp/property/jobtrigger_triggers_schedule.rb index 0814ba37c..d4013d4e0 100644 --- a/libraries/google/dlp/property/jobtrigger_triggers_schedule.rb +++ b/libraries/google/dlp/property/jobtrigger_triggers_schedule.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class JobTriggerTriggersSchedule def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @recurrence_period_duration = args['recurrencePeriodDuration'] + @recurrence_period_duration = args["recurrencePeriodDuration"] end def to_s diff --git a/libraries/google/dlp/property/storedinfotype_dictionary.rb b/libraries/google/dlp/property/storedinfotype_dictionary.rb index 2675ad74b..0fb63a18c 100644 --- a/libraries/google/dlp/property/storedinfotype_dictionary.rb +++ b/libraries/google/dlp/property/storedinfotype_dictionary.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/storedinfotype_dictionary_cloud_storage_path' -require 'google/dlp/property/storedinfotype_dictionary_word_list' +require "google/dlp/property/storedinfotype_dictionary_cloud_storage_path" +require "google/dlp/property/storedinfotype_dictionary_word_list" module GoogleInSpec module DLP module Property @@ -26,8 +26,8 @@ class StoredInfoTypeDictionary def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @word_list = GoogleInSpec::DLP::Property::StoredInfoTypeDictionaryWordList.new(args['wordList'], to_s) - @cloud_storage_path = GoogleInSpec::DLP::Property::StoredInfoTypeDictionaryCloudStoragePath.new(args['cloudStoragePath'], to_s) + @word_list = GoogleInSpec::DLP::Property::StoredInfoTypeDictionaryWordList.new(args["wordList"], to_s) + @cloud_storage_path = GoogleInSpec::DLP::Property::StoredInfoTypeDictionaryCloudStoragePath.new(args["cloudStoragePath"], to_s) end def to_s diff --git a/libraries/google/dlp/property/storedinfotype_dictionary_cloud_storage_path.rb b/libraries/google/dlp/property/storedinfotype_dictionary_cloud_storage_path.rb index f2d78cd21..4bb2d3763 100644 --- a/libraries/google/dlp/property/storedinfotype_dictionary_cloud_storage_path.rb +++ b/libraries/google/dlp/property/storedinfotype_dictionary_cloud_storage_path.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class StoredInfoTypeDictionaryCloudStoragePath def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @path = args['path'] + @path = args["path"] end def to_s diff --git a/libraries/google/dlp/property/storedinfotype_dictionary_word_list.rb b/libraries/google/dlp/property/storedinfotype_dictionary_word_list.rb index 1d56670b3..4dfb5ae6b 100644 --- a/libraries/google/dlp/property/storedinfotype_dictionary_word_list.rb +++ b/libraries/google/dlp/property/storedinfotype_dictionary_word_list.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class StoredInfoTypeDictionaryWordList def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @words = args['words'] + @words = args["words"] end def to_s diff --git a/libraries/google/dlp/property/storedinfotype_large_custom_dictionary.rb b/libraries/google/dlp/property/storedinfotype_large_custom_dictionary.rb index fa12257a3..24cd20095 100644 --- a/libraries/google/dlp/property/storedinfotype_large_custom_dictionary.rb +++ b/libraries/google/dlp/property/storedinfotype_large_custom_dictionary.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field' -require 'google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_field' -require 'google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_table' -require 'google/dlp/property/storedinfotype_large_custom_dictionary_cloud_storage_file_set' -require 'google/dlp/property/storedinfotype_large_custom_dictionary_output_path' +require "google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field" +require "google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_field" +require "google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_table" +require "google/dlp/property/storedinfotype_large_custom_dictionary_cloud_storage_file_set" +require "google/dlp/property/storedinfotype_large_custom_dictionary_output_path" module GoogleInSpec module DLP module Property @@ -31,9 +31,9 @@ class StoredInfoTypeLargeCustomDictionary def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_path = GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionaryOutputPath.new(args['outputPath'], to_s) - @cloud_storage_file_set = GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionaryCloudStorageFileSet.new(args['cloudStorageFileSet'], to_s) - @big_query_field = GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionaryBigQueryField.new(args['bigQueryField'], to_s) + @output_path = GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionaryOutputPath.new(args["outputPath"], to_s) + @cloud_storage_file_set = GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionaryCloudStorageFileSet.new(args["cloudStorageFileSet"], to_s) + @big_query_field = GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionaryBigQueryField.new(args["bigQueryField"], to_s) end def to_s diff --git a/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field.rb b/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field.rb index d6cbdbedb..6663336b5 100644 --- a/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field.rb +++ b/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_field' -require 'google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_table' +require "google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_field" +require "google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_table" module GoogleInSpec module DLP module Property @@ -26,8 +26,8 @@ class StoredInfoTypeLargeCustomDictionaryBigQueryField def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @table = GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionaryBigQueryFieldTable.new(args['table'], to_s) - @field = GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionaryBigQueryFieldField.new(args['field'], to_s) + @table = GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionaryBigQueryFieldTable.new(args["table"], to_s) + @field = GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionaryBigQueryFieldField.new(args["field"], to_s) end def to_s diff --git a/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_field.rb b/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_field.rb index 40bd0681b..7fb3bdffd 100644 --- a/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_field.rb +++ b/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_field.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class StoredInfoTypeLargeCustomDictionaryBigQueryFieldField def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_table.rb b/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_table.rb index c1e97307c..7f4f68acf 100644 --- a/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_table.rb +++ b/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_table.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class StoredInfoTypeLargeCustomDictionaryBigQueryFieldTable def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @project_id = args['projectId'] - @dataset_id = args['datasetId'] - @table_id = args['tableId'] + @project_id = args["projectId"] + @dataset_id = args["datasetId"] + @table_id = args["tableId"] end def to_s diff --git a/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_cloud_storage_file_set.rb b/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_cloud_storage_file_set.rb index 81e592aed..d6288286a 100644 --- a/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_cloud_storage_file_set.rb +++ b/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_cloud_storage_file_set.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class StoredInfoTypeLargeCustomDictionaryCloudStorageFileSet def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @url = args['url'] + @url = args["url"] end def to_s diff --git a/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_output_path.rb b/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_output_path.rb index c0636f2b8..179ac6e74 100644 --- a/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_output_path.rb +++ b/libraries/google/dlp/property/storedinfotype_large_custom_dictionary_output_path.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class StoredInfoTypeLargeCustomDictionaryOutputPath def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @path = args['path'] + @path = args["path"] end def to_s diff --git a/libraries/google/dlp/property/storedinfotype_regex.rb b/libraries/google/dlp/property/storedinfotype_regex.rb index 205120794..b7236c96d 100644 --- a/libraries/google/dlp/property/storedinfotype_regex.rb +++ b/libraries/google/dlp/property/storedinfotype_regex.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class StoredInfoTypeRegex def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @pattern = args['pattern'] - @group_indexes = args['groupIndexes'] + @pattern = args["pattern"] + @group_indexes = args["groupIndexes"] end def to_s diff --git a/libraries/google/dns/property/managedzone_dnssec_config.rb b/libraries/google/dns/property/managedzone_dnssec_config.rb index 9d07e94ea..ba6ccdc0a 100644 --- a/libraries/google/dns/property/managedzone_dnssec_config.rb +++ b/libraries/google/dns/property/managedzone_dnssec_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dns/property/managedzone_dnssec_config_default_key_specs' +require "google/dns/property/managedzone_dnssec_config_default_key_specs" module GoogleInSpec module DNS module Property @@ -29,10 +29,10 @@ class ManagedZoneDnssecConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kind = args['kind'] - @non_existence = args['nonExistence'] - @state = args['state'] - @default_key_specs = GoogleInSpec::DNS::Property::ManagedZoneDnssecConfigDefaultKeySpecsArray.parse(args['defaultKeySpecs'], to_s) + @kind = args["kind"] + @non_existence = args["nonExistence"] + @state = args["state"] + @default_key_specs = GoogleInSpec::DNS::Property::ManagedZoneDnssecConfigDefaultKeySpecsArray.parse(args["defaultKeySpecs"], to_s) end def to_s diff --git a/libraries/google/dns/property/managedzone_dnssec_config_default_key_specs.rb b/libraries/google/dns/property/managedzone_dnssec_config_default_key_specs.rb index ff636d8da..1f3e45993 100644 --- a/libraries/google/dns/property/managedzone_dnssec_config_default_key_specs.rb +++ b/libraries/google/dns/property/managedzone_dnssec_config_default_key_specs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class ManagedZoneDnssecConfigDefaultKeySpecs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @algorithm = args['algorithm'] - @key_length = args['keyLength'] - @key_type = args['keyType'] - @kind = args['kind'] + @algorithm = args["algorithm"] + @key_length = args["keyLength"] + @key_type = args["keyType"] + @kind = args["kind"] end def to_s diff --git a/libraries/google/dns/property/managedzone_forwarding_config.rb b/libraries/google/dns/property/managedzone_forwarding_config.rb index f2227b929..343b3eca8 100644 --- a/libraries/google/dns/property/managedzone_forwarding_config.rb +++ b/libraries/google/dns/property/managedzone_forwarding_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dns/property/managedzone_forwarding_config_target_name_servers' +require "google/dns/property/managedzone_forwarding_config_target_name_servers" module GoogleInSpec module DNS module Property @@ -23,7 +23,7 @@ class ManagedZoneForwardingConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @target_name_servers = GoogleInSpec::DNS::Property::ManagedZoneForwardingConfigTargetNameServersArray.parse(args['targetNameServers'], to_s) + @target_name_servers = GoogleInSpec::DNS::Property::ManagedZoneForwardingConfigTargetNameServersArray.parse(args["targetNameServers"], to_s) end def to_s diff --git a/libraries/google/dns/property/managedzone_forwarding_config_target_name_servers.rb b/libraries/google/dns/property/managedzone_forwarding_config_target_name_servers.rb index 9fbef9a80..2be108797 100644 --- a/libraries/google/dns/property/managedzone_forwarding_config_target_name_servers.rb +++ b/libraries/google/dns/property/managedzone_forwarding_config_target_name_servers.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ManagedZoneForwardingConfigTargetNameServers def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @ipv4_address = args['ipv4Address'] - @forwarding_path = args['forwardingPath'] + @ipv4_address = args["ipv4Address"] + @forwarding_path = args["forwardingPath"] end def to_s diff --git a/libraries/google/dns/property/managedzone_peering_config.rb b/libraries/google/dns/property/managedzone_peering_config.rb index 44e432e0a..8df224820 100644 --- a/libraries/google/dns/property/managedzone_peering_config.rb +++ b/libraries/google/dns/property/managedzone_peering_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dns/property/managedzone_peering_config_target_network' +require "google/dns/property/managedzone_peering_config_target_network" module GoogleInSpec module DNS module Property @@ -23,7 +23,7 @@ class ManagedZonePeeringConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @target_network = GoogleInSpec::DNS::Property::ManagedZonePeeringConfigTargetNetwork.new(args['targetNetwork'], to_s) + @target_network = GoogleInSpec::DNS::Property::ManagedZonePeeringConfigTargetNetwork.new(args["targetNetwork"], to_s) end def to_s diff --git a/libraries/google/dns/property/managedzone_peering_config_target_network.rb b/libraries/google/dns/property/managedzone_peering_config_target_network.rb index 82e92cfc8..e62ccc90b 100644 --- a/libraries/google/dns/property/managedzone_peering_config_target_network.rb +++ b/libraries/google/dns/property/managedzone_peering_config_target_network.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ManagedZonePeeringConfigTargetNetwork def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @network_url = args['networkUrl'] + @network_url = args["networkUrl"] end def to_s diff --git a/libraries/google/dns/property/managedzone_private_visibility_config.rb b/libraries/google/dns/property/managedzone_private_visibility_config.rb index c75070185..2e6fd14cc 100644 --- a/libraries/google/dns/property/managedzone_private_visibility_config.rb +++ b/libraries/google/dns/property/managedzone_private_visibility_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dns/property/managedzone_private_visibility_config_networks' +require "google/dns/property/managedzone_private_visibility_config_networks" module GoogleInSpec module DNS module Property @@ -23,7 +23,7 @@ class ManagedZonePrivateVisibilityConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @networks = GoogleInSpec::DNS::Property::ManagedZonePrivateVisibilityConfigNetworksArray.parse(args['networks'], to_s) + @networks = GoogleInSpec::DNS::Property::ManagedZonePrivateVisibilityConfigNetworksArray.parse(args["networks"], to_s) end def to_s diff --git a/libraries/google/dns/property/managedzone_private_visibility_config_networks.rb b/libraries/google/dns/property/managedzone_private_visibility_config_networks.rb index d82907f13..88543e200 100644 --- a/libraries/google/dns/property/managedzone_private_visibility_config_networks.rb +++ b/libraries/google/dns/property/managedzone_private_visibility_config_networks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ManagedZonePrivateVisibilityConfigNetworks def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @network_url = args['networkUrl'] + @network_url = args["networkUrl"] end def to_s diff --git a/libraries/google/dns/property/managedzone_service_directory_config.rb b/libraries/google/dns/property/managedzone_service_directory_config.rb index c78e81761..008ecba2b 100644 --- a/libraries/google/dns/property/managedzone_service_directory_config.rb +++ b/libraries/google/dns/property/managedzone_service_directory_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dns/property/managedzone_service_directory_config_namespace' +require "google/dns/property/managedzone_service_directory_config_namespace" module GoogleInSpec module DNS module Property @@ -23,7 +23,7 @@ class ManagedZoneServiceDirectoryConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @namespace = GoogleInSpec::DNS::Property::ManagedZoneServiceDirectoryConfigNamespace.new(args['namespace'], to_s) + @namespace = GoogleInSpec::DNS::Property::ManagedZoneServiceDirectoryConfigNamespace.new(args["namespace"], to_s) end def to_s diff --git a/libraries/google/dns/property/managedzone_service_directory_config_namespace.rb b/libraries/google/dns/property/managedzone_service_directory_config_namespace.rb index d96dd68ad..d6f114720 100644 --- a/libraries/google/dns/property/managedzone_service_directory_config_namespace.rb +++ b/libraries/google/dns/property/managedzone_service_directory_config_namespace.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ManagedZoneServiceDirectoryConfigNamespace def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @namespace_url = args['namespaceUrl'] + @namespace_url = args["namespaceUrl"] end def to_s diff --git a/libraries/google/filestore/property/instance_file_shares.rb b/libraries/google/filestore/property/instance_file_shares.rb index c406046f0..5f904facf 100644 --- a/libraries/google/filestore/property/instance_file_shares.rb +++ b/libraries/google/filestore/property/instance_file_shares.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/filestore/property/instance_file_shares_nfs_export_options' +require "google/filestore/property/instance_file_shares_nfs_export_options" module GoogleInSpec module Filestore module Property @@ -27,9 +27,9 @@ class InstanceFileShares def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @capacity_gb = args['capacityGb'] - @nfs_export_options = GoogleInSpec::Filestore::Property::InstanceFileSharesNfsExportOptionsArray.parse(args['nfsExportOptions'], to_s) + @name = args["name"] + @capacity_gb = args["capacityGb"] + @nfs_export_options = GoogleInSpec::Filestore::Property::InstanceFileSharesNfsExportOptionsArray.parse(args["nfsExportOptions"], to_s) end def to_s diff --git a/libraries/google/filestore/property/instance_file_shares_nfs_export_options.rb b/libraries/google/filestore/property/instance_file_shares_nfs_export_options.rb index 89601ed8c..46c817482 100644 --- a/libraries/google/filestore/property/instance_file_shares_nfs_export_options.rb +++ b/libraries/google/filestore/property/instance_file_shares_nfs_export_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class InstanceFileSharesNfsExportOptions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @ip_ranges = args['ipRanges'] - @access_mode = args['accessMode'] - @squash_mode = args['squashMode'] - @anon_uid = args['anonUid'] - @anon_gid = args['anonGid'] + @ip_ranges = args["ipRanges"] + @access_mode = args["accessMode"] + @squash_mode = args["squashMode"] + @anon_uid = args["anonUid"] + @anon_gid = args["anonGid"] end def to_s diff --git a/libraries/google/filestore/property/instance_networks.rb b/libraries/google/filestore/property/instance_networks.rb index c934f7a4b..7b3b8b0bb 100644 --- a/libraries/google/filestore/property/instance_networks.rb +++ b/libraries/google/filestore/property/instance_networks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class InstanceNetworks def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @network = args['network'] - @modes = args['modes'] - @reserved_ip_range = args['reservedIpRange'] - @ip_addresses = args['ipAddresses'] + @network = args["network"] + @modes = args["modes"] + @reserved_ip_range = args["reservedIpRange"] + @ip_addresses = args["ipAddresses"] end def to_s diff --git a/libraries/google/iam/property/iam_binding_condition.rb b/libraries/google/iam/property/iam_binding_condition.rb index fcabcbe7a..b8fd46f33 100644 --- a/libraries/google/iam/property/iam_binding_condition.rb +++ b/libraries/google/iam/property/iam_binding_condition.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); @@ -26,9 +26,9 @@ class IamBindingCondition def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @title = args['title'] - @description = args['description'] - @expression = args['expression'] + @title = args["title"] + @description = args["description"] + @expression = args["expression"] end def to_s diff --git a/libraries/google/iam/property/iam_policy_audit_configs.rb b/libraries/google/iam/property/iam_policy_audit_configs.rb index e960b9b1f..64455f2a3 100644 --- a/libraries/google/iam/property/iam_policy_audit_configs.rb +++ b/libraries/google/iam/property/iam_policy_audit_configs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require 'google/iam/property/iam_policy_audit_configs_audit_log_configs' +require "google/iam/property/iam_policy_audit_configs_audit_log_configs" module GoogleInSpec module Iam module Property @@ -25,8 +25,8 @@ class IamPolicyAuditConfigs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @service = args['service'] - @audit_log_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsAuditLogConfigsArray.parse(args['auditLogConfigs'], to_s) + @service = args["service"] + @audit_log_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsAuditLogConfigsArray.parse(args["auditLogConfigs"], to_s) end def to_s diff --git a/libraries/google/iam/property/iam_policy_audit_configs_audit_log_configs.rb b/libraries/google/iam/property/iam_policy_audit_configs_audit_log_configs.rb index 371e49b38..d4ed1f48b 100644 --- a/libraries/google/iam/property/iam_policy_audit_configs_audit_log_configs.rb +++ b/libraries/google/iam/property/iam_policy_audit_configs_audit_log_configs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,8 +24,8 @@ class IamPolicyAuditConfigsAuditLogConfigs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @log_type = args['logType'] - @exempted_members = args['exemptedMembers'] + @log_type = args["logType"] + @exempted_members = args["exemptedMembers"] end def to_s diff --git a/libraries/google/iam/property/iam_policy_bindings.rb b/libraries/google/iam/property/iam_policy_bindings.rb index 7277ae4cb..83277fba3 100644 --- a/libraries/google/iam/property/iam_policy_bindings.rb +++ b/libraries/google/iam/property/iam_policy_bindings.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -require 'google/iam/property/iam_binding_condition' +require "google/iam/property/iam_binding_condition" module GoogleInSpec module Iam module Property @@ -27,9 +27,9 @@ class IamPolicyBindings def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @role = args['role'] - @members = args['members'] - @condition = GoogleInSpec::Iam::Property::IamBindingCondition.new(args['condition'], to_s) + @role = args["role"] + @members = args["members"] + @condition = GoogleInSpec::Iam::Property::IamBindingCondition.new(args["condition"], to_s) end def to_s diff --git a/libraries/google/kms/property/cryptokey_version_template.rb b/libraries/google/kms/property/cryptokey_version_template.rb index 0f7227e09..c9dfbde88 100644 --- a/libraries/google/kms/property/cryptokey_version_template.rb +++ b/libraries/google/kms/property/cryptokey_version_template.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class CryptoKeyVersionTemplate def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @algorithm = args['algorithm'] - @protection_level = args['protectionLevel'] + @algorithm = args["algorithm"] + @protection_level = args["protectionLevel"] end def to_s diff --git a/libraries/google/kms/property/ekmconnection_service_resolvers.rb b/libraries/google/kms/property/ekmconnection_service_resolvers.rb index 20bb95306..6425f1682 100644 --- a/libraries/google/kms/property/ekmconnection_service_resolvers.rb +++ b/libraries/google/kms/property/ekmconnection_service_resolvers.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/kms/property/ekmconnection_service_resolvers_server_certificates' +require "google/kms/property/ekmconnection_service_resolvers_server_certificates" module GoogleInSpec module KMS module Property @@ -29,10 +29,10 @@ class EkmConnectionServiceResolvers def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @service_directory_service = args['serviceDirectoryService'] - @endpoint_filter = args['endpointFilter'] - @hostname = args['hostname'] - @server_certificates = GoogleInSpec::KMS::Property::EkmConnectionServiceResolversServerCertificates.new(args['serverCertificates'], to_s) + @service_directory_service = args["serviceDirectoryService"] + @endpoint_filter = args["endpointFilter"] + @hostname = args["hostname"] + @server_certificates = GoogleInSpec::KMS::Property::EkmConnectionServiceResolversServerCertificates.new(args["serverCertificates"], to_s) end def to_s diff --git a/libraries/google/kms/property/ekmconnection_service_resolvers_server_certificates.rb b/libraries/google/kms/property/ekmconnection_service_resolvers_server_certificates.rb index a930577b1..396aeb7c9 100644 --- a/libraries/google/kms/property/ekmconnection_service_resolvers_server_certificates.rb +++ b/libraries/google/kms/property/ekmconnection_service_resolvers_server_certificates.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -38,15 +38,15 @@ class EkmConnectionServiceResolversServerCertificates def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @raw_der = args['rawDer'] - @parsed = args['parsed'] - @issuer = args['issuer'] - @subject = args['subject'] - @subject_alternative_dns_names = args['subjectAlternativeDnsNames'] - @not_before_time = parse_time_string(args['notBeforeTime']) - @not_after_time = parse_time_string(args['notAfterTime']) - @serial_number = args['serialNumber'] - @sha256_fingerprint = args['sha256Fingerprint'] + @raw_der = args["rawDer"] + @parsed = args["parsed"] + @issuer = args["issuer"] + @subject = args["subject"] + @subject_alternative_dns_names = args["subjectAlternativeDnsNames"] + @not_before_time = parse_time_string(args["notBeforeTime"]) + @not_after_time = parse_time_string(args["notAfterTime"]) + @serial_number = args["serialNumber"] + @sha256_fingerprint = args["sha256Fingerprint"] end def to_s diff --git a/libraries/google/kms/property/keyringimportjob_attestation.rb b/libraries/google/kms/property/keyringimportjob_attestation.rb index 6e24e7da2..abcecba18 100644 --- a/libraries/google/kms/property/keyringimportjob_attestation.rb +++ b/libraries/google/kms/property/keyringimportjob_attestation.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class KeyRingImportJobAttestation def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @format = args['format'] - @content = args['content'] + @format = args["format"] + @content = args["content"] end def to_s diff --git a/libraries/google/kms/property/keyringimportjob_public_key.rb b/libraries/google/kms/property/keyringimportjob_public_key.rb index d39db0621..102964284 100644 --- a/libraries/google/kms/property/keyringimportjob_public_key.rb +++ b/libraries/google/kms/property/keyringimportjob_public_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class KeyRingImportJobPublicKey def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @pem = args['pem'] + @pem = args["pem"] end def to_s diff --git a/libraries/google/logging/property/metric_bucket_options.rb b/libraries/google/logging/property/metric_bucket_options.rb index 61e19bf86..cdd05d9ff 100644 --- a/libraries/google/logging/property/metric_bucket_options.rb +++ b/libraries/google/logging/property/metric_bucket_options.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/logging/property/metric_bucket_options_explicit_buckets' -require 'google/logging/property/metric_bucket_options_exponential_buckets' -require 'google/logging/property/metric_bucket_options_linear_buckets' +require "google/logging/property/metric_bucket_options_explicit_buckets" +require "google/logging/property/metric_bucket_options_exponential_buckets" +require "google/logging/property/metric_bucket_options_linear_buckets" module GoogleInSpec module Logging module Property @@ -29,9 +29,9 @@ class MetricBucketOptions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @linear_buckets = GoogleInSpec::Logging::Property::MetricBucketOptionsLinearBuckets.new(args['linearBuckets'], to_s) - @exponential_buckets = GoogleInSpec::Logging::Property::MetricBucketOptionsExponentialBuckets.new(args['exponentialBuckets'], to_s) - @explicit_buckets = GoogleInSpec::Logging::Property::MetricBucketOptionsExplicitBuckets.new(args['explicitBuckets'], to_s) + @linear_buckets = GoogleInSpec::Logging::Property::MetricBucketOptionsLinearBuckets.new(args["linearBuckets"], to_s) + @exponential_buckets = GoogleInSpec::Logging::Property::MetricBucketOptionsExponentialBuckets.new(args["exponentialBuckets"], to_s) + @explicit_buckets = GoogleInSpec::Logging::Property::MetricBucketOptionsExplicitBuckets.new(args["explicitBuckets"], to_s) end def to_s diff --git a/libraries/google/logging/property/metric_bucket_options_explicit_buckets.rb b/libraries/google/logging/property/metric_bucket_options_explicit_buckets.rb index 18add270c..e9de6d453 100644 --- a/libraries/google/logging/property/metric_bucket_options_explicit_buckets.rb +++ b/libraries/google/logging/property/metric_bucket_options_explicit_buckets.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class MetricBucketOptionsExplicitBuckets def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @bounds = args['bounds'] + @bounds = args["bounds"] end def to_s diff --git a/libraries/google/logging/property/metric_bucket_options_exponential_buckets.rb b/libraries/google/logging/property/metric_bucket_options_exponential_buckets.rb index 70e4f2280..6db8017b2 100644 --- a/libraries/google/logging/property/metric_bucket_options_exponential_buckets.rb +++ b/libraries/google/logging/property/metric_bucket_options_exponential_buckets.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class MetricBucketOptionsExponentialBuckets def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @num_finite_buckets = args['numFiniteBuckets'] - @growth_factor = args['growthFactor'] - @scale = args['scale'] + @num_finite_buckets = args["numFiniteBuckets"] + @growth_factor = args["growthFactor"] + @scale = args["scale"] end def to_s diff --git a/libraries/google/logging/property/metric_bucket_options_linear_buckets.rb b/libraries/google/logging/property/metric_bucket_options_linear_buckets.rb index f127e7b87..71146b186 100644 --- a/libraries/google/logging/property/metric_bucket_options_linear_buckets.rb +++ b/libraries/google/logging/property/metric_bucket_options_linear_buckets.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class MetricBucketOptionsLinearBuckets def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @num_finite_buckets = args['numFiniteBuckets'] - @width = args['width'] - @offset = args['offset'] + @num_finite_buckets = args["numFiniteBuckets"] + @width = args["width"] + @offset = args["offset"] end def to_s diff --git a/libraries/google/logging/property/metric_metric_descriptor.rb b/libraries/google/logging/property/metric_metric_descriptor.rb index d16f1d38a..519e63ff4 100644 --- a/libraries/google/logging/property/metric_metric_descriptor.rb +++ b/libraries/google/logging/property/metric_metric_descriptor.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/logging/property/metric_metric_descriptor_labels' +require "google/logging/property/metric_metric_descriptor_labels" module GoogleInSpec module Logging module Property @@ -33,12 +33,12 @@ class MetricMetricDescriptor def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @unit = args['unit'] - @value_type = args['valueType'] - @metric_kind = args['metricKind'] - @labels = GoogleInSpec::Logging::Property::MetricMetricDescriptorLabelsArray.parse(args['labels'], to_s) - @display_name = args['displayName'] - @type = args['type'] + @unit = args["unit"] + @value_type = args["valueType"] + @metric_kind = args["metricKind"] + @labels = GoogleInSpec::Logging::Property::MetricMetricDescriptorLabelsArray.parse(args["labels"], to_s) + @display_name = args["displayName"] + @type = args["type"] end def to_s diff --git a/libraries/google/logging/property/metric_metric_descriptor_labels.rb b/libraries/google/logging/property/metric_metric_descriptor_labels.rb index 50b874450..da9fcc5ec 100644 --- a/libraries/google/logging/property/metric_metric_descriptor_labels.rb +++ b/libraries/google/logging/property/metric_metric_descriptor_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class MetricMetricDescriptorLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @key = args['key'] - @description = args['description'] - @value_type = args['valueType'] + @key = args["key"] + @description = args["description"] + @value_type = args["valueType"] end def to_s diff --git a/libraries/google/memcache/property/instance_memcache_nodes.rb b/libraries/google/memcache/property/instance_memcache_nodes.rb index f9d52dbf3..634e5b9ad 100644 --- a/libraries/google/memcache/property/instance_memcache_nodes.rb +++ b/libraries/google/memcache/property/instance_memcache_nodes.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class InstanceMemcacheNodes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @node_id = args['nodeId'] - @zone = args['zone'] - @port = args['port'] - @host = args['host'] - @state = args['state'] + @node_id = args["nodeId"] + @zone = args["zone"] + @port = args["port"] + @host = args["host"] + @state = args["state"] end def to_s diff --git a/libraries/google/memcache/property/instance_memcache_parameters.rb b/libraries/google/memcache/property/instance_memcache_parameters.rb index 5b3c38d5d..6c489d381 100644 --- a/libraries/google/memcache/property/instance_memcache_parameters.rb +++ b/libraries/google/memcache/property/instance_memcache_parameters.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InstanceMemcacheParameters def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @id = args['id'] - @params = args['params'] + @id = args["id"] + @params = args["params"] end def to_s diff --git a/libraries/google/memcache/property/instance_node_config.rb b/libraries/google/memcache/property/instance_node_config.rb index eec43609e..cb17eab46 100644 --- a/libraries/google/memcache/property/instance_node_config.rb +++ b/libraries/google/memcache/property/instance_node_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InstanceNodeConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @cpu_count = args['cpuCount'] - @memory_size_mb = args['memorySizeMb'] + @cpu_count = args["cpuCount"] + @memory_size_mb = args["memorySizeMb"] end def to_s diff --git a/libraries/google/memcache/property/instance_parameters.rb b/libraries/google/memcache/property/instance_parameters.rb index ecf924cdd..f1dff0aed 100644 --- a/libraries/google/memcache/property/instance_parameters.rb +++ b/libraries/google/memcache/property/instance_parameters.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class InstanceParameters def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @id = args['id'] - @params = args['params'] + @id = args["id"] + @params = args["params"] end def to_s diff --git a/libraries/google/mlengine/property/model_default_version.rb b/libraries/google/mlengine/property/model_default_version.rb index 3305c3b3c..42c5c7e15 100644 --- a/libraries/google/mlengine/property/model_default_version.rb +++ b/libraries/google/mlengine/property/model_default_version.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelDefaultVersion def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @name = args["name"] end def to_s diff --git a/libraries/google/monitoring/property/alertpolicy_conditions.rb b/libraries/google/monitoring/property/alertpolicy_conditions.rb index 113b3bf63..776f559e1 100644 --- a/libraries/google/monitoring/property/alertpolicy_conditions.rb +++ b/libraries/google/monitoring/property/alertpolicy_conditions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/monitoring/property/alertpolicy_conditions_condition_absent' -require 'google/monitoring/property/alertpolicy_conditions_condition_absent_aggregations' -require 'google/monitoring/property/alertpolicy_conditions_condition_absent_trigger' -require 'google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language' -require 'google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language_trigger' -require 'google/monitoring/property/alertpolicy_conditions_condition_threshold' -require 'google/monitoring/property/alertpolicy_conditions_condition_threshold_aggregations' -require 'google/monitoring/property/alertpolicy_conditions_condition_threshold_denominator_aggregations' -require 'google/monitoring/property/alertpolicy_conditions_condition_threshold_trigger' +require "google/monitoring/property/alertpolicy_conditions_condition_absent" +require "google/monitoring/property/alertpolicy_conditions_condition_absent_aggregations" +require "google/monitoring/property/alertpolicy_conditions_condition_absent_trigger" +require "google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language" +require "google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language_trigger" +require "google/monitoring/property/alertpolicy_conditions_condition_threshold" +require "google/monitoring/property/alertpolicy_conditions_condition_threshold_aggregations" +require "google/monitoring/property/alertpolicy_conditions_condition_threshold_denominator_aggregations" +require "google/monitoring/property/alertpolicy_conditions_condition_threshold_trigger" module GoogleInSpec module Monitoring module Property @@ -39,11 +39,11 @@ class AlertPolicyConditions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @condition_absent = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionAbsent.new(args['conditionAbsent'], to_s) - @name = args['name'] - @condition_monitoring_query_language = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionMonitoringQueryLanguage.new(args['conditionMonitoringQueryLanguage'], to_s) - @condition_threshold = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionThreshold.new(args['conditionThreshold'], to_s) - @display_name = args['displayName'] + @condition_absent = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionAbsent.new(args["conditionAbsent"], to_s) + @name = args["name"] + @condition_monitoring_query_language = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionMonitoringQueryLanguage.new(args["conditionMonitoringQueryLanguage"], to_s) + @condition_threshold = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionThreshold.new(args["conditionThreshold"], to_s) + @display_name = args["displayName"] end def to_s diff --git a/libraries/google/monitoring/property/alertpolicy_conditions_condition_absent.rb b/libraries/google/monitoring/property/alertpolicy_conditions_condition_absent.rb index 1b6c47409..9a94c1c41 100644 --- a/libraries/google/monitoring/property/alertpolicy_conditions_condition_absent.rb +++ b/libraries/google/monitoring/property/alertpolicy_conditions_condition_absent.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/monitoring/property/alertpolicy_conditions_condition_absent_aggregations' -require 'google/monitoring/property/alertpolicy_conditions_condition_absent_trigger' +require "google/monitoring/property/alertpolicy_conditions_condition_absent_aggregations" +require "google/monitoring/property/alertpolicy_conditions_condition_absent_trigger" module GoogleInSpec module Monitoring module Property @@ -30,10 +30,10 @@ class AlertPolicyConditionsConditionAbsent def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @aggregations = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionAbsentAggregationsArray.parse(args['aggregations'], to_s) - @trigger = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionAbsentTrigger.new(args['trigger'], to_s) - @duration = args['duration'] - @filter = args['filter'] + @aggregations = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionAbsentAggregationsArray.parse(args["aggregations"], to_s) + @trigger = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionAbsentTrigger.new(args["trigger"], to_s) + @duration = args["duration"] + @filter = args["filter"] end def to_s diff --git a/libraries/google/monitoring/property/alertpolicy_conditions_condition_absent_aggregations.rb b/libraries/google/monitoring/property/alertpolicy_conditions_condition_absent_aggregations.rb index 367a8ec8b..e910e2283 100644 --- a/libraries/google/monitoring/property/alertpolicy_conditions_condition_absent_aggregations.rb +++ b/libraries/google/monitoring/property/alertpolicy_conditions_condition_absent_aggregations.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class AlertPolicyConditionsConditionAbsentAggregations def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @per_series_aligner = args['perSeriesAligner'] - @group_by_fields = args['groupByFields'] - @alignment_period = args['alignmentPeriod'] - @cross_series_reducer = args['crossSeriesReducer'] + @per_series_aligner = args["perSeriesAligner"] + @group_by_fields = args["groupByFields"] + @alignment_period = args["alignmentPeriod"] + @cross_series_reducer = args["crossSeriesReducer"] end def to_s diff --git a/libraries/google/monitoring/property/alertpolicy_conditions_condition_absent_trigger.rb b/libraries/google/monitoring/property/alertpolicy_conditions_condition_absent_trigger.rb index 5f98caac3..146b3b3c5 100644 --- a/libraries/google/monitoring/property/alertpolicy_conditions_condition_absent_trigger.rb +++ b/libraries/google/monitoring/property/alertpolicy_conditions_condition_absent_trigger.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class AlertPolicyConditionsConditionAbsentTrigger def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @percent = args['percent'] - @count = args['count'] + @percent = args["percent"] + @count = args["count"] end def to_s diff --git a/libraries/google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language.rb b/libraries/google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language.rb index 036a86190..6c8a92f01 100644 --- a/libraries/google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language.rb +++ b/libraries/google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language_trigger' +require "google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language_trigger" module GoogleInSpec module Monitoring module Property @@ -27,9 +27,9 @@ class AlertPolicyConditionsConditionMonitoringQueryLanguage def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @query = args['query'] - @duration = args['duration'] - @trigger = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionMonitoringQueryLanguageTrigger.new(args['trigger'], to_s) + @query = args["query"] + @duration = args["duration"] + @trigger = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionMonitoringQueryLanguageTrigger.new(args["trigger"], to_s) end def to_s diff --git a/libraries/google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language_trigger.rb b/libraries/google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language_trigger.rb index 81bed32ee..181b6db2b 100644 --- a/libraries/google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language_trigger.rb +++ b/libraries/google/monitoring/property/alertpolicy_conditions_condition_monitoring_query_language_trigger.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class AlertPolicyConditionsConditionMonitoringQueryLanguageTrigger def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @percent = args['percent'] - @count = args['count'] + @percent = args["percent"] + @count = args["count"] end def to_s diff --git a/libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold.rb b/libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold.rb index 4d2d50cdd..399d6a03d 100644 --- a/libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold.rb +++ b/libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/monitoring/property/alertpolicy_conditions_condition_threshold_aggregations' -require 'google/monitoring/property/alertpolicy_conditions_condition_threshold_denominator_aggregations' -require 'google/monitoring/property/alertpolicy_conditions_condition_threshold_trigger' +require "google/monitoring/property/alertpolicy_conditions_condition_threshold_aggregations" +require "google/monitoring/property/alertpolicy_conditions_condition_threshold_denominator_aggregations" +require "google/monitoring/property/alertpolicy_conditions_condition_threshold_trigger" module GoogleInSpec module Monitoring module Property @@ -39,14 +39,14 @@ class AlertPolicyConditionsConditionThreshold def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @threshold_value = args['thresholdValue'] - @denominator_filter = args['denominatorFilter'] - @denominator_aggregations = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionThresholdDenominatorAggregationsArray.parse(args['denominatorAggregations'], to_s) - @duration = args['duration'] - @comparison = args['comparison'] - @trigger = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionThresholdTrigger.new(args['trigger'], to_s) - @aggregations = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionThresholdAggregationsArray.parse(args['aggregations'], to_s) - @filter = args['filter'] + @threshold_value = args["thresholdValue"] + @denominator_filter = args["denominatorFilter"] + @denominator_aggregations = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionThresholdDenominatorAggregationsArray.parse(args["denominatorAggregations"], to_s) + @duration = args["duration"] + @comparison = args["comparison"] + @trigger = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionThresholdTrigger.new(args["trigger"], to_s) + @aggregations = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsConditionThresholdAggregationsArray.parse(args["aggregations"], to_s) + @filter = args["filter"] end def to_s diff --git a/libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold_aggregations.rb b/libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold_aggregations.rb index 36e68d817..5066dd42e 100644 --- a/libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold_aggregations.rb +++ b/libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold_aggregations.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class AlertPolicyConditionsConditionThresholdAggregations def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @per_series_aligner = args['perSeriesAligner'] - @group_by_fields = args['groupByFields'] - @alignment_period = args['alignmentPeriod'] - @cross_series_reducer = args['crossSeriesReducer'] + @per_series_aligner = args["perSeriesAligner"] + @group_by_fields = args["groupByFields"] + @alignment_period = args["alignmentPeriod"] + @cross_series_reducer = args["crossSeriesReducer"] end def to_s diff --git a/libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold_denominator_aggregations.rb b/libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold_denominator_aggregations.rb index 79912e304..e0dc14e35 100644 --- a/libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold_denominator_aggregations.rb +++ b/libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold_denominator_aggregations.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class AlertPolicyConditionsConditionThresholdDenominatorAggregations def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @per_series_aligner = args['perSeriesAligner'] - @group_by_fields = args['groupByFields'] - @alignment_period = args['alignmentPeriod'] - @cross_series_reducer = args['crossSeriesReducer'] + @per_series_aligner = args["perSeriesAligner"] + @group_by_fields = args["groupByFields"] + @alignment_period = args["alignmentPeriod"] + @cross_series_reducer = args["crossSeriesReducer"] end def to_s diff --git a/libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold_trigger.rb b/libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold_trigger.rb index 28cbbd187..1b0836b09 100644 --- a/libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold_trigger.rb +++ b/libraries/google/monitoring/property/alertpolicy_conditions_condition_threshold_trigger.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class AlertPolicyConditionsConditionThresholdTrigger def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @percent = args['percent'] - @count = args['count'] + @percent = args["percent"] + @count = args["count"] end def to_s diff --git a/libraries/google/monitoring/property/alertpolicy_creation_record.rb b/libraries/google/monitoring/property/alertpolicy_creation_record.rb index ca8408288..364f425a9 100644 --- a/libraries/google/monitoring/property/alertpolicy_creation_record.rb +++ b/libraries/google/monitoring/property/alertpolicy_creation_record.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class AlertPolicyCreationRecord def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @mutate_time = args['mutateTime'] - @mutated_by = args['mutatedBy'] + @mutate_time = args["mutateTime"] + @mutated_by = args["mutatedBy"] end def to_s diff --git a/libraries/google/monitoring/property/alertpolicy_documentation.rb b/libraries/google/monitoring/property/alertpolicy_documentation.rb index e746c9df8..f2b6794a2 100644 --- a/libraries/google/monitoring/property/alertpolicy_documentation.rb +++ b/libraries/google/monitoring/property/alertpolicy_documentation.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class AlertPolicyDocumentation def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @content = args['content'] - @mime_type = args['mimeType'] + @content = args["content"] + @mime_type = args["mimeType"] end def to_s diff --git a/libraries/google/pubsub/property/subscription_dead_letter_policy.rb b/libraries/google/pubsub/property/subscription_dead_letter_policy.rb index 23fd1820e..a4012c5ba 100644 --- a/libraries/google/pubsub/property/subscription_dead_letter_policy.rb +++ b/libraries/google/pubsub/property/subscription_dead_letter_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class SubscriptionDeadLetterPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @dead_letter_topic = args['deadLetterTopic'] - @max_delivery_attempts = args['maxDeliveryAttempts'] + @dead_letter_topic = args["deadLetterTopic"] + @max_delivery_attempts = args["maxDeliveryAttempts"] end def to_s diff --git a/libraries/google/pubsub/property/subscription_expiration_policy.rb b/libraries/google/pubsub/property/subscription_expiration_policy.rb index 914944bf6..112913c3f 100644 --- a/libraries/google/pubsub/property/subscription_expiration_policy.rb +++ b/libraries/google/pubsub/property/subscription_expiration_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class SubscriptionExpirationPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @ttl = args['ttl'] + @ttl = args["ttl"] end def to_s diff --git a/libraries/google/pubsub/property/subscription_push_config.rb b/libraries/google/pubsub/property/subscription_push_config.rb index 4ca633b91..20873ec91 100644 --- a/libraries/google/pubsub/property/subscription_push_config.rb +++ b/libraries/google/pubsub/property/subscription_push_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/pubsub/property/subscription_push_config_oidc_token' +require "google/pubsub/property/subscription_push_config_oidc_token" module GoogleInSpec module Pubsub module Property @@ -27,9 +27,9 @@ class SubscriptionPushConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @oidc_token = GoogleInSpec::Pubsub::Property::SubscriptionPushConfigOidcToken.new(args['oidcToken'], to_s) - @push_endpoint = args['pushEndpoint'] - @attributes = args['attributes'] + @oidc_token = GoogleInSpec::Pubsub::Property::SubscriptionPushConfigOidcToken.new(args["oidcToken"], to_s) + @push_endpoint = args["pushEndpoint"] + @attributes = args["attributes"] end def to_s diff --git a/libraries/google/pubsub/property/subscription_push_config_oidc_token.rb b/libraries/google/pubsub/property/subscription_push_config_oidc_token.rb index 8ac9ab81a..304773c21 100644 --- a/libraries/google/pubsub/property/subscription_push_config_oidc_token.rb +++ b/libraries/google/pubsub/property/subscription_push_config_oidc_token.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class SubscriptionPushConfigOidcToken def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @service_account_email = args['serviceAccountEmail'] - @audience = args['audience'] + @service_account_email = args["serviceAccountEmail"] + @audience = args["audience"] end def to_s diff --git a/libraries/google/pubsub/property/subscription_retry_policy.rb b/libraries/google/pubsub/property/subscription_retry_policy.rb index 0ce49a2fe..40391a6da 100644 --- a/libraries/google/pubsub/property/subscription_retry_policy.rb +++ b/libraries/google/pubsub/property/subscription_retry_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class SubscriptionRetryPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @minimum_backoff = args['minimumBackoff'] - @maximum_backoff = args['maximumBackoff'] + @minimum_backoff = args["minimumBackoff"] + @maximum_backoff = args["maximumBackoff"] end def to_s diff --git a/libraries/google/pubsub/property/topic_message_storage_policy.rb b/libraries/google/pubsub/property/topic_message_storage_policy.rb index 4a71742e4..34f1fd16b 100644 --- a/libraries/google/pubsub/property/topic_message_storage_policy.rb +++ b/libraries/google/pubsub/property/topic_message_storage_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TopicMessageStoragePolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @allowed_persistence_regions = args['allowedPersistenceRegions'] + @allowed_persistence_regions = args["allowedPersistenceRegions"] end def to_s diff --git a/libraries/google/redis/property/instance_server_ca_certs.rb b/libraries/google/redis/property/instance_server_ca_certs.rb index 235bd9263..139f3e89a 100644 --- a/libraries/google/redis/property/instance_server_ca_certs.rb +++ b/libraries/google/redis/property/instance_server_ca_certs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class InstanceServerCaCerts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @serial_number = args['serialNumber'] - @cert = args['cert'] - @create_time = args['createTime'] - @expire_time = args['expireTime'] - @sha1_fingerprint = args['sha1Fingerprint'] + @serial_number = args["serialNumber"] + @cert = args["cert"] + @create_time = args["createTime"] + @expire_time = args["expireTime"] + @sha1_fingerprint = args["sha1Fingerprint"] end def to_s diff --git a/libraries/google/resourcemanager/property/organization_owner.rb b/libraries/google/resourcemanager/property/organization_owner.rb index 5005311d3..85d724e36 100644 --- a/libraries/google/resourcemanager/property/organization_owner.rb +++ b/libraries/google/resourcemanager/property/organization_owner.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class OrganizationOwner def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @directory_customer_id = args['directoryCustomerId'] + @directory_customer_id = args["directoryCustomerId"] end def to_s diff --git a/libraries/google/resourcemanager/property/project_parent.rb b/libraries/google/resourcemanager/property/project_parent.rb index 444ffa75b..64d35c821 100644 --- a/libraries/google/resourcemanager/property/project_parent.rb +++ b/libraries/google/resourcemanager/property/project_parent.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ProjectParent def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @type = args['type'] - @id = args['id'] + @type = args["type"] + @id = args["id"] end def to_s diff --git a/libraries/google/serviceusage/property/service_config.rb b/libraries/google/serviceusage/property/service_config.rb index b1646b6ca..bf391b07a 100644 --- a/libraries/google/serviceusage/property/service_config.rb +++ b/libraries/google/serviceusage/property/service_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/serviceusage/property/service_config_apis' +require "google/serviceusage/property/service_config_apis" module GoogleInSpec module ServiceUsage module Property @@ -27,9 +27,9 @@ class ServiceConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @title = args['title'] - @apis = GoogleInSpec::ServiceUsage::Property::ServiceConfigApisArray.parse(args['apis'], to_s) + @name = args["name"] + @title = args["title"] + @apis = GoogleInSpec::ServiceUsage::Property::ServiceConfigApisArray.parse(args["apis"], to_s) end def to_s diff --git a/libraries/google/serviceusage/property/service_config_apis.rb b/libraries/google/serviceusage/property/service_config_apis.rb index 455356649..b2cf6c21f 100644 --- a/libraries/google/serviceusage/property/service_config_apis.rb +++ b/libraries/google/serviceusage/property/service_config_apis.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ServiceConfigApis def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @version = args['version'] + @name = args["name"] + @version = args["version"] end def to_s diff --git a/libraries/google/sourcerepo/property/repository_pubsub_configs.rb b/libraries/google/sourcerepo/property/repository_pubsub_configs.rb index e4f94c9b2..600046c8f 100644 --- a/libraries/google/sourcerepo/property/repository_pubsub_configs.rb +++ b/libraries/google/sourcerepo/property/repository_pubsub_configs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class RepositoryPubsubConfigs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @message_format = args['messageFormat'] - @service_account_email = args['serviceAccountEmail'] + @message_format = args["messageFormat"] + @service_account_email = args["serviceAccountEmail"] end def to_s diff --git a/libraries/google/sql/property/connect_ip_addresses.rb b/libraries/google/sql/property/connect_ip_addresses.rb index 2de2c5634..6d6f89ca9 100644 --- a/libraries/google/sql/property/connect_ip_addresses.rb +++ b/libraries/google/sql/property/connect_ip_addresses.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ConnectIpAddresses def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @ip_address = args['ipAddress'] - @time_to_retire = parse_time_string(args['timeToRetire']) - @type = args['type'] + @ip_address = args["ipAddress"] + @time_to_retire = parse_time_string(args["timeToRetire"]) + @type = args["type"] end def to_s diff --git a/libraries/google/sql/property/connect_server_ca_cert.rb b/libraries/google/sql/property/connect_server_ca_cert.rb index fd10fa5c3..dfefaabc6 100644 --- a/libraries/google/sql/property/connect_server_ca_cert.rb +++ b/libraries/google/sql/property/connect_server_ca_cert.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -34,13 +34,13 @@ class ConnectServerCaCert def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @cert = args['cert'] - @cert_serial_number = args['certSerialNumber'] - @common_name = args['commonName'] - @sha1_fingerprint = args['sha1Fingerprint'] - @instance = args['instance'] - @create_time = parse_time_string(args['createTime']) - @expiration_time = parse_time_string(args['expirationTime']) + @cert = args["cert"] + @cert_serial_number = args["certSerialNumber"] + @common_name = args["commonName"] + @sha1_fingerprint = args["sha1Fingerprint"] + @instance = args["instance"] + @create_time = parse_time_string(args["createTime"]) + @expiration_time = parse_time_string(args["expirationTime"]) end def to_s diff --git a/libraries/google/sql/property/databaseinstance_disk_encryption_configuration.rb b/libraries/google/sql/property/databaseinstance_disk_encryption_configuration.rb index 0e359dbc6..eb5b0e863 100644 --- a/libraries/google/sql/property/databaseinstance_disk_encryption_configuration.rb +++ b/libraries/google/sql/property/databaseinstance_disk_encryption_configuration.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class DatabaseInstanceDiskEncryptionConfiguration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/sql/property/databaseinstance_disk_encryption_status.rb b/libraries/google/sql/property/databaseinstance_disk_encryption_status.rb index b2f6c8ced..6b46ab20a 100644 --- a/libraries/google/sql/property/databaseinstance_disk_encryption_status.rb +++ b/libraries/google/sql/property/databaseinstance_disk_encryption_status.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class DatabaseInstanceDiskEncryptionStatus def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_version_name = args['kmsKeyVersionName'] + @kms_key_version_name = args["kmsKeyVersionName"] end def to_s diff --git a/libraries/google/sql/property/databaseinstance_failover_replica.rb b/libraries/google/sql/property/databaseinstance_failover_replica.rb index dbfbf9747..15aa99ed9 100644 --- a/libraries/google/sql/property/databaseinstance_failover_replica.rb +++ b/libraries/google/sql/property/databaseinstance_failover_replica.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class DatabaseInstanceFailoverReplica def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @available = args['available'] - @name = args['name'] + @available = args["available"] + @name = args["name"] end def to_s diff --git a/libraries/google/sql/property/databaseinstance_ip_addresses.rb b/libraries/google/sql/property/databaseinstance_ip_addresses.rb index 781a62777..1166837b7 100644 --- a/libraries/google/sql/property/databaseinstance_ip_addresses.rb +++ b/libraries/google/sql/property/databaseinstance_ip_addresses.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class DatabaseInstanceIpAddresses def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @ip_address = args['ipAddress'] - @time_to_retire = parse_time_string(args['timeToRetire']) - @type = args['type'] + @ip_address = args["ipAddress"] + @time_to_retire = parse_time_string(args["timeToRetire"]) + @type = args["type"] end def to_s diff --git a/libraries/google/sql/property/databaseinstance_replica_configuration.rb b/libraries/google/sql/property/databaseinstance_replica_configuration.rb index 653e73599..8cccab1df 100644 --- a/libraries/google/sql/property/databaseinstance_replica_configuration.rb +++ b/libraries/google/sql/property/databaseinstance_replica_configuration.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/sql/property/databaseinstance_replica_configuration_mysql_replica_configuration' +require "google/sql/property/databaseinstance_replica_configuration_mysql_replica_configuration" module GoogleInSpec module SQL module Property @@ -29,10 +29,10 @@ class DatabaseInstanceReplicaConfiguration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @failover_target = args['failoverTarget'] - @mysql_replica_configuration = GoogleInSpec::SQL::Property::DatabaseInstanceReplicaConfigurationMysqlReplicaConfiguration.new(args['mysqlReplicaConfiguration'], to_s) - @replica_names = args['replicaNames'] - @service_account_email_address = args['serviceAccountEmailAddress'] + @failover_target = args["failoverTarget"] + @mysql_replica_configuration = GoogleInSpec::SQL::Property::DatabaseInstanceReplicaConfigurationMysqlReplicaConfiguration.new(args["mysqlReplicaConfiguration"], to_s) + @replica_names = args["replicaNames"] + @service_account_email_address = args["serviceAccountEmailAddress"] end def to_s diff --git a/libraries/google/sql/property/databaseinstance_replica_configuration_mysql_replica_configuration.rb b/libraries/google/sql/property/databaseinstance_replica_configuration_mysql_replica_configuration.rb index ad8e5f18c..1e41e9eb8 100644 --- a/libraries/google/sql/property/databaseinstance_replica_configuration_mysql_replica_configuration.rb +++ b/libraries/google/sql/property/databaseinstance_replica_configuration_mysql_replica_configuration.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -40,16 +40,16 @@ class DatabaseInstanceReplicaConfigurationMysqlReplicaConfiguration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @ca_certificate = args['caCertificate'] - @client_certificate = args['clientCertificate'] - @client_key = args['clientKey'] - @connect_retry_interval = args['connectRetryInterval'] - @dump_file_path = args['dumpFilePath'] - @master_heartbeat_period = args['masterHeartbeatPeriod'] - @password = args['password'] - @ssl_cipher = args['sslCipher'] - @username = args['username'] - @verify_server_certificate = args['verifyServerCertificate'] + @ca_certificate = args["caCertificate"] + @client_certificate = args["clientCertificate"] + @client_key = args["clientKey"] + @connect_retry_interval = args["connectRetryInterval"] + @dump_file_path = args["dumpFilePath"] + @master_heartbeat_period = args["masterHeartbeatPeriod"] + @password = args["password"] + @ssl_cipher = args["sslCipher"] + @username = args["username"] + @verify_server_certificate = args["verifyServerCertificate"] end def to_s diff --git a/libraries/google/sql/property/databaseinstance_server_ca_cert.rb b/libraries/google/sql/property/databaseinstance_server_ca_cert.rb index 0bb721c39..144bf3ebb 100644 --- a/libraries/google/sql/property/databaseinstance_server_ca_cert.rb +++ b/libraries/google/sql/property/databaseinstance_server_ca_cert.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -32,12 +32,12 @@ class DatabaseInstanceServerCaCert def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @cert = args['cert'] - @cert_serial_number = args['certSerialNumber'] - @common_name = args['commonName'] - @create_time = parse_time_string(args['createTime']) - @expiration_time = parse_time_string(args['expirationTime']) - @sha1_fingerprint = args['sha1Fingerprint'] + @cert = args["cert"] + @cert_serial_number = args["certSerialNumber"] + @common_name = args["commonName"] + @create_time = parse_time_string(args["createTime"]) + @expiration_time = parse_time_string(args["expirationTime"]) + @sha1_fingerprint = args["sha1Fingerprint"] end def to_s diff --git a/libraries/google/sql/property/databaseinstance_settings.rb b/libraries/google/sql/property/databaseinstance_settings.rb index 074e511f8..46f2be2f7 100644 --- a/libraries/google/sql/property/databaseinstance_settings.rb +++ b/libraries/google/sql/property/databaseinstance_settings.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/sql/property/databaseinstance_settings_backup_configuration' -require 'google/sql/property/databaseinstance_settings_database_flags' -require 'google/sql/property/databaseinstance_settings_ip_configuration' -require 'google/sql/property/databaseinstance_settings_ip_configuration_authorized_networks' +require "google/sql/property/databaseinstance_settings_backup_configuration" +require "google/sql/property/databaseinstance_settings_database_flags" +require "google/sql/property/databaseinstance_settings_ip_configuration" +require "google/sql/property/databaseinstance_settings_ip_configuration_authorized_networks" module GoogleInSpec module SQL module Property @@ -54,21 +54,21 @@ class DatabaseInstanceSettings def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kind = args['kind'] - @database_flags = GoogleInSpec::SQL::Property::DatabaseInstanceSettingsDatabaseFlagsArray.parse(args['databaseFlags'], to_s) - @ip_configuration = GoogleInSpec::SQL::Property::DatabaseInstanceSettingsIpConfiguration.new(args['ipConfiguration'], to_s) - @tier = args['tier'] - @availability_type = args['availabilityType'] - @backup_configuration = GoogleInSpec::SQL::Property::DatabaseInstanceSettingsBackupConfiguration.new(args['backupConfiguration'], to_s) - @settings_version = args['settingsVersion'] - @user_labels = args['userLabels'] - @activation_policy = args['activationPolicy'] - @data_disk_size_gb = args['dataDiskSizeGb'] - @data_disk_type = args['dataDiskType'] - @pricing_plan = args['pricingPlan'] - @replication_type = args['replicationType'] - @storage_auto_resize = args['storageAutoResize'] - @storage_auto_resize_limit = args['storageAutoResizeLimit'] + @kind = args["kind"] + @database_flags = GoogleInSpec::SQL::Property::DatabaseInstanceSettingsDatabaseFlagsArray.parse(args["databaseFlags"], to_s) + @ip_configuration = GoogleInSpec::SQL::Property::DatabaseInstanceSettingsIpConfiguration.new(args["ipConfiguration"], to_s) + @tier = args["tier"] + @availability_type = args["availabilityType"] + @backup_configuration = GoogleInSpec::SQL::Property::DatabaseInstanceSettingsBackupConfiguration.new(args["backupConfiguration"], to_s) + @settings_version = args["settingsVersion"] + @user_labels = args["userLabels"] + @activation_policy = args["activationPolicy"] + @data_disk_size_gb = args["dataDiskSizeGb"] + @data_disk_type = args["dataDiskType"] + @pricing_plan = args["pricingPlan"] + @replication_type = args["replicationType"] + @storage_auto_resize = args["storageAutoResize"] + @storage_auto_resize_limit = args["storageAutoResizeLimit"] end def to_s diff --git a/libraries/google/sql/property/databaseinstance_settings_backup_configuration.rb b/libraries/google/sql/property/databaseinstance_settings_backup_configuration.rb index 1cd3434ba..9e226b3e9 100644 --- a/libraries/google/sql/property/databaseinstance_settings_backup_configuration.rb +++ b/libraries/google/sql/property/databaseinstance_settings_backup_configuration.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class DatabaseInstanceSettingsBackupConfiguration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enabled = args['enabled'] - @binary_log_enabled = args['binaryLogEnabled'] - @start_time = args['startTime'] + @enabled = args["enabled"] + @binary_log_enabled = args["binaryLogEnabled"] + @start_time = args["startTime"] end def to_s diff --git a/libraries/google/sql/property/databaseinstance_settings_database_flags.rb b/libraries/google/sql/property/databaseinstance_settings_database_flags.rb index a9b18631e..b55366755 100644 --- a/libraries/google/sql/property/databaseinstance_settings_database_flags.rb +++ b/libraries/google/sql/property/databaseinstance_settings_database_flags.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class DatabaseInstanceSettingsDatabaseFlags def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @value = args['value'] + @name = args["name"] + @value = args["value"] end def to_s diff --git a/libraries/google/sql/property/databaseinstance_settings_ip_configuration.rb b/libraries/google/sql/property/databaseinstance_settings_ip_configuration.rb index 4963b8ddc..ad85fd37e 100644 --- a/libraries/google/sql/property/databaseinstance_settings_ip_configuration.rb +++ b/libraries/google/sql/property/databaseinstance_settings_ip_configuration.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/sql/property/databaseinstance_settings_ip_configuration_authorized_networks' +require "google/sql/property/databaseinstance_settings_ip_configuration_authorized_networks" module GoogleInSpec module SQL module Property @@ -27,9 +27,9 @@ class DatabaseInstanceSettingsIpConfiguration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @ipv4_enabled = args['ipv4Enabled'] - @authorized_networks = GoogleInSpec::SQL::Property::DatabaseInstanceSettingsIpConfigurationAuthorizedNetworksArray.parse(args['authorizedNetworks'], to_s) - @require_ssl = args['requireSsl'] + @ipv4_enabled = args["ipv4Enabled"] + @authorized_networks = GoogleInSpec::SQL::Property::DatabaseInstanceSettingsIpConfigurationAuthorizedNetworksArray.parse(args["authorizedNetworks"], to_s) + @require_ssl = args["requireSsl"] end def to_s diff --git a/libraries/google/sql/property/databaseinstance_settings_ip_configuration_authorized_networks.rb b/libraries/google/sql/property/databaseinstance_settings_ip_configuration_authorized_networks.rb index 511675002..265d2a71c 100644 --- a/libraries/google/sql/property/databaseinstance_settings_ip_configuration_authorized_networks.rb +++ b/libraries/google/sql/property/databaseinstance_settings_ip_configuration_authorized_networks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class DatabaseInstanceSettingsIpConfigurationAuthorizedNetworks def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @expiration_time = parse_time_string(args['expirationTime']) - @name = args['name'] - @value = args['value'] + @expiration_time = parse_time_string(args["expirationTime"]) + @name = args["name"] + @value = args["value"] end def to_s diff --git a/libraries/google/storage/property/bucket_acl.rb b/libraries/google/storage/property/bucket_acl.rb index ec2cfa7d8..a6dab3da3 100644 --- a/libraries/google/storage/property/bucket_acl.rb +++ b/libraries/google/storage/property/bucket_acl.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/storage/property/bucket_acl_project_team' +require "google/storage/property/bucket_acl_project_team" module GoogleInSpec module Storage module Property @@ -37,14 +37,14 @@ class BucketAcl def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @bucket = args['bucket'] - @domain = args['domain'] - @email = args['email'] - @entity = args['entity'] - @entity_id = args['entityId'] - @id = args['id'] - @project_team = GoogleInSpec::Storage::Property::BucketAclProjectTeam.new(args['projectTeam'], to_s) - @role = args['role'] + @bucket = args["bucket"] + @domain = args["domain"] + @email = args["email"] + @entity = args["entity"] + @entity_id = args["entityId"] + @id = args["id"] + @project_team = GoogleInSpec::Storage::Property::BucketAclProjectTeam.new(args["projectTeam"], to_s) + @role = args["role"] end def to_s diff --git a/libraries/google/storage/property/bucket_acl_project_team.rb b/libraries/google/storage/property/bucket_acl_project_team.rb index 3657f7901..3fe76b3ac 100644 --- a/libraries/google/storage/property/bucket_acl_project_team.rb +++ b/libraries/google/storage/property/bucket_acl_project_team.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class BucketAclProjectTeam def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @project_number = args['projectNumber'] - @team = args['team'] + @project_number = args["projectNumber"] + @team = args["team"] end def to_s diff --git a/libraries/google/storage/property/bucket_cors.rb b/libraries/google/storage/property/bucket_cors.rb index 0f1cc3cdc..66d1bd35b 100644 --- a/libraries/google/storage/property/bucket_cors.rb +++ b/libraries/google/storage/property/bucket_cors.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class BucketCors def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_age_seconds = args['maxAgeSeconds'] - @method = args['method'] - @origin = args['origin'] - @response_header = args['responseHeader'] + @max_age_seconds = args["maxAgeSeconds"] + @method = args["method"] + @origin = args["origin"] + @response_header = args["responseHeader"] end def to_s diff --git a/libraries/google/storage/property/bucket_default_object_acl.rb b/libraries/google/storage/property/bucket_default_object_acl.rb index 582a22709..233e864e3 100644 --- a/libraries/google/storage/property/bucket_default_object_acl.rb +++ b/libraries/google/storage/property/bucket_default_object_acl.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/storage/property/bucket_default_object_acl_project_team' +require "google/storage/property/bucket_default_object_acl_project_team" module GoogleInSpec module Storage module Property @@ -41,16 +41,16 @@ class BucketDefaultObjectAcl def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @bucket = args['bucket'] - @domain = args['domain'] - @email = args['email'] - @entity = args['entity'] - @entity_id = args['entityId'] - @generation = args['generation'] - @id = args['id'] - @object = args['object'] - @project_team = GoogleInSpec::Storage::Property::BucketDefaultObjectAclProjectTeam.new(args['projectTeam'], to_s) - @role = args['role'] + @bucket = args["bucket"] + @domain = args["domain"] + @email = args["email"] + @entity = args["entity"] + @entity_id = args["entityId"] + @generation = args["generation"] + @id = args["id"] + @object = args["object"] + @project_team = GoogleInSpec::Storage::Property::BucketDefaultObjectAclProjectTeam.new(args["projectTeam"], to_s) + @role = args["role"] end def to_s diff --git a/libraries/google/storage/property/bucket_default_object_acl_project_team.rb b/libraries/google/storage/property/bucket_default_object_acl_project_team.rb index 25659cc5e..9e29b5c55 100644 --- a/libraries/google/storage/property/bucket_default_object_acl_project_team.rb +++ b/libraries/google/storage/property/bucket_default_object_acl_project_team.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class BucketDefaultObjectAclProjectTeam def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @project_number = args['projectNumber'] - @team = args['team'] + @project_number = args["projectNumber"] + @team = args["team"] end def to_s diff --git a/libraries/google/storage/property/bucket_encryption.rb b/libraries/google/storage/property/bucket_encryption.rb index 79933665c..75762ac89 100644 --- a/libraries/google/storage/property/bucket_encryption.rb +++ b/libraries/google/storage/property/bucket_encryption.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class BucketEncryption def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @default_kms_key_name = args['defaultKmsKeyName'] + @default_kms_key_name = args["defaultKmsKeyName"] end def to_s diff --git a/libraries/google/storage/property/bucket_lifecycle.rb b/libraries/google/storage/property/bucket_lifecycle.rb index 4042b6355..318ce96d3 100644 --- a/libraries/google/storage/property/bucket_lifecycle.rb +++ b/libraries/google/storage/property/bucket_lifecycle.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/storage/property/bucket_lifecycle_rule' +require "google/storage/property/bucket_lifecycle_rule" module GoogleInSpec module Storage module Property @@ -23,7 +23,7 @@ class BucketLifecycle def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @rule = GoogleInSpec::Storage::Property::BucketLifecycleRuleArray.parse(args['rule'], to_s) + @rule = GoogleInSpec::Storage::Property::BucketLifecycleRuleArray.parse(args["rule"], to_s) end def to_s diff --git a/libraries/google/storage/property/bucket_lifecycle_rule.rb b/libraries/google/storage/property/bucket_lifecycle_rule.rb index 364d541ad..181fe7b19 100644 --- a/libraries/google/storage/property/bucket_lifecycle_rule.rb +++ b/libraries/google/storage/property/bucket_lifecycle_rule.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/storage/property/bucket_lifecycle_rule_action' -require 'google/storage/property/bucket_lifecycle_rule_condition' +require "google/storage/property/bucket_lifecycle_rule_action" +require "google/storage/property/bucket_lifecycle_rule_condition" module GoogleInSpec module Storage module Property @@ -26,8 +26,8 @@ class BucketLifecycleRule def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @action = GoogleInSpec::Storage::Property::BucketLifecycleRuleAction.new(args['action'], to_s) - @condition = GoogleInSpec::Storage::Property::BucketLifecycleRuleCondition.new(args['condition'], to_s) + @action = GoogleInSpec::Storage::Property::BucketLifecycleRuleAction.new(args["action"], to_s) + @condition = GoogleInSpec::Storage::Property::BucketLifecycleRuleCondition.new(args["condition"], to_s) end def to_s diff --git a/libraries/google/storage/property/bucket_lifecycle_rule_action.rb b/libraries/google/storage/property/bucket_lifecycle_rule_action.rb index 36173d301..c36b11855 100644 --- a/libraries/google/storage/property/bucket_lifecycle_rule_action.rb +++ b/libraries/google/storage/property/bucket_lifecycle_rule_action.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class BucketLifecycleRuleAction def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @storage_class = args['storageClass'] - @type = args['type'] + @storage_class = args["storageClass"] + @type = args["type"] end def to_s diff --git a/libraries/google/storage/property/bucket_lifecycle_rule_condition.rb b/libraries/google/storage/property/bucket_lifecycle_rule_condition.rb index 519ba0641..873d9e998 100644 --- a/libraries/google/storage/property/bucket_lifecycle_rule_condition.rb +++ b/libraries/google/storage/property/bucket_lifecycle_rule_condition.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -30,11 +30,11 @@ class BucketLifecycleRuleCondition def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @age_days = args['age'] - @created_before = parse_time_string(args['createdBefore']) - @is_live = args['isLive'] - @matches_storage_class = args['matchesStorageClass'] - @num_newer_versions = args['numNewerVersions'] + @age_days = args["age"] + @created_before = parse_time_string(args["createdBefore"]) + @is_live = args["isLive"] + @matches_storage_class = args["matchesStorageClass"] + @num_newer_versions = args["numNewerVersions"] end def to_s diff --git a/libraries/google/storage/property/bucket_logging.rb b/libraries/google/storage/property/bucket_logging.rb index 4625b7ea3..9aa3a776c 100644 --- a/libraries/google/storage/property/bucket_logging.rb +++ b/libraries/google/storage/property/bucket_logging.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class BucketLogging def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @log_bucket = args['logBucket'] - @log_object_prefix = args['logObjectPrefix'] + @log_bucket = args["logBucket"] + @log_object_prefix = args["logObjectPrefix"] end def to_s diff --git a/libraries/google/storage/property/bucket_owner.rb b/libraries/google/storage/property/bucket_owner.rb index 06b76ac89..c237e68e9 100644 --- a/libraries/google/storage/property/bucket_owner.rb +++ b/libraries/google/storage/property/bucket_owner.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class BucketOwner def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @entity = args['entity'] - @entity_id = args['entityId'] + @entity = args["entity"] + @entity_id = args["entityId"] end def to_s diff --git a/libraries/google/storage/property/bucket_retention_policy.rb b/libraries/google/storage/property/bucket_retention_policy.rb index 7d429c568..4f6161f78 100644 --- a/libraries/google/storage/property/bucket_retention_policy.rb +++ b/libraries/google/storage/property/bucket_retention_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class BucketRetentionPolicy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @effective_time = parse_time_string(args['effectiveTime']) - @is_locked = args['isLocked'] - @retention_period = args['retentionPeriod'] + @effective_time = parse_time_string(args["effectiveTime"]) + @is_locked = args["isLocked"] + @retention_period = args["retentionPeriod"] end def to_s diff --git a/libraries/google/storage/property/bucket_versioning.rb b/libraries/google/storage/property/bucket_versioning.rb index 747b99878..602d3fe46 100644 --- a/libraries/google/storage/property/bucket_versioning.rb +++ b/libraries/google/storage/property/bucket_versioning.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class BucketVersioning def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @enabled = args['enabled'] + @enabled = args["enabled"] end def to_s diff --git a/libraries/google/storage/property/bucket_website.rb b/libraries/google/storage/property/bucket_website.rb index 096b53f67..0fa6b4f55 100644 --- a/libraries/google/storage/property/bucket_website.rb +++ b/libraries/google/storage/property/bucket_website.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class BucketWebsite def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @main_page_suffix = args['mainPageSuffix'] - @not_found_page = args['notFoundPage'] + @main_page_suffix = args["mainPageSuffix"] + @not_found_page = args["notFoundPage"] end def to_s diff --git a/libraries/google/storage/property/bucketacl_project_team.rb b/libraries/google/storage/property/bucketacl_project_team.rb index 02370f3df..10b73a64b 100644 --- a/libraries/google/storage/property/bucketacl_project_team.rb +++ b/libraries/google/storage/property/bucketacl_project_team.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class BucketACLProjectTeam def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @project_number = args['projectNumber'] - @team = args['team'] + @project_number = args["projectNumber"] + @team = args["team"] end def to_s diff --git a/libraries/google/storage/property/defaultobjectacl_project_team.rb b/libraries/google/storage/property/defaultobjectacl_project_team.rb index 19df5674e..c5b0be826 100644 --- a/libraries/google/storage/property/defaultobjectacl_project_team.rb +++ b/libraries/google/storage/property/defaultobjectacl_project_team.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class DefaultObjectACLProjectTeam def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @project_number = args['projectNumber'] - @team = args['team'] + @project_number = args["projectNumber"] + @team = args["team"] end def to_s diff --git a/libraries/google/storage/property/objectacl_project_team.rb b/libraries/google/storage/property/objectacl_project_team.rb index 481835bc8..51b5d4455 100644 --- a/libraries/google/storage/property/objectacl_project_team.rb +++ b/libraries/google/storage/property/objectacl_project_team.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ObjectACLProjectTeam def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @project_number = args['projectNumber'] - @team = args['team'] + @project_number = args["projectNumber"] + @team = args["team"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_completion_stats.rb b/libraries/google/vertexai/property/batchpredictionjob_completion_stats.rb index 9b046e209..c9db5b978 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_completion_stats.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_completion_stats.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class BatchPredictionJobCompletionStats def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @successful_forecast_point_count = args['successfulForecastPointCount'] - @incomplete_count = args['incompleteCount'] - @failed_count = args['failedCount'] - @successful_count = args['successfulCount'] + @successful_forecast_point_count = args["successfulForecastPointCount"] + @incomplete_count = args["incompleteCount"] + @failed_count = args["failedCount"] + @successful_count = args["successfulCount"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_dedicated_resources.rb b/libraries/google/vertexai/property/batchpredictionjob_dedicated_resources.rb index 06e0a77a8..a067685a5 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_dedicated_resources.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_dedicated_resources.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/batchpredictionjob_dedicated_resources_machine_spec' +require "google/vertexai/property/batchpredictionjob_dedicated_resources_machine_spec" module GoogleInSpec module VertexAI module Property @@ -27,9 +27,9 @@ class BatchPredictionJobDedicatedResources def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @starting_replica_count = args['startingReplicaCount'] - @max_replica_count = args['maxReplicaCount'] - @machine_spec = GoogleInSpec::VertexAI::Property::BatchPredictionJobDedicatedResourcesMachineSpec.new(args['machineSpec'], to_s) + @starting_replica_count = args["startingReplicaCount"] + @max_replica_count = args["maxReplicaCount"] + @machine_spec = GoogleInSpec::VertexAI::Property::BatchPredictionJobDedicatedResourcesMachineSpec.new(args["machineSpec"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_dedicated_resources_machine_spec.rb b/libraries/google/vertexai/property/batchpredictionjob_dedicated_resources_machine_spec.rb index 540f28dec..6cccdc348 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_dedicated_resources_machine_spec.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_dedicated_resources_machine_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class BatchPredictionJobDedicatedResourcesMachineSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @accelerator_type = args['acceleratorType'] - @machine_type = args['machineType'] - @accelerator_count = args['acceleratorCount'] + @accelerator_type = args["acceleratorType"] + @machine_type = args["machineType"] + @accelerator_count = args["acceleratorCount"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_encryption_spec.rb b/libraries/google/vertexai/property/batchpredictionjob_encryption_spec.rb index 7e0c45773..b0f036f99 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_encryption_spec.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_encryption_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class BatchPredictionJobEncryptionSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_error.rb b/libraries/google/vertexai/property/batchpredictionjob_error.rb index 75753611b..6338a5a43 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_error.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_error.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class BatchPredictionJobError def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @details = args['details'] - @code = args['code'] - @message = args['message'] + @details = args["details"] + @code = args["code"] + @message = args["message"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec.rb index 8f178937f..136dbeb5c 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,25 +13,25 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/batchpredictionjob_explanation_spec_metadata' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_metadata_inputs' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_metadata_outputs' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_presets' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_sampled_shapley_attribution' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/batchpredictionjob_explanation_spec_metadata" +require "google/vertexai/property/batchpredictionjob_explanation_spec_metadata_inputs" +require "google/vertexai/property/batchpredictionjob_explanation_spec_metadata_outputs" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_presets" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_sampled_shapley_attribution" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -43,8 +43,8 @@ class BatchPredictionJobExplanationSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @parameters = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParameters.new(args['parameters'], to_s) - @metadata = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecMetadata.new(args['metadata'], to_s) + @parameters = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParameters.new(args["parameters"], to_s) + @metadata = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecMetadata.new(args["metadata"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_metadata.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_metadata.rb index 943d0983d..8e6d418c0 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_metadata.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_metadata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/batchpredictionjob_explanation_spec_metadata_inputs' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_metadata_outputs' +require "google/vertexai/property/batchpredictionjob_explanation_spec_metadata_inputs" +require "google/vertexai/property/batchpredictionjob_explanation_spec_metadata_outputs" module GoogleInSpec module VertexAI module Property @@ -30,10 +30,10 @@ class BatchPredictionJobExplanationSpecMetadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @feature_attributions_schema_uri = args['featureAttributionsSchemaUri'] - @latent_space_source = args['latentSpaceSource'] - @outputs = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecMetadataOutputs.new(args['outputs'], to_s) - @inputs = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecMetadataInputs.new(args['inputs'], to_s) + @feature_attributions_schema_uri = args["featureAttributionsSchemaUri"] + @latent_space_source = args["latentSpaceSource"] + @outputs = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecMetadataOutputs.new(args["outputs"], to_s) + @inputs = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecMetadataInputs.new(args["inputs"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_metadata_inputs.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_metadata_inputs.rb index 6829f825b..11b111cac 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_metadata_inputs.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_metadata_inputs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class BatchPredictionJobExplanationSpecMetadataInputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_metadata_outputs.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_metadata_outputs.rb index 7e5e9e41f..ae2bfd748 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_metadata_outputs.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_metadata_outputs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class BatchPredictionJobExplanationSpecMetadataOutputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters.rb index 2bd808080..144ec3ca1 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,21 +13,21 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_presets' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_sampled_shapley_attribution' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_presets" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_sampled_shapley_attribution" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -47,12 +47,12 @@ class BatchPredictionJobExplanationSpecParameters def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_indices = args['outputIndices'] - @examples = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersExamples.new(args['examples'], to_s) - @xrai_attribution = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersXraiAttribution.new(args['xraiAttribution'], to_s) - @top_k = args['topK'] - @integrated_gradients_attribution = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttribution.new(args['integratedGradientsAttribution'], to_s) - @sampled_shapley_attribution = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersSampledShapleyAttribution.new(args['sampledShapleyAttribution'], to_s) + @output_indices = args["outputIndices"] + @examples = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersExamples.new(args["examples"], to_s) + @xrai_attribution = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersXraiAttribution.new(args["xraiAttribution"], to_s) + @top_k = args["topK"] + @integrated_gradients_attribution = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttribution.new(args["integratedGradientsAttribution"], to_s) + @sampled_shapley_attribution = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersSampledShapleyAttribution.new(args["sampledShapleyAttribution"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples.rb index 31b17aae6..0754e2730 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_presets' +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_presets" module GoogleInSpec module VertexAI module Property @@ -31,10 +31,10 @@ class BatchPredictionJobExplanationSpecParametersExamples def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @presets = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersExamplesPresets.new(args['presets'], to_s) - @neighbor_count = args['neighborCount'] - @example_gcs_source = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersExamplesExampleGcsSource.new(args['exampleGcsSource'], to_s) - @nearest_neighbor_search_config = args['nearestNeighborSearchConfig'] + @presets = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersExamplesPresets.new(args["presets"], to_s) + @neighbor_count = args["neighborCount"] + @example_gcs_source = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersExamplesExampleGcsSource.new(args["exampleGcsSource"], to_s) + @nearest_neighbor_search_config = args["nearestNeighborSearchConfig"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source.rb index 8bad2fd87..c59a3d6b1 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source' +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source" module GoogleInSpec module VertexAI module Property @@ -25,8 +25,8 @@ class BatchPredictionJobExplanationSpecParametersExamplesExampleGcsSource def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @gcs_source = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersExamplesExampleGcsSourceGcsSource.new(args['gcsSource'], to_s) - @data_format = args['dataFormat'] + @gcs_source = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersExamplesExampleGcsSourceGcsSource.new(args["gcsSource"], to_s) + @data_format = args["dataFormat"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb index 116a0bf8d..a22068e0a 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class BatchPredictionJobExplanationSpecParametersExamplesExampleGcsSourceGcsSour def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @uris = args['uris'] + @uris = args["uris"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_presets.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_presets.rb index 1eb20e007..b48422505 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_presets.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_presets.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class BatchPredictionJobExplanationSpecParametersExamplesPresets def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @modality = args['modality'] - @query = args['query'] + @modality = args["modality"] + @query = args["query"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution.rb index 6bcf10d98..987340c08 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -30,9 +30,9 @@ class BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttribution def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @step_count = args['stepCount'] - @smooth_grad_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) - @blur_baseline_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) + @step_count = args["stepCount"] + @smooth_grad_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig.new(args["smoothGradConfig"], to_s) + @blur_baseline_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig.new(args["blurBaselineConfig"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb index ce61d2fc5..ef5078b13 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionB def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_blur_sigma = args['maxBlurSigma'] + @max_blur_sigma = args["maxBlurSigma"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb index 002a071fb..22c72ad70 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -28,9 +28,9 @@ class BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionS def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @feature_noise_sigma = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) - @noise_sigma = args['noiseSigma'] - @noisy_sample_count = args['noisySampleCount'] + @feature_noise_sigma = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma.new(args["featureNoiseSigma"], to_s) + @noise_sigma = args["noiseSigma"] + @noisy_sample_count = args["noisySampleCount"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb index f403ee6ec..5134419bb 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -23,7 +23,7 @@ class BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionS def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @noise_sigma = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) + @noise_sigma = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args["noiseSigma"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb index 7b7df15da..fe8b164e2 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class BatchPredictionJobExplanationSpecParametersIntegratedGradientsAttributionS def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @sigma = args['sigma'] + @name = args["name"] + @sigma = args["sigma"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_sampled_shapley_attribution.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_sampled_shapley_attribution.rb index 7ee6922dc..96f086eac 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_sampled_shapley_attribution.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_sampled_shapley_attribution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class BatchPredictionJobExplanationSpecParametersSampledShapleyAttribution def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @path_count = args['pathCount'] + @path_count = args["pathCount"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution.rb index 7e166611a..9c677ce31 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -30,9 +30,9 @@ class BatchPredictionJobExplanationSpecParametersXraiAttribution def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @smooth_grad_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) - @step_count = args['stepCount'] - @blur_baseline_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersXraiAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) + @smooth_grad_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfig.new(args["smoothGradConfig"], to_s) + @step_count = args["stepCount"] + @blur_baseline_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersXraiAttributionBlurBaselineConfig.new(args["blurBaselineConfig"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb index 93091c4b5..f0a4f72e2 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class BatchPredictionJobExplanationSpecParametersXraiAttributionBlurBaselineConf def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_blur_sigma = args['maxBlurSigma'] + @max_blur_sigma = args["maxBlurSigma"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb index a6f2cdfe8..7e131eb56 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -28,9 +28,9 @@ class BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @feature_noise_sigma = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) - @noise_sigma = args['noiseSigma'] - @noisy_sample_count = args['noisySampleCount'] + @feature_noise_sigma = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma.new(args["featureNoiseSigma"], to_s) + @noise_sigma = args["noiseSigma"] + @noisy_sample_count = args["noisySampleCount"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb index a34a792da..dc848f3cf 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -23,7 +23,7 @@ class BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @noise_sigma = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) + @noise_sigma = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args["noiseSigma"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb index 41a08c9b5..1af7008a4 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class BatchPredictionJobExplanationSpecParametersXraiAttributionSmoothGradConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @sigma = args['sigma'] + @name = args["name"] + @sigma = args["sigma"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_input_config.rb b/libraries/google/vertexai/property/batchpredictionjob_input_config.rb index 9069f206e..09260c5ce 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_input_config.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_input_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/batchpredictionjob_input_config_bigquery_source' -require 'google/vertexai/property/batchpredictionjob_input_config_gcs_source' +require "google/vertexai/property/batchpredictionjob_input_config_bigquery_source" +require "google/vertexai/property/batchpredictionjob_input_config_gcs_source" module GoogleInSpec module VertexAI module Property @@ -28,9 +28,9 @@ class BatchPredictionJobInputConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @instances_format = args['instancesFormat'] - @bigquery_source = GoogleInSpec::VertexAI::Property::BatchPredictionJobInputConfigBigquerySource.new(args['bigquerySource'], to_s) - @gcs_source = GoogleInSpec::VertexAI::Property::BatchPredictionJobInputConfigGcsSource.new(args['gcsSource'], to_s) + @instances_format = args["instancesFormat"] + @bigquery_source = GoogleInSpec::VertexAI::Property::BatchPredictionJobInputConfigBigquerySource.new(args["bigquerySource"], to_s) + @gcs_source = GoogleInSpec::VertexAI::Property::BatchPredictionJobInputConfigGcsSource.new(args["gcsSource"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_input_config_bigquery_source.rb b/libraries/google/vertexai/property/batchpredictionjob_input_config_bigquery_source.rb index ec8166e77..45d7f9f2b 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_input_config_bigquery_source.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_input_config_bigquery_source.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class BatchPredictionJobInputConfigBigquerySource def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @input_uri = args['inputUri'] + @input_uri = args["inputUri"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_input_config_gcs_source.rb b/libraries/google/vertexai/property/batchpredictionjob_input_config_gcs_source.rb index 9116cb2a9..9616e3f4c 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_input_config_gcs_source.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_input_config_gcs_source.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class BatchPredictionJobInputConfigGcsSource def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @uris = args['uris'] + @uris = args["uris"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_instance_config.rb b/libraries/google/vertexai/property/batchpredictionjob_instance_config.rb index 469c48227..902de177d 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_instance_config.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_instance_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class BatchPredictionJobInstanceConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @included_fields = args['includedFields'] - @instance_type = args['instanceType'] - @excluded_fields = args['excludedFields'] - @key_field = args['keyField'] + @included_fields = args["includedFields"] + @instance_type = args["instanceType"] + @excluded_fields = args["excludedFields"] + @key_field = args["keyField"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_labels.rb b/libraries/google/vertexai/property/batchpredictionjob_labels.rb index ec814d014..e67bff4c2 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_labels.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class BatchPredictionJobLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_manual_batch_tuning_parameters.rb b/libraries/google/vertexai/property/batchpredictionjob_manual_batch_tuning_parameters.rb index 3808072f5..536d12f80 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_manual_batch_tuning_parameters.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_manual_batch_tuning_parameters.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class BatchPredictionJobManualBatchTuningParameters def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @batch_size = args['batchSize'] + @batch_size = args["batchSize"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_output_config.rb b/libraries/google/vertexai/property/batchpredictionjob_output_config.rb index 9597c75ed..6ac66f954 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_output_config.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_output_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/batchpredictionjob_output_config_bigquery_destination' -require 'google/vertexai/property/batchpredictionjob_output_config_gcs_destination' +require "google/vertexai/property/batchpredictionjob_output_config_bigquery_destination" +require "google/vertexai/property/batchpredictionjob_output_config_gcs_destination" module GoogleInSpec module VertexAI module Property @@ -28,9 +28,9 @@ class BatchPredictionJobOutputConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @gcs_destination = GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputConfigGcsDestination.new(args['gcsDestination'], to_s) - @predictions_format = args['predictionsFormat'] - @bigquery_destination = GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputConfigBigqueryDestination.new(args['bigqueryDestination'], to_s) + @gcs_destination = GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputConfigGcsDestination.new(args["gcsDestination"], to_s) + @predictions_format = args["predictionsFormat"] + @bigquery_destination = GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputConfigBigqueryDestination.new(args["bigqueryDestination"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_output_config_bigquery_destination.rb b/libraries/google/vertexai/property/batchpredictionjob_output_config_bigquery_destination.rb index 14161fb49..9fb58d01d 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_output_config_bigquery_destination.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_output_config_bigquery_destination.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class BatchPredictionJobOutputConfigBigqueryDestination def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_uri = args['outputUri'] + @output_uri = args["outputUri"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_output_config_gcs_destination.rb b/libraries/google/vertexai/property/batchpredictionjob_output_config_gcs_destination.rb index a69dce1d8..200010314 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_output_config_gcs_destination.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_output_config_gcs_destination.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class BatchPredictionJobOutputConfigGcsDestination def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_uri_prefix = args['outputUriPrefix'] + @output_uri_prefix = args["outputUriPrefix"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_output_info.rb b/libraries/google/vertexai/property/batchpredictionjob_output_info.rb index 597a02c05..3730ee5a1 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_output_info.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_output_info.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class BatchPredictionJobOutputInfo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @bigquery_output_dataset = args['bigqueryOutputDataset'] - @gcs_output_directory = args['gcsOutputDirectory'] - @bigquery_output_table = args['bigqueryOutputTable'] + @bigquery_output_dataset = args["bigqueryOutputDataset"] + @gcs_output_directory = args["gcsOutputDirectory"] + @bigquery_output_table = args["bigqueryOutputTable"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_partial_failures.rb b/libraries/google/vertexai/property/batchpredictionjob_partial_failures.rb index 4d17b433f..35ff3fe86 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_partial_failures.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_partial_failures.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class BatchPredictionJobPartialFailures def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @details = args['details'] - @code = args['code'] - @message = args['message'] + @details = args["details"] + @code = args["code"] + @message = args["message"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_resources_consumed.rb b/libraries/google/vertexai/property/batchpredictionjob_resources_consumed.rb index ececc1ab4..b0c78b5cc 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_resources_consumed.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_resources_consumed.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class BatchPredictionJobResourcesConsumed def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @replica_hours = args['replicaHours'] + @replica_hours = args["replicaHours"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model.rb b/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model.rb index 50b874d79..dd671d011 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec' -require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_env' -require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_ports' -require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_predict_schemata' +require "google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec" +require "google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_env" +require "google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_ports" +require "google/vertexai/property/batchpredictionjob_unmanaged_container_model_predict_schemata" module GoogleInSpec module VertexAI module Property @@ -30,9 +30,9 @@ class BatchPredictionJobUnmanagedContainerModel def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @artifact_uri = args['artifactUri'] - @predict_schemata = GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModelPredictSchemata.new(args['predictSchemata'], to_s) - @container_spec = GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModelContainerSpec.new(args['containerSpec'], to_s) + @artifact_uri = args["artifactUri"] + @predict_schemata = GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModelPredictSchemata.new(args["predictSchemata"], to_s) + @container_spec = GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModelContainerSpec.new(args["containerSpec"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec.rb b/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec.rb index 6c566706f..f1e09be7c 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_env' -require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_ports' +require "google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_env" +require "google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_ports" module GoogleInSpec module VertexAI module Property @@ -36,13 +36,13 @@ class BatchPredictionJobUnmanagedContainerModelContainerSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @predict_route = args['predictRoute'] - @image_uri = args['imageUri'] - @env = GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModelContainerSpecEnvArray.parse(args['env'], to_s) - @args = args['args'] - @command = args['command'] - @ports = GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModelContainerSpecPortsArray.parse(args['ports'], to_s) - @health_route = args['healthRoute'] + @predict_route = args["predictRoute"] + @image_uri = args["imageUri"] + @env = GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModelContainerSpecEnvArray.parse(args["env"], to_s) + @args = args["args"] + @command = args["command"] + @ports = GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModelContainerSpecPortsArray.parse(args["ports"], to_s) + @health_route = args["healthRoute"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_env.rb b/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_env.rb index 3de6d1b26..04a85851a 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_env.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_env.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class BatchPredictionJobUnmanagedContainerModelContainerSpecEnv def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @value = args['value'] + @name = args["name"] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_ports.rb b/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_ports.rb index 35e487533..0ddca6722 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_ports.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_ports.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class BatchPredictionJobUnmanagedContainerModelContainerSpecPorts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @container_port = args['containerPort'] + @container_port = args["containerPort"] end def to_s diff --git a/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_predict_schemata.rb b/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_predict_schemata.rb index 454710a3c..3b2da787e 100644 --- a/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_predict_schemata.rb +++ b/libraries/google/vertexai/property/batchpredictionjob_unmanaged_container_model_predict_schemata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class BatchPredictionJobUnmanagedContainerModelPredictSchemata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @instance_schema_uri = args['instanceSchemaUri'] - @parameters_schema_uri = args['parametersSchemaUri'] - @prediction_schema_uri = args['predictionSchemaUri'] + @instance_schema_uri = args["instanceSchemaUri"] + @parameters_schema_uri = args["parametersSchemaUri"] + @prediction_schema_uri = args["predictionSchemaUri"] end def to_s diff --git a/libraries/google/vertexai/property/customjob_encryption_spec.rb b/libraries/google/vertexai/property/customjob_encryption_spec.rb index cd1112ebf..03e7d9bb3 100644 --- a/libraries/google/vertexai/property/customjob_encryption_spec.rb +++ b/libraries/google/vertexai/property/customjob_encryption_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class CustomJobEncryptionSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/vertexai/property/customjob_error.rb b/libraries/google/vertexai/property/customjob_error.rb index 990c014a6..7c983d84d 100644 --- a/libraries/google/vertexai/property/customjob_error.rb +++ b/libraries/google/vertexai/property/customjob_error.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class CustomJobError def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @details = args['details'] - @code = args['code'] - @message = args['message'] + @details = args["details"] + @code = args["code"] + @message = args["message"] end def to_s diff --git a/libraries/google/vertexai/property/customjob_job_spec.rb b/libraries/google/vertexai/property/customjob_job_spec.rb index 45ceba316..b78155ab1 100644 --- a/libraries/google/vertexai/property/customjob_job_spec.rb +++ b/libraries/google/vertexai/property/customjob_job_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/customjob_job_spec_base_output_directory' -require 'google/vertexai/property/customjob_job_spec_scheduling' -require 'google/vertexai/property/customjob_job_spec_worker_pool_specs' +require "google/vertexai/property/customjob_job_spec_base_output_directory" +require "google/vertexai/property/customjob_job_spec_scheduling" +require "google/vertexai/property/customjob_job_spec_worker_pool_specs" module GoogleInSpec module VertexAI module Property @@ -45,17 +45,17 @@ class CustomJobJobSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @worker_pool_specs = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsArray.parse(args['workerPoolSpecs'], to_s) - @enable_web_access = args['enableWebAccess'] - @tensorboard = args['tensorboard'] - @experiment = args['experiment'] - @experiment_run = args['experimentRun'] - @scheduling = GoogleInSpec::VertexAI::Property::CustomJobJobSpecScheduling.new(args['scheduling'], to_s) - @enable_dashboard_access = args['enableDashboardAccess'] - @service_account = args['serviceAccount'] - @base_output_directory = GoogleInSpec::VertexAI::Property::CustomJobJobSpecBaseOutputDirectory.new(args['baseOutputDirectory'], to_s) - @reserved_ip_ranges = args['reservedIpRanges'] - @network = args['network'] + @worker_pool_specs = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsArray.parse(args["workerPoolSpecs"], to_s) + @enable_web_access = args["enableWebAccess"] + @tensorboard = args["tensorboard"] + @experiment = args["experiment"] + @experiment_run = args["experimentRun"] + @scheduling = GoogleInSpec::VertexAI::Property::CustomJobJobSpecScheduling.new(args["scheduling"], to_s) + @enable_dashboard_access = args["enableDashboardAccess"] + @service_account = args["serviceAccount"] + @base_output_directory = GoogleInSpec::VertexAI::Property::CustomJobJobSpecBaseOutputDirectory.new(args["baseOutputDirectory"], to_s) + @reserved_ip_ranges = args["reservedIpRanges"] + @network = args["network"] end def to_s diff --git a/libraries/google/vertexai/property/customjob_job_spec_base_output_directory.rb b/libraries/google/vertexai/property/customjob_job_spec_base_output_directory.rb index 08d90f024..d57d41036 100644 --- a/libraries/google/vertexai/property/customjob_job_spec_base_output_directory.rb +++ b/libraries/google/vertexai/property/customjob_job_spec_base_output_directory.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class CustomJobJobSpecBaseOutputDirectory def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_uri_prefix = args['outputUriPrefix'] + @output_uri_prefix = args["outputUriPrefix"] end def to_s diff --git a/libraries/google/vertexai/property/customjob_job_spec_scheduling.rb b/libraries/google/vertexai/property/customjob_job_spec_scheduling.rb index e156832b1..15db3f989 100644 --- a/libraries/google/vertexai/property/customjob_job_spec_scheduling.rb +++ b/libraries/google/vertexai/property/customjob_job_spec_scheduling.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class CustomJobJobSpecScheduling def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @disable_retries = args['disableRetries'] - @timeout = args['timeout'] - @restart_job_on_worker_restart = args['restartJobOnWorkerRestart'] + @disable_retries = args["disableRetries"] + @timeout = args["timeout"] + @restart_job_on_worker_restart = args["restartJobOnWorkerRestart"] end def to_s diff --git a/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs.rb b/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs.rb index fc0f0d545..6a36a2ccb 100644 --- a/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs.rb +++ b/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec' -require 'google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec_env' -require 'google/vertexai/property/customjob_job_spec_worker_pool_specs_disk_spec' -require 'google/vertexai/property/customjob_job_spec_worker_pool_specs_machine_spec' -require 'google/vertexai/property/customjob_job_spec_worker_pool_specs_nfs_mounts' -require 'google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec' -require 'google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec_env' +require "google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec" +require "google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec_env" +require "google/vertexai/property/customjob_job_spec_worker_pool_specs_disk_spec" +require "google/vertexai/property/customjob_job_spec_worker_pool_specs_machine_spec" +require "google/vertexai/property/customjob_job_spec_worker_pool_specs_nfs_mounts" +require "google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec" +require "google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec_env" module GoogleInSpec module VertexAI module Property @@ -39,12 +39,12 @@ class CustomJobJobSpecWorkerPoolSpecs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @container_spec = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsContainerSpec.new(args['containerSpec'], to_s) - @machine_spec = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsMachineSpec.new(args['machineSpec'], to_s) - @replica_count = args['replicaCount'] - @nfs_mounts = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsNfsMountsArray.parse(args['nfsMounts'], to_s) - @python_package_spec = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsPythonPackageSpec.new(args['pythonPackageSpec'], to_s) - @disk_spec = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsDiskSpec.new(args['diskSpec'], to_s) + @container_spec = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsContainerSpec.new(args["containerSpec"], to_s) + @machine_spec = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsMachineSpec.new(args["machineSpec"], to_s) + @replica_count = args["replicaCount"] + @nfs_mounts = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsNfsMountsArray.parse(args["nfsMounts"], to_s) + @python_package_spec = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsPythonPackageSpec.new(args["pythonPackageSpec"], to_s) + @disk_spec = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsDiskSpec.new(args["diskSpec"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec.rb b/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec.rb index 85e9ccdf2..6e459757a 100644 --- a/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec.rb +++ b/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec_env' +require "google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec_env" module GoogleInSpec module VertexAI module Property @@ -29,10 +29,10 @@ class CustomJobJobSpecWorkerPoolSpecsContainerSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @env = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsContainerSpecEnvArray.parse(args['env'], to_s) - @args = args['args'] - @command = args['command'] - @image_uri = args['imageUri'] + @env = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsContainerSpecEnvArray.parse(args["env"], to_s) + @args = args["args"] + @command = args["command"] + @image_uri = args["imageUri"] end def to_s diff --git a/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec_env.rb b/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec_env.rb index 3015b1f58..800505861 100644 --- a/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec_env.rb +++ b/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_container_spec_env.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class CustomJobJobSpecWorkerPoolSpecsContainerSpecEnv def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @value = args['value'] + @name = args["name"] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_disk_spec.rb b/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_disk_spec.rb index f7c6d87cc..ae5ebc8ec 100644 --- a/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_disk_spec.rb +++ b/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_disk_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class CustomJobJobSpecWorkerPoolSpecsDiskSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @boot_disk_type = args['bootDiskType'] - @boot_disk_size_gb = args['bootDiskSizeGb'] + @boot_disk_type = args["bootDiskType"] + @boot_disk_size_gb = args["bootDiskSizeGb"] end def to_s diff --git a/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_machine_spec.rb b/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_machine_spec.rb index 6d80a2e0c..a00b4c794 100644 --- a/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_machine_spec.rb +++ b/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_machine_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class CustomJobJobSpecWorkerPoolSpecsMachineSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @accelerator_type = args['acceleratorType'] - @machine_type = args['machineType'] - @accelerator_count = args['acceleratorCount'] + @accelerator_type = args["acceleratorType"] + @machine_type = args["machineType"] + @accelerator_count = args["acceleratorCount"] end def to_s diff --git a/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_nfs_mounts.rb b/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_nfs_mounts.rb index cf7aeb4ab..1cd8483be 100644 --- a/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_nfs_mounts.rb +++ b/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_nfs_mounts.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class CustomJobJobSpecWorkerPoolSpecsNfsMounts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @path = args['path'] - @mount_point = args['mountPoint'] - @server = args['server'] + @path = args["path"] + @mount_point = args["mountPoint"] + @server = args["server"] end def to_s diff --git a/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec.rb b/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec.rb index dc84fae55..f6e91ddab 100644 --- a/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec.rb +++ b/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec_env' +require "google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec_env" module GoogleInSpec module VertexAI module Property @@ -31,11 +31,11 @@ class CustomJobJobSpecWorkerPoolSpecsPythonPackageSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @package_uris = args['packageUris'] - @env = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsPythonPackageSpecEnvArray.parse(args['env'], to_s) - @executor_image_uri = args['executorImageUri'] - @args = args['args'] - @python_module = args['pythonModule'] + @package_uris = args["packageUris"] + @env = GoogleInSpec::VertexAI::Property::CustomJobJobSpecWorkerPoolSpecsPythonPackageSpecEnvArray.parse(args["env"], to_s) + @executor_image_uri = args["executorImageUri"] + @args = args["args"] + @python_module = args["pythonModule"] end def to_s diff --git a/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec_env.rb b/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec_env.rb index cb1dfa330..a3e49f690 100644 --- a/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec_env.rb +++ b/libraries/google/vertexai/property/customjob_job_spec_worker_pool_specs_python_package_spec_env.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class CustomJobJobSpecWorkerPoolSpecsPythonPackageSpecEnv def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @value = args['value'] + @name = args["name"] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/customjob_labels.rb b/libraries/google/vertexai/property/customjob_labels.rb index 4241a6ac7..f40fe8cb5 100644 --- a/libraries/google/vertexai/property/customjob_labels.rb +++ b/libraries/google/vertexai/property/customjob_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class CustomJobLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/customjob_web_access_uris.rb b/libraries/google/vertexai/property/customjob_web_access_uris.rb index d22fae8dd..295e9f7b9 100644 --- a/libraries/google/vertexai/property/customjob_web_access_uris.rb +++ b/libraries/google/vertexai/property/customjob_web_access_uris.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class CustomJobWebAccessUris def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/dataset_encryption_spec.rb b/libraries/google/vertexai/property/dataset_encryption_spec.rb index ed9352d3f..697c0e203 100644 --- a/libraries/google/vertexai/property/dataset_encryption_spec.rb +++ b/libraries/google/vertexai/property/dataset_encryption_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class DatasetEncryptionSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/vertexai/property/dataset_labels.rb b/libraries/google/vertexai/property/dataset_labels.rb index 4de930e96..a2c8126ac 100644 --- a/libraries/google/vertexai/property/dataset_labels.rb +++ b/libraries/google/vertexai/property/dataset_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class DatasetLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/dataset_saved_queries.rb b/libraries/google/vertexai/property/dataset_saved_queries.rb index 8107ce7d3..884e6d83c 100644 --- a/libraries/google/vertexai/property/dataset_saved_queries.rb +++ b/libraries/google/vertexai/property/dataset_saved_queries.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -40,16 +40,16 @@ class DatasetSavedQueries def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @annotation_spec_count = args['annotationSpecCount'] - @update_time = args['updateTime'] - @support_automl_training = args['supportAutomlTraining'] - @metadata = args['metadata'] - @problem_type = args['problemType'] - @name = args['name'] - @create_time = args['createTime'] - @etag = args['etag'] - @display_name = args['displayName'] - @annotation_filter = args['annotationFilter'] + @annotation_spec_count = args["annotationSpecCount"] + @update_time = args["updateTime"] + @support_automl_training = args["supportAutomlTraining"] + @metadata = args["metadata"] + @problem_type = args["problemType"] + @name = args["name"] + @create_time = args["createTime"] + @etag = args["etag"] + @display_name = args["displayName"] + @annotation_filter = args["annotationFilter"] end def to_s diff --git a/libraries/google/vertexai/property/datasetdataitemannotation_labels.rb b/libraries/google/vertexai/property/datasetdataitemannotation_labels.rb index 0e7c29c1a..5023ecfc3 100644 --- a/libraries/google/vertexai/property/datasetdataitemannotation_labels.rb +++ b/libraries/google/vertexai/property/datasetdataitemannotation_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class DatasetDataItemAnnotationLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/datasetsdataitem_labels.rb b/libraries/google/vertexai/property/datasetsdataitem_labels.rb index 86d68ccf5..f77cb9257 100644 --- a/libraries/google/vertexai/property/datasetsdataitem_labels.rb +++ b/libraries/google/vertexai/property/datasetsdataitem_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class DatasetsDataItemLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models.rb b/libraries/google/vertexai/property/endpoint_deployed_models.rb index e759e0c55..08e571341 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,31 +13,31 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/endpoint_deployed_models_automatic_resources' -require 'google/vertexai/property/endpoint_deployed_models_dedicated_resources' -require 'google/vertexai/property/endpoint_deployed_models_dedicated_resources_autoscaling_metric_specs' -require 'google/vertexai/property/endpoint_deployed_models_dedicated_resources_machine_spec' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_inputs' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_outputs' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_presets' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_sampled_shapley_attribution' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/endpoint_deployed_models_private_endpoints' +require "google/vertexai/property/endpoint_deployed_models_automatic_resources" +require "google/vertexai/property/endpoint_deployed_models_dedicated_resources" +require "google/vertexai/property/endpoint_deployed_models_dedicated_resources_autoscaling_metric_specs" +require "google/vertexai/property/endpoint_deployed_models_dedicated_resources_machine_spec" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_inputs" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_outputs" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_presets" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_sampled_shapley_attribution" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/endpoint_deployed_models_private_endpoints" module GoogleInSpec module VertexAI module Property @@ -69,18 +69,18 @@ class EndpointDeployedModels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @create_time = args['createTime'] - @private_endpoints = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsPrivateEndpoints.new(args['privateEndpoints'], to_s) - @disable_container_logging = args['disableContainerLogging'] - @model_version_id = args['modelVersionId'] - @explanation_spec = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpec.new(args['explanationSpec'], to_s) - @enable_access_logging = args['enableAccessLogging'] - @service_account = args['serviceAccount'] - @dedicated_resources = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsDedicatedResources.new(args['dedicatedResources'], to_s) - @automatic_resources = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsAutomaticResources.new(args['automaticResources'], to_s) - @display_name = args['displayName'] - @model = args['model'] - @id = args['id'] + @create_time = args["createTime"] + @private_endpoints = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsPrivateEndpoints.new(args["privateEndpoints"], to_s) + @disable_container_logging = args["disableContainerLogging"] + @model_version_id = args["modelVersionId"] + @explanation_spec = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpec.new(args["explanationSpec"], to_s) + @enable_access_logging = args["enableAccessLogging"] + @service_account = args["serviceAccount"] + @dedicated_resources = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsDedicatedResources.new(args["dedicatedResources"], to_s) + @automatic_resources = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsAutomaticResources.new(args["automaticResources"], to_s) + @display_name = args["displayName"] + @model = args["model"] + @id = args["id"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_automatic_resources.rb b/libraries/google/vertexai/property/endpoint_deployed_models_automatic_resources.rb index 9f2dec001..85a9e4695 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_automatic_resources.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_automatic_resources.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class EndpointDeployedModelsAutomaticResources def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_replica_count = args['maxReplicaCount'] - @min_replica_count = args['minReplicaCount'] + @max_replica_count = args["maxReplicaCount"] + @min_replica_count = args["minReplicaCount"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_dedicated_resources.rb b/libraries/google/vertexai/property/endpoint_deployed_models_dedicated_resources.rb index 1514d03e2..d324e07cc 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_dedicated_resources.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_dedicated_resources.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/endpoint_deployed_models_dedicated_resources_autoscaling_metric_specs' -require 'google/vertexai/property/endpoint_deployed_models_dedicated_resources_machine_spec' +require "google/vertexai/property/endpoint_deployed_models_dedicated_resources_autoscaling_metric_specs" +require "google/vertexai/property/endpoint_deployed_models_dedicated_resources_machine_spec" module GoogleInSpec module VertexAI module Property @@ -30,10 +30,10 @@ class EndpointDeployedModelsDedicatedResources def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @machine_spec = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsDedicatedResourcesMachineSpec.new(args['machineSpec'], to_s) - @max_replica_count = args['maxReplicaCount'] - @autoscaling_metric_specs = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsDedicatedResourcesAutoscalingMetricSpecsArray.parse(args['autoscalingMetricSpecs'], to_s) - @min_replica_count = args['minReplicaCount'] + @machine_spec = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsDedicatedResourcesMachineSpec.new(args["machineSpec"], to_s) + @max_replica_count = args["maxReplicaCount"] + @autoscaling_metric_specs = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsDedicatedResourcesAutoscalingMetricSpecsArray.parse(args["autoscalingMetricSpecs"], to_s) + @min_replica_count = args["minReplicaCount"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_dedicated_resources_autoscaling_metric_specs.rb b/libraries/google/vertexai/property/endpoint_deployed_models_dedicated_resources_autoscaling_metric_specs.rb index 357b9b77a..1949e396a 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_dedicated_resources_autoscaling_metric_specs.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_dedicated_resources_autoscaling_metric_specs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class EndpointDeployedModelsDedicatedResourcesAutoscalingMetricSpecs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @target = args['target'] - @metric_name = args['metricName'] + @target = args["target"] + @metric_name = args["metricName"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_dedicated_resources_machine_spec.rb b/libraries/google/vertexai/property/endpoint_deployed_models_dedicated_resources_machine_spec.rb index c715977d2..0b60fe67c 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_dedicated_resources_machine_spec.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_dedicated_resources_machine_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class EndpointDeployedModelsDedicatedResourcesMachineSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @accelerator_type = args['acceleratorType'] - @machine_type = args['machineType'] - @accelerator_count = args['acceleratorCount'] + @accelerator_type = args["acceleratorType"] + @machine_type = args["machineType"] + @accelerator_count = args["acceleratorCount"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec.rb index e87d5dd4d..449eb787d 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,25 +13,25 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_inputs' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_outputs' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_presets' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_sampled_shapley_attribution' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_inputs" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_outputs" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_presets" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_sampled_shapley_attribution" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -43,8 +43,8 @@ class EndpointDeployedModelsExplanationSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @parameters = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParameters.new(args['parameters'], to_s) - @metadata = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecMetadata.new(args['metadata'], to_s) + @parameters = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParameters.new(args["parameters"], to_s) + @metadata = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecMetadata.new(args["metadata"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata.rb index 029dd1c59..1747ee723 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_inputs' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_outputs' +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_inputs" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_outputs" module GoogleInSpec module VertexAI module Property @@ -30,10 +30,10 @@ class EndpointDeployedModelsExplanationSpecMetadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @feature_attributions_schema_uri = args['featureAttributionsSchemaUri'] - @latent_space_source = args['latentSpaceSource'] - @outputs = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecMetadataOutputs.new(args['outputs'], to_s) - @inputs = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecMetadataInputs.new(args['inputs'], to_s) + @feature_attributions_schema_uri = args["featureAttributionsSchemaUri"] + @latent_space_source = args["latentSpaceSource"] + @outputs = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecMetadataOutputs.new(args["outputs"], to_s) + @inputs = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecMetadataInputs.new(args["inputs"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_inputs.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_inputs.rb index 15919d351..8e55a27cb 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_inputs.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_inputs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class EndpointDeployedModelsExplanationSpecMetadataInputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_outputs.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_outputs.rb index 85809ab3e..564c4f168 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_outputs.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_metadata_outputs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class EndpointDeployedModelsExplanationSpecMetadataOutputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters.rb index bbcafe883..7ff1c9f8e 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,21 +13,21 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_presets' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_sampled_shapley_attribution' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_presets" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_sampled_shapley_attribution" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -47,12 +47,12 @@ class EndpointDeployedModelsExplanationSpecParameters def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_indices = args['outputIndices'] - @examples = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersExamples.new(args['examples'], to_s) - @xrai_attribution = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersXraiAttribution.new(args['xraiAttribution'], to_s) - @top_k = args['topK'] - @integrated_gradients_attribution = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttribution.new(args['integratedGradientsAttribution'], to_s) - @sampled_shapley_attribution = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersSampledShapleyAttribution.new(args['sampledShapleyAttribution'], to_s) + @output_indices = args["outputIndices"] + @examples = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersExamples.new(args["examples"], to_s) + @xrai_attribution = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersXraiAttribution.new(args["xraiAttribution"], to_s) + @top_k = args["topK"] + @integrated_gradients_attribution = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttribution.new(args["integratedGradientsAttribution"], to_s) + @sampled_shapley_attribution = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersSampledShapleyAttribution.new(args["sampledShapleyAttribution"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples.rb index 7837f3b8b..e665bc617 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_presets' +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_presets" module GoogleInSpec module VertexAI module Property @@ -31,10 +31,10 @@ class EndpointDeployedModelsExplanationSpecParametersExamples def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @presets = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersExamplesPresets.new(args['presets'], to_s) - @neighbor_count = args['neighborCount'] - @example_gcs_source = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersExamplesExampleGcsSource.new(args['exampleGcsSource'], to_s) - @nearest_neighbor_search_config = args['nearestNeighborSearchConfig'] + @presets = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersExamplesPresets.new(args["presets"], to_s) + @neighbor_count = args["neighborCount"] + @example_gcs_source = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersExamplesExampleGcsSource.new(args["exampleGcsSource"], to_s) + @nearest_neighbor_search_config = args["nearestNeighborSearchConfig"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source.rb index 2594858ec..6bf7f2340 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source' +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source" module GoogleInSpec module VertexAI module Property @@ -25,8 +25,8 @@ class EndpointDeployedModelsExplanationSpecParametersExamplesExampleGcsSource def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @gcs_source = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersExamplesExampleGcsSourceGcsSource.new(args['gcsSource'], to_s) - @data_format = args['dataFormat'] + @gcs_source = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersExamplesExampleGcsSourceGcsSource.new(args["gcsSource"], to_s) + @data_format = args["dataFormat"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb index 300b5385a..2b4d42998 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class EndpointDeployedModelsExplanationSpecParametersExamplesExampleGcsSourceGcs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @uris = args['uris'] + @uris = args["uris"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_presets.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_presets.rb index 7bf30eff6..0eca66d71 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_presets.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_examples_presets.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class EndpointDeployedModelsExplanationSpecParametersExamplesPresets def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @modality = args['modality'] - @query = args['query'] + @modality = args["modality"] + @query = args["query"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution.rb index 6003467da..babd9426e 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -30,9 +30,9 @@ class EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttribut def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @step_count = args['stepCount'] - @smooth_grad_config = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) - @blur_baseline_config = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) + @step_count = args["stepCount"] + @smooth_grad_config = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig.new(args["smoothGradConfig"], to_s) + @blur_baseline_config = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig.new(args["blurBaselineConfig"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb index 9d4a199ba..243944157 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttribut def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_blur_sigma = args['maxBlurSigma'] + @max_blur_sigma = args["maxBlurSigma"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb index b8377ae89..a897eb44f 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -28,9 +28,9 @@ class EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttribut def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @feature_noise_sigma = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) - @noise_sigma = args['noiseSigma'] - @noisy_sample_count = args['noisySampleCount'] + @feature_noise_sigma = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma.new(args["featureNoiseSigma"], to_s) + @noise_sigma = args["noiseSigma"] + @noisy_sample_count = args["noisySampleCount"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb index 3fb7937f7..a9ca217c3 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -23,7 +23,7 @@ class EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttribut def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @noise_sigma = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) + @noise_sigma = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args["noiseSigma"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb index 46696962d..a0992191c 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class EndpointDeployedModelsExplanationSpecParametersIntegratedGradientsAttribut def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @sigma = args['sigma'] + @name = args["name"] + @sigma = args["sigma"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_sampled_shapley_attribution.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_sampled_shapley_attribution.rb index c7036d0dd..86fb1ff90 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_sampled_shapley_attribution.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_sampled_shapley_attribution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class EndpointDeployedModelsExplanationSpecParametersSampledShapleyAttribution def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @path_count = args['pathCount'] + @path_count = args["pathCount"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution.rb index 0df839de1..5573f98f2 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -30,9 +30,9 @@ class EndpointDeployedModelsExplanationSpecParametersXraiAttribution def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @smooth_grad_config = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) - @step_count = args['stepCount'] - @blur_baseline_config = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersXraiAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) + @smooth_grad_config = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradConfig.new(args["smoothGradConfig"], to_s) + @step_count = args["stepCount"] + @blur_baseline_config = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersXraiAttributionBlurBaselineConfig.new(args["blurBaselineConfig"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb index 9be06b24d..c603c9c0c 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class EndpointDeployedModelsExplanationSpecParametersXraiAttributionBlurBaseline def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_blur_sigma = args['maxBlurSigma'] + @max_blur_sigma = args["maxBlurSigma"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb index 0d44bfb02..6d0430953 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -28,9 +28,9 @@ class EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradCo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @feature_noise_sigma = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) - @noise_sigma = args['noiseSigma'] - @noisy_sample_count = args['noisySampleCount'] + @feature_noise_sigma = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma.new(args["featureNoiseSigma"], to_s) + @noise_sigma = args["noiseSigma"] + @noisy_sample_count = args["noisySampleCount"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb index bdfd25cd9..adf0dbae6 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -23,7 +23,7 @@ class EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradCo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @noise_sigma = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) + @noise_sigma = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args["noiseSigma"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb index c361c1e70..9bdcb0da0 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class EndpointDeployedModelsExplanationSpecParametersXraiAttributionSmoothGradCo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @sigma = args['sigma'] + @name = args["name"] + @sigma = args["sigma"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_deployed_models_private_endpoints.rb b/libraries/google/vertexai/property/endpoint_deployed_models_private_endpoints.rb index e2931df47..ce5d49a30 100644 --- a/libraries/google/vertexai/property/endpoint_deployed_models_private_endpoints.rb +++ b/libraries/google/vertexai/property/endpoint_deployed_models_private_endpoints.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class EndpointDeployedModelsPrivateEndpoints def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @health_http_uri = args['healthHttpUri'] - @explain_http_uri = args['explainHttpUri'] - @predict_http_uri = args['predictHttpUri'] - @service_attachment = args['serviceAttachment'] + @health_http_uri = args["healthHttpUri"] + @explain_http_uri = args["explainHttpUri"] + @predict_http_uri = args["predictHttpUri"] + @service_attachment = args["serviceAttachment"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_encryption_spec.rb b/libraries/google/vertexai/property/endpoint_encryption_spec.rb index b70d94de7..2be7a58a3 100644 --- a/libraries/google/vertexai/property/endpoint_encryption_spec.rb +++ b/libraries/google/vertexai/property/endpoint_encryption_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class EndpointEncryptionSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_labels.rb b/libraries/google/vertexai/property/endpoint_labels.rb index f255ac949..d993fabc7 100644 --- a/libraries/google/vertexai/property/endpoint_labels.rb +++ b/libraries/google/vertexai/property/endpoint_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class EndpointLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_predict_request_response_logging_config.rb b/libraries/google/vertexai/property/endpoint_predict_request_response_logging_config.rb index a4afbff61..392c894ee 100644 --- a/libraries/google/vertexai/property/endpoint_predict_request_response_logging_config.rb +++ b/libraries/google/vertexai/property/endpoint_predict_request_response_logging_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/endpoint_predict_request_response_logging_config_bigquery_destination' +require "google/vertexai/property/endpoint_predict_request_response_logging_config_bigquery_destination" module GoogleInSpec module VertexAI module Property @@ -27,9 +27,9 @@ class EndpointPredictRequestResponseLoggingConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @sampling_rate = args['samplingRate'] - @enabled = args['enabled'] - @bigquery_destination = GoogleInSpec::VertexAI::Property::EndpointPredictRequestResponseLoggingConfigBigqueryDestination.new(args['bigqueryDestination'], to_s) + @sampling_rate = args["samplingRate"] + @enabled = args["enabled"] + @bigquery_destination = GoogleInSpec::VertexAI::Property::EndpointPredictRequestResponseLoggingConfigBigqueryDestination.new(args["bigqueryDestination"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/endpoint_predict_request_response_logging_config_bigquery_destination.rb b/libraries/google/vertexai/property/endpoint_predict_request_response_logging_config_bigquery_destination.rb index 2124286cd..4dd157bdf 100644 --- a/libraries/google/vertexai/property/endpoint_predict_request_response_logging_config_bigquery_destination.rb +++ b/libraries/google/vertexai/property/endpoint_predict_request_response_logging_config_bigquery_destination.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class EndpointPredictRequestResponseLoggingConfigBigqueryDestination def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_uri = args['outputUri'] + @output_uri = args["outputUri"] end def to_s diff --git a/libraries/google/vertexai/property/endpoint_traffic_split.rb b/libraries/google/vertexai/property/endpoint_traffic_split.rb index 11352df40..1202a4a44 100644 --- a/libraries/google/vertexai/property/endpoint_traffic_split.rb +++ b/libraries/google/vertexai/property/endpoint_traffic_split.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class EndpointTrafficSplit def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/featurestore_encryption_spec.rb b/libraries/google/vertexai/property/featurestore_encryption_spec.rb index d617e46ab..8d72607b3 100644 --- a/libraries/google/vertexai/property/featurestore_encryption_spec.rb +++ b/libraries/google/vertexai/property/featurestore_encryption_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class FeaturestoreEncryptionSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/vertexai/property/featurestore_labels.rb b/libraries/google/vertexai/property/featurestore_labels.rb index 3f063bc05..98bca56cd 100644 --- a/libraries/google/vertexai/property/featurestore_labels.rb +++ b/libraries/google/vertexai/property/featurestore_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class FeaturestoreLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/featurestore_online_serving_config.rb b/libraries/google/vertexai/property/featurestore_online_serving_config.rb index f7dcb8ebc..5bbfa6bb9 100644 --- a/libraries/google/vertexai/property/featurestore_online_serving_config.rb +++ b/libraries/google/vertexai/property/featurestore_online_serving_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/featurestore_online_serving_config_scaling' +require "google/vertexai/property/featurestore_online_serving_config_scaling" module GoogleInSpec module VertexAI module Property @@ -25,8 +25,8 @@ class FeaturestoreOnlineServingConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @fixed_node_count = args['fixedNodeCount'] - @scaling = GoogleInSpec::VertexAI::Property::FeaturestoreOnlineServingConfigScaling.new(args['scaling'], to_s) + @fixed_node_count = args["fixedNodeCount"] + @scaling = GoogleInSpec::VertexAI::Property::FeaturestoreOnlineServingConfigScaling.new(args["scaling"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/featurestore_online_serving_config_scaling.rb b/libraries/google/vertexai/property/featurestore_online_serving_config_scaling.rb index a077952e5..75dde05e2 100644 --- a/libraries/google/vertexai/property/featurestore_online_serving_config_scaling.rb +++ b/libraries/google/vertexai/property/featurestore_online_serving_config_scaling.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class FeaturestoreOnlineServingConfigScaling def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_node_count = args['maxNodeCount'] - @min_node_count = args['minNodeCount'] - @cpu_utilization_target = args['cpuUtilizationTarget'] + @max_node_count = args["maxNodeCount"] + @min_node_count = args["minNodeCount"] + @cpu_utilization_target = args["cpuUtilizationTarget"] end def to_s diff --git a/libraries/google/vertexai/property/featurestoreentitytypefeature_labels.rb b/libraries/google/vertexai/property/featurestoreentitytypefeature_labels.rb index 0d84a8fd8..c3373400d 100644 --- a/libraries/google/vertexai/property/featurestoreentitytypefeature_labels.rb +++ b/libraries/google/vertexai/property/featurestoreentitytypefeature_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class FeaturestoreEntityTypeFeatureLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/featurestoresentitytype_labels.rb b/libraries/google/vertexai/property/featurestoresentitytype_labels.rb index b1e517b95..ac6e1e99f 100644 --- a/libraries/google/vertexai/property/featurestoresentitytype_labels.rb +++ b/libraries/google/vertexai/property/featurestoresentitytype_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class FeaturestoresEntityTypeLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config.rb b/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config.rb index f5813595d..4714e716b 100644 --- a/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config.rb +++ b/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/featurestoresentitytype_monitoring_config_categorical_threshold_config' -require 'google/vertexai/property/featurestoresentitytype_monitoring_config_import_features_analysis' -require 'google/vertexai/property/featurestoresentitytype_monitoring_config_numerical_threshold_config' -require 'google/vertexai/property/featurestoresentitytype_monitoring_config_snapshot_analysis' +require "google/vertexai/property/featurestoresentitytype_monitoring_config_categorical_threshold_config" +require "google/vertexai/property/featurestoresentitytype_monitoring_config_import_features_analysis" +require "google/vertexai/property/featurestoresentitytype_monitoring_config_numerical_threshold_config" +require "google/vertexai/property/featurestoresentitytype_monitoring_config_snapshot_analysis" module GoogleInSpec module VertexAI module Property @@ -32,10 +32,10 @@ class FeaturestoresEntityTypeMonitoringConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @import_features_analysis = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfigImportFeaturesAnalysis.new(args['importFeaturesAnalysis'], to_s) - @numerical_threshold_config = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfigNumericalThresholdConfig.new(args['numericalThresholdConfig'], to_s) - @categorical_threshold_config = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfigCategoricalThresholdConfig.new(args['categoricalThresholdConfig'], to_s) - @snapshot_analysis = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfigSnapshotAnalysis.new(args['snapshotAnalysis'], to_s) + @import_features_analysis = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfigImportFeaturesAnalysis.new(args["importFeaturesAnalysis"], to_s) + @numerical_threshold_config = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfigNumericalThresholdConfig.new(args["numericalThresholdConfig"], to_s) + @categorical_threshold_config = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfigCategoricalThresholdConfig.new(args["categoricalThresholdConfig"], to_s) + @snapshot_analysis = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfigSnapshotAnalysis.new(args["snapshotAnalysis"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_categorical_threshold_config.rb b/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_categorical_threshold_config.rb index 79c83c1d0..1f628e2d3 100644 --- a/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_categorical_threshold_config.rb +++ b/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_categorical_threshold_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class FeaturestoresEntityTypeMonitoringConfigCategoricalThresholdConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @value = args['value'] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_import_features_analysis.rb b/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_import_features_analysis.rb index dd4e5b68d..5c4299ec4 100644 --- a/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_import_features_analysis.rb +++ b/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_import_features_analysis.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class FeaturestoresEntityTypeMonitoringConfigImportFeaturesAnalysis def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @anomaly_detection_baseline = args['anomalyDetectionBaseline'] - @state = args['state'] + @anomaly_detection_baseline = args["anomalyDetectionBaseline"] + @state = args["state"] end def to_s diff --git a/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_numerical_threshold_config.rb b/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_numerical_threshold_config.rb index cfd22a2d9..339a2c1a5 100644 --- a/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_numerical_threshold_config.rb +++ b/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_numerical_threshold_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class FeaturestoresEntityTypeMonitoringConfigNumericalThresholdConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @value = args['value'] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_snapshot_analysis.rb b/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_snapshot_analysis.rb index 9cb5094b8..be89c2243 100644 --- a/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_snapshot_analysis.rb +++ b/libraries/google/vertexai/property/featurestoresentitytype_monitoring_config_snapshot_analysis.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class FeaturestoresEntityTypeMonitoringConfigSnapshotAnalysis def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @monitoring_interval_days = args['monitoringIntervalDays'] - @staleness_days = args['stalenessDays'] - @disabled = args['disabled'] + @monitoring_interval_days = args["monitoringIntervalDays"] + @staleness_days = args["stalenessDays"] + @disabled = args["disabled"] end def to_s diff --git a/libraries/google/vertexai/property/hyperparametertuningjob_labels.rb b/libraries/google/vertexai/property/hyperparametertuningjob_labels.rb index 920a377af..27586b682 100644 --- a/libraries/google/vertexai/property/hyperparametertuningjob_labels.rb +++ b/libraries/google/vertexai/property/hyperparametertuningjob_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class HyperparameterTuningJobLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/index_labels.rb b/libraries/google/vertexai/property/index_labels.rb index 07e4cf241..6262ba958 100644 --- a/libraries/google/vertexai/property/index_labels.rb +++ b/libraries/google/vertexai/property/index_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class IndexLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/indexendpoint_deployed_indexes.rb b/libraries/google/vertexai/property/indexendpoint_deployed_indexes.rb index bab8e398c..57a68a4a3 100644 --- a/libraries/google/vertexai/property/indexendpoint_deployed_indexes.rb +++ b/libraries/google/vertexai/property/indexendpoint_deployed_indexes.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/indexendpoint_deployed_indexes_automatic_resources' -require 'google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources' -require 'google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_autoscaling_metric_specs' -require 'google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_machine_spec' -require 'google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config' -require 'google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config_auth_provider' -require 'google/vertexai/property/indexendpoint_deployed_indexes_private_endpoints' +require "google/vertexai/property/indexendpoint_deployed_indexes_automatic_resources" +require "google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources" +require "google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_autoscaling_metric_specs" +require "google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_machine_spec" +require "google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config" +require "google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config_auth_provider" +require "google/vertexai/property/indexendpoint_deployed_indexes_private_endpoints" module GoogleInSpec module VertexAI module Property @@ -51,18 +51,18 @@ class IndexEndpointDeployedIndexes def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @private_endpoints = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesPrivateEndpoints.new(args['privateEndpoints'], to_s) - @deployment_group = args['deploymentGroup'] - @dedicated_resources = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesDedicatedResources.new(args['dedicatedResources'], to_s) - @deployed_index_auth_config = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesDeployedIndexAuthConfig.new(args['deployedIndexAuthConfig'], to_s) - @id = args['id'] - @index_sync_time = args['indexSyncTime'] - @automatic_resources = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesAutomaticResources.new(args['automaticResources'], to_s) - @enable_access_logging = args['enableAccessLogging'] - @create_time = args['createTime'] - @reserved_ip_ranges = args['reservedIpRanges'] - @index = args['index'] - @display_name = args['displayName'] + @private_endpoints = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesPrivateEndpoints.new(args["privateEndpoints"], to_s) + @deployment_group = args["deploymentGroup"] + @dedicated_resources = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesDedicatedResources.new(args["dedicatedResources"], to_s) + @deployed_index_auth_config = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesDeployedIndexAuthConfig.new(args["deployedIndexAuthConfig"], to_s) + @id = args["id"] + @index_sync_time = args["indexSyncTime"] + @automatic_resources = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesAutomaticResources.new(args["automaticResources"], to_s) + @enable_access_logging = args["enableAccessLogging"] + @create_time = args["createTime"] + @reserved_ip_ranges = args["reservedIpRanges"] + @index = args["index"] + @display_name = args["displayName"] end def to_s diff --git a/libraries/google/vertexai/property/indexendpoint_deployed_indexes_automatic_resources.rb b/libraries/google/vertexai/property/indexendpoint_deployed_indexes_automatic_resources.rb index 0668bece3..8567164cd 100644 --- a/libraries/google/vertexai/property/indexendpoint_deployed_indexes_automatic_resources.rb +++ b/libraries/google/vertexai/property/indexendpoint_deployed_indexes_automatic_resources.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class IndexEndpointDeployedIndexesAutomaticResources def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_replica_count = args['maxReplicaCount'] - @min_replica_count = args['minReplicaCount'] + @max_replica_count = args["maxReplicaCount"] + @min_replica_count = args["minReplicaCount"] end def to_s diff --git a/libraries/google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources.rb b/libraries/google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources.rb index 5c980d7e3..f1fd77f07 100644 --- a/libraries/google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources.rb +++ b/libraries/google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_autoscaling_metric_specs' -require 'google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_machine_spec' +require "google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_autoscaling_metric_specs" +require "google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_machine_spec" module GoogleInSpec module VertexAI module Property @@ -30,10 +30,10 @@ class IndexEndpointDeployedIndexesDedicatedResources def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @machine_spec = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesDedicatedResourcesMachineSpec.new(args['machineSpec'], to_s) - @max_replica_count = args['maxReplicaCount'] - @autoscaling_metric_specs = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesDedicatedResourcesAutoscalingMetricSpecsArray.parse(args['autoscalingMetricSpecs'], to_s) - @min_replica_count = args['minReplicaCount'] + @machine_spec = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesDedicatedResourcesMachineSpec.new(args["machineSpec"], to_s) + @max_replica_count = args["maxReplicaCount"] + @autoscaling_metric_specs = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesDedicatedResourcesAutoscalingMetricSpecsArray.parse(args["autoscalingMetricSpecs"], to_s) + @min_replica_count = args["minReplicaCount"] end def to_s diff --git a/libraries/google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_autoscaling_metric_specs.rb b/libraries/google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_autoscaling_metric_specs.rb index 5f72c0003..9bdbc77f3 100644 --- a/libraries/google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_autoscaling_metric_specs.rb +++ b/libraries/google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_autoscaling_metric_specs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class IndexEndpointDeployedIndexesDedicatedResourcesAutoscalingMetricSpecs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @target = args['target'] - @metric_name = args['metricName'] + @target = args["target"] + @metric_name = args["metricName"] end def to_s diff --git a/libraries/google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_machine_spec.rb b/libraries/google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_machine_spec.rb index e20b4d78f..5a46d335e 100644 --- a/libraries/google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_machine_spec.rb +++ b/libraries/google/vertexai/property/indexendpoint_deployed_indexes_dedicated_resources_machine_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class IndexEndpointDeployedIndexesDedicatedResourcesMachineSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @accelerator_type = args['acceleratorType'] - @machine_type = args['machineType'] - @accelerator_count = args['acceleratorCount'] + @accelerator_type = args["acceleratorType"] + @machine_type = args["machineType"] + @accelerator_count = args["acceleratorCount"] end def to_s diff --git a/libraries/google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config.rb b/libraries/google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config.rb index 46a428e24..15e5b341b 100644 --- a/libraries/google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config.rb +++ b/libraries/google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config_auth_provider' +require "google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config_auth_provider" module GoogleInSpec module VertexAI module Property @@ -23,7 +23,7 @@ class IndexEndpointDeployedIndexesDeployedIndexAuthConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @auth_provider = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesDeployedIndexAuthConfigAuthProvider.new(args['authProvider'], to_s) + @auth_provider = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesDeployedIndexAuthConfigAuthProvider.new(args["authProvider"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config_auth_provider.rb b/libraries/google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config_auth_provider.rb index 7daa4d356..93a38880f 100644 --- a/libraries/google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config_auth_provider.rb +++ b/libraries/google/vertexai/property/indexendpoint_deployed_indexes_deployed_index_auth_config_auth_provider.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class IndexEndpointDeployedIndexesDeployedIndexAuthConfigAuthProvider def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @audiences = args['audiences'] - @allowed_issuers = args['allowedIssuers'] + @audiences = args["audiences"] + @allowed_issuers = args["allowedIssuers"] end def to_s diff --git a/libraries/google/vertexai/property/indexendpoint_deployed_indexes_private_endpoints.rb b/libraries/google/vertexai/property/indexendpoint_deployed_indexes_private_endpoints.rb index 3f1491701..a2565be4e 100644 --- a/libraries/google/vertexai/property/indexendpoint_deployed_indexes_private_endpoints.rb +++ b/libraries/google/vertexai/property/indexendpoint_deployed_indexes_private_endpoints.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class IndexEndpointDeployedIndexesPrivateEndpoints def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @service_attachment = args['serviceAttachment'] - @match_grpc_address = args['matchGrpcAddress'] + @service_attachment = args["serviceAttachment"] + @match_grpc_address = args["matchGrpcAddress"] end def to_s diff --git a/libraries/google/vertexai/property/indexendpoint_labels.rb b/libraries/google/vertexai/property/indexendpoint_labels.rb index de76875d3..41ad5bd30 100644 --- a/libraries/google/vertexai/property/indexendpoint_labels.rb +++ b/libraries/google/vertexai/property/indexendpoint_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class IndexEndpointLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/indexendpoint_private_service_connect_config.rb b/libraries/google/vertexai/property/indexendpoint_private_service_connect_config.rb index 175356dc8..9baddaece 100644 --- a/libraries/google/vertexai/property/indexendpoint_private_service_connect_config.rb +++ b/libraries/google/vertexai/property/indexendpoint_private_service_connect_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class IndexEndpointPrivateServiceConnectConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @project_allowlist = args['projectAllowlist'] - @enable_private_service_connect = args['enablePrivateServiceConnect'] + @project_allowlist = args["projectAllowlist"] + @enable_private_service_connect = args["enablePrivateServiceConnect"] end def to_s diff --git a/libraries/google/vertexai/property/metadatastore_encryption_spec.rb b/libraries/google/vertexai/property/metadatastore_encryption_spec.rb index a0e5f43a2..e4b91a749 100644 --- a/libraries/google/vertexai/property/metadatastore_encryption_spec.rb +++ b/libraries/google/vertexai/property/metadatastore_encryption_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class MetadataStoreEncryptionSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/vertexai/property/metadatastore_state.rb b/libraries/google/vertexai/property/metadatastore_state.rb index 15c8986bf..637749fbf 100644 --- a/libraries/google/vertexai/property/metadatastore_state.rb +++ b/libraries/google/vertexai/property/metadatastore_state.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class MetadataStoreState def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @disk_utilization_bytes = args['diskUtilizationBytes'] + @disk_utilization_bytes = args["diskUtilizationBytes"] end def to_s diff --git a/libraries/google/vertexai/property/metadatastoresartifact_labels.rb b/libraries/google/vertexai/property/metadatastoresartifact_labels.rb index 0ba2cac13..b2356c2f4 100644 --- a/libraries/google/vertexai/property/metadatastoresartifact_labels.rb +++ b/libraries/google/vertexai/property/metadatastoresartifact_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class MetadataStoresArtifactLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/metadatastoresartifact_metadata.rb b/libraries/google/vertexai/property/metadatastoresartifact_metadata.rb index 879a4b2d5..77e348b24 100644 --- a/libraries/google/vertexai/property/metadatastoresartifact_metadata.rb +++ b/libraries/google/vertexai/property/metadatastoresartifact_metadata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class MetadataStoresArtifactMetadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/metadatastorescontext_labels.rb b/libraries/google/vertexai/property/metadatastorescontext_labels.rb index 0911a1ef6..c1181c22b 100644 --- a/libraries/google/vertexai/property/metadatastorescontext_labels.rb +++ b/libraries/google/vertexai/property/metadatastorescontext_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class MetadataStoresContextLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/metadatastorescontext_metadata.rb b/libraries/google/vertexai/property/metadatastorescontext_metadata.rb index 825990301..89519d545 100644 --- a/libraries/google/vertexai/property/metadatastorescontext_metadata.rb +++ b/libraries/google/vertexai/property/metadatastorescontext_metadata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class MetadataStoresContextMetadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/metadatastoresexecution_labels.rb b/libraries/google/vertexai/property/metadatastoresexecution_labels.rb index 5b7a08916..39103d038 100644 --- a/libraries/google/vertexai/property/metadatastoresexecution_labels.rb +++ b/libraries/google/vertexai/property/metadatastoresexecution_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class MetadataStoresExecutionLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/metadatastoresexecution_metadata.rb b/libraries/google/vertexai/property/metadatastoresexecution_metadata.rb index 7fd84ca99..00c6ecf69 100644 --- a/libraries/google/vertexai/property/metadatastoresexecution_metadata.rb +++ b/libraries/google/vertexai/property/metadatastoresexecution_metadata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class MetadataStoresExecutionMetadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/model_container_spec.rb b/libraries/google/vertexai/property/model_container_spec.rb index fd8c54cd2..00d5a90ce 100644 --- a/libraries/google/vertexai/property/model_container_spec.rb +++ b/libraries/google/vertexai/property/model_container_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/model_container_spec_env' -require 'google/vertexai/property/model_container_spec_ports' +require "google/vertexai/property/model_container_spec_env" +require "google/vertexai/property/model_container_spec_ports" module GoogleInSpec module VertexAI module Property @@ -36,13 +36,13 @@ class ModelContainerSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @predict_route = args['predictRoute'] - @image_uri = args['imageUri'] - @env = GoogleInSpec::VertexAI::Property::ModelContainerSpecEnvArray.parse(args['env'], to_s) - @args = args['args'] - @command = args['command'] - @ports = GoogleInSpec::VertexAI::Property::ModelContainerSpecPortsArray.parse(args['ports'], to_s) - @health_route = args['healthRoute'] + @predict_route = args["predictRoute"] + @image_uri = args["imageUri"] + @env = GoogleInSpec::VertexAI::Property::ModelContainerSpecEnvArray.parse(args["env"], to_s) + @args = args["args"] + @command = args["command"] + @ports = GoogleInSpec::VertexAI::Property::ModelContainerSpecPortsArray.parse(args["ports"], to_s) + @health_route = args["healthRoute"] end def to_s diff --git a/libraries/google/vertexai/property/model_container_spec_env.rb b/libraries/google/vertexai/property/model_container_spec_env.rb index 1ffb89433..5094fe3f0 100644 --- a/libraries/google/vertexai/property/model_container_spec_env.rb +++ b/libraries/google/vertexai/property/model_container_spec_env.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ModelContainerSpecEnv def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @value = args['value'] + @name = args["name"] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/model_container_spec_ports.rb b/libraries/google/vertexai/property/model_container_spec_ports.rb index 5d8f04218..6eb2f7089 100644 --- a/libraries/google/vertexai/property/model_container_spec_ports.rb +++ b/libraries/google/vertexai/property/model_container_spec_ports.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelContainerSpecPorts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @container_port = args['containerPort'] + @container_port = args["containerPort"] end def to_s diff --git a/libraries/google/vertexai/property/model_deployed_models.rb b/libraries/google/vertexai/property/model_deployed_models.rb index 3bccbe30d..c7b384fe3 100644 --- a/libraries/google/vertexai/property/model_deployed_models.rb +++ b/libraries/google/vertexai/property/model_deployed_models.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ModelDeployedModels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @deployed_model_id = args['deployedModelId'] - @endpoint = args['endpoint'] + @deployed_model_id = args["deployedModelId"] + @endpoint = args["endpoint"] end def to_s diff --git a/libraries/google/vertexai/property/model_encryption_spec.rb b/libraries/google/vertexai/property/model_encryption_spec.rb index 7a2da1849..57e733fa2 100644 --- a/libraries/google/vertexai/property/model_encryption_spec.rb +++ b/libraries/google/vertexai/property/model_encryption_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelEncryptionSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec.rb b/libraries/google/vertexai/property/model_explanation_spec.rb index 306c363f3..921225ed3 100644 --- a/libraries/google/vertexai/property/model_explanation_spec.rb +++ b/libraries/google/vertexai/property/model_explanation_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,25 +13,25 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/model_explanation_spec_metadata' -require 'google/vertexai/property/model_explanation_spec_metadata_inputs' -require 'google/vertexai/property/model_explanation_spec_metadata_outputs' -require 'google/vertexai/property/model_explanation_spec_parameters' -require 'google/vertexai/property/model_explanation_spec_parameters_examples' -require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/model_explanation_spec_parameters_examples_presets' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/model_explanation_spec_parameters_sampled_shapley_attribution' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/model_explanation_spec_metadata" +require "google/vertexai/property/model_explanation_spec_metadata_inputs" +require "google/vertexai/property/model_explanation_spec_metadata_outputs" +require "google/vertexai/property/model_explanation_spec_parameters" +require "google/vertexai/property/model_explanation_spec_parameters_examples" +require "google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/model_explanation_spec_parameters_examples_presets" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/model_explanation_spec_parameters_sampled_shapley_attribution" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -43,8 +43,8 @@ class ModelExplanationSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @parameters = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParameters.new(args['parameters'], to_s) - @metadata = GoogleInSpec::VertexAI::Property::ModelExplanationSpecMetadata.new(args['metadata'], to_s) + @parameters = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParameters.new(args["parameters"], to_s) + @metadata = GoogleInSpec::VertexAI::Property::ModelExplanationSpecMetadata.new(args["metadata"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_metadata.rb b/libraries/google/vertexai/property/model_explanation_spec_metadata.rb index 1fc66e947..0274e7812 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_metadata.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_metadata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/model_explanation_spec_metadata_inputs' -require 'google/vertexai/property/model_explanation_spec_metadata_outputs' +require "google/vertexai/property/model_explanation_spec_metadata_inputs" +require "google/vertexai/property/model_explanation_spec_metadata_outputs" module GoogleInSpec module VertexAI module Property @@ -30,10 +30,10 @@ class ModelExplanationSpecMetadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @feature_attributions_schema_uri = args['featureAttributionsSchemaUri'] - @latent_space_source = args['latentSpaceSource'] - @outputs = GoogleInSpec::VertexAI::Property::ModelExplanationSpecMetadataOutputs.new(args['outputs'], to_s) - @inputs = GoogleInSpec::VertexAI::Property::ModelExplanationSpecMetadataInputs.new(args['inputs'], to_s) + @feature_attributions_schema_uri = args["featureAttributionsSchemaUri"] + @latent_space_source = args["latentSpaceSource"] + @outputs = GoogleInSpec::VertexAI::Property::ModelExplanationSpecMetadataOutputs.new(args["outputs"], to_s) + @inputs = GoogleInSpec::VertexAI::Property::ModelExplanationSpecMetadataInputs.new(args["inputs"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_metadata_inputs.rb b/libraries/google/vertexai/property/model_explanation_spec_metadata_inputs.rb index 6634607ac..5a7e675e1 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_metadata_inputs.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_metadata_inputs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelExplanationSpecMetadataInputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_metadata_outputs.rb b/libraries/google/vertexai/property/model_explanation_spec_metadata_outputs.rb index 3737b731d..c661bc644 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_metadata_outputs.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_metadata_outputs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelExplanationSpecMetadataOutputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_parameters.rb b/libraries/google/vertexai/property/model_explanation_spec_parameters.rb index 409ebef13..c99598c0a 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_parameters.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_parameters.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,21 +13,21 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/model_explanation_spec_parameters_examples' -require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/model_explanation_spec_parameters_examples_presets' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/model_explanation_spec_parameters_sampled_shapley_attribution' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/model_explanation_spec_parameters_examples" +require "google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/model_explanation_spec_parameters_examples_presets" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/model_explanation_spec_parameters_sampled_shapley_attribution" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -47,12 +47,12 @@ class ModelExplanationSpecParameters def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_indices = args['outputIndices'] - @examples = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersExamples.new(args['examples'], to_s) - @xrai_attribution = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersXraiAttribution.new(args['xraiAttribution'], to_s) - @top_k = args['topK'] - @integrated_gradients_attribution = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersIntegratedGradientsAttribution.new(args['integratedGradientsAttribution'], to_s) - @sampled_shapley_attribution = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersSampledShapleyAttribution.new(args['sampledShapleyAttribution'], to_s) + @output_indices = args["outputIndices"] + @examples = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersExamples.new(args["examples"], to_s) + @xrai_attribution = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersXraiAttribution.new(args["xraiAttribution"], to_s) + @top_k = args["topK"] + @integrated_gradients_attribution = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersIntegratedGradientsAttribution.new(args["integratedGradientsAttribution"], to_s) + @sampled_shapley_attribution = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersSampledShapleyAttribution.new(args["sampledShapleyAttribution"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_parameters_examples.rb b/libraries/google/vertexai/property/model_explanation_spec_parameters_examples.rb index 9576fce39..96d142127 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_parameters_examples.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_parameters_examples.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/model_explanation_spec_parameters_examples_presets' +require "google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/model_explanation_spec_parameters_examples_presets" module GoogleInSpec module VertexAI module Property @@ -31,10 +31,10 @@ class ModelExplanationSpecParametersExamples def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @presets = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersExamplesPresets.new(args['presets'], to_s) - @neighbor_count = args['neighborCount'] - @example_gcs_source = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersExamplesExampleGcsSource.new(args['exampleGcsSource'], to_s) - @nearest_neighbor_search_config = args['nearestNeighborSearchConfig'] + @presets = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersExamplesPresets.new(args["presets"], to_s) + @neighbor_count = args["neighborCount"] + @example_gcs_source = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersExamplesExampleGcsSource.new(args["exampleGcsSource"], to_s) + @nearest_neighbor_search_config = args["nearestNeighborSearchConfig"] end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source.rb b/libraries/google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source.rb index 5420546ff..f4110541b 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source' +require "google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source" module GoogleInSpec module VertexAI module Property @@ -25,8 +25,8 @@ class ModelExplanationSpecParametersExamplesExampleGcsSource def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @gcs_source = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersExamplesExampleGcsSourceGcsSource.new(args['gcsSource'], to_s) - @data_format = args['dataFormat'] + @gcs_source = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersExamplesExampleGcsSourceGcsSource.new(args["gcsSource"], to_s) + @data_format = args["dataFormat"] end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb b/libraries/google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb index 874de218e..1e01a9e29 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelExplanationSpecParametersExamplesExampleGcsSourceGcsSource def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @uris = args['uris'] + @uris = args["uris"] end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_parameters_examples_presets.rb b/libraries/google/vertexai/property/model_explanation_spec_parameters_examples_presets.rb index 5dbe21fe4..2c7154daa 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_parameters_examples_presets.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_parameters_examples_presets.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ModelExplanationSpecParametersExamplesPresets def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @modality = args['modality'] - @query = args['query'] + @modality = args["modality"] + @query = args["query"] end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution.rb b/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution.rb index 49f7ef267..7a88ee44c 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -30,9 +30,9 @@ class ModelExplanationSpecParametersIntegratedGradientsAttribution def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @step_count = args['stepCount'] - @smooth_grad_config = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) - @blur_baseline_config = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) + @step_count = args["stepCount"] + @smooth_grad_config = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig.new(args["smoothGradConfig"], to_s) + @blur_baseline_config = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig.new(args["blurBaselineConfig"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb b/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb index c8b741cb8..815175356 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineCo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_blur_sigma = args['maxBlurSigma'] + @max_blur_sigma = args["maxBlurSigma"] end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb b/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb index 9937f2ba8..29982c9f3 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -28,9 +28,9 @@ class ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConf def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @feature_noise_sigma = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) - @noise_sigma = args['noiseSigma'] - @noisy_sample_count = args['noisySampleCount'] + @feature_noise_sigma = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma.new(args["featureNoiseSigma"], to_s) + @noise_sigma = args["noiseSigma"] + @noisy_sample_count = args["noisySampleCount"] end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb b/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb index 95cc69672..03f29a69d 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -23,7 +23,7 @@ class ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConf def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @noise_sigma = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) + @noise_sigma = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args["noiseSigma"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb b/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb index bab3b620d..9bf93c691 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ModelExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConf def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @sigma = args['sigma'] + @name = args["name"] + @sigma = args["sigma"] end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_parameters_sampled_shapley_attribution.rb b/libraries/google/vertexai/property/model_explanation_spec_parameters_sampled_shapley_attribution.rb index 2c9c8eb4a..878baa97d 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_parameters_sampled_shapley_attribution.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_parameters_sampled_shapley_attribution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelExplanationSpecParametersSampledShapleyAttribution def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @path_count = args['pathCount'] + @path_count = args["pathCount"] end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution.rb b/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution.rb index e166c8b38..281b2d0ac 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -30,9 +30,9 @@ class ModelExplanationSpecParametersXraiAttribution def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @smooth_grad_config = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersXraiAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) - @step_count = args['stepCount'] - @blur_baseline_config = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersXraiAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) + @smooth_grad_config = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersXraiAttributionSmoothGradConfig.new(args["smoothGradConfig"], to_s) + @step_count = args["stepCount"] + @blur_baseline_config = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersXraiAttributionBlurBaselineConfig.new(args["blurBaselineConfig"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb b/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb index ed390f2b5..5aa72dd95 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelExplanationSpecParametersXraiAttributionBlurBaselineConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_blur_sigma = args['maxBlurSigma'] + @max_blur_sigma = args["maxBlurSigma"] end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb b/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb index 29f809e0d..89104e1dd 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -28,9 +28,9 @@ class ModelExplanationSpecParametersXraiAttributionSmoothGradConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @feature_noise_sigma = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) - @noise_sigma = args['noiseSigma'] - @noisy_sample_count = args['noisySampleCount'] + @feature_noise_sigma = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma.new(args["featureNoiseSigma"], to_s) + @noise_sigma = args["noiseSigma"] + @noisy_sample_count = args["noisySampleCount"] end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb b/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb index dd82e5894..97c2c6ed9 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -23,7 +23,7 @@ class ModelExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseS def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @noise_sigma = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) + @noise_sigma = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args["noiseSigma"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb b/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb index 3c5a1ed97..1a5570fbe 100644 --- a/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb +++ b/libraries/google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ModelExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseS def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @sigma = args['sigma'] + @name = args["name"] + @sigma = args["sigma"] end def to_s diff --git a/libraries/google/vertexai/property/model_labels.rb b/libraries/google/vertexai/property/model_labels.rb index 8ea675d79..b5f2f579a 100644 --- a/libraries/google/vertexai/property/model_labels.rb +++ b/libraries/google/vertexai/property/model_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/model_model_source_info.rb b/libraries/google/vertexai/property/model_model_source_info.rb index 51c44f68a..86f9bec9b 100644 --- a/libraries/google/vertexai/property/model_model_source_info.rb +++ b/libraries/google/vertexai/property/model_model_source_info.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ModelModelSourceInfo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @copy = args['copy'] - @source_type = args['sourceType'] + @copy = args["copy"] + @source_type = args["sourceType"] end def to_s diff --git a/libraries/google/vertexai/property/model_original_model_info.rb b/libraries/google/vertexai/property/model_original_model_info.rb index 42ca7d842..8e4427a0c 100644 --- a/libraries/google/vertexai/property/model_original_model_info.rb +++ b/libraries/google/vertexai/property/model_original_model_info.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelOriginalModelInfo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @model = args['model'] + @model = args["model"] end def to_s diff --git a/libraries/google/vertexai/property/model_predict_schemata.rb b/libraries/google/vertexai/property/model_predict_schemata.rb index 39b1711b4..afdc55d88 100644 --- a/libraries/google/vertexai/property/model_predict_schemata.rb +++ b/libraries/google/vertexai/property/model_predict_schemata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ModelPredictSchemata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @instance_schema_uri = args['instanceSchemaUri'] - @parameters_schema_uri = args['parametersSchemaUri'] - @prediction_schema_uri = args['predictionSchemaUri'] + @instance_schema_uri = args["instanceSchemaUri"] + @parameters_schema_uri = args["parametersSchemaUri"] + @prediction_schema_uri = args["predictionSchemaUri"] end def to_s diff --git a/libraries/google/vertexai/property/model_supported_export_formats.rb b/libraries/google/vertexai/property/model_supported_export_formats.rb index 555456d93..807de7efa 100644 --- a/libraries/google/vertexai/property/model_supported_export_formats.rb +++ b/libraries/google/vertexai/property/model_supported_export_formats.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ModelSupportedExportFormats def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @exportable_contents = args['exportableContents'] - @id = args['id'] + @exportable_contents = args["exportableContents"] + @id = args["id"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_bigquery_tables.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_bigquery_tables.rb index 92ca14b89..055cb5f56 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_bigquery_tables.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_bigquery_tables.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ModelDeploymentMonitoringJobBigqueryTables def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @log_source = args['logSource'] - @bigquery_table_path = args['bigqueryTablePath'] - @log_type = args['logType'] + @log_source = args["logSource"] + @bigquery_table_path = args["bigqueryTablePath"] + @log_type = args["logType"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_encryption_spec.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_encryption_spec.rb index f45359002..1c7df4d61 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_encryption_spec.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_encryption_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelDeploymentMonitoringJobEncryptionSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_error.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_error.rb index f2a93bb1a..776eb1c30 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_error.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_error.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ModelDeploymentMonitoringJobError def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @details = args['details'] - @code = args['code'] - @message = args['message'] + @details = args["details"] + @code = args["code"] + @message = args["message"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_labels.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_labels.rb index f4d9d4576..80c296e18 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_labels.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelDeploymentMonitoringJobLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata.rb index 4ce56e358..38cd33bb0 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata_status' +require "google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata_status" module GoogleInSpec module VertexAI module Property @@ -25,8 +25,8 @@ class ModelDeploymentMonitoringJobLatestMonitoringPipelineMetadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @status = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLatestMonitoringPipelineMetadataStatus.new(args['status'], to_s) - @run_time = args['runTime'] + @status = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLatestMonitoringPipelineMetadataStatus.new(args["status"], to_s) + @run_time = args["runTime"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata_status.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata_status.rb index bd2052883..5fcb33aad 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata_status.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata_status.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ModelDeploymentMonitoringJobLatestMonitoringPipelineMetadataStatus def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @details = args['details'] - @code = args['code'] - @message = args['message'] + @details = args["details"] + @code = args["code"] + @message = args["message"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy.rb index a15b8d64b..28dd93130 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy_random_sample_config' +require "google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy_random_sample_config" module GoogleInSpec module VertexAI module Property @@ -23,7 +23,7 @@ class ModelDeploymentMonitoringJobLoggingSamplingStrategy def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @random_sample_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLoggingSamplingStrategyRandomSampleConfig.new(args['randomSampleConfig'], to_s) + @random_sample_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLoggingSamplingStrategyRandomSampleConfig.new(args["randomSampleConfig"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy_random_sample_config.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy_random_sample_config.rb index 06a5d3d7b..9501c8176 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy_random_sample_config.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy_random_sample_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelDeploymentMonitoringJobLoggingSamplingStrategyRandomSampleConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @sample_rate = args['sampleRate'] + @sample_rate = args["sampleRate"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs.rb index f12eb03d3..6132bd98d 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,24 +13,24 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_bigquery' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_gcs' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_attribution_score_drift_thresholds' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_default_drift_threshold' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_drift_thresholds' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_bigquery_source' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_gcs_source' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy_random_sample_config' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_attribution_score_skew_thresholds' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_default_skew_threshold' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_skew_thresholds' +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_bigquery" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_gcs" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_attribution_score_drift_thresholds" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_default_drift_threshold" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_drift_thresholds" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_bigquery_source" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_gcs_source" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy_random_sample_config" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_attribution_score_skew_thresholds" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_default_skew_threshold" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_skew_thresholds" module GoogleInSpec module VertexAI module Property @@ -42,8 +42,8 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @objective_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfig.new(args['objectiveConfig'], to_s) - @deployed_model_id = args['deployedModelId'] + @objective_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfig.new(args["objectiveConfig"], to_s) + @deployed_model_id = args["deployedModelId"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config.rb index e75cbd046..7d07388fb 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,23 +13,23 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_bigquery' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_gcs' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_attribution_score_drift_thresholds' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_default_drift_threshold' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_drift_thresholds' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_bigquery_source' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_gcs_source' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy_random_sample_config' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_attribution_score_skew_thresholds' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_default_skew_threshold' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_skew_thresholds' +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_bigquery" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_gcs" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_attribution_score_drift_thresholds" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_default_drift_threshold" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_drift_thresholds" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_bigquery_source" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_gcs_source" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy_random_sample_config" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_attribution_score_skew_thresholds" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_default_skew_threshold" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_skew_thresholds" module GoogleInSpec module VertexAI module Property @@ -45,10 +45,10 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @explanation_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfig.new(args['explanationConfig'], to_s) - @training_dataset = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDataset.new(args['trainingDataset'], to_s) - @training_prediction_skew_detection_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfig.new(args['trainingPredictionSkewDetectionConfig'], to_s) - @prediction_drift_detection_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfig.new(args['predictionDriftDetectionConfig'], to_s) + @explanation_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfig.new(args["explanationConfig"], to_s) + @training_dataset = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDataset.new(args["trainingDataset"], to_s) + @training_prediction_skew_detection_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfig.new(args["trainingPredictionSkewDetectionConfig"], to_s) + @prediction_drift_detection_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfig.new(args["predictionDriftDetectionConfig"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config.rb index 1437875f8..be889a731 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_bigquery' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_gcs' +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_bigquery" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_gcs" module GoogleInSpec module VertexAI module Property @@ -27,8 +27,8 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @explanation_baseline = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfigExplanationBaseline.new(args['explanationBaseline'], to_s) - @enable_feature_attributes = args['enableFeatureAttributes'] + @explanation_baseline = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfigExplanationBaseline.new(args["explanationBaseline"], to_s) + @enable_feature_attributes = args["enableFeatureAttributes"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline.rb index d1fe42540..6106fc0a0 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_bigquery' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_gcs' +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_bigquery" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_gcs" module GoogleInSpec module VertexAI module Property @@ -28,9 +28,9 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @prediction_format = args['predictionFormat'] - @gcs = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfigExplanationBaselineGcs.new(args['gcs'], to_s) - @bigquery = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfigExplanationBaselineBigquery.new(args['bigquery'], to_s) + @prediction_format = args["predictionFormat"] + @gcs = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfigExplanationBaselineGcs.new(args["gcs"], to_s) + @bigquery = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigExplanationConfigExplanationBaselineBigquery.new(args["bigquery"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_bigquery.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_bigquery.rb index b28056eb0..41caa4ada 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_bigquery.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_bigquery.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_uri = args['outputUri'] + @output_uri = args["outputUri"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_gcs.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_gcs.rb index d2cebf1bd..629505744 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_gcs.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_explanation_config_explanation_baseline_gcs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_uri_prefix = args['outputUriPrefix'] + @output_uri_prefix = args["outputUriPrefix"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config.rb index e73c27d08..f33d12b56 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_attribution_score_drift_thresholds' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_default_drift_threshold' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_drift_thresholds' +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_attribution_score_drift_thresholds" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_default_drift_threshold" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_drift_thresholds" module GoogleInSpec module VertexAI module Property @@ -29,9 +29,9 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @attribution_score_drift_thresholds = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfigAttributionScoreDriftThresholds.new(args['attributionScoreDriftThresholds'], to_s) - @drift_thresholds = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfigDriftThresholds.new(args['driftThresholds'], to_s) - @default_drift_threshold = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfigDefaultDriftThreshold.new(args['defaultDriftThreshold'], to_s) + @attribution_score_drift_thresholds = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfigAttributionScoreDriftThresholds.new(args["attributionScoreDriftThresholds"], to_s) + @drift_thresholds = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfigDriftThresholds.new(args["driftThresholds"], to_s) + @default_drift_threshold = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigPredictionDriftDetectionConfigDefaultDriftThreshold.new(args["defaultDriftThreshold"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_attribution_score_drift_thresholds.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_attribution_score_drift_thresholds.rb index 0f364de39..bdda30095 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_attribution_score_drift_thresholds.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_attribution_score_drift_thresholds.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_default_drift_threshold.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_default_drift_threshold.rb index 40a7a840d..bb4a5421c 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_default_drift_threshold.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_default_drift_threshold.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @value = args['value'] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_drift_thresholds.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_drift_thresholds.rb index c4b00f60d..0df126786 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_drift_thresholds.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_prediction_drift_detection_config_drift_thresholds.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset.rb index ac8d08fd3..831f02b50 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_bigquery_source' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_gcs_source' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy_random_sample_config' +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_bigquery_source" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_gcs_source" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy_random_sample_config" module GoogleInSpec module VertexAI module Property @@ -36,12 +36,12 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @logging_sampling_strategy = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetLoggingSamplingStrategy.new(args['loggingSamplingStrategy'], to_s) - @dataset = args['dataset'] - @gcs_source = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetGcsSource.new(args['gcsSource'], to_s) - @target_field = args['targetField'] - @bigquery_source = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetBigquerySource.new(args['bigquerySource'], to_s) - @data_format = args['dataFormat'] + @logging_sampling_strategy = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetLoggingSamplingStrategy.new(args["loggingSamplingStrategy"], to_s) + @dataset = args["dataset"] + @gcs_source = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetGcsSource.new(args["gcsSource"], to_s) + @target_field = args["targetField"] + @bigquery_source = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetBigquerySource.new(args["bigquerySource"], to_s) + @data_format = args["dataFormat"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_bigquery_source.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_bigquery_source.rb index a37597bb6..971beef4e 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_bigquery_source.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_bigquery_source.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @input_uri = args['inputUri'] + @input_uri = args["inputUri"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_gcs_source.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_gcs_source.rb index a1540c5b1..e339a9b58 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_gcs_source.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_gcs_source.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @uris = args['uris'] + @uris = args["uris"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy.rb index 7b3acb31f..269a2f56b 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy_random_sample_config' +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy_random_sample_config" module GoogleInSpec module VertexAI module Property @@ -23,7 +23,7 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @random_sample_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetLoggingSamplingStrategyRandomSampleConfig.new(args['randomSampleConfig'], to_s) + @random_sample_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingDatasetLoggingSamplingStrategyRandomSampleConfig.new(args["randomSampleConfig"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy_random_sample_config.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy_random_sample_config.rb index 90d1f3d35..1aa0f5fc0 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy_random_sample_config.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_dataset_logging_sampling_strategy_random_sample_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @sample_rate = args['sampleRate'] + @sample_rate = args["sampleRate"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config.rb index 188bd433a..361f2b41a 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_attribution_score_skew_thresholds' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_default_skew_threshold' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_skew_thresholds' +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_attribution_score_skew_thresholds" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_default_skew_threshold" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_skew_thresholds" module GoogleInSpec module VertexAI module Property @@ -29,9 +29,9 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @skew_thresholds = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfigSkewThresholds.new(args['skewThresholds'], to_s) - @default_skew_threshold = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfigDefaultSkewThreshold.new(args['defaultSkewThreshold'], to_s) - @attribution_score_skew_thresholds = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfigAttributionScoreSkewThresholds.new(args['attributionScoreSkewThresholds'], to_s) + @skew_thresholds = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfigSkewThresholds.new(args["skewThresholds"], to_s) + @default_skew_threshold = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfigDefaultSkewThreshold.new(args["defaultSkewThreshold"], to_s) + @attribution_score_skew_thresholds = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjectiveConfigTrainingPredictionSkewDetectionConfigAttributionScoreSkewThresholds.new(args["attributionScoreSkewThresholds"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_attribution_score_skew_thresholds.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_attribution_score_skew_thresholds.rb index f1997a487..b1e1946cd 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_attribution_score_skew_thresholds.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_attribution_score_skew_thresholds.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_default_skew_threshold.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_default_skew_threshold.rb index f9eb3aa39..f1cac823b 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_default_skew_threshold.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_default_skew_threshold.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @value = args['value'] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_skew_thresholds.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_skew_thresholds.rb index c9af0d28d..d4c3da0c8 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_skew_thresholds.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs_objective_config_training_prediction_skew_detection_config_skew_thresholds.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsObjec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_schedule_config.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_schedule_config.rb index a868b7b34..7944757ed 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_schedule_config.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_schedule_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ModelDeploymentMonitoringJobModelDeploymentMonitoringScheduleConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @monitor_window = args['monitorWindow'] - @monitor_interval = args['monitorInterval'] + @monitor_window = args["monitorWindow"] + @monitor_interval = args["monitorInterval"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config.rb index dd0687a9f..9cd3434b4 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config_email_alert_config' +require "google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config_email_alert_config" module GoogleInSpec module VertexAI module Property @@ -25,8 +25,8 @@ class ModelDeploymentMonitoringJobModelMonitoringAlertConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @email_alert_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelMonitoringAlertConfigEmailAlertConfig.new(args['emailAlertConfig'], to_s) - @enable_logging = args['enableLogging'] + @email_alert_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelMonitoringAlertConfigEmailAlertConfig.new(args["emailAlertConfig"], to_s) + @enable_logging = args["enableLogging"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config_email_alert_config.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config_email_alert_config.rb index 5e2358acf..0ab2f6289 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config_email_alert_config.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config_email_alert_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelDeploymentMonitoringJobModelMonitoringAlertConfigEmailAlertConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @user_emails = args['userEmails'] + @user_emails = args["userEmails"] end def to_s diff --git a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_stats_anomalies_base_directory.rb b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_stats_anomalies_base_directory.rb index defedd497..267f09f26 100644 --- a/libraries/google/vertexai/property/modeldeploymentmonitoringjob_stats_anomalies_base_directory.rb +++ b/libraries/google/vertexai/property/modeldeploymentmonitoringjob_stats_anomalies_base_directory.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelDeploymentMonitoringJobStatsAnomaliesBaseDirectory def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_uri_prefix = args['outputUriPrefix'] + @output_uri_prefix = args["outputUriPrefix"] end def to_s diff --git a/libraries/google/vertexai/property/modelevaluationslice_model_explanation.rb b/libraries/google/vertexai/property/modelevaluationslice_model_explanation.rb index a2deab513..db8f28f72 100644 --- a/libraries/google/vertexai/property/modelevaluationslice_model_explanation.rb +++ b/libraries/google/vertexai/property/modelevaluationslice_model_explanation.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modelevaluationslice_model_explanation_mean_attributions' +require "google/vertexai/property/modelevaluationslice_model_explanation_mean_attributions" module GoogleInSpec module VertexAI module Property @@ -23,7 +23,7 @@ class ModelEvaluationSliceModelExplanation def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @mean_attributions = GoogleInSpec::VertexAI::Property::ModelEvaluationSliceModelExplanationMeanAttributionsArray.parse(args['meanAttributions'], to_s) + @mean_attributions = GoogleInSpec::VertexAI::Property::ModelEvaluationSliceModelExplanationMeanAttributionsArray.parse(args["meanAttributions"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/modelevaluationslice_model_explanation_mean_attributions.rb b/libraries/google/vertexai/property/modelevaluationslice_model_explanation_mean_attributions.rb index 0c38aa32d..df66d8872 100644 --- a/libraries/google/vertexai/property/modelevaluationslice_model_explanation_mean_attributions.rb +++ b/libraries/google/vertexai/property/modelevaluationslice_model_explanation_mean_attributions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -34,13 +34,13 @@ class ModelEvaluationSliceModelExplanationMeanAttributions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_display_name = args['outputDisplayName'] - @baseline_output_value = args['baselineOutputValue'] - @output_name = args['outputName'] - @feature_attributions = args['featureAttributions'] - @output_index = args['outputIndex'] - @instance_output_value = args['instanceOutputValue'] - @approximation_error = args['approximationError'] + @output_display_name = args["outputDisplayName"] + @baseline_output_value = args["baselineOutputValue"] + @output_name = args["outputName"] + @feature_attributions = args["featureAttributions"] + @output_index = args["outputIndex"] + @instance_output_value = args["instanceOutputValue"] + @approximation_error = args["approximationError"] end def to_s diff --git a/libraries/google/vertexai/property/modelevaluationslice_slice.rb b/libraries/google/vertexai/property/modelevaluationslice_slice.rb index b3d6e196a..3d4556480 100644 --- a/libraries/google/vertexai/property/modelevaluationslice_slice.rb +++ b/libraries/google/vertexai/property/modelevaluationslice_slice.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modelevaluationslice_slice_slice_spec' -require 'google/vertexai/property/modelevaluationslice_slice_slice_spec_configs' +require "google/vertexai/property/modelevaluationslice_slice_slice_spec" +require "google/vertexai/property/modelevaluationslice_slice_slice_spec_configs" module GoogleInSpec module VertexAI module Property @@ -28,9 +28,9 @@ class ModelEvaluationSliceSlice def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @value = args['value'] - @dimension = args['dimension'] - @slice_spec = GoogleInSpec::VertexAI::Property::ModelEvaluationSliceSliceSliceSpec.new(args['sliceSpec'], to_s) + @value = args["value"] + @dimension = args["dimension"] + @slice_spec = GoogleInSpec::VertexAI::Property::ModelEvaluationSliceSliceSliceSpec.new(args["sliceSpec"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/modelevaluationslice_slice_slice_spec.rb b/libraries/google/vertexai/property/modelevaluationslice_slice_slice_spec.rb index f1a032c55..b8c181509 100644 --- a/libraries/google/vertexai/property/modelevaluationslice_slice_slice_spec.rb +++ b/libraries/google/vertexai/property/modelevaluationslice_slice_slice_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modelevaluationslice_slice_slice_spec_configs' +require "google/vertexai/property/modelevaluationslice_slice_slice_spec_configs" module GoogleInSpec module VertexAI module Property @@ -23,7 +23,7 @@ class ModelEvaluationSliceSliceSliceSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @configs = GoogleInSpec::VertexAI::Property::ModelEvaluationSliceSliceSliceSpecConfigs.new(args['configs'], to_s) + @configs = GoogleInSpec::VertexAI::Property::ModelEvaluationSliceSliceSliceSpecConfigs.new(args["configs"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/modelevaluationslice_slice_slice_spec_configs.rb b/libraries/google/vertexai/property/modelevaluationslice_slice_slice_spec_configs.rb index cb71ad499..b751f9424 100644 --- a/libraries/google/vertexai/property/modelevaluationslice_slice_slice_spec_configs.rb +++ b/libraries/google/vertexai/property/modelevaluationslice_slice_slice_spec_configs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelEvaluationSliceSliceSliceSpecConfigs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs.rb index 673a5d9ba..48088d239 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,26 +13,26 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_inputs' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_outputs' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_presets' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_sampled_shapley_attribution' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_inputs" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_outputs" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_presets" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_sampled_shapley_attribution" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -44,8 +44,8 @@ class ModelsEvaluationExplanationSpecs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @explanation_spec = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpec.new(args['explanationSpec'], to_s) - @explanation_type = args['explanationType'] + @explanation_spec = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpec.new(args["explanationSpec"], to_s) + @explanation_type = args["explanationType"] end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec.rb index d986ce130..0470580a8 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,25 +13,25 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_inputs' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_outputs' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_presets' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_sampled_shapley_attribution' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_inputs" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_outputs" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_presets" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_sampled_shapley_attribution" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -43,8 +43,8 @@ class ModelsEvaluationExplanationSpecsExplanationSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @parameters = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParameters.new(args['parameters'], to_s) - @metadata = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecMetadata.new(args['metadata'], to_s) + @parameters = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParameters.new(args["parameters"], to_s) + @metadata = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecMetadata.new(args["metadata"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata.rb index 4354fa551..39c09de7f 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_inputs' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_outputs' +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_inputs" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_outputs" module GoogleInSpec module VertexAI module Property @@ -30,10 +30,10 @@ class ModelsEvaluationExplanationSpecsExplanationSpecMetadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @feature_attributions_schema_uri = args['featureAttributionsSchemaUri'] - @latent_space_source = args['latentSpaceSource'] - @outputs = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecMetadataOutputs.new(args['outputs'], to_s) - @inputs = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecMetadataInputs.new(args['inputs'], to_s) + @feature_attributions_schema_uri = args["featureAttributionsSchemaUri"] + @latent_space_source = args["latentSpaceSource"] + @outputs = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecMetadataOutputs.new(args["outputs"], to_s) + @inputs = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecMetadataInputs.new(args["inputs"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_inputs.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_inputs.rb index 13450a539..41f522068 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_inputs.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_inputs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelsEvaluationExplanationSpecsExplanationSpecMetadataInputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_outputs.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_outputs.rb index 996887ca8..4bffc22a4 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_outputs.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_metadata_outputs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelsEvaluationExplanationSpecsExplanationSpecMetadataOutputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters.rb index e955f0c71..c89794c47 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,21 +13,21 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_presets' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_sampled_shapley_attribution' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_presets" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_sampled_shapley_attribution" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -47,12 +47,12 @@ class ModelsEvaluationExplanationSpecsExplanationSpecParameters def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_indices = args['outputIndices'] - @examples = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersExamples.new(args['examples'], to_s) - @xrai_attribution = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttribution.new(args['xraiAttribution'], to_s) - @top_k = args['topK'] - @integrated_gradients_attribution = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttribution.new(args['integratedGradientsAttribution'], to_s) - @sampled_shapley_attribution = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersSampledShapleyAttribution.new(args['sampledShapleyAttribution'], to_s) + @output_indices = args["outputIndices"] + @examples = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersExamples.new(args["examples"], to_s) + @xrai_attribution = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttribution.new(args["xraiAttribution"], to_s) + @top_k = args["topK"] + @integrated_gradients_attribution = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttribution.new(args["integratedGradientsAttribution"], to_s) + @sampled_shapley_attribution = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersSampledShapleyAttribution.new(args["sampledShapleyAttribution"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples.rb index 3a36270e2..835353b63 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_presets' +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_presets" module GoogleInSpec module VertexAI module Property @@ -31,10 +31,10 @@ class ModelsEvaluationExplanationSpecsExplanationSpecParametersExamples def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @presets = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersExamplesPresets.new(args['presets'], to_s) - @neighbor_count = args['neighborCount'] - @example_gcs_source = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersExamplesExampleGcsSource.new(args['exampleGcsSource'], to_s) - @nearest_neighbor_search_config = args['nearestNeighborSearchConfig'] + @presets = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersExamplesPresets.new(args["presets"], to_s) + @neighbor_count = args["neighborCount"] + @example_gcs_source = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersExamplesExampleGcsSource.new(args["exampleGcsSource"], to_s) + @nearest_neighbor_search_config = args["nearestNeighborSearchConfig"] end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source.rb index 81c7823a5..dee48b418 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source_gcs_source' +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source_gcs_source" module GoogleInSpec module VertexAI module Property @@ -25,8 +25,8 @@ class ModelsEvaluationExplanationSpecsExplanationSpecParametersExamplesExampleGc def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @gcs_source = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersExamplesExampleGcsSourceGcsSource.new(args['gcsSource'], to_s) - @data_format = args['dataFormat'] + @gcs_source = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersExamplesExampleGcsSourceGcsSource.new(args["gcsSource"], to_s) + @data_format = args["dataFormat"] end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb index 4446fc103..c5b28c66d 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelsEvaluationExplanationSpecsExplanationSpecParametersExamplesExampleGc def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @uris = args['uris'] + @uris = args["uris"] end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_presets.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_presets.rb index 61bc126ba..fb9b9fa85 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_presets.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_examples_presets.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ModelsEvaluationExplanationSpecsExplanationSpecParametersExamplesPresets def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @modality = args['modality'] - @query = args['query'] + @modality = args["modality"] + @query = args["query"] end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution.rb index c8412a9ca..d765e9a90 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -30,9 +30,9 @@ class ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradien def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @step_count = args['stepCount'] - @smooth_grad_config = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) - @blur_baseline_config = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) + @step_count = args["stepCount"] + @smooth_grad_config = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig.new(args["smoothGradConfig"], to_s) + @blur_baseline_config = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig.new(args["blurBaselineConfig"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb index ef9a78dd3..df0fcab35 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradien def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_blur_sigma = args['maxBlurSigma'] + @max_blur_sigma = args["maxBlurSigma"] end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb index d92bd24f3..4ef56a3d9 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -28,9 +28,9 @@ class ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradien def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @feature_noise_sigma = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) - @noise_sigma = args['noiseSigma'] - @noisy_sample_count = args['noisySampleCount'] + @feature_noise_sigma = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma.new(args["featureNoiseSigma"], to_s) + @noise_sigma = args["noiseSigma"] + @noisy_sample_count = args["noisySampleCount"] end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb index caa883312..d6d19e8b0 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -23,7 +23,7 @@ class ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradien def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @noise_sigma = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) + @noise_sigma = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args["noiseSigma"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb index c1b920059..c69a4300e 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ModelsEvaluationExplanationSpecsExplanationSpecParametersIntegratedGradien def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @sigma = args['sigma'] + @name = args["name"] + @sigma = args["sigma"] end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_sampled_shapley_attribution.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_sampled_shapley_attribution.rb index ee8f72897..b38d90bcd 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_sampled_shapley_attribution.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_sampled_shapley_attribution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelsEvaluationExplanationSpecsExplanationSpecParametersSampledShapleyAtt def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @path_count = args['pathCount'] + @path_count = args["pathCount"] end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution.rb index 1331e521c..34c76f49c 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -30,9 +30,9 @@ class ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttribution def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @smooth_grad_config = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) - @step_count = args['stepCount'] - @blur_baseline_config = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) + @smooth_grad_config = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSmoothGradConfig.new(args["smoothGradConfig"], to_s) + @step_count = args["stepCount"] + @blur_baseline_config = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionBlurBaselineConfig.new(args["blurBaselineConfig"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb index 16dd29b1d..89d4dc1a2 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionBl def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_blur_sigma = args['maxBlurSigma'] + @max_blur_sigma = args["maxBlurSigma"] end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb index cc18c8f71..c7498d049 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -28,9 +28,9 @@ class ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSm def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @feature_noise_sigma = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) - @noise_sigma = args['noiseSigma'] - @noisy_sample_count = args['noisySampleCount'] + @feature_noise_sigma = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma.new(args["featureNoiseSigma"], to_s) + @noise_sigma = args["noiseSigma"] + @noisy_sample_count = args["noisySampleCount"] end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb index 553e0e053..b6df0db18 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -23,7 +23,7 @@ class ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSm def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @noise_sigma = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) + @noise_sigma = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args["noiseSigma"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb index 92e513494..3d3edad8a 100644 --- a/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb +++ b/libraries/google/vertexai/property/modelsevaluation_explanation_specs_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ModelsEvaluationExplanationSpecsExplanationSpecParametersXraiAttributionSm def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @sigma = args['sigma'] + @name = args["name"] + @sigma = args["sigma"] end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_model_explanation.rb b/libraries/google/vertexai/property/modelsevaluation_model_explanation.rb index 684c08475..d7f054fd8 100644 --- a/libraries/google/vertexai/property/modelsevaluation_model_explanation.rb +++ b/libraries/google/vertexai/property/modelsevaluation_model_explanation.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/modelsevaluation_model_explanation_mean_attributions' +require "google/vertexai/property/modelsevaluation_model_explanation_mean_attributions" module GoogleInSpec module VertexAI module Property @@ -23,7 +23,7 @@ class ModelsEvaluationModelExplanation def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @mean_attributions = GoogleInSpec::VertexAI::Property::ModelsEvaluationModelExplanationMeanAttributionsArray.parse(args['meanAttributions'], to_s) + @mean_attributions = GoogleInSpec::VertexAI::Property::ModelsEvaluationModelExplanationMeanAttributionsArray.parse(args["meanAttributions"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/modelsevaluation_model_explanation_mean_attributions.rb b/libraries/google/vertexai/property/modelsevaluation_model_explanation_mean_attributions.rb index 0b6693938..68ab06ccf 100644 --- a/libraries/google/vertexai/property/modelsevaluation_model_explanation_mean_attributions.rb +++ b/libraries/google/vertexai/property/modelsevaluation_model_explanation_mean_attributions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -34,13 +34,13 @@ class ModelsEvaluationModelExplanationMeanAttributions def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_display_name = args['outputDisplayName'] - @baseline_output_value = args['baselineOutputValue'] - @output_name = args['outputName'] - @feature_attributions = args['featureAttributions'] - @output_index = args['outputIndex'] - @instance_output_value = args['instanceOutputValue'] - @approximation_error = args['approximationError'] + @output_display_name = args["outputDisplayName"] + @baseline_output_value = args["baselineOutputValue"] + @output_name = args["outputName"] + @feature_attributions = args["featureAttributions"] + @output_index = args["outputIndex"] + @instance_output_value = args["instanceOutputValue"] + @approximation_error = args["approximationError"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_encryption_spec.rb b/libraries/google/vertexai/property/nasjob_encryption_spec.rb index 81d759d73..153b8a875 100644 --- a/libraries/google/vertexai/property/nasjob_encryption_spec.rb +++ b/libraries/google/vertexai/property/nasjob_encryption_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class NasJobEncryptionSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_error.rb b/libraries/google/vertexai/property/nasjob_error.rb index 5ad640774..d9006a091 100644 --- a/libraries/google/vertexai/property/nasjob_error.rb +++ b/libraries/google/vertexai/property/nasjob_error.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class NasJobError def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @details = args['details'] - @code = args['code'] - @message = args['message'] + @details = args["details"] + @code = args["code"] + @message = args["message"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_labels.rb b/libraries/google/vertexai/property/nasjob_labels.rb index 82074a45f..518c69623 100644 --- a/libraries/google/vertexai/property/nasjob_labels.rb +++ b/libraries/google/vertexai/property/nasjob_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class NasJobLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_output.rb b/libraries/google/vertexai/property/nasjob_nas_job_output.rb index 19498b886..aa1aa8f13 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_output.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_output.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output' -require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials' -require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials' +require "google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output" +require "google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials" +require "google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials" module GoogleInSpec module VertexAI module Property @@ -25,7 +25,7 @@ class NasJobNasJobOutput def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @multi_trial_job_output = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutput.new(args['multiTrialJobOutput'], to_s) + @multi_trial_job_output = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutput.new(args["multiTrialJobOutput"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output.rb b/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output.rb index 85643e148..b5546271b 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials' -require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials' +require "google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials" +require "google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials" module GoogleInSpec module VertexAI module Property @@ -26,8 +26,8 @@ class NasJobNasJobOutputMultiTrialJobOutput def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @search_trials = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutputSearchTrialsArray.parse(args['searchTrials'], to_s) - @train_trials = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutputTrainTrialsArray.parse(args['trainTrials'], to_s) + @search_trials = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutputSearchTrialsArray.parse(args["searchTrials"], to_s) + @train_trials = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutputTrainTrialsArray.parse(args["trainTrials"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials.rb b/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials.rb index 39bb42d91..c1376b9e0 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement' -require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement_metrics' +require "google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement" +require "google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement_metrics" module GoogleInSpec module VertexAI module Property @@ -32,11 +32,11 @@ class NasJobNasJobOutputMultiTrialJobOutputSearchTrials def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @id = args['id'] - @state = args['state'] - @final_measurement = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutputSearchTrialsFinalMeasurement.new(args['finalMeasurement'], to_s) - @start_time = args['startTime'] - @end_time = args['endTime'] + @id = args["id"] + @state = args["state"] + @final_measurement = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutputSearchTrialsFinalMeasurement.new(args["finalMeasurement"], to_s) + @start_time = args["startTime"] + @end_time = args["endTime"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement.rb b/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement.rb index 2ed523906..af5c58f10 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement_metrics' +require "google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement_metrics" module GoogleInSpec module VertexAI module Property @@ -27,9 +27,9 @@ class NasJobNasJobOutputMultiTrialJobOutputSearchTrialsFinalMeasurement def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @metrics = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutputSearchTrialsFinalMeasurementMetricsArray.parse(args['metrics'], to_s) - @elapsed_duration = args['elapsedDuration'] - @step_count = args['stepCount'] + @metrics = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutputSearchTrialsFinalMeasurementMetricsArray.parse(args["metrics"], to_s) + @elapsed_duration = args["elapsedDuration"] + @step_count = args["stepCount"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement_metrics.rb b/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement_metrics.rb index 4d97d3f9f..f6beca279 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement_metrics.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials_final_measurement_metrics.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class NasJobNasJobOutputMultiTrialJobOutputSearchTrialsFinalMeasurementMetrics def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @metric_id = args['metricId'] - @value = args['value'] + @metric_id = args["metricId"] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials.rb b/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials.rb index 2dd84db59..03d402403 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement' -require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement_metrics' +require "google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement" +require "google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement_metrics" module GoogleInSpec module VertexAI module Property @@ -32,11 +32,11 @@ class NasJobNasJobOutputMultiTrialJobOutputTrainTrials def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @id = args['id'] - @state = args['state'] - @final_measurement = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutputTrainTrialsFinalMeasurement.new(args['finalMeasurement'], to_s) - @start_time = args['startTime'] - @end_time = args['endTime'] + @id = args["id"] + @state = args["state"] + @final_measurement = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutputTrainTrialsFinalMeasurement.new(args["finalMeasurement"], to_s) + @start_time = args["startTime"] + @end_time = args["endTime"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement.rb b/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement.rb index f37e89af2..12884b059 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement_metrics' +require "google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement_metrics" module GoogleInSpec module VertexAI module Property @@ -27,9 +27,9 @@ class NasJobNasJobOutputMultiTrialJobOutputTrainTrialsFinalMeasurement def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @metrics = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutputTrainTrialsFinalMeasurementMetricsArray.parse(args['metrics'], to_s) - @elapsed_duration = args['elapsedDuration'] - @step_count = args['stepCount'] + @metrics = GoogleInSpec::VertexAI::Property::NasJobNasJobOutputMultiTrialJobOutputTrainTrialsFinalMeasurementMetricsArray.parse(args["metrics"], to_s) + @elapsed_duration = args["elapsedDuration"] + @step_count = args["stepCount"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement_metrics.rb b/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement_metrics.rb index f7c2851b9..edaccd55f 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement_metrics.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials_final_measurement_metrics.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class NasJobNasJobOutputMultiTrialJobOutputTrainTrialsFinalMeasurementMetrics def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @metric_id = args['metricId'] - @value = args['value'] + @metric_id = args["metricId"] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec.rb index 8b6a82a41..7da019c9f 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,18 +13,18 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_metric' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_base_output_directory' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_base_output_directory' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs' +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_metric" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_base_output_directory" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_base_output_directory" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs" module GoogleInSpec module VertexAI module Property @@ -38,9 +38,9 @@ class NasJobNasJobSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @search_space_spec = args['searchSpaceSpec'] - @resume_nas_job_id = args['resumeNasJobId'] - @multi_trial_algorithm_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpec.new(args['multiTrialAlgorithmSpec'], to_s) + @search_space_spec = args["searchSpaceSpec"] + @resume_nas_job_id = args["resumeNasJobId"] + @multi_trial_algorithm_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpec.new(args["multiTrialAlgorithmSpec"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec.rb index 957eaefb9..449701ad1 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,17 +13,17 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_metric' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_base_output_directory' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_base_output_directory' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs' +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_metric" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_base_output_directory" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_base_output_directory" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs" module GoogleInSpec module VertexAI module Property @@ -39,10 +39,10 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @search_trial_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpec.new(args['searchTrialSpec'], to_s) - @multi_trial_algorithm = args['multiTrialAlgorithm'] - @train_trial_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpec.new(args['trainTrialSpec'], to_s) - @metric = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecMetric.new(args['metric'], to_s) + @search_trial_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpec.new(args["searchTrialSpec"], to_s) + @multi_trial_algorithm = args["multiTrialAlgorithm"] + @train_trial_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpec.new(args["trainTrialSpec"], to_s) + @metric = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecMetric.new(args["metric"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_metric.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_metric.rb index b642a26e9..9790f6d85 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_metric.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_metric.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecMetric def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @goal = args['goal'] - @metric_id = args['metricId'] + @goal = args["goal"] + @metric_id = args["metricId"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec.rb index a97779d45..1f3c6f9c5 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_base_output_directory' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs' +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_base_output_directory" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs" module GoogleInSpec module VertexAI module Property @@ -32,10 +32,10 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_failed_trial_count = args['maxFailedTrialCount'] - @max_parallel_trial_count = args['maxParallelTrialCount'] - @search_trial_job_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpec.new(args['searchTrialJobSpec'], to_s) - @max_trial_count = args['maxTrialCount'] + @max_failed_trial_count = args["maxFailedTrialCount"] + @max_parallel_trial_count = args["maxParallelTrialCount"] + @search_trial_job_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpec.new(args["searchTrialJobSpec"], to_s) + @max_trial_count = args["maxTrialCount"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec.rb index 57f68c990..176e06b07 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_base_output_directory' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs' +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_base_output_directory" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs" module GoogleInSpec module VertexAI module Property @@ -45,17 +45,17 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @worker_pool_specs = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsArray.parse(args['workerPoolSpecs'], to_s) - @enable_web_access = args['enableWebAccess'] - @tensorboard = args['tensorboard'] - @experiment = args['experiment'] - @experiment_run = args['experimentRun'] - @scheduling = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecScheduling.new(args['scheduling'], to_s) - @enable_dashboard_access = args['enableDashboardAccess'] - @service_account = args['serviceAccount'] - @base_output_directory = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecBaseOutputDirectory.new(args['baseOutputDirectory'], to_s) - @reserved_ip_ranges = args['reservedIpRanges'] - @network = args['network'] + @worker_pool_specs = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsArray.parse(args["workerPoolSpecs"], to_s) + @enable_web_access = args["enableWebAccess"] + @tensorboard = args["tensorboard"] + @experiment = args["experiment"] + @experiment_run = args["experimentRun"] + @scheduling = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecScheduling.new(args["scheduling"], to_s) + @enable_dashboard_access = args["enableDashboardAccess"] + @service_account = args["serviceAccount"] + @base_output_directory = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecBaseOutputDirectory.new(args["baseOutputDirectory"], to_s) + @reserved_ip_ranges = args["reservedIpRanges"] + @network = args["network"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_base_output_directory.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_base_output_directory.rb index 9d412c3f3..5da5ece7a 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_base_output_directory.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_base_output_directory.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecBa def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_uri_prefix = args['outputUriPrefix'] + @output_uri_prefix = args["outputUriPrefix"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling.rb index f5a2c6994..c84c496ae 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecSc def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @disable_retries = args['disableRetries'] - @timeout = args['timeout'] - @restart_job_on_worker_restart = args['restartJobOnWorkerRestart'] + @disable_retries = args["disableRetries"] + @timeout = args["timeout"] + @restart_job_on_worker_restart = args["restartJobOnWorkerRestart"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs.rb index ce422b5aa..4ed188dac 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_container_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_container_spec_env' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_disk_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_machine_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_nfs_mounts' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_python_package_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_python_package_spec_env' +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_container_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_container_spec_env" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_disk_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_machine_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_nfs_mounts" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_python_package_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_python_package_spec_env" module GoogleInSpec module VertexAI module Property @@ -39,12 +39,12 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @container_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsContainerSpec.new(args['containerSpec'], to_s) - @machine_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsMachineSpec.new(args['machineSpec'], to_s) - @replica_count = args['replicaCount'] - @nfs_mounts = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsNfsMountsArray.parse(args['nfsMounts'], to_s) - @python_package_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsPythonPackageSpec.new(args['pythonPackageSpec'], to_s) - @disk_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsDiskSpec.new(args['diskSpec'], to_s) + @container_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsContainerSpec.new(args["containerSpec"], to_s) + @machine_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsMachineSpec.new(args["machineSpec"], to_s) + @replica_count = args["replicaCount"] + @nfs_mounts = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsNfsMountsArray.parse(args["nfsMounts"], to_s) + @python_package_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsPythonPackageSpec.new(args["pythonPackageSpec"], to_s) + @disk_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsDiskSpec.new(args["diskSpec"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_container_spec.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_container_spec.rb index a9972a574..2cc935182 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_container_spec.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_container_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_container_spec_env' +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_container_spec_env" module GoogleInSpec module VertexAI module Property @@ -29,10 +29,10 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @env = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsContainerSpecEnvArray.parse(args['env'], to_s) - @args = args['args'] - @command = args['command'] - @image_uri = args['imageUri'] + @env = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsContainerSpecEnvArray.parse(args["env"], to_s) + @args = args["args"] + @command = args["command"] + @image_uri = args["imageUri"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_container_spec_env.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_container_spec_env.rb index d0d065312..244a73075 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_container_spec_env.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_container_spec_env.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @value = args['value'] + @name = args["name"] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_disk_spec.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_disk_spec.rb index 1664d99b6..808f036f9 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_disk_spec.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_disk_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @boot_disk_type = args['bootDiskType'] - @boot_disk_size_gb = args['bootDiskSizeGb'] + @boot_disk_type = args["bootDiskType"] + @boot_disk_size_gb = args["bootDiskSizeGb"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_machine_spec.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_machine_spec.rb index 18f1fff90..456563d3f 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_machine_spec.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_machine_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @accelerator_type = args['acceleratorType'] - @machine_type = args['machineType'] - @accelerator_count = args['acceleratorCount'] + @accelerator_type = args["acceleratorType"] + @machine_type = args["machineType"] + @accelerator_count = args["acceleratorCount"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_nfs_mounts.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_nfs_mounts.rb index 7efce0b90..ccff7ad70 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_nfs_mounts.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_nfs_mounts.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @path = args['path'] - @mount_point = args['mountPoint'] - @server = args['server'] + @path = args["path"] + @mount_point = args["mountPoint"] + @server = args["server"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_python_package_spec.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_python_package_spec.rb index 2f2ba483d..2ba567cc3 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_python_package_spec.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_python_package_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_python_package_spec_env' +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_python_package_spec_env" module GoogleInSpec module VertexAI module Property @@ -31,11 +31,11 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @package_uris = args['packageUris'] - @env = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsPythonPackageSpecEnvArray.parse(args['env'], to_s) - @executor_image_uri = args['executorImageUri'] - @args = args['args'] - @python_module = args['pythonModule'] + @package_uris = args["packageUris"] + @env = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWorkerPoolSpecsPythonPackageSpecEnvArray.parse(args["env"], to_s) + @executor_image_uri = args["executorImageUri"] + @args = args["args"] + @python_module = args["pythonModule"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_python_package_spec_env.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_python_package_spec_env.rb index 31e1253fa..687acccdf 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_python_package_spec_env.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs_python_package_spec_env.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecSearchTrialSpecSearchTrialJobSpecWo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @value = args['value'] + @name = args["name"] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec.rb index ec76aa23a..b54a61840 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_base_output_directory' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs' +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_base_output_directory" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs" module GoogleInSpec module VertexAI module Property @@ -30,9 +30,9 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @frequency = args['frequency'] - @max_parallel_trial_count = args['maxParallelTrialCount'] - @train_trial_job_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpec.new(args['trainTrialJobSpec'], to_s) + @frequency = args["frequency"] + @max_parallel_trial_count = args["maxParallelTrialCount"] + @train_trial_job_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpec.new(args["trainTrialJobSpec"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec.rb index d5ef49f3b..19c80934e 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_base_output_directory' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs' +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_base_output_directory" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs" module GoogleInSpec module VertexAI module Property @@ -45,17 +45,17 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @worker_pool_specs = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsArray.parse(args['workerPoolSpecs'], to_s) - @enable_web_access = args['enableWebAccess'] - @tensorboard = args['tensorboard'] - @experiment = args['experiment'] - @experiment_run = args['experimentRun'] - @scheduling = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecScheduling.new(args['scheduling'], to_s) - @enable_dashboard_access = args['enableDashboardAccess'] - @service_account = args['serviceAccount'] - @base_output_directory = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecBaseOutputDirectory.new(args['baseOutputDirectory'], to_s) - @reserved_ip_ranges = args['reservedIpRanges'] - @network = args['network'] + @worker_pool_specs = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsArray.parse(args["workerPoolSpecs"], to_s) + @enable_web_access = args["enableWebAccess"] + @tensorboard = args["tensorboard"] + @experiment = args["experiment"] + @experiment_run = args["experimentRun"] + @scheduling = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecScheduling.new(args["scheduling"], to_s) + @enable_dashboard_access = args["enableDashboardAccess"] + @service_account = args["serviceAccount"] + @base_output_directory = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecBaseOutputDirectory.new(args["baseOutputDirectory"], to_s) + @reserved_ip_ranges = args["reservedIpRanges"] + @network = args["network"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_base_output_directory.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_base_output_directory.rb index b4e2e21b8..416b97845 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_base_output_directory.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_base_output_directory.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecBase def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_uri_prefix = args['outputUriPrefix'] + @output_uri_prefix = args["outputUriPrefix"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling.rb index 55e9547ff..a57e0c35c 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecSche def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @disable_retries = args['disableRetries'] - @timeout = args['timeout'] - @restart_job_on_worker_restart = args['restartJobOnWorkerRestart'] + @disable_retries = args["disableRetries"] + @timeout = args["timeout"] + @restart_job_on_worker_restart = args["restartJobOnWorkerRestart"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs.rb index 02e55ffcf..9509d46b0 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_container_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_container_spec_env' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_disk_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_machine_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_nfs_mounts' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_python_package_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_python_package_spec_env' +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_container_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_container_spec_env" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_disk_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_machine_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_nfs_mounts" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_python_package_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_python_package_spec_env" module GoogleInSpec module VertexAI module Property @@ -39,12 +39,12 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWork def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @container_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsContainerSpec.new(args['containerSpec'], to_s) - @machine_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsMachineSpec.new(args['machineSpec'], to_s) - @replica_count = args['replicaCount'] - @nfs_mounts = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsNfsMountsArray.parse(args['nfsMounts'], to_s) - @python_package_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsPythonPackageSpec.new(args['pythonPackageSpec'], to_s) - @disk_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsDiskSpec.new(args['diskSpec'], to_s) + @container_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsContainerSpec.new(args["containerSpec"], to_s) + @machine_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsMachineSpec.new(args["machineSpec"], to_s) + @replica_count = args["replicaCount"] + @nfs_mounts = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsNfsMountsArray.parse(args["nfsMounts"], to_s) + @python_package_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsPythonPackageSpec.new(args["pythonPackageSpec"], to_s) + @disk_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsDiskSpec.new(args["diskSpec"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_container_spec.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_container_spec.rb index 57b7d766e..451c6c93f 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_container_spec.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_container_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_container_spec_env' +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_container_spec_env" module GoogleInSpec module VertexAI module Property @@ -29,10 +29,10 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWork def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @env = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsContainerSpecEnvArray.parse(args['env'], to_s) - @args = args['args'] - @command = args['command'] - @image_uri = args['imageUri'] + @env = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsContainerSpecEnvArray.parse(args["env"], to_s) + @args = args["args"] + @command = args["command"] + @image_uri = args["imageUri"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_container_spec_env.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_container_spec_env.rb index 8f9a3f6d6..679594240 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_container_spec_env.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_container_spec_env.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWork def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @value = args['value'] + @name = args["name"] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_disk_spec.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_disk_spec.rb index 4f37670d1..580d5c6c7 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_disk_spec.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_disk_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWork def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @boot_disk_type = args['bootDiskType'] - @boot_disk_size_gb = args['bootDiskSizeGb'] + @boot_disk_type = args["bootDiskType"] + @boot_disk_size_gb = args["bootDiskSizeGb"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_machine_spec.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_machine_spec.rb index 5ec7f972f..1629fbc5b 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_machine_spec.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_machine_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWork def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @accelerator_type = args['acceleratorType'] - @machine_type = args['machineType'] - @accelerator_count = args['acceleratorCount'] + @accelerator_type = args["acceleratorType"] + @machine_type = args["machineType"] + @accelerator_count = args["acceleratorCount"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_nfs_mounts.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_nfs_mounts.rb index 786247ba5..370ba9ae5 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_nfs_mounts.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_nfs_mounts.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWork def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @path = args['path'] - @mount_point = args['mountPoint'] - @server = args['server'] + @path = args["path"] + @mount_point = args["mountPoint"] + @server = args["server"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_python_package_spec.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_python_package_spec.rb index cbabe58db..90733d394 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_python_package_spec.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_python_package_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_python_package_spec_env' +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_python_package_spec_env" module GoogleInSpec module VertexAI module Property @@ -31,11 +31,11 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWork def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @package_uris = args['packageUris'] - @env = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsPythonPackageSpecEnvArray.parse(args['env'], to_s) - @executor_image_uri = args['executorImageUri'] - @args = args['args'] - @python_module = args['pythonModule'] + @package_uris = args["packageUris"] + @env = GoogleInSpec::VertexAI::Property::NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWorkerPoolSpecsPythonPackageSpecEnvArray.parse(args["env"], to_s) + @executor_image_uri = args["executorImageUri"] + @args = args["args"] + @python_module = args["pythonModule"] end def to_s diff --git a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_python_package_spec_env.rb b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_python_package_spec_env.rb index 7d511a2bb..13aab21e6 100644 --- a/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_python_package_spec_env.rb +++ b/libraries/google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs_python_package_spec_env.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class NasJobNasJobSpecMultiTrialAlgorithmSpecTrainTrialSpecTrainTrialJobSpecWork def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @value = args['value'] + @name = args["name"] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/nasjobsnastrialdetail_search_trial.rb b/libraries/google/vertexai/property/nasjobsnastrialdetail_search_trial.rb index c8cdbc1c9..404779058 100644 --- a/libraries/google/vertexai/property/nasjobsnastrialdetail_search_trial.rb +++ b/libraries/google/vertexai/property/nasjobsnastrialdetail_search_trial.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement' -require 'google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement_metrics' +require "google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement" +require "google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement_metrics" module GoogleInSpec module VertexAI module Property @@ -32,11 +32,11 @@ class NasJobsNasTrialDetailSearchTrial def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @id = args['id'] - @state = args['state'] - @final_measurement = GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailSearchTrialFinalMeasurement.new(args['finalMeasurement'], to_s) - @start_time = args['startTime'] - @end_time = args['endTime'] + @id = args["id"] + @state = args["state"] + @final_measurement = GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailSearchTrialFinalMeasurement.new(args["finalMeasurement"], to_s) + @start_time = args["startTime"] + @end_time = args["endTime"] end def to_s diff --git a/libraries/google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement.rb b/libraries/google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement.rb index cb6fa304a..3745e732a 100644 --- a/libraries/google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement.rb +++ b/libraries/google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement_metrics' +require "google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement_metrics" module GoogleInSpec module VertexAI module Property @@ -27,9 +27,9 @@ class NasJobsNasTrialDetailSearchTrialFinalMeasurement def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @metrics = GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailSearchTrialFinalMeasurementMetricsArray.parse(args['metrics'], to_s) - @elapsed_duration = args['elapsedDuration'] - @step_count = args['stepCount'] + @metrics = GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailSearchTrialFinalMeasurementMetricsArray.parse(args["metrics"], to_s) + @elapsed_duration = args["elapsedDuration"] + @step_count = args["stepCount"] end def to_s diff --git a/libraries/google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement_metrics.rb b/libraries/google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement_metrics.rb index aa31bf045..9e861685b 100644 --- a/libraries/google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement_metrics.rb +++ b/libraries/google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement_metrics.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class NasJobsNasTrialDetailSearchTrialFinalMeasurementMetrics def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @metric_id = args['metricId'] - @value = args['value'] + @metric_id = args["metricId"] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/nasjobsnastrialdetail_train_trial.rb b/libraries/google/vertexai/property/nasjobsnastrialdetail_train_trial.rb index ca1da2d88..993d5123e 100644 --- a/libraries/google/vertexai/property/nasjobsnastrialdetail_train_trial.rb +++ b/libraries/google/vertexai/property/nasjobsnastrialdetail_train_trial.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement' -require 'google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement_metrics' +require "google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement" +require "google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement_metrics" module GoogleInSpec module VertexAI module Property @@ -32,11 +32,11 @@ class NasJobsNasTrialDetailTrainTrial def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @id = args['id'] - @state = args['state'] - @final_measurement = GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailTrainTrialFinalMeasurement.new(args['finalMeasurement'], to_s) - @start_time = args['startTime'] - @end_time = args['endTime'] + @id = args["id"] + @state = args["state"] + @final_measurement = GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailTrainTrialFinalMeasurement.new(args["finalMeasurement"], to_s) + @start_time = args["startTime"] + @end_time = args["endTime"] end def to_s diff --git a/libraries/google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement.rb b/libraries/google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement.rb index 9c723fc32..979e1b405 100644 --- a/libraries/google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement.rb +++ b/libraries/google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement_metrics' +require "google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement_metrics" module GoogleInSpec module VertexAI module Property @@ -27,9 +27,9 @@ class NasJobsNasTrialDetailTrainTrialFinalMeasurement def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @metrics = GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailTrainTrialFinalMeasurementMetricsArray.parse(args['metrics'], to_s) - @elapsed_duration = args['elapsedDuration'] - @step_count = args['stepCount'] + @metrics = GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailTrainTrialFinalMeasurementMetricsArray.parse(args["metrics"], to_s) + @elapsed_duration = args["elapsedDuration"] + @step_count = args["stepCount"] end def to_s diff --git a/libraries/google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement_metrics.rb b/libraries/google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement_metrics.rb index c88102262..4dadba3cb 100644 --- a/libraries/google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement_metrics.rb +++ b/libraries/google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement_metrics.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class NasJobsNasTrialDetailTrainTrialFinalMeasurementMetrics def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @metric_id = args['metricId'] - @value = args['value'] + @metric_id = args["metricId"] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_encryption_spec.rb b/libraries/google/vertexai/property/pipelinejob_encryption_spec.rb index 90144ba40..725b5f065 100644 --- a/libraries/google/vertexai/property/pipelinejob_encryption_spec.rb +++ b/libraries/google/vertexai/property/pipelinejob_encryption_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class PipelineJobEncryptionSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_error.rb b/libraries/google/vertexai/property/pipelinejob_error.rb index 2b7f71762..3b1946035 100644 --- a/libraries/google/vertexai/property/pipelinejob_error.rb +++ b/libraries/google/vertexai/property/pipelinejob_error.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class PipelineJobError def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @details = args['details'] - @code = args['code'] - @message = args['message'] + @details = args["details"] + @code = args["code"] + @message = args["message"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail.rb b/libraries/google/vertexai/property/pipelinejob_job_detail.rb index 07bb9795e..ca5008921 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/pipelinejob_job_detail_pipeline_context' -require 'google/vertexai/property/pipelinejob_job_detail_pipeline_context_labels' -require 'google/vertexai/property/pipelinejob_job_detail_pipeline_context_metadata' -require 'google/vertexai/property/pipelinejob_job_detail_pipeline_run_context' -require 'google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_labels' -require 'google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_metadata' -require 'google/vertexai/property/pipelinejob_job_detail_task_details' +require "google/vertexai/property/pipelinejob_job_detail_pipeline_context" +require "google/vertexai/property/pipelinejob_job_detail_pipeline_context_labels" +require "google/vertexai/property/pipelinejob_job_detail_pipeline_context_metadata" +require "google/vertexai/property/pipelinejob_job_detail_pipeline_run_context" +require "google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_labels" +require "google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_metadata" +require "google/vertexai/property/pipelinejob_job_detail_task_details" module GoogleInSpec module VertexAI module Property @@ -33,9 +33,9 @@ class PipelineJobJobDetail def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @task_details = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsArray.parse(args['taskDetails'], to_s) - @pipeline_run_context = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailPipelineRunContext.new(args['pipelineRunContext'], to_s) - @pipeline_context = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailPipelineContext.new(args['pipelineContext'], to_s) + @task_details = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsArray.parse(args["taskDetails"], to_s) + @pipeline_run_context = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailPipelineRunContext.new(args["pipelineRunContext"], to_s) + @pipeline_context = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailPipelineContext.new(args["pipelineContext"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_context.rb b/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_context.rb index 8bfa0e01f..2cd72acc4 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_context.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_context.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/pipelinejob_job_detail_pipeline_context_labels' -require 'google/vertexai/property/pipelinejob_job_detail_pipeline_context_metadata' +require "google/vertexai/property/pipelinejob_job_detail_pipeline_context_labels" +require "google/vertexai/property/pipelinejob_job_detail_pipeline_context_metadata" module GoogleInSpec module VertexAI module Property @@ -44,17 +44,17 @@ class PipelineJobJobDetailPipelineContext def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @schema_title = args['schemaTitle'] - @etag = args['etag'] - @description = args['description'] - @display_name = args['displayName'] - @schema_version = args['schemaVersion'] - @create_time = args['createTime'] - @labels = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailPipelineContextLabels.new(args['labels'], to_s) - @metadata = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailPipelineContextMetadata.new(args['metadata'], to_s) - @update_time = args['updateTime'] - @parent_contexts = args['parentContexts'] + @name = args["name"] + @schema_title = args["schemaTitle"] + @etag = args["etag"] + @description = args["description"] + @display_name = args["displayName"] + @schema_version = args["schemaVersion"] + @create_time = args["createTime"] + @labels = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailPipelineContextLabels.new(args["labels"], to_s) + @metadata = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailPipelineContextMetadata.new(args["metadata"], to_s) + @update_time = args["updateTime"] + @parent_contexts = args["parentContexts"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_context_labels.rb b/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_context_labels.rb index 98ff87ec2..19d30046b 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_context_labels.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_context_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class PipelineJobJobDetailPipelineContextLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_context_metadata.rb b/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_context_metadata.rb index 7b8498db6..d7f7872b6 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_context_metadata.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_context_metadata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class PipelineJobJobDetailPipelineContextMetadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_run_context.rb b/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_run_context.rb index 8b7b26fce..e8f49da55 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_run_context.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_run_context.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_labels' -require 'google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_metadata' +require "google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_labels" +require "google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_metadata" module GoogleInSpec module VertexAI module Property @@ -44,17 +44,17 @@ class PipelineJobJobDetailPipelineRunContext def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @schema_title = args['schemaTitle'] - @etag = args['etag'] - @description = args['description'] - @display_name = args['displayName'] - @schema_version = args['schemaVersion'] - @create_time = args['createTime'] - @labels = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailPipelineRunContextLabels.new(args['labels'], to_s) - @metadata = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailPipelineRunContextMetadata.new(args['metadata'], to_s) - @update_time = args['updateTime'] - @parent_contexts = args['parentContexts'] + @name = args["name"] + @schema_title = args["schemaTitle"] + @etag = args["etag"] + @description = args["description"] + @display_name = args["displayName"] + @schema_version = args["schemaVersion"] + @create_time = args["createTime"] + @labels = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailPipelineRunContextLabels.new(args["labels"], to_s) + @metadata = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailPipelineRunContextMetadata.new(args["metadata"], to_s) + @update_time = args["updateTime"] + @parent_contexts = args["parentContexts"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_labels.rb b/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_labels.rb index 511f4f7ac..d59f0021b 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_labels.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class PipelineJobJobDetailPipelineRunContextLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_metadata.rb b/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_metadata.rb index 86b57e6e6..422619a30 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_metadata.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_metadata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class PipelineJobJobDetailPipelineRunContextMetadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details.rb b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details.rb index 73994fcd5..2fee734b3 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/pipelinejob_job_detail_task_details_error' -require 'google/vertexai/property/pipelinejob_job_detail_task_details_execution' -require 'google/vertexai/property/pipelinejob_job_detail_task_details_execution_labels' -require 'google/vertexai/property/pipelinejob_job_detail_task_details_execution_metadata' -require 'google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail' -require 'google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_container_detail' -require 'google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_custom_job_detail' -require 'google/vertexai/property/pipelinejob_job_detail_task_details_inputs' -require 'google/vertexai/property/pipelinejob_job_detail_task_details_outputs' -require 'google/vertexai/property/pipelinejob_job_detail_task_details_pipeline_task_status' +require "google/vertexai/property/pipelinejob_job_detail_task_details_error" +require "google/vertexai/property/pipelinejob_job_detail_task_details_execution" +require "google/vertexai/property/pipelinejob_job_detail_task_details_execution_labels" +require "google/vertexai/property/pipelinejob_job_detail_task_details_execution_metadata" +require "google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail" +require "google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_container_detail" +require "google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_custom_job_detail" +require "google/vertexai/property/pipelinejob_job_detail_task_details_inputs" +require "google/vertexai/property/pipelinejob_job_detail_task_details_outputs" +require "google/vertexai/property/pipelinejob_job_detail_task_details_pipeline_task_status" module GoogleInSpec module VertexAI module Property @@ -56,19 +56,19 @@ class PipelineJobJobDetailTaskDetails def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @inputs = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsInputs.new(args['inputs'], to_s) - @pipeline_task_status = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsPipelineTaskStatusArray.parse(args['pipelineTaskStatus'], to_s) - @end_time = args['endTime'] - @outputs = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsOutputs.new(args['outputs'], to_s) - @create_time = args['createTime'] - @start_time = args['startTime'] - @execution = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsExecution.new(args['execution'], to_s) - @task_name = args['taskName'] - @parent_task_id = args['parentTaskId'] - @state = args['state'] - @task_id = args['taskId'] - @executor_detail = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsExecutorDetail.new(args['executorDetail'], to_s) - @error = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsError.new(args['error'], to_s) + @inputs = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsInputs.new(args["inputs"], to_s) + @pipeline_task_status = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsPipelineTaskStatusArray.parse(args["pipelineTaskStatus"], to_s) + @end_time = args["endTime"] + @outputs = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsOutputs.new(args["outputs"], to_s) + @create_time = args["createTime"] + @start_time = args["startTime"] + @execution = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsExecution.new(args["execution"], to_s) + @task_name = args["taskName"] + @parent_task_id = args["parentTaskId"] + @state = args["state"] + @task_id = args["taskId"] + @executor_detail = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsExecutorDetail.new(args["executorDetail"], to_s) + @error = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsError.new(args["error"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_error.rb b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_error.rb index 007ff9513..7a4978cc1 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_error.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_error.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class PipelineJobJobDetailTaskDetailsError def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @details = args['details'] - @code = args['code'] - @message = args['message'] + @details = args["details"] + @code = args["code"] + @message = args["message"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_execution.rb b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_execution.rb index 6003bd436..a8107f979 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_execution.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_execution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/pipelinejob_job_detail_task_details_execution_labels' -require 'google/vertexai/property/pipelinejob_job_detail_task_details_execution_metadata' +require "google/vertexai/property/pipelinejob_job_detail_task_details_execution_labels" +require "google/vertexai/property/pipelinejob_job_detail_task_details_execution_metadata" module GoogleInSpec module VertexAI module Property @@ -44,17 +44,17 @@ class PipelineJobJobDetailTaskDetailsExecution def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @labels = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsExecutionLabels.new(args['labels'], to_s) - @create_time = args['createTime'] - @schema_version = args['schemaVersion'] - @state = args['state'] - @name = args['name'] - @etag = args['etag'] - @display_name = args['displayName'] - @metadata = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsExecutionMetadata.new(args['metadata'], to_s) - @schema_title = args['schemaTitle'] - @description = args['description'] - @update_time = args['updateTime'] + @labels = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsExecutionLabels.new(args["labels"], to_s) + @create_time = args["createTime"] + @schema_version = args["schemaVersion"] + @state = args["state"] + @name = args["name"] + @etag = args["etag"] + @display_name = args["displayName"] + @metadata = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsExecutionMetadata.new(args["metadata"], to_s) + @schema_title = args["schemaTitle"] + @description = args["description"] + @update_time = args["updateTime"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_execution_labels.rb b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_execution_labels.rb index 41c49210a..7dc65c441 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_execution_labels.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_execution_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class PipelineJobJobDetailTaskDetailsExecutionLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_execution_metadata.rb b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_execution_metadata.rb index 5fae8d462..55be496b7 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_execution_metadata.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_execution_metadata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class PipelineJobJobDetailTaskDetailsExecutionMetadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail.rb b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail.rb index 54c186f36..f32dd92f7 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_container_detail' -require 'google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_custom_job_detail' +require "google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_container_detail" +require "google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_custom_job_detail" module GoogleInSpec module VertexAI module Property @@ -26,8 +26,8 @@ class PipelineJobJobDetailTaskDetailsExecutorDetail def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @container_detail = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsExecutorDetailContainerDetail.new(args['containerDetail'], to_s) - @custom_job_detail = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsExecutorDetailCustomJobDetail.new(args['customJobDetail'], to_s) + @container_detail = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsExecutorDetailContainerDetail.new(args["containerDetail"], to_s) + @custom_job_detail = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsExecutorDetailCustomJobDetail.new(args["customJobDetail"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_container_detail.rb b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_container_detail.rb index 41f125f22..fd80257e2 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_container_detail.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_container_detail.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class PipelineJobJobDetailTaskDetailsExecutorDetailContainerDetail def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @failed_main_jobs = args['failedMainJobs'] - @main_job = args['mainJob'] - @pre_caching_check_job = args['preCachingCheckJob'] - @failed_pre_caching_check_jobs = args['failedPreCachingCheckJobs'] + @failed_main_jobs = args["failedMainJobs"] + @main_job = args["mainJob"] + @pre_caching_check_job = args["preCachingCheckJob"] + @failed_pre_caching_check_jobs = args["failedPreCachingCheckJobs"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_custom_job_detail.rb b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_custom_job_detail.rb index dfc6195cb..de5a76439 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_custom_job_detail.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_executor_detail_custom_job_detail.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class PipelineJobJobDetailTaskDetailsExecutorDetailCustomJobDetail def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @failed_jobs = args['failedJobs'] - @job = args['job'] + @failed_jobs = args["failedJobs"] + @job = args["job"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_inputs.rb b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_inputs.rb index 9c65ed657..92d2ac609 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_inputs.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_inputs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class PipelineJobJobDetailTaskDetailsInputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_outputs.rb b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_outputs.rb index 8dc4a7d43..594f417b3 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_outputs.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_outputs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class PipelineJobJobDetailTaskDetailsOutputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_pipeline_task_status.rb b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_pipeline_task_status.rb index 0bf475529..942b11ed0 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_pipeline_task_status.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_pipeline_task_status.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/pipelinejob_job_detail_task_details_pipeline_task_status_error' +require "google/vertexai/property/pipelinejob_job_detail_task_details_pipeline_task_status_error" module GoogleInSpec module VertexAI module Property @@ -27,9 +27,9 @@ class PipelineJobJobDetailTaskDetailsPipelineTaskStatus def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @update_time = args['updateTime'] - @error = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsPipelineTaskStatusError.new(args['error'], to_s) - @state = args['state'] + @update_time = args["updateTime"] + @error = GoogleInSpec::VertexAI::Property::PipelineJobJobDetailTaskDetailsPipelineTaskStatusError.new(args["error"], to_s) + @state = args["state"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_pipeline_task_status_error.rb b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_pipeline_task_status_error.rb index 174bbc2de..ede1ec2e6 100644 --- a/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_pipeline_task_status_error.rb +++ b/libraries/google/vertexai/property/pipelinejob_job_detail_task_details_pipeline_task_status_error.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class PipelineJobJobDetailTaskDetailsPipelineTaskStatusError def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @details = args['details'] - @code = args['code'] - @message = args['message'] + @details = args["details"] + @code = args["code"] + @message = args["message"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_labels.rb b/libraries/google/vertexai/property/pipelinejob_labels.rb index c5b03e0ca..dbbe76035 100644 --- a/libraries/google/vertexai/property/pipelinejob_labels.rb +++ b/libraries/google/vertexai/property/pipelinejob_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class PipelineJobLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_pipeline_spec.rb b/libraries/google/vertexai/property/pipelinejob_pipeline_spec.rb index 42ccf11eb..ba7f43f87 100644 --- a/libraries/google/vertexai/property/pipelinejob_pipeline_spec.rb +++ b/libraries/google/vertexai/property/pipelinejob_pipeline_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class PipelineJobPipelineSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_runtime_config.rb b/libraries/google/vertexai/property/pipelinejob_runtime_config.rb index 7524a2961..67b870ce6 100644 --- a/libraries/google/vertexai/property/pipelinejob_runtime_config.rb +++ b/libraries/google/vertexai/property/pipelinejob_runtime_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/pipelinejob_runtime_config_input_artifacts' -require 'google/vertexai/property/pipelinejob_runtime_config_parameter_values' -require 'google/vertexai/property/pipelinejob_runtime_config_parameters' +require "google/vertexai/property/pipelinejob_runtime_config_input_artifacts" +require "google/vertexai/property/pipelinejob_runtime_config_parameter_values" +require "google/vertexai/property/pipelinejob_runtime_config_parameters" module GoogleInSpec module VertexAI module Property @@ -33,11 +33,11 @@ class PipelineJobRuntimeConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @gcs_output_directory = args['gcsOutputDirectory'] - @parameter_values = GoogleInSpec::VertexAI::Property::PipelineJobRuntimeConfigParameterValues.new(args['parameterValues'], to_s) - @failure_policy = args['failurePolicy'] - @parameters = GoogleInSpec::VertexAI::Property::PipelineJobRuntimeConfigParameters.new(args['parameters'], to_s) - @input_artifacts = GoogleInSpec::VertexAI::Property::PipelineJobRuntimeConfigInputArtifacts.new(args['inputArtifacts'], to_s) + @gcs_output_directory = args["gcsOutputDirectory"] + @parameter_values = GoogleInSpec::VertexAI::Property::PipelineJobRuntimeConfigParameterValues.new(args["parameterValues"], to_s) + @failure_policy = args["failurePolicy"] + @parameters = GoogleInSpec::VertexAI::Property::PipelineJobRuntimeConfigParameters.new(args["parameters"], to_s) + @input_artifacts = GoogleInSpec::VertexAI::Property::PipelineJobRuntimeConfigInputArtifacts.new(args["inputArtifacts"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_runtime_config_input_artifacts.rb b/libraries/google/vertexai/property/pipelinejob_runtime_config_input_artifacts.rb index 48e32a263..024e27f79 100644 --- a/libraries/google/vertexai/property/pipelinejob_runtime_config_input_artifacts.rb +++ b/libraries/google/vertexai/property/pipelinejob_runtime_config_input_artifacts.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class PipelineJobRuntimeConfigInputArtifacts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_runtime_config_parameter_values.rb b/libraries/google/vertexai/property/pipelinejob_runtime_config_parameter_values.rb index df5a5e80c..8f1fe133e 100644 --- a/libraries/google/vertexai/property/pipelinejob_runtime_config_parameter_values.rb +++ b/libraries/google/vertexai/property/pipelinejob_runtime_config_parameter_values.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class PipelineJobRuntimeConfigParameterValues def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_runtime_config_parameters.rb b/libraries/google/vertexai/property/pipelinejob_runtime_config_parameters.rb index 65f35739d..019d825ef 100644 --- a/libraries/google/vertexai/property/pipelinejob_runtime_config_parameters.rb +++ b/libraries/google/vertexai/property/pipelinejob_runtime_config_parameters.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class PipelineJobRuntimeConfigParameters def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/pipelinejob_template_metadata.rb b/libraries/google/vertexai/property/pipelinejob_template_metadata.rb index 3488a5bfe..e116247c9 100644 --- a/libraries/google/vertexai/property/pipelinejob_template_metadata.rb +++ b/libraries/google/vertexai/property/pipelinejob_template_metadata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class PipelineJobTemplateMetadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @version = args['version'] + @version = args["version"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request.rb index 7951cfac0..93dedd3c2 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,24 +13,24 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_encryption_spec' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_error' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_labels' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_pipeline_spec' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_input_artifacts' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameter_values' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameters' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_template_metadata' +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_encryption_spec" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_error" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_labels" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_pipeline_spec" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_input_artifacts" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameter_values" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameters" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_template_metadata" module GoogleInSpec module VertexAI module Property @@ -44,9 +44,9 @@ class ScheduleCreatePipelineJobRequest def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @pipeline_job = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJob.new(args['pipelineJob'], to_s) - @pipeline_job_id = args['pipelineJobId'] - @parent = args['parent'] + @pipeline_job = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJob.new(args["pipelineJob"], to_s) + @pipeline_job_id = args["pipelineJobId"] + @parent = args["parent"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job.rb index a6ebb2ac0..b24e74090 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,23 +13,23 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_encryption_spec' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_error' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_labels' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_pipeline_spec' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_input_artifacts' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameter_values' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameters' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_template_metadata' +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_encryption_spec" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_error" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_labels" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_pipeline_spec" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_input_artifacts" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameter_values" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameters" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_template_metadata" module GoogleInSpec module VertexAI module Property @@ -75,25 +75,25 @@ class ScheduleCreatePipelineJobRequestPipelineJob def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @encryption_spec = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobEncryptionSpec.new(args['encryptionSpec'], to_s) - @end_time = args['endTime'] - @error = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobError.new(args['error'], to_s) - @update_time = args['updateTime'] - @job_detail = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetail.new(args['jobDetail'], to_s) - @template_metadata = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobTemplateMetadata.new(args['templateMetadata'], to_s) - @state = args['state'] - @create_time = args['createTime'] - @name = args['name'] - @schedule_name = args['scheduleName'] - @reserved_ip_ranges = args['reservedIpRanges'] - @start_time = args['startTime'] - @service_account = args['serviceAccount'] - @display_name = args['displayName'] - @template_uri = args['templateUri'] - @pipeline_spec = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobPipelineSpec.new(args['pipelineSpec'], to_s) - @network = args['network'] - @labels = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobLabels.new(args['labels'], to_s) - @runtime_config = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfig.new(args['runtimeConfig'], to_s) + @encryption_spec = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobEncryptionSpec.new(args["encryptionSpec"], to_s) + @end_time = args["endTime"] + @error = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobError.new(args["error"], to_s) + @update_time = args["updateTime"] + @job_detail = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetail.new(args["jobDetail"], to_s) + @template_metadata = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobTemplateMetadata.new(args["templateMetadata"], to_s) + @state = args["state"] + @create_time = args["createTime"] + @name = args["name"] + @schedule_name = args["scheduleName"] + @reserved_ip_ranges = args["reservedIpRanges"] + @start_time = args["startTime"] + @service_account = args["serviceAccount"] + @display_name = args["displayName"] + @template_uri = args["templateUri"] + @pipeline_spec = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobPipelineSpec.new(args["pipelineSpec"], to_s) + @network = args["network"] + @labels = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobLabels.new(args["labels"], to_s) + @runtime_config = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfig.new(args["runtimeConfig"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_encryption_spec.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_encryption_spec.rb index aa3fef603..1c1995094 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_encryption_spec.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_encryption_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ScheduleCreatePipelineJobRequestPipelineJobEncryptionSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_error.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_error.rb index 081ddb2c7..14ed31da7 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_error.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_error.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ScheduleCreatePipelineJobRequestPipelineJobError def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @details = args['details'] - @code = args['code'] - @message = args['message'] + @details = args["details"] + @code = args["code"] + @message = args["message"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail.rb index 330a8761b..1eef8dac3 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details' +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details" module GoogleInSpec module VertexAI module Property @@ -33,9 +33,9 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetail def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @task_details = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsArray.parse(args['taskDetails'], to_s) - @pipeline_run_context = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineRunContext.new(args['pipelineRunContext'], to_s) - @pipeline_context = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineContext.new(args['pipelineContext'], to_s) + @task_details = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsArray.parse(args["taskDetails"], to_s) + @pipeline_run_context = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineRunContext.new(args["pipelineRunContext"], to_s) + @pipeline_context = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineContext.new(args["pipelineContext"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context.rb index cd444c5dd..d8bd8fb28 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata' +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata" module GoogleInSpec module VertexAI module Property @@ -44,17 +44,17 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineContext def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @schema_title = args['schemaTitle'] - @etag = args['etag'] - @description = args['description'] - @display_name = args['displayName'] - @schema_version = args['schemaVersion'] - @create_time = args['createTime'] - @labels = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineContextLabels.new(args['labels'], to_s) - @metadata = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineContextMetadata.new(args['metadata'], to_s) - @update_time = args['updateTime'] - @parent_contexts = args['parentContexts'] + @name = args["name"] + @schema_title = args["schemaTitle"] + @etag = args["etag"] + @description = args["description"] + @display_name = args["displayName"] + @schema_version = args["schemaVersion"] + @create_time = args["createTime"] + @labels = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineContextLabels.new(args["labels"], to_s) + @metadata = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineContextMetadata.new(args["metadata"], to_s) + @update_time = args["updateTime"] + @parent_contexts = args["parentContexts"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels.rb index 8faa2e7ec..2d88d77d7 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineContextLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata.rb index 26d061c1c..f20b537dc 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineContextMetadat def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context.rb index 5d7c708a8..608cc81d4 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata' +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata" module GoogleInSpec module VertexAI module Property @@ -44,17 +44,17 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineRunContext def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @schema_title = args['schemaTitle'] - @etag = args['etag'] - @description = args['description'] - @display_name = args['displayName'] - @schema_version = args['schemaVersion'] - @create_time = args['createTime'] - @labels = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineRunContextLabels.new(args['labels'], to_s) - @metadata = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineRunContextMetadata.new(args['metadata'], to_s) - @update_time = args['updateTime'] - @parent_contexts = args['parentContexts'] + @name = args["name"] + @schema_title = args["schemaTitle"] + @etag = args["etag"] + @description = args["description"] + @display_name = args["displayName"] + @schema_version = args["schemaVersion"] + @create_time = args["createTime"] + @labels = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineRunContextLabels.new(args["labels"], to_s) + @metadata = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineRunContextMetadata.new(args["metadata"], to_s) + @update_time = args["updateTime"] + @parent_contexts = args["parentContexts"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels.rb index 2381057e0..479500e09 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineRunContextLabe def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata.rb index 82caf1b4a..2c47b09fd 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetailPipelineRunContextMeta def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details.rb index 86d9cd146..069480229 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_error' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_labels' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_metadata' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail_container_detail' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail_custom_job_detail' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_inputs' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_outputs' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_pipeline_task_status' +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_error" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_labels" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_metadata" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail_container_detail" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail_custom_job_detail" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_inputs" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_outputs" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_pipeline_task_status" module GoogleInSpec module VertexAI module Property @@ -56,19 +56,19 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetails def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @inputs = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsInputs.new(args['inputs'], to_s) - @pipeline_task_status = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsPipelineTaskStatusArray.parse(args['pipelineTaskStatus'], to_s) - @end_time = args['endTime'] - @outputs = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsOutputs.new(args['outputs'], to_s) - @create_time = args['createTime'] - @start_time = args['startTime'] - @execution = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecution.new(args['execution'], to_s) - @task_name = args['taskName'] - @parent_task_id = args['parentTaskId'] - @state = args['state'] - @task_id = args['taskId'] - @executor_detail = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutorDetail.new(args['executorDetail'], to_s) - @error = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsError.new(args['error'], to_s) + @inputs = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsInputs.new(args["inputs"], to_s) + @pipeline_task_status = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsPipelineTaskStatusArray.parse(args["pipelineTaskStatus"], to_s) + @end_time = args["endTime"] + @outputs = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsOutputs.new(args["outputs"], to_s) + @create_time = args["createTime"] + @start_time = args["startTime"] + @execution = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecution.new(args["execution"], to_s) + @task_name = args["taskName"] + @parent_task_id = args["parentTaskId"] + @state = args["state"] + @task_id = args["taskId"] + @executor_detail = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutorDetail.new(args["executorDetail"], to_s) + @error = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsError.new(args["error"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_error.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_error.rb index 4091ba8a9..81ffbacc3 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_error.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_error.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsError def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @details = args['details'] - @code = args['code'] - @message = args['message'] + @details = args["details"] + @code = args["code"] + @message = args["message"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution.rb index 83d222645..8749f079c 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_labels' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_metadata' +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_labels" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_metadata" module GoogleInSpec module VertexAI module Property @@ -44,17 +44,17 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecution def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @labels = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutionLabels.new(args['labels'], to_s) - @create_time = args['createTime'] - @schema_version = args['schemaVersion'] - @state = args['state'] - @name = args['name'] - @etag = args['etag'] - @display_name = args['displayName'] - @metadata = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutionMetadata.new(args['metadata'], to_s) - @schema_title = args['schemaTitle'] - @description = args['description'] - @update_time = args['updateTime'] + @labels = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutionLabels.new(args["labels"], to_s) + @create_time = args["createTime"] + @schema_version = args["schemaVersion"] + @state = args["state"] + @name = args["name"] + @etag = args["etag"] + @display_name = args["displayName"] + @metadata = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutionMetadata.new(args["metadata"], to_s) + @schema_title = args["schemaTitle"] + @description = args["description"] + @update_time = args["updateTime"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_labels.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_labels.rb index 8bd12a680..ee13a56c7 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_labels.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutionLa def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_metadata.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_metadata.rb index 4401fd851..c5feaff56 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_metadata.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_execution_metadata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutionMe def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail.rb index c253910bd..f26387033 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail_container_detail' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail_custom_job_detail' +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail_container_detail" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail_custom_job_detail" module GoogleInSpec module VertexAI module Property @@ -26,8 +26,8 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutorDet def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @container_detail = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutorDetailContainerDetail.new(args['containerDetail'], to_s) - @custom_job_detail = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutorDetailCustomJobDetail.new(args['customJobDetail'], to_s) + @container_detail = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutorDetailContainerDetail.new(args["containerDetail"], to_s) + @custom_job_detail = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutorDetailCustomJobDetail.new(args["customJobDetail"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail_container_detail.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail_container_detail.rb index 1a5a7ea96..0e857b839 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail_container_detail.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail_container_detail.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutorDet def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @failed_main_jobs = args['failedMainJobs'] - @main_job = args['mainJob'] - @pre_caching_check_job = args['preCachingCheckJob'] - @failed_pre_caching_check_jobs = args['failedPreCachingCheckJobs'] + @failed_main_jobs = args["failedMainJobs"] + @main_job = args["mainJob"] + @pre_caching_check_job = args["preCachingCheckJob"] + @failed_pre_caching_check_jobs = args["failedPreCachingCheckJobs"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail_custom_job_detail.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail_custom_job_detail.rb index 29598cbe6..052e2cdfa 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail_custom_job_detail.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_executor_detail_custom_job_detail.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsExecutorDet def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @failed_jobs = args['failedJobs'] - @job = args['job'] + @failed_jobs = args["failedJobs"] + @job = args["job"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_inputs.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_inputs.rb index 00ce85175..b22987b5b 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_inputs.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_inputs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsInputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_outputs.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_outputs.rb index 465908c46..a1f33743e 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_outputs.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_outputs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsOutputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_pipeline_task_status.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_pipeline_task_status.rb index ea9f6b4d0..60f93b0fa 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_pipeline_task_status.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_pipeline_task_status.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_pipeline_task_status_error' +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_pipeline_task_status_error" module GoogleInSpec module VertexAI module Property @@ -27,9 +27,9 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsPipelineTas def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @update_time = args['updateTime'] - @error = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsPipelineTaskStatusError.new(args['error'], to_s) - @state = args['state'] + @update_time = args["updateTime"] + @error = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsPipelineTaskStatusError.new(args["error"], to_s) + @state = args["state"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_pipeline_task_status_error.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_pipeline_task_status_error.rb index cacb88548..09d20fdeb 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_pipeline_task_status_error.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details_pipeline_task_status_error.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class ScheduleCreatePipelineJobRequestPipelineJobJobDetailTaskDetailsPipelineTas def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @details = args['details'] - @code = args['code'] - @message = args['message'] + @details = args["details"] + @code = args["code"] + @message = args["message"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_labels.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_labels.rb index ed27648f3..63236c9d6 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_labels.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ScheduleCreatePipelineJobRequestPipelineJobLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_pipeline_spec.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_pipeline_spec.rb index 589320de0..560968c31 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_pipeline_spec.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_pipeline_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ScheduleCreatePipelineJobRequestPipelineJobPipelineSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config.rb index 5450820bb..415c28355 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_input_artifacts' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameter_values' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameters' +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_input_artifacts" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameter_values" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameters" module GoogleInSpec module VertexAI module Property @@ -33,11 +33,11 @@ class ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @gcs_output_directory = args['gcsOutputDirectory'] - @parameter_values = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfigParameterValues.new(args['parameterValues'], to_s) - @failure_policy = args['failurePolicy'] - @parameters = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfigParameters.new(args['parameters'], to_s) - @input_artifacts = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfigInputArtifacts.new(args['inputArtifacts'], to_s) + @gcs_output_directory = args["gcsOutputDirectory"] + @parameter_values = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfigParameterValues.new(args["parameterValues"], to_s) + @failure_policy = args["failurePolicy"] + @parameters = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfigParameters.new(args["parameters"], to_s) + @input_artifacts = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfigInputArtifacts.new(args["inputArtifacts"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_input_artifacts.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_input_artifacts.rb index 027377ab3..f7ac4f378 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_input_artifacts.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_input_artifacts.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfigInputArtifacts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameter_values.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameter_values.rb index 8e3c66e73..1b9dc893b 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameter_values.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameter_values.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfigParameterValues def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameters.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameters.rb index d79ccb3cd..5a47bb0a0 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameters.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameters.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ScheduleCreatePipelineJobRequestPipelineJobRuntimeConfigParameters def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_template_metadata.rb b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_template_metadata.rb index b83690c6f..7fa58a5c8 100644 --- a/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_template_metadata.rb +++ b/libraries/google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_template_metadata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class ScheduleCreatePipelineJobRequestPipelineJobTemplateMetadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @version = args['version'] + @version = args["version"] end def to_s diff --git a/libraries/google/vertexai/property/schedule_last_scheduled_run_response.rb b/libraries/google/vertexai/property/schedule_last_scheduled_run_response.rb index acdaa2689..b2bb6848c 100644 --- a/libraries/google/vertexai/property/schedule_last_scheduled_run_response.rb +++ b/libraries/google/vertexai/property/schedule_last_scheduled_run_response.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class ScheduleLastScheduledRunResponse def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @run_response = args['runResponse'] - @scheduled_run_time = args['scheduledRunTime'] + @run_response = args["runResponse"] + @scheduled_run_time = args["scheduledRunTime"] end def to_s diff --git a/libraries/google/vertexai/property/studiestrial_final_measurement.rb b/libraries/google/vertexai/property/studiestrial_final_measurement.rb index 12e3f00cf..d17cfdf5f 100644 --- a/libraries/google/vertexai/property/studiestrial_final_measurement.rb +++ b/libraries/google/vertexai/property/studiestrial_final_measurement.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/studiestrial_final_measurement_metrics' +require "google/vertexai/property/studiestrial_final_measurement_metrics" module GoogleInSpec module VertexAI module Property @@ -27,9 +27,9 @@ class StudiesTrialFinalMeasurement def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @metrics = GoogleInSpec::VertexAI::Property::StudiesTrialFinalMeasurementMetricsArray.parse(args['metrics'], to_s) - @elapsed_duration = args['elapsedDuration'] - @step_count = args['stepCount'] + @metrics = GoogleInSpec::VertexAI::Property::StudiesTrialFinalMeasurementMetricsArray.parse(args["metrics"], to_s) + @elapsed_duration = args["elapsedDuration"] + @step_count = args["stepCount"] end def to_s diff --git a/libraries/google/vertexai/property/studiestrial_final_measurement_metrics.rb b/libraries/google/vertexai/property/studiestrial_final_measurement_metrics.rb index 406c18356..bcab21fac 100644 --- a/libraries/google/vertexai/property/studiestrial_final_measurement_metrics.rb +++ b/libraries/google/vertexai/property/studiestrial_final_measurement_metrics.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class StudiesTrialFinalMeasurementMetrics def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @metric_id = args['metricId'] - @value = args['value'] + @metric_id = args["metricId"] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/studiestrial_measurements.rb b/libraries/google/vertexai/property/studiestrial_measurements.rb index cb7097e7d..a83d1db02 100644 --- a/libraries/google/vertexai/property/studiestrial_measurements.rb +++ b/libraries/google/vertexai/property/studiestrial_measurements.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/studiestrial_measurements_metrics' +require "google/vertexai/property/studiestrial_measurements_metrics" module GoogleInSpec module VertexAI module Property @@ -27,9 +27,9 @@ class StudiesTrialMeasurements def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @metrics = GoogleInSpec::VertexAI::Property::StudiesTrialMeasurementsMetricsArray.parse(args['metrics'], to_s) - @elapsed_duration = args['elapsedDuration'] - @step_count = args['stepCount'] + @metrics = GoogleInSpec::VertexAI::Property::StudiesTrialMeasurementsMetricsArray.parse(args["metrics"], to_s) + @elapsed_duration = args["elapsedDuration"] + @step_count = args["stepCount"] end def to_s diff --git a/libraries/google/vertexai/property/studiestrial_measurements_metrics.rb b/libraries/google/vertexai/property/studiestrial_measurements_metrics.rb index ae2fb3639..602f7f305 100644 --- a/libraries/google/vertexai/property/studiestrial_measurements_metrics.rb +++ b/libraries/google/vertexai/property/studiestrial_measurements_metrics.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class StudiesTrialMeasurementsMetrics def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @metric_id = args['metricId'] - @value = args['value'] + @metric_id = args["metricId"] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/studiestrial_parameters.rb b/libraries/google/vertexai/property/studiestrial_parameters.rb index 6dc7a65f0..2d4f218e1 100644 --- a/libraries/google/vertexai/property/studiestrial_parameters.rb +++ b/libraries/google/vertexai/property/studiestrial_parameters.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class StudiesTrialParameters def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @value = args['value'] - @parameter_id = args['parameterId'] + @value = args["value"] + @parameter_id = args["parameterId"] end def to_s diff --git a/libraries/google/vertexai/property/studiestrial_web_access_uris.rb b/libraries/google/vertexai/property/studiestrial_web_access_uris.rb index 242f5ff9a..03925f29a 100644 --- a/libraries/google/vertexai/property/studiestrial_web_access_uris.rb +++ b/libraries/google/vertexai/property/studiestrial_web_access_uris.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class StudiesTrialWebAccessUris def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/tensorboard_encryption_spec.rb b/libraries/google/vertexai/property/tensorboard_encryption_spec.rb index 34fcae25f..37868708b 100644 --- a/libraries/google/vertexai/property/tensorboard_encryption_spec.rb +++ b/libraries/google/vertexai/property/tensorboard_encryption_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TensorboardEncryptionSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/vertexai/property/tensorboard_labels.rb b/libraries/google/vertexai/property/tensorboard_labels.rb index 1a2a63ccc..0b33bdbe5 100644 --- a/libraries/google/vertexai/property/tensorboard_labels.rb +++ b/libraries/google/vertexai/property/tensorboard_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TensorboardLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/tensorboardexperimentrun_labels.rb b/libraries/google/vertexai/property/tensorboardexperimentrun_labels.rb index 143b87893..b02e869df 100644 --- a/libraries/google/vertexai/property/tensorboardexperimentrun_labels.rb +++ b/libraries/google/vertexai/property/tensorboardexperimentrun_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TensorboardExperimentRunLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/tensorboardsexperiment_labels.rb b/libraries/google/vertexai/property/tensorboardsexperiment_labels.rb index 54e76d421..d2aa774d0 100644 --- a/libraries/google/vertexai/property/tensorboardsexperiment_labels.rb +++ b/libraries/google/vertexai/property/tensorboardsexperiment_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TensorboardsExperimentLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_encryption_spec.rb b/libraries/google/vertexai/property/trainingpipeline_encryption_spec.rb index fef6673aa..c342ca8c9 100644 --- a/libraries/google/vertexai/property/trainingpipeline_encryption_spec.rb +++ b/libraries/google/vertexai/property/trainingpipeline_encryption_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TrainingPipelineEncryptionSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_error.rb b/libraries/google/vertexai/property/trainingpipeline_error.rb index 265e23672..4c5dc4b2c 100644 --- a/libraries/google/vertexai/property/trainingpipeline_error.rb +++ b/libraries/google/vertexai/property/trainingpipeline_error.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class TrainingPipelineError def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @details = args['details'] - @code = args['code'] - @message = args['message'] + @details = args["details"] + @code = args["code"] + @message = args["message"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_input_data_config.rb b/libraries/google/vertexai/property/trainingpipeline_input_data_config.rb index 4a852c9e5..b9a8579f2 100644 --- a/libraries/google/vertexai/property/trainingpipeline_input_data_config.rb +++ b/libraries/google/vertexai/property/trainingpipeline_input_data_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/trainingpipeline_input_data_config_bigquery_destination' -require 'google/vertexai/property/trainingpipeline_input_data_config_filter_split' -require 'google/vertexai/property/trainingpipeline_input_data_config_fraction_split' -require 'google/vertexai/property/trainingpipeline_input_data_config_gcs_destination' -require 'google/vertexai/property/trainingpipeline_input_data_config_predefined_split' -require 'google/vertexai/property/trainingpipeline_input_data_config_stratified_split' -require 'google/vertexai/property/trainingpipeline_input_data_config_timestamp_split' +require "google/vertexai/property/trainingpipeline_input_data_config_bigquery_destination" +require "google/vertexai/property/trainingpipeline_input_data_config_filter_split" +require "google/vertexai/property/trainingpipeline_input_data_config_fraction_split" +require "google/vertexai/property/trainingpipeline_input_data_config_gcs_destination" +require "google/vertexai/property/trainingpipeline_input_data_config_predefined_split" +require "google/vertexai/property/trainingpipeline_input_data_config_stratified_split" +require "google/vertexai/property/trainingpipeline_input_data_config_timestamp_split" module GoogleInSpec module VertexAI module Property @@ -51,18 +51,18 @@ class TrainingPipelineInputDataConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @fraction_split = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigFractionSplit.new(args['fractionSplit'], to_s) - @persist_ml_use_assignment = args['persistMlUseAssignment'] - @saved_query_id = args['savedQueryId'] - @annotations_filter = args['annotationsFilter'] - @gcs_destination = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigGcsDestination.new(args['gcsDestination'], to_s) - @bigquery_destination = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigBigqueryDestination.new(args['bigqueryDestination'], to_s) - @stratified_split = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigStratifiedSplit.new(args['stratifiedSplit'], to_s) - @annotation_schema_uri = args['annotationSchemaUri'] - @predefined_split = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigPredefinedSplit.new(args['predefinedSplit'], to_s) - @filter_split = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigFilterSplit.new(args['filterSplit'], to_s) - @timestamp_split = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigTimestampSplit.new(args['timestampSplit'], to_s) - @dataset_id = args['datasetId'] + @fraction_split = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigFractionSplit.new(args["fractionSplit"], to_s) + @persist_ml_use_assignment = args["persistMlUseAssignment"] + @saved_query_id = args["savedQueryId"] + @annotations_filter = args["annotationsFilter"] + @gcs_destination = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigGcsDestination.new(args["gcsDestination"], to_s) + @bigquery_destination = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigBigqueryDestination.new(args["bigqueryDestination"], to_s) + @stratified_split = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigStratifiedSplit.new(args["stratifiedSplit"], to_s) + @annotation_schema_uri = args["annotationSchemaUri"] + @predefined_split = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigPredefinedSplit.new(args["predefinedSplit"], to_s) + @filter_split = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigFilterSplit.new(args["filterSplit"], to_s) + @timestamp_split = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfigTimestampSplit.new(args["timestampSplit"], to_s) + @dataset_id = args["datasetId"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_input_data_config_bigquery_destination.rb b/libraries/google/vertexai/property/trainingpipeline_input_data_config_bigquery_destination.rb index 1f39c78d1..925f45ef1 100644 --- a/libraries/google/vertexai/property/trainingpipeline_input_data_config_bigquery_destination.rb +++ b/libraries/google/vertexai/property/trainingpipeline_input_data_config_bigquery_destination.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TrainingPipelineInputDataConfigBigqueryDestination def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_uri = args['outputUri'] + @output_uri = args["outputUri"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_input_data_config_filter_split.rb b/libraries/google/vertexai/property/trainingpipeline_input_data_config_filter_split.rb index 300e5b906..87229c783 100644 --- a/libraries/google/vertexai/property/trainingpipeline_input_data_config_filter_split.rb +++ b/libraries/google/vertexai/property/trainingpipeline_input_data_config_filter_split.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class TrainingPipelineInputDataConfigFilterSplit def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @validation_filter = args['validationFilter'] - @test_filter = args['testFilter'] - @training_filter = args['trainingFilter'] + @validation_filter = args["validationFilter"] + @test_filter = args["testFilter"] + @training_filter = args["trainingFilter"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_input_data_config_fraction_split.rb b/libraries/google/vertexai/property/trainingpipeline_input_data_config_fraction_split.rb index c6577823e..03633f83d 100644 --- a/libraries/google/vertexai/property/trainingpipeline_input_data_config_fraction_split.rb +++ b/libraries/google/vertexai/property/trainingpipeline_input_data_config_fraction_split.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class TrainingPipelineInputDataConfigFractionSplit def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @training_fraction = args['trainingFraction'] - @test_fraction = args['testFraction'] - @validation_fraction = args['validationFraction'] + @training_fraction = args["trainingFraction"] + @test_fraction = args["testFraction"] + @validation_fraction = args["validationFraction"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_input_data_config_gcs_destination.rb b/libraries/google/vertexai/property/trainingpipeline_input_data_config_gcs_destination.rb index 9763130ce..5c5e45ea0 100644 --- a/libraries/google/vertexai/property/trainingpipeline_input_data_config_gcs_destination.rb +++ b/libraries/google/vertexai/property/trainingpipeline_input_data_config_gcs_destination.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TrainingPipelineInputDataConfigGcsDestination def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_uri_prefix = args['outputUriPrefix'] + @output_uri_prefix = args["outputUriPrefix"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_input_data_config_predefined_split.rb b/libraries/google/vertexai/property/trainingpipeline_input_data_config_predefined_split.rb index 87b0d658f..cab3ddce8 100644 --- a/libraries/google/vertexai/property/trainingpipeline_input_data_config_predefined_split.rb +++ b/libraries/google/vertexai/property/trainingpipeline_input_data_config_predefined_split.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TrainingPipelineInputDataConfigPredefinedSplit def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @key = args['key'] + @key = args["key"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_input_data_config_stratified_split.rb b/libraries/google/vertexai/property/trainingpipeline_input_data_config_stratified_split.rb index cfb105655..d3649391e 100644 --- a/libraries/google/vertexai/property/trainingpipeline_input_data_config_stratified_split.rb +++ b/libraries/google/vertexai/property/trainingpipeline_input_data_config_stratified_split.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class TrainingPipelineInputDataConfigStratifiedSplit def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @training_fraction = args['trainingFraction'] - @test_fraction = args['testFraction'] - @key = args['key'] - @validation_fraction = args['validationFraction'] + @training_fraction = args["trainingFraction"] + @test_fraction = args["testFraction"] + @key = args["key"] + @validation_fraction = args["validationFraction"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_input_data_config_timestamp_split.rb b/libraries/google/vertexai/property/trainingpipeline_input_data_config_timestamp_split.rb index eb6aa3334..eaa6cb4e8 100644 --- a/libraries/google/vertexai/property/trainingpipeline_input_data_config_timestamp_split.rb +++ b/libraries/google/vertexai/property/trainingpipeline_input_data_config_timestamp_split.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -28,10 +28,10 @@ class TrainingPipelineInputDataConfigTimestampSplit def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @test_fraction = args['testFraction'] - @training_fraction = args['trainingFraction'] - @validation_fraction = args['validationFraction'] - @key = args['key'] + @test_fraction = args["testFraction"] + @training_fraction = args["trainingFraction"] + @validation_fraction = args["validationFraction"] + @key = args["key"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_labels.rb b/libraries/google/vertexai/property/trainingpipeline_labels.rb index 8c8a92645..ace67e192 100644 --- a/libraries/google/vertexai/property/trainingpipeline_labels.rb +++ b/libraries/google/vertexai/property/trainingpipeline_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TrainingPipelineLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload.rb index 0885d3b83..c36091a50 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,36 +13,36 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/trainingpipeline_model_to_upload_container_spec' -require 'google/vertexai/property/trainingpipeline_model_to_upload_container_spec_env' -require 'google/vertexai/property/trainingpipeline_model_to_upload_container_spec_ports' -require 'google/vertexai/property/trainingpipeline_model_to_upload_deployed_models' -require 'google/vertexai/property/trainingpipeline_model_to_upload_encryption_spec' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_inputs' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_outputs' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_sampled_shapley_attribution' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/trainingpipeline_model_to_upload_labels' -require 'google/vertexai/property/trainingpipeline_model_to_upload_model_source_info' -require 'google/vertexai/property/trainingpipeline_model_to_upload_original_model_info' -require 'google/vertexai/property/trainingpipeline_model_to_upload_predict_schemata' -require 'google/vertexai/property/trainingpipeline_model_to_upload_supported_export_formats' +require "google/vertexai/property/trainingpipeline_model_to_upload_container_spec" +require "google/vertexai/property/trainingpipeline_model_to_upload_container_spec_env" +require "google/vertexai/property/trainingpipeline_model_to_upload_container_spec_ports" +require "google/vertexai/property/trainingpipeline_model_to_upload_deployed_models" +require "google/vertexai/property/trainingpipeline_model_to_upload_encryption_spec" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_inputs" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_outputs" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_sampled_shapley_attribution" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/trainingpipeline_model_to_upload_labels" +require "google/vertexai/property/trainingpipeline_model_to_upload_model_source_info" +require "google/vertexai/property/trainingpipeline_model_to_upload_original_model_info" +require "google/vertexai/property/trainingpipeline_model_to_upload_predict_schemata" +require "google/vertexai/property/trainingpipeline_model_to_upload_supported_export_formats" module GoogleInSpec module VertexAI module Property @@ -108,35 +108,35 @@ class TrainingPipelineModelToUpload def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @model_source_info = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadModelSourceInfo.new(args['modelSourceInfo'], to_s) - @name = args['name'] - @metadata = args['metadata'] - @update_time = args['updateTime'] - @etag = args['etag'] - @description = args['description'] - @deployed_models = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadDeployedModelsArray.parse(args['deployedModels'], to_s) - @create_time = args['createTime'] - @explanation_spec = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpec.new(args['explanationSpec'], to_s) - @encryption_spec = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadEncryptionSpec.new(args['encryptionSpec'], to_s) - @pipeline_job = args['pipelineJob'] - @predict_schemata = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadPredictSchemata.new(args['predictSchemata'], to_s) - @version_update_time = args['versionUpdateTime'] - @supported_export_formats = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadSupportedExportFormatsArray.parse(args['supportedExportFormats'], to_s) - @original_model_info = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadOriginalModelInfo.new(args['originalModelInfo'], to_s) - @metadata_artifact = args['metadataArtifact'] - @supported_input_storage_formats = args['supportedInputStorageFormats'] - @metadata_schema_uri = args['metadataSchemaUri'] - @container_spec = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadContainerSpec.new(args['containerSpec'], to_s) - @version_id = args['versionId'] - @artifact_uri = args['artifactUri'] - @training_pipeline = args['trainingPipeline'] - @display_name = args['displayName'] - @supported_deployment_resources_types = args['supportedDeploymentResourcesTypes'] - @supported_output_storage_formats = args['supportedOutputStorageFormats'] - @version_aliases = args['versionAliases'] - @version_create_time = args['versionCreateTime'] - @version_description = args['versionDescription'] - @labels = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadLabels.new(args['labels'], to_s) + @model_source_info = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadModelSourceInfo.new(args["modelSourceInfo"], to_s) + @name = args["name"] + @metadata = args["metadata"] + @update_time = args["updateTime"] + @etag = args["etag"] + @description = args["description"] + @deployed_models = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadDeployedModelsArray.parse(args["deployedModels"], to_s) + @create_time = args["createTime"] + @explanation_spec = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpec.new(args["explanationSpec"], to_s) + @encryption_spec = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadEncryptionSpec.new(args["encryptionSpec"], to_s) + @pipeline_job = args["pipelineJob"] + @predict_schemata = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadPredictSchemata.new(args["predictSchemata"], to_s) + @version_update_time = args["versionUpdateTime"] + @supported_export_formats = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadSupportedExportFormatsArray.parse(args["supportedExportFormats"], to_s) + @original_model_info = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadOriginalModelInfo.new(args["originalModelInfo"], to_s) + @metadata_artifact = args["metadataArtifact"] + @supported_input_storage_formats = args["supportedInputStorageFormats"] + @metadata_schema_uri = args["metadataSchemaUri"] + @container_spec = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadContainerSpec.new(args["containerSpec"], to_s) + @version_id = args["versionId"] + @artifact_uri = args["artifactUri"] + @training_pipeline = args["trainingPipeline"] + @display_name = args["displayName"] + @supported_deployment_resources_types = args["supportedDeploymentResourcesTypes"] + @supported_output_storage_formats = args["supportedOutputStorageFormats"] + @version_aliases = args["versionAliases"] + @version_create_time = args["versionCreateTime"] + @version_description = args["versionDescription"] + @labels = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadLabels.new(args["labels"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_container_spec.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_container_spec.rb index df879376e..cce509401 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_container_spec.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_container_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/trainingpipeline_model_to_upload_container_spec_env' -require 'google/vertexai/property/trainingpipeline_model_to_upload_container_spec_ports' +require "google/vertexai/property/trainingpipeline_model_to_upload_container_spec_env" +require "google/vertexai/property/trainingpipeline_model_to_upload_container_spec_ports" module GoogleInSpec module VertexAI module Property @@ -36,13 +36,13 @@ class TrainingPipelineModelToUploadContainerSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @predict_route = args['predictRoute'] - @image_uri = args['imageUri'] - @env = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadContainerSpecEnvArray.parse(args['env'], to_s) - @args = args['args'] - @command = args['command'] - @ports = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadContainerSpecPortsArray.parse(args['ports'], to_s) - @health_route = args['healthRoute'] + @predict_route = args["predictRoute"] + @image_uri = args["imageUri"] + @env = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadContainerSpecEnvArray.parse(args["env"], to_s) + @args = args["args"] + @command = args["command"] + @ports = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadContainerSpecPortsArray.parse(args["ports"], to_s) + @health_route = args["healthRoute"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_container_spec_env.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_container_spec_env.rb index 2647c77d7..0964babd4 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_container_spec_env.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_container_spec_env.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class TrainingPipelineModelToUploadContainerSpecEnv def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @value = args['value'] + @name = args["name"] + @value = args["value"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_container_spec_ports.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_container_spec_ports.rb index b31418db6..be1070bfa 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_container_spec_ports.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_container_spec_ports.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TrainingPipelineModelToUploadContainerSpecPorts def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @container_port = args['containerPort'] + @container_port = args["containerPort"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_deployed_models.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_deployed_models.rb index ba20f0b33..e82006aa1 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_deployed_models.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_deployed_models.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class TrainingPipelineModelToUploadDeployedModels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @deployed_model_id = args['deployedModelId'] - @endpoint = args['endpoint'] + @deployed_model_id = args["deployedModelId"] + @endpoint = args["endpoint"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_encryption_spec.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_encryption_spec.rb index 52cf658a1..01e28001b 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_encryption_spec.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_encryption_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TrainingPipelineModelToUploadEncryptionSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @kms_key_name = args['kmsKeyName'] + @kms_key_name = args["kmsKeyName"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec.rb index 7adc17c8b..e3b1c8c7f 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,25 +13,25 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_inputs' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_outputs' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_sampled_shapley_attribution' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_inputs" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_outputs" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_sampled_shapley_attribution" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -43,8 +43,8 @@ class TrainingPipelineModelToUploadExplanationSpec def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @parameters = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParameters.new(args['parameters'], to_s) - @metadata = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecMetadata.new(args['metadata'], to_s) + @parameters = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParameters.new(args["parameters"], to_s) + @metadata = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecMetadata.new(args["metadata"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata.rb index ead0dc968..079238a38 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_inputs' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_outputs' +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_inputs" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_outputs" module GoogleInSpec module VertexAI module Property @@ -30,10 +30,10 @@ class TrainingPipelineModelToUploadExplanationSpecMetadata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @feature_attributions_schema_uri = args['featureAttributionsSchemaUri'] - @latent_space_source = args['latentSpaceSource'] - @outputs = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecMetadataOutputs.new(args['outputs'], to_s) - @inputs = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecMetadataInputs.new(args['inputs'], to_s) + @feature_attributions_schema_uri = args["featureAttributionsSchemaUri"] + @latent_space_source = args["latentSpaceSource"] + @outputs = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecMetadataOutputs.new(args["outputs"], to_s) + @inputs = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecMetadataInputs.new(args["inputs"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_inputs.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_inputs.rb index 3fa5b229f..66e9a28a4 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_inputs.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_inputs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TrainingPipelineModelToUploadExplanationSpecMetadataInputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_outputs.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_outputs.rb index 1463a8d89..6f7137548 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_outputs.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_outputs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TrainingPipelineModelToUploadExplanationSpecMetadataOutputs def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters.rb index 2562ea850..74b4dbcbb 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,21 +13,21 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_sampled_shapley_attribution' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_sampled_shapley_attribution" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -47,12 +47,12 @@ class TrainingPipelineModelToUploadExplanationSpecParameters def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @output_indices = args['outputIndices'] - @examples = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersExamples.new(args['examples'], to_s) - @xrai_attribution = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersXraiAttribution.new(args['xraiAttribution'], to_s) - @top_k = args['topK'] - @integrated_gradients_attribution = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttribution.new(args['integratedGradientsAttribution'], to_s) - @sampled_shapley_attribution = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersSampledShapleyAttribution.new(args['sampledShapleyAttribution'], to_s) + @output_indices = args["outputIndices"] + @examples = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersExamples.new(args["examples"], to_s) + @xrai_attribution = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersXraiAttribution.new(args["xraiAttribution"], to_s) + @top_k = args["topK"] + @integrated_gradients_attribution = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttribution.new(args["integratedGradientsAttribution"], to_s) + @sampled_shapley_attribution = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersSampledShapleyAttribution.new(args["sampledShapleyAttribution"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples.rb index f5a8787a0..555ccff5c 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,9 +13,9 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets' +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets" module GoogleInSpec module VertexAI module Property @@ -31,10 +31,10 @@ class TrainingPipelineModelToUploadExplanationSpecParametersExamples def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @presets = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersExamplesPresets.new(args['presets'], to_s) - @neighbor_count = args['neighborCount'] - @example_gcs_source = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersExamplesExampleGcsSource.new(args['exampleGcsSource'], to_s) - @nearest_neighbor_search_config = args['nearestNeighborSearchConfig'] + @presets = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersExamplesPresets.new(args["presets"], to_s) + @neighbor_count = args["neighborCount"] + @example_gcs_source = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersExamplesExampleGcsSource.new(args["exampleGcsSource"], to_s) + @nearest_neighbor_search_config = args["nearestNeighborSearchConfig"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source.rb index 151690a05..d07f4ab6a 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source_gcs_source' +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source_gcs_source" module GoogleInSpec module VertexAI module Property @@ -25,8 +25,8 @@ class TrainingPipelineModelToUploadExplanationSpecParametersExamplesExampleGcsSo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @gcs_source = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersExamplesExampleGcsSourceGcsSource.new(args['gcsSource'], to_s) - @data_format = args['dataFormat'] + @gcs_source = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersExamplesExampleGcsSourceGcsSource.new(args["gcsSource"], to_s) + @data_format = args["dataFormat"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb index afe9fd6c5..21639febf 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source_gcs_source.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TrainingPipelineModelToUploadExplanationSpecParametersExamplesExampleGcsSo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @uris = args['uris'] + @uris = args["uris"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets.rb index ad3b08b58..ea1d276f1 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class TrainingPipelineModelToUploadExplanationSpecParametersExamplesPresets def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @modality = args['modality'] - @query = args['query'] + @modality = args["modality"] + @query = args["query"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution.rb index 451f4aa13..7e0015f1b 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -30,9 +30,9 @@ class TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsA def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @step_count = args['stepCount'] - @smooth_grad_config = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) - @blur_baseline_config = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) + @step_count = args["stepCount"] + @smooth_grad_config = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfig.new(args["smoothGradConfig"], to_s) + @blur_baseline_config = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionBlurBaselineConfig.new(args["blurBaselineConfig"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb index 41a21e785..8e86c3ad7 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsA def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_blur_sigma = args['maxBlurSigma'] + @max_blur_sigma = args["maxBlurSigma"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb index dc022b74b..b78ee2f04 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -28,9 +28,9 @@ class TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsA def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @feature_noise_sigma = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) - @noise_sigma = args['noiseSigma'] - @noisy_sample_count = args['noisySampleCount'] + @feature_noise_sigma = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigma.new(args["featureNoiseSigma"], to_s) + @noise_sigma = args["noiseSigma"] + @noisy_sample_count = args["noisySampleCount"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb index a6868829f..06dd970b0 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -23,7 +23,7 @@ class TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsA def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @noise_sigma = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) + @noise_sigma = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args["noiseSigma"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb index 0c65fc3d1..f8a49f284 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class TrainingPipelineModelToUploadExplanationSpecParametersIntegratedGradientsA def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @sigma = args['sigma'] + @name = args["name"] + @sigma = args["sigma"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_sampled_shapley_attribution.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_sampled_shapley_attribution.rb index 7421177e5..26ea98940 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_sampled_shapley_attribution.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_sampled_shapley_attribution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TrainingPipelineModelToUploadExplanationSpecParametersSampledShapleyAttrib def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @path_count = args['pathCount'] + @path_count = args["pathCount"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution.rb index 8659a6d26..1992c6940 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,10 +13,10 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -30,9 +30,9 @@ class TrainingPipelineModelToUploadExplanationSpecParametersXraiAttribution def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @smooth_grad_config = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoothGradConfig.new(args['smoothGradConfig'], to_s) - @step_count = args['stepCount'] - @blur_baseline_config = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionBlurBaselineConfig.new(args['blurBaselineConfig'], to_s) + @smooth_grad_config = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoothGradConfig.new(args["smoothGradConfig"], to_s) + @step_count = args["stepCount"] + @blur_baseline_config = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionBlurBaselineConfig.new(args["blurBaselineConfig"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb index 073cb121a..8a2383810 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_blur_baseline_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionBlurB def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @max_blur_sigma = args['maxBlurSigma'] + @max_blur_sigma = args["maxBlurSigma"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb index fcc5110cf..4ae8a8438 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,8 +13,8 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -28,9 +28,9 @@ class TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoot def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @feature_noise_sigma = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma.new(args['featureNoiseSigma'], to_s) - @noise_sigma = args['noiseSigma'] - @noisy_sample_count = args['noisySampleCount'] + @feature_noise_sigma = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigma.new(args["featureNoiseSigma"], to_s) + @noise_sigma = args["noiseSigma"] + @noisy_sample_count = args["noisySampleCount"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb index d5b334f1f..8b36d3042 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,7 +13,7 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" module GoogleInSpec module VertexAI module Property @@ -23,7 +23,7 @@ class TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoot def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @noise_sigma = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args['noiseSigma'], to_s) + @noise_sigma = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoothGradConfigFeatureNoiseSigmaNoiseSigmaArray.parse(args["noiseSigma"], to_s) end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb index 39c387a9c..9c061b3d0 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class TrainingPipelineModelToUploadExplanationSpecParametersXraiAttributionSmoot def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] - @sigma = args['sigma'] + @name = args["name"] + @sigma = args["sigma"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_labels.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_labels.rb index 2779b7062..249637537 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_labels.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_labels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TrainingPipelineModelToUploadLabels def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @additional_properties = args['additionalProperties'] + @additional_properties = args["additionalProperties"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_model_source_info.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_model_source_info.rb index 21781abfc..e7299adcd 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_model_source_info.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_model_source_info.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class TrainingPipelineModelToUploadModelSourceInfo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @copy = args['copy'] - @source_type = args['sourceType'] + @copy = args["copy"] + @source_type = args["sourceType"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_original_model_info.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_original_model_info.rb index 512d27db4..dc0c90742 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_original_model_info.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_original_model_info.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -22,7 +22,7 @@ class TrainingPipelineModelToUploadOriginalModelInfo def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @model = args['model'] + @model = args["model"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_predict_schemata.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_predict_schemata.rb index 1c04e89d0..a169e03f2 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_predict_schemata.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_predict_schemata.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -26,9 +26,9 @@ class TrainingPipelineModelToUploadPredictSchemata def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @instance_schema_uri = args['instanceSchemaUri'] - @parameters_schema_uri = args['parametersSchemaUri'] - @prediction_schema_uri = args['predictionSchemaUri'] + @instance_schema_uri = args["instanceSchemaUri"] + @parameters_schema_uri = args["parametersSchemaUri"] + @prediction_schema_uri = args["predictionSchemaUri"] end def to_s diff --git a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_supported_export_formats.rb b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_supported_export_formats.rb index 5ebdcad70..416200e59 100644 --- a/libraries/google/vertexai/property/trainingpipeline_model_to_upload_supported_export_formats.rb +++ b/libraries/google/vertexai/property/trainingpipeline_model_to_upload_supported_export_formats.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -24,8 +24,8 @@ class TrainingPipelineModelToUploadSupportedExportFormats def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @exportable_contents = args['exportableContents'] - @id = args['id'] + @exportable_contents = args["exportableContents"] + @id = args["id"] end def to_s diff --git a/libraries/google_access_context_manager_access_level.rb b/libraries/google_access_context_manager_access_level.rb index 12ca05447..a842aefb1 100644 --- a/libraries/google_access_context_manager_access_level.rb +++ b/libraries/google_access_context_manager_access_level.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,17 +13,17 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/accesscontextmanager/property/accesslevel_basic' -require 'google/accesscontextmanager/property/accesslevel_basic_conditions' -require 'google/accesscontextmanager/property/accesslevel_custom' -require 'google/accesscontextmanager/property/accesslevel_custom_expr' +require "gcp_backend" +require "google/accesscontextmanager/property/accesslevel_basic" +require "google/accesscontextmanager/property/accesslevel_basic_conditions" +require "google/accesscontextmanager/property/accesslevel_custom" +require "google/accesscontextmanager/property/accesslevel_custom_expr" # A provider to manage Access Context Manager (VPC Service Controls) resources. class AccessContextManagerAccessLevel < GcpResourceBase - name 'google_access_context_manager_access_level' - desc 'AccessLevel' - supports platform: 'gcp' + name "google_access_context_manager_access_level" + desc "AccessLevel" + supports platform: "gcp" attr_reader :params attr_reader :title @@ -36,17 +36,17 @@ class AccessContextManagerAccessLevel < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @title = @fetched['title'] - @description = @fetched['description'] - @basic = GoogleInSpec::AccessContextManager::Property::AccessLevelBasic.new(@fetched['basic'], to_s) - @custom = GoogleInSpec::AccessContextManager::Property::AccessLevelCustom.new(@fetched['custom'], to_s) - @parent = name_from_self_link(@fetched['parent']) - @name = name_from_self_link(@fetched['name']) + @title = @fetched["title"] + @description = @fetched["description"] + @basic = GoogleInSpec::AccessContextManager::Property::AccessLevelBasic.new(@fetched["basic"], to_s) + @custom = GoogleInSpec::AccessContextManager::Property::AccessLevelCustom.new(@fetched["custom"], to_s) + @parent = name_from_self_link(@fetched["parent"]) + @name = name_from_self_link(@fetched["name"]) end def exists? @@ -60,10 +60,10 @@ def to_s private def product_url(_ = nil) - 'https://accesscontextmanager.googleapis.com/v1/' + "https://accesscontextmanager.googleapis.com/v1/" end def resource_base_url - 'accessPolicies/{{parent}}/accessLevels/{{name}}' + "accessPolicies/{{parent}}/accessLevels/{{name}}" end end diff --git a/libraries/google_access_context_manager_access_levels.rb b/libraries/google_access_context_manager_access_levels.rb index f6c5d48f5..e28d2414e 100644 --- a/libraries/google_access_context_manager_access_levels.rb +++ b/libraries/google_access_context_manager_access_levels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class AccessContextManagerAccessLevels < GcpResourceBase - name 'google_access_context_manager_access_levels' - desc 'AccessLevel plural resource' - supports platform: 'gcp' + name "google_access_context_manager_access_levels" + desc "AccessLevel plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class AccessContextManagerAccessLevels < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('accessLevels') + @table = fetch_wrapped_resource("accessLevels") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,22 +68,22 @@ def transform(key, value) def transformers { - 'title' => ->(obj) { [:title, obj['title']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'basic' => ->(obj) { [:basic, GoogleInSpec::AccessContextManager::Property::AccessLevelBasic.new(obj['basic'], to_s)] }, - 'custom' => ->(obj) { [:custom, GoogleInSpec::AccessContextManager::Property::AccessLevelCustom.new(obj['custom'], to_s)] }, - 'parent' => ->(obj) { [:parent, name_from_self_link(obj['parent'])] }, - 'name' => ->(obj) { [:name, name_from_self_link(obj['name'])] }, + "title" => ->(obj) { [:title, obj["title"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "basic" => ->(obj) { [:basic, GoogleInSpec::AccessContextManager::Property::AccessLevelBasic.new(obj["basic"], to_s)] }, + "custom" => ->(obj) { [:custom, GoogleInSpec::AccessContextManager::Property::AccessLevelCustom.new(obj["custom"], to_s)] }, + "parent" => ->(obj) { [:parent, name_from_self_link(obj["parent"])] }, + "name" => ->(obj) { [:name, name_from_self_link(obj["name"])] }, } end private def product_url(_ = nil) - 'https://accesscontextmanager.googleapis.com/v1/' + "https://accesscontextmanager.googleapis.com/v1/" end def resource_base_url - 'accessPolicies/{{parent}}/accessLevels' + "accessPolicies/{{parent}}/accessLevels" end end diff --git a/libraries/google_access_context_manager_access_policies.rb b/libraries/google_access_context_manager_access_policies.rb index 004a13719..5786f75d9 100644 --- a/libraries/google_access_context_manager_access_policies.rb +++ b/libraries/google_access_context_manager_access_policies.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class AccessContextManagerAccessPolicys < GcpResourceBase - name 'google_access_context_manager_access_policies' - desc 'AccessPolicy plural resource' - supports platform: 'gcp' + name "google_access_context_manager_access_policies" + desc "AccessPolicy plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class AccessContextManagerAccessPolicys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('accessPolicies') + @table = fetch_wrapped_resource("accessPolicies") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, name_from_self_link(obj['name'])] }, - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'updateTime' => ->(obj) { [:update_time, parse_time_string(obj['updateTime'])] }, - 'parent' => ->(obj) { [:parent, obj['parent']] }, - 'title' => ->(obj) { [:title, obj['title']] }, + "name" => ->(obj) { [:name, name_from_self_link(obj["name"])] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "updateTime" => ->(obj) { [:update_time, parse_time_string(obj["updateTime"])] }, + "parent" => ->(obj) { [:parent, obj["parent"]] }, + "title" => ->(obj) { [:title, obj["title"]] }, } end @@ -83,10 +83,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://accesscontextmanager.googleapis.com/v1/' + "https://accesscontextmanager.googleapis.com/v1/" end def resource_base_url - 'accessPolicies?parent=organizations/{{org_id}}' + "accessPolicies?parent=organizations/{{org_id}}" end end diff --git a/libraries/google_access_context_manager_access_policy.rb b/libraries/google_access_context_manager_access_policy.rb index ffaeb954a..cb5e602f5 100644 --- a/libraries/google_access_context_manager_access_policy.rb +++ b/libraries/google_access_context_manager_access_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Access Context Manager (VPC Service Controls) resources. class AccessContextManagerAccessPolicy < GcpResourceBase - name 'google_access_context_manager_access_policy' - desc 'AccessPolicy' - supports platform: 'gcp' + name "google_access_context_manager_access_policy" + desc "AccessPolicy" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -31,16 +31,16 @@ class AccessContextManagerAccessPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = name_from_self_link(@fetched['name']) - @create_time = parse_time_string(@fetched['createTime']) - @update_time = parse_time_string(@fetched['updateTime']) - @parent = @fetched['parent'] - @title = @fetched['title'] + @name = name_from_self_link(@fetched["name"]) + @create_time = parse_time_string(@fetched["createTime"]) + @update_time = parse_time_string(@fetched["updateTime"]) + @parent = @fetched["parent"] + @title = @fetched["title"] end # Handles parsing RFC3339 time string @@ -59,10 +59,10 @@ def to_s private def product_url(_ = nil) - 'https://accesscontextmanager.googleapis.com/v1/' + "https://accesscontextmanager.googleapis.com/v1/" end def resource_base_url - 'accessPolicies/{{name}}' + "accessPolicies/{{name}}" end end diff --git a/libraries/google_access_context_manager_service_perimeter.rb b/libraries/google_access_context_manager_service_perimeter.rb index 09dfb76a2..938432f14 100644 --- a/libraries/google_access_context_manager_service_perimeter.rb +++ b/libraries/google_access_context_manager_service_perimeter.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,17 +13,17 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/accesscontextmanager/property/serviceperimeter_spec' -require 'google/accesscontextmanager/property/serviceperimeter_spec_vpc_accessible_services' -require 'google/accesscontextmanager/property/serviceperimeter_status' -require 'google/accesscontextmanager/property/serviceperimeter_status_vpc_accessible_services' +require "gcp_backend" +require "google/accesscontextmanager/property/serviceperimeter_spec" +require "google/accesscontextmanager/property/serviceperimeter_spec_vpc_accessible_services" +require "google/accesscontextmanager/property/serviceperimeter_status" +require "google/accesscontextmanager/property/serviceperimeter_status_vpc_accessible_services" # A provider to manage Access Context Manager (VPC Service Controls) resources. class AccessContextManagerServicePerimeter < GcpResourceBase - name 'google_access_context_manager_service_perimeter' - desc 'ServicePerimeter' - supports platform: 'gcp' + name "google_access_context_manager_service_perimeter" + desc "ServicePerimeter" + supports platform: "gcp" attr_reader :params attr_reader :title @@ -40,21 +40,21 @@ class AccessContextManagerServicePerimeter < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @title = @fetched['title'] - @description = @fetched['description'] - @create_time = parse_time_string(@fetched['createTime']) - @update_time = parse_time_string(@fetched['updateTime']) - @perimeter_type = @fetched['perimeterType'] - @status = GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatus.new(@fetched['status'], to_s) - @spec = GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpec.new(@fetched['spec'], to_s) - @use_explicit_dry_run_spec = @fetched['useExplicitDryRunSpec'] - @parent = @fetched['parent'] - @name = name_from_self_link(@fetched['name']) + @title = @fetched["title"] + @description = @fetched["description"] + @create_time = parse_time_string(@fetched["createTime"]) + @update_time = parse_time_string(@fetched["updateTime"]) + @perimeter_type = @fetched["perimeterType"] + @status = GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatus.new(@fetched["status"], to_s) + @spec = GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpec.new(@fetched["spec"], to_s) + @use_explicit_dry_run_spec = @fetched["useExplicitDryRunSpec"] + @parent = @fetched["parent"] + @name = name_from_self_link(@fetched["name"]) end # Handles parsing RFC3339 time string @@ -73,10 +73,10 @@ def to_s private def product_url(_ = nil) - 'https://accesscontextmanager.googleapis.com/v1/' + "https://accesscontextmanager.googleapis.com/v1/" end def resource_base_url - 'accessPolicies/{{policy_name}}/servicePerimeters/{{name}}' + "accessPolicies/{{policy_name}}/servicePerimeters/{{name}}" end end diff --git a/libraries/google_access_context_manager_service_perimeters.rb b/libraries/google_access_context_manager_service_perimeters.rb index be74aad2d..23fbdae4f 100644 --- a/libraries/google_access_context_manager_service_perimeters.rb +++ b/libraries/google_access_context_manager_service_perimeters.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class AccessContextManagerServicePerimeters < GcpResourceBase - name 'google_access_context_manager_service_perimeters' - desc 'ServicePerimeter plural resource' - supports platform: 'gcp' + name "google_access_context_manager_service_perimeters" + desc "ServicePerimeter plural resource" + supports platform: "gcp" attr_reader :table @@ -39,12 +39,12 @@ class AccessContextManagerServicePerimeters < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('servicePerimeters') + @table = fetch_wrapped_resource("servicePerimeters") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'title' => ->(obj) { [:title, obj['title']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'updateTime' => ->(obj) { [:update_time, parse_time_string(obj['updateTime'])] }, - 'perimeterType' => ->(obj) { [:perimeter_type, obj['perimeterType']] }, - 'status' => ->(obj) { [:status, GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatus.new(obj['status'], to_s)] }, - 'spec' => ->(obj) { [:spec, GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpec.new(obj['spec'], to_s)] }, - 'useExplicitDryRunSpec' => ->(obj) { [:use_explicit_dry_run_spec, obj['useExplicitDryRunSpec']] }, - 'parent' => ->(obj) { [:parent, obj['parent']] }, - 'name' => ->(obj) { [:name, name_from_self_link(obj['name'])] }, + "title" => ->(obj) { [:title, obj["title"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "updateTime" => ->(obj) { [:update_time, parse_time_string(obj["updateTime"])] }, + "perimeterType" => ->(obj) { [:perimeter_type, obj["perimeterType"]] }, + "status" => ->(obj) { [:status, GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatus.new(obj["status"], to_s)] }, + "spec" => ->(obj) { [:spec, GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpec.new(obj["spec"], to_s)] }, + "useExplicitDryRunSpec" => ->(obj) { [:use_explicit_dry_run_spec, obj["useExplicitDryRunSpec"]] }, + "parent" => ->(obj) { [:parent, obj["parent"]] }, + "name" => ->(obj) { [:name, name_from_self_link(obj["name"])] }, } end @@ -93,10 +93,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://accesscontextmanager.googleapis.com/v1/' + "https://accesscontextmanager.googleapis.com/v1/" end def resource_base_url - 'accessPolicies/{{policy_name}}/servicePerimeters' + "accessPolicies/{{policy_name}}/servicePerimeters" end end diff --git a/libraries/google_apigee_organization.rb b/libraries/google_apigee_organization.rb index b5862e4e1..7680bea8b 100644 --- a/libraries/google_apigee_organization.rb +++ b/libraries/google_apigee_organization.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,22 +13,22 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/apigee/property/organization_addons_config' -require 'google/apigee/property/organization_addons_config_advanced_api_ops_config' -require 'google/apigee/property/organization_addons_config_analytics_config' -require 'google/apigee/property/organization_addons_config_api_security_config' -require 'google/apigee/property/organization_addons_config_connectors_platform_config' -require 'google/apigee/property/organization_addons_config_integration_config' -require 'google/apigee/property/organization_addons_config_monetization_config' -require 'google/apigee/property/organization_properties' -require 'google/apigee/property/organization_properties_property' +require "gcp_backend" +require "google/apigee/property/organization_addons_config" +require "google/apigee/property/organization_addons_config_advanced_api_ops_config" +require "google/apigee/property/organization_addons_config_analytics_config" +require "google/apigee/property/organization_addons_config_api_security_config" +require "google/apigee/property/organization_addons_config_connectors_platform_config" +require "google/apigee/property/organization_addons_config_integration_config" +require "google/apigee/property/organization_addons_config_monetization_config" +require "google/apigee/property/organization_properties" +require "google/apigee/property/organization_properties_property" # A provider to manage Apigee resources. class ApigeeOrganization < GcpResourceBase - name 'google_apigee_organization' - desc 'Organization' - supports platform: 'gcp' + name "google_apigee_organization" + desc "Organization" + supports platform: "gcp" attr_reader :params attr_reader :api_consumer_data_encryption_key_name @@ -63,39 +63,39 @@ class ApigeeOrganization < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @api_consumer_data_encryption_key_name = @fetched['apiConsumerDataEncryptionKeyName'] - @runtime_database_encryption_key_name = @fetched['runtimeDatabaseEncryptionKeyName'] - @environments = @fetched['environments'] - @runtime_type = @fetched['runtimeType'] - @type = @fetched['type'] - @portal_disabled = @fetched['portalDisabled'] - @authorized_network = @fetched['authorizedNetwork'] - @project_id = @fetched['projectId'] - @description = @fetched['description'] - @ca_certificate = @fetched['caCertificate'] - @subscription_type = @fetched['subscriptionType'] - @addons_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfig.new(@fetched['addonsConfig'], to_s) - @customer_name = @fetched['customerName'] - @created_at = @fetched['createdAt'] - @last_modified_at = @fetched['lastModifiedAt'] - @subscription_plan = @fetched['subscriptionPlan'] - @properties = GoogleInSpec::Apigee::Property::OrganizationProperties.new(@fetched['properties'], to_s) - @state = @fetched['state'] - @name = @fetched['name'] - @disable_vpc_peering = @fetched['disableVpcPeering'] - @control_plane_encryption_key_name = @fetched['controlPlaneEncryptionKeyName'] - @analytics_region = @fetched['analyticsRegion'] - @api_consumer_data_location = @fetched['apiConsumerDataLocation'] - @display_name = @fetched['displayName'] - @apigee_project_id = @fetched['apigeeProjectId'] - @expires_at = @fetched['expiresAt'] - @attributes = @fetched['attributes'] - @billing_type = @fetched['billingType'] + @api_consumer_data_encryption_key_name = @fetched["apiConsumerDataEncryptionKeyName"] + @runtime_database_encryption_key_name = @fetched["runtimeDatabaseEncryptionKeyName"] + @environments = @fetched["environments"] + @runtime_type = @fetched["runtimeType"] + @type = @fetched["type"] + @portal_disabled = @fetched["portalDisabled"] + @authorized_network = @fetched["authorizedNetwork"] + @project_id = @fetched["projectId"] + @description = @fetched["description"] + @ca_certificate = @fetched["caCertificate"] + @subscription_type = @fetched["subscriptionType"] + @addons_config = GoogleInSpec::Apigee::Property::OrganizationAddonsConfig.new(@fetched["addonsConfig"], to_s) + @customer_name = @fetched["customerName"] + @created_at = @fetched["createdAt"] + @last_modified_at = @fetched["lastModifiedAt"] + @subscription_plan = @fetched["subscriptionPlan"] + @properties = GoogleInSpec::Apigee::Property::OrganizationProperties.new(@fetched["properties"], to_s) + @state = @fetched["state"] + @name = @fetched["name"] + @disable_vpc_peering = @fetched["disableVpcPeering"] + @control_plane_encryption_key_name = @fetched["controlPlaneEncryptionKeyName"] + @analytics_region = @fetched["analyticsRegion"] + @api_consumer_data_location = @fetched["apiConsumerDataLocation"] + @display_name = @fetched["displayName"] + @apigee_project_id = @fetched["apigeeProjectId"] + @expires_at = @fetched["expiresAt"] + @attributes = @fetched["attributes"] + @billing_type = @fetched["billingType"] end def exists? @@ -109,10 +109,10 @@ def to_s private def product_url(_ = nil) - 'https://apigee.googleapis.com/v1/' + "https://apigee.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_apigee_organization_envgroup.rb b/libraries/google_apigee_organization_envgroup.rb index 14daa871a..883629dc8 100644 --- a/libraries/google_apigee_organization_envgroup.rb +++ b/libraries/google_apigee_organization_envgroup.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Apigee resources. class ApigeeOrganizationEnvgroup < GcpResourceBase - name 'google_apigee_organization_envgroup' - desc 'OrganizationEnvgroup' - supports platform: 'gcp' + name "google_apigee_organization_envgroup" + desc "OrganizationEnvgroup" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -31,16 +31,16 @@ class ApigeeOrganizationEnvgroup < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @last_modified_at = @fetched['lastModifiedAt'] - @hostnames = @fetched['hostnames'] - @state = @fetched['state'] - @created_at = @fetched['createdAt'] + @name = @fetched["name"] + @last_modified_at = @fetched["lastModifiedAt"] + @hostnames = @fetched["hostnames"] + @state = @fetched["state"] + @created_at = @fetched["createdAt"] end def exists? @@ -54,10 +54,10 @@ def to_s private def product_url(_ = nil) - 'https://apigee.googleapis.com/v1/' + "https://apigee.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_apigee_organization_envgroup_attachment.rb b/libraries/google_apigee_organization_envgroup_attachment.rb index 705deb58f..8864a6860 100644 --- a/libraries/google_apigee_organization_envgroup_attachment.rb +++ b/libraries/google_apigee_organization_envgroup_attachment.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Apigee resources. class ApigeeOrganizationEnvgroupAttachment < GcpResourceBase - name 'google_apigee_organization_envgroup_attachment' - desc 'OrganizationEnvgroupAttachment' - supports platform: 'gcp' + name "google_apigee_organization_envgroup_attachment" + desc "OrganizationEnvgroupAttachment" + supports platform: "gcp" attr_reader :params attr_reader :created_at @@ -30,15 +30,15 @@ class ApigeeOrganizationEnvgroupAttachment < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @created_at = @fetched['createdAt'] - @environment = @fetched['environment'] - @environment_group_id = @fetched['environmentGroupId'] - @name = @fetched['name'] + @created_at = @fetched["createdAt"] + @environment = @fetched["environment"] + @environment_group_id = @fetched["environmentGroupId"] + @name = @fetched["name"] end def exists? @@ -52,10 +52,10 @@ def to_s private def product_url(_ = nil) - 'https://apigee.googleapis.com/v1/' + "https://apigee.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_apigee_organization_envgroup_attachments.rb b/libraries/google_apigee_organization_envgroup_attachments.rb index d61e48d26..650ecd3b0 100644 --- a/libraries/google_apigee_organization_envgroup_attachments.rb +++ b/libraries/google_apigee_organization_envgroup_attachments.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ApigeeOrganizationEnvgroupAttachments < GcpResourceBase - name 'google_apigee_organization_envgroup_attachments' - desc 'OrganizationEnvgroupAttachment plural resource' - supports platform: 'gcp' + name "google_apigee_organization_envgroup_attachments" + desc "OrganizationEnvgroupAttachment plural resource" + supports platform: "gcp" attr_reader :table @@ -33,12 +33,12 @@ class ApigeeOrganizationEnvgroupAttachments < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('environmentGroupAttachments') + @table = fetch_wrapped_resource("environmentGroupAttachments") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -66,20 +66,20 @@ def transform(key, value) def transformers { - 'createdAt' => ->(obj) { [:created_at, obj['createdAt']] }, - 'environment' => ->(obj) { [:environment, obj['environment']] }, - 'environmentGroupId' => ->(obj) { [:environment_group_id, obj['environmentGroupId']] }, - 'name' => ->(obj) { [:name, obj['name']] }, + "createdAt" => ->(obj) { [:created_at, obj["createdAt"]] }, + "environment" => ->(obj) { [:environment, obj["environment"]] }, + "environmentGroupId" => ->(obj) { [:environment_group_id, obj["environmentGroupId"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, } end private def product_url(_ = nil) - 'https://apigee.googleapis.com/v1/' + "https://apigee.googleapis.com/v1/" end def resource_base_url - '{{parent}}/attachments' + "{{parent}}/attachments" end end diff --git a/libraries/google_apigee_organization_envgroups.rb b/libraries/google_apigee_organization_envgroups.rb index 7cdefa5f4..d4ecf5df6 100644 --- a/libraries/google_apigee_organization_envgroups.rb +++ b/libraries/google_apigee_organization_envgroups.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ApigeeOrganizationEnvgroups < GcpResourceBase - name 'google_apigee_organization_envgroups' - desc 'OrganizationEnvgroup plural resource' - supports platform: 'gcp' + name "google_apigee_organization_envgroups" + desc "OrganizationEnvgroup plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class ApigeeOrganizationEnvgroups < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('environmentGroups') + @table = fetch_wrapped_resource("environmentGroups") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,21 +67,21 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'lastModifiedAt' => ->(obj) { [:last_modified_at, obj['lastModifiedAt']] }, - 'hostnames' => ->(obj) { [:hostnames, obj['hostnames']] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'createdAt' => ->(obj) { [:created_at, obj['createdAt']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "lastModifiedAt" => ->(obj) { [:last_modified_at, obj["lastModifiedAt"]] }, + "hostnames" => ->(obj) { [:hostnames, obj["hostnames"]] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "createdAt" => ->(obj) { [:created_at, obj["createdAt"]] }, } end private def product_url(_ = nil) - 'https://apigee.googleapis.com/v1/' + "https://apigee.googleapis.com/v1/" end def resource_base_url - '{{parent}}/envgroups' + "{{parent}}/envgroups" end end diff --git a/libraries/google_apigee_organizations.rb b/libraries/google_apigee_organizations.rb index 0d074793c..b8d752df1 100644 --- a/libraries/google_apigee_organizations.rb +++ b/libraries/google_apigee_organizations.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ApigeeOrganizations < GcpResourceBase - name 'google_apigee_organizations' - desc 'Organization plural resource' - supports platform: 'gcp' + name "google_apigee_organizations" + desc "Organization plural resource" + supports platform: "gcp" attr_reader :table @@ -57,12 +57,12 @@ class ApigeeOrganizations < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('organizations') + @table = fetch_wrapped_resource("organizations") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -90,44 +90,44 @@ def transform(key, value) def transformers { - 'apiConsumerDataEncryptionKeyName' => ->(obj) { [:api_consumer_data_encryption_key_name, obj['apiConsumerDataEncryptionKeyName']] }, - 'runtimeDatabaseEncryptionKeyName' => ->(obj) { [:runtime_database_encryption_key_name, obj['runtimeDatabaseEncryptionKeyName']] }, - 'environments' => ->(obj) { [:environments, obj['environments']] }, - 'runtimeType' => ->(obj) { [:runtime_type, obj['runtimeType']] }, - 'type' => ->(obj) { [:type, obj['type']] }, - 'portalDisabled' => ->(obj) { [:portal_disabled, obj['portalDisabled']] }, - 'authorizedNetwork' => ->(obj) { [:authorized_network, obj['authorizedNetwork']] }, - 'projectId' => ->(obj) { [:project_id, obj['projectId']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'caCertificate' => ->(obj) { [:ca_certificate, obj['caCertificate']] }, - 'subscriptionType' => ->(obj) { [:subscription_type, obj['subscriptionType']] }, - 'addonsConfig' => ->(obj) { [:addons_config, GoogleInSpec::Apigee::Property::OrganizationAddonsConfig.new(obj['addonsConfig'], to_s)] }, - 'customerName' => ->(obj) { [:customer_name, obj['customerName']] }, - 'createdAt' => ->(obj) { [:created_at, obj['createdAt']] }, - 'lastModifiedAt' => ->(obj) { [:last_modified_at, obj['lastModifiedAt']] }, - 'subscriptionPlan' => ->(obj) { [:subscription_plan, obj['subscriptionPlan']] }, - 'properties' => ->(obj) { [:properties, GoogleInSpec::Apigee::Property::OrganizationProperties.new(obj['properties'], to_s)] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'disableVpcPeering' => ->(obj) { [:disable_vpc_peering, obj['disableVpcPeering']] }, - 'controlPlaneEncryptionKeyName' => ->(obj) { [:control_plane_encryption_key_name, obj['controlPlaneEncryptionKeyName']] }, - 'analyticsRegion' => ->(obj) { [:analytics_region, obj['analyticsRegion']] }, - 'apiConsumerDataLocation' => ->(obj) { [:api_consumer_data_location, obj['apiConsumerDataLocation']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'apigeeProjectId' => ->(obj) { [:apigee_project_id, obj['apigeeProjectId']] }, - 'expiresAt' => ->(obj) { [:expires_at, obj['expiresAt']] }, - 'attributes' => ->(obj) { [:attributes, obj['attributes']] }, - 'billingType' => ->(obj) { [:billing_type, obj['billingType']] }, + "apiConsumerDataEncryptionKeyName" => ->(obj) { [:api_consumer_data_encryption_key_name, obj["apiConsumerDataEncryptionKeyName"]] }, + "runtimeDatabaseEncryptionKeyName" => ->(obj) { [:runtime_database_encryption_key_name, obj["runtimeDatabaseEncryptionKeyName"]] }, + "environments" => ->(obj) { [:environments, obj["environments"]] }, + "runtimeType" => ->(obj) { [:runtime_type, obj["runtimeType"]] }, + "type" => ->(obj) { [:type, obj["type"]] }, + "portalDisabled" => ->(obj) { [:portal_disabled, obj["portalDisabled"]] }, + "authorizedNetwork" => ->(obj) { [:authorized_network, obj["authorizedNetwork"]] }, + "projectId" => ->(obj) { [:project_id, obj["projectId"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "caCertificate" => ->(obj) { [:ca_certificate, obj["caCertificate"]] }, + "subscriptionType" => ->(obj) { [:subscription_type, obj["subscriptionType"]] }, + "addonsConfig" => ->(obj) { [:addons_config, GoogleInSpec::Apigee::Property::OrganizationAddonsConfig.new(obj["addonsConfig"], to_s)] }, + "customerName" => ->(obj) { [:customer_name, obj["customerName"]] }, + "createdAt" => ->(obj) { [:created_at, obj["createdAt"]] }, + "lastModifiedAt" => ->(obj) { [:last_modified_at, obj["lastModifiedAt"]] }, + "subscriptionPlan" => ->(obj) { [:subscription_plan, obj["subscriptionPlan"]] }, + "properties" => ->(obj) { [:properties, GoogleInSpec::Apigee::Property::OrganizationProperties.new(obj["properties"], to_s)] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "disableVpcPeering" => ->(obj) { [:disable_vpc_peering, obj["disableVpcPeering"]] }, + "controlPlaneEncryptionKeyName" => ->(obj) { [:control_plane_encryption_key_name, obj["controlPlaneEncryptionKeyName"]] }, + "analyticsRegion" => ->(obj) { [:analytics_region, obj["analyticsRegion"]] }, + "apiConsumerDataLocation" => ->(obj) { [:api_consumer_data_location, obj["apiConsumerDataLocation"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "apigeeProjectId" => ->(obj) { [:apigee_project_id, obj["apigeeProjectId"]] }, + "expiresAt" => ->(obj) { [:expires_at, obj["expiresAt"]] }, + "attributes" => ->(obj) { [:attributes, obj["attributes"]] }, + "billingType" => ->(obj) { [:billing_type, obj["billingType"]] }, } end private def product_url(_ = nil) - 'https://apigee.googleapis.com/v1/' + "https://apigee.googleapis.com/v1/" end def resource_base_url - '{{parent}}' + "{{parent}}" end end diff --git a/libraries/google_appengine_standard_app_version.rb b/libraries/google_appengine_standard_app_version.rb index 98469177f..1e8b8512f 100644 --- a/libraries/google_appengine_standard_app_version.rb +++ b/libraries/google_appengine_standard_app_version.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,18 +13,18 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/appengine/property/standardappversion_automatic_scaling' -require 'google/appengine/property/standardappversion_automatic_scaling_standard_scheduler_settings' -require 'google/appengine/property/standardappversion_basic_scaling' -require 'google/appengine/property/standardappversion_manual_scaling' -require 'google/appengine/property/standardappversion_vpc_access_connector' +require "gcp_backend" +require "google/appengine/property/standardappversion_automatic_scaling" +require "google/appengine/property/standardappversion_automatic_scaling_standard_scheduler_settings" +require "google/appengine/property/standardappversion_basic_scaling" +require "google/appengine/property/standardappversion_manual_scaling" +require "google/appengine/property/standardappversion_vpc_access_connector" # A provider to manage App Engine resources. class AppEngineStandardAppVersion < GcpResourceBase - name 'google_appengine_standard_app_version' - desc 'StandardAppVersion' - supports platform: 'gcp' + name "google_appengine_standard_app_version" + desc "StandardAppVersion" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -41,21 +41,21 @@ class AppEngineStandardAppVersion < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @version_id = @fetched['id'] - @runtime = @fetched['runtime'] - @threadsafe = @fetched['threadsafe'] - @vpc_access_connector = GoogleInSpec::AppEngine::Property::StandardAppVersionVPCAccessConnector.new(@fetched['vpcAccessConnector'], to_s) - @inbound_services = @fetched['inboundServices'] - @instance_class = @fetched['instanceClass'] - @automatic_scaling = GoogleInSpec::AppEngine::Property::StandardAppVersionAutomaticScaling.new(@fetched['automaticScaling'], to_s) - @basic_scaling = GoogleInSpec::AppEngine::Property::StandardAppVersionBasicScaling.new(@fetched['basicScaling'], to_s) - @manual_scaling = GoogleInSpec::AppEngine::Property::StandardAppVersionManualScaling.new(@fetched['manualScaling'], to_s) + @name = @fetched["name"] + @version_id = @fetched["id"] + @runtime = @fetched["runtime"] + @threadsafe = @fetched["threadsafe"] + @vpc_access_connector = GoogleInSpec::AppEngine::Property::StandardAppVersionVPCAccessConnector.new(@fetched["vpcAccessConnector"], to_s) + @inbound_services = @fetched["inboundServices"] + @instance_class = @fetched["instanceClass"] + @automatic_scaling = GoogleInSpec::AppEngine::Property::StandardAppVersionAutomaticScaling.new(@fetched["automaticScaling"], to_s) + @basic_scaling = GoogleInSpec::AppEngine::Property::StandardAppVersionBasicScaling.new(@fetched["basicScaling"], to_s) + @manual_scaling = GoogleInSpec::AppEngine::Property::StandardAppVersionManualScaling.new(@fetched["manualScaling"], to_s) end def exists? @@ -69,10 +69,10 @@ def to_s private def product_url(_ = nil) - 'https://appengine.googleapis.com/v1/' + "https://appengine.googleapis.com/v1/" end def resource_base_url - 'apps/{{project}}/services/{{service}}/versions/{{version_id}}?view=FULL' + "apps/{{project}}/services/{{service}}/versions/{{version_id}}?view=FULL" end end diff --git a/libraries/google_appengine_standard_app_versions.rb b/libraries/google_appengine_standard_app_versions.rb index 266366ae7..3d5ab7577 100644 --- a/libraries/google_appengine_standard_app_versions.rb +++ b/libraries/google_appengine_standard_app_versions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class AppEngineStandardAppVersions < GcpResourceBase - name 'google_appengine_standard_app_versions' - desc 'StandardAppVersion plural resource' - supports platform: 'gcp' + name "google_appengine_standard_app_versions" + desc "StandardAppVersion plural resource" + supports platform: "gcp" attr_reader :table @@ -39,12 +39,12 @@ class AppEngineStandardAppVersions < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('versions') + @table = fetch_wrapped_resource("versions") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -72,26 +72,26 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'id' => ->(obj) { [:version_id, obj['id']] }, - 'runtime' => ->(obj) { [:runtime, obj['runtime']] }, - 'threadsafe' => ->(obj) { [:threadsafe, obj['threadsafe']] }, - 'vpcAccessConnector' => ->(obj) { [:vpc_access_connector, GoogleInSpec::AppEngine::Property::StandardAppVersionVPCAccessConnector.new(obj['vpcAccessConnector'], to_s)] }, - 'inboundServices' => ->(obj) { [:inbound_services, obj['inboundServices']] }, - 'instanceClass' => ->(obj) { [:instance_class, obj['instanceClass']] }, - 'automaticScaling' => ->(obj) { [:automatic_scaling, GoogleInSpec::AppEngine::Property::StandardAppVersionAutomaticScaling.new(obj['automaticScaling'], to_s)] }, - 'basicScaling' => ->(obj) { [:basic_scaling, GoogleInSpec::AppEngine::Property::StandardAppVersionBasicScaling.new(obj['basicScaling'], to_s)] }, - 'manualScaling' => ->(obj) { [:manual_scaling, GoogleInSpec::AppEngine::Property::StandardAppVersionManualScaling.new(obj['manualScaling'], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "id" => ->(obj) { [:version_id, obj["id"]] }, + "runtime" => ->(obj) { [:runtime, obj["runtime"]] }, + "threadsafe" => ->(obj) { [:threadsafe, obj["threadsafe"]] }, + "vpcAccessConnector" => ->(obj) { [:vpc_access_connector, GoogleInSpec::AppEngine::Property::StandardAppVersionVPCAccessConnector.new(obj["vpcAccessConnector"], to_s)] }, + "inboundServices" => ->(obj) { [:inbound_services, obj["inboundServices"]] }, + "instanceClass" => ->(obj) { [:instance_class, obj["instanceClass"]] }, + "automaticScaling" => ->(obj) { [:automatic_scaling, GoogleInSpec::AppEngine::Property::StandardAppVersionAutomaticScaling.new(obj["automaticScaling"], to_s)] }, + "basicScaling" => ->(obj) { [:basic_scaling, GoogleInSpec::AppEngine::Property::StandardAppVersionBasicScaling.new(obj["basicScaling"], to_s)] }, + "manualScaling" => ->(obj) { [:manual_scaling, GoogleInSpec::AppEngine::Property::StandardAppVersionManualScaling.new(obj["manualScaling"], to_s)] }, } end private def product_url(_ = nil) - 'https://appengine.googleapis.com/v1/' + "https://appengine.googleapis.com/v1/" end def resource_base_url - 'apps/{{project}}/services/{{service}}/versions' + "apps/{{project}}/services/{{service}}/versions" end end diff --git a/libraries/google_artifactregistry_project_location_repositories.rb b/libraries/google_artifactregistry_project_location_repositories.rb index 80cdd679f..974f52e09 100644 --- a/libraries/google_artifactregistry_project_location_repositories.rb +++ b/libraries/google_artifactregistry_project_location_repositories.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ArtifactregistryProjectLocationRepositorys < GcpResourceBase - name 'google_artifactregistry_project_location_repositories' - desc 'ProjectLocationRepository plural resource' - supports platform: 'gcp' + name "google_artifactregistry_project_location_repositories" + desc "ProjectLocationRepository plural resource" + supports platform: "gcp" attr_reader :table @@ -45,12 +45,12 @@ class ArtifactregistryProjectLocationRepositorys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('repositories') + @table = fetch_wrapped_resource("repositories") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -78,32 +78,32 @@ def transform(key, value) def transformers { - 'mavenConfig' => ->(obj) { [:maven_config, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryMavenConfig.new(obj['mavenConfig'], to_s)] }, - 'dockerConfig' => ->(obj) { [:docker_config, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryDockerConfig.new(obj['dockerConfig'], to_s)] }, - 'virtualRepositoryConfig' => ->(obj) { [:virtual_repository_config, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryVirtualRepositoryConfig.new(obj['virtualRepositoryConfig'], to_s)] }, - 'remoteRepositoryConfig' => ->(obj) { [:remote_repository_config, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfig.new(obj['remoteRepositoryConfig'], to_s)] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'format' => ->(obj) { [:format, obj['format']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryLabels.new(obj['labels'], to_s)] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'kmsKeyName' => ->(obj) { [:kms_key_name, obj['kmsKeyName']] }, - 'mode' => ->(obj) { [:mode, obj['mode']] }, - 'cleanupPolicies' => ->(obj) { [:cleanup_policies, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryCleanupPolicies.new(obj['cleanupPolicies'], to_s)] }, - 'sizeBytes' => ->(obj) { [:size_bytes, obj['sizeBytes']] }, - 'satisfiesPzs' => ->(obj) { [:satisfies_pzs, obj['satisfiesPzs']] }, - 'cleanupPolicyDryRun' => ->(obj) { [:cleanup_policy_dry_run, obj['cleanupPolicyDryRun']] }, + "mavenConfig" => ->(obj) { [:maven_config, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryMavenConfig.new(obj["mavenConfig"], to_s)] }, + "dockerConfig" => ->(obj) { [:docker_config, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryDockerConfig.new(obj["dockerConfig"], to_s)] }, + "virtualRepositoryConfig" => ->(obj) { [:virtual_repository_config, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryVirtualRepositoryConfig.new(obj["virtualRepositoryConfig"], to_s)] }, + "remoteRepositoryConfig" => ->(obj) { [:remote_repository_config, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfig.new(obj["remoteRepositoryConfig"], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "format" => ->(obj) { [:format, obj["format"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryLabels.new(obj["labels"], to_s)] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "kmsKeyName" => ->(obj) { [:kms_key_name, obj["kmsKeyName"]] }, + "mode" => ->(obj) { [:mode, obj["mode"]] }, + "cleanupPolicies" => ->(obj) { [:cleanup_policies, GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryCleanupPolicies.new(obj["cleanupPolicies"], to_s)] }, + "sizeBytes" => ->(obj) { [:size_bytes, obj["sizeBytes"]] }, + "satisfiesPzs" => ->(obj) { [:satisfies_pzs, obj["satisfiesPzs"]] }, + "cleanupPolicyDryRun" => ->(obj) { [:cleanup_policy_dry_run, obj["cleanupPolicyDryRun"]] }, } end private def product_url(_ = nil) - 'https://artifactregistry.googleapis.com/v1beta1/' + "https://artifactregistry.googleapis.com/v1beta1/" end def resource_base_url - '{{parent}}/repositories' + "{{parent}}/repositories" end end diff --git a/libraries/google_artifactregistry_project_location_repository.rb b/libraries/google_artifactregistry_project_location_repository.rb index cff85e08d..d74fb574c 100644 --- a/libraries/google_artifactregistry_project_location_repository.rb +++ b/libraries/google_artifactregistry_project_location_repository.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,30 +13,30 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/artifactregistry/property/projectlocationrepository_cleanup_policies' -require 'google/artifactregistry/property/projectlocationrepository_docker_config' -require 'google/artifactregistry/property/projectlocationrepository_labels' -require 'google/artifactregistry/property/projectlocationrepository_maven_config' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_docker_repository' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_maven_repository' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_npm_repository' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_python_repository' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials_username_password_credentials' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository' -require 'google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository' -require 'google/artifactregistry/property/projectlocationrepository_virtual_repository_config' -require 'google/artifactregistry/property/projectlocationrepository_virtual_repository_config_upstream_policies' +require "gcp_backend" +require "google/artifactregistry/property/projectlocationrepository_cleanup_policies" +require "google/artifactregistry/property/projectlocationrepository_docker_config" +require "google/artifactregistry/property/projectlocationrepository_labels" +require "google/artifactregistry/property/projectlocationrepository_maven_config" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_apt_repository_public_repository" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_docker_repository" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_maven_repository" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_npm_repository" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_python_repository" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_upstream_credentials_username_password_credentials" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository" +require "google/artifactregistry/property/projectlocationrepository_remote_repository_config_yum_repository_public_repository" +require "google/artifactregistry/property/projectlocationrepository_virtual_repository_config" +require "google/artifactregistry/property/projectlocationrepository_virtual_repository_config_upstream_policies" # A provider to manage Artifact Registry resources. class ArtifactregistryProjectLocationRepository < GcpResourceBase - name 'google_artifactregistry_project_location_repository' - desc 'ProjectLocationRepository' - supports platform: 'gcp' + name "google_artifactregistry_project_location_repository" + desc "ProjectLocationRepository" + supports platform: "gcp" attr_reader :params attr_reader :maven_config @@ -59,27 +59,27 @@ class ArtifactregistryProjectLocationRepository < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @maven_config = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryMavenConfig.new(@fetched['mavenConfig'], to_s) - @docker_config = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryDockerConfig.new(@fetched['dockerConfig'], to_s) - @virtual_repository_config = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryVirtualRepositoryConfig.new(@fetched['virtualRepositoryConfig'], to_s) - @remote_repository_config = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfig.new(@fetched['remoteRepositoryConfig'], to_s) - @name = @fetched['name'] - @format = @fetched['format'] - @description = @fetched['description'] - @labels = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryLabels.new(@fetched['labels'], to_s) - @create_time = @fetched['createTime'] - @update_time = @fetched['updateTime'] - @kms_key_name = @fetched['kmsKeyName'] - @mode = @fetched['mode'] - @cleanup_policies = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryCleanupPolicies.new(@fetched['cleanupPolicies'], to_s) - @size_bytes = @fetched['sizeBytes'] - @satisfies_pzs = @fetched['satisfiesPzs'] - @cleanup_policy_dry_run = @fetched['cleanupPolicyDryRun'] + @maven_config = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryMavenConfig.new(@fetched["mavenConfig"], to_s) + @docker_config = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryDockerConfig.new(@fetched["dockerConfig"], to_s) + @virtual_repository_config = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryVirtualRepositoryConfig.new(@fetched["virtualRepositoryConfig"], to_s) + @remote_repository_config = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryRemoteRepositoryConfig.new(@fetched["remoteRepositoryConfig"], to_s) + @name = @fetched["name"] + @format = @fetched["format"] + @description = @fetched["description"] + @labels = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryLabels.new(@fetched["labels"], to_s) + @create_time = @fetched["createTime"] + @update_time = @fetched["updateTime"] + @kms_key_name = @fetched["kmsKeyName"] + @mode = @fetched["mode"] + @cleanup_policies = GoogleInSpec::Artifactregistry::Property::ProjectLocationRepositoryCleanupPolicies.new(@fetched["cleanupPolicies"], to_s) + @size_bytes = @fetched["sizeBytes"] + @satisfies_pzs = @fetched["satisfiesPzs"] + @cleanup_policy_dry_run = @fetched["cleanupPolicyDryRun"] end def exists? @@ -93,10 +93,10 @@ def to_s private def product_url(_ = nil) - 'https://artifactregistry.googleapis.com/v1beta1/' + "https://artifactregistry.googleapis.com/v1beta1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_bigquery_dataset.rb b/libraries/google_bigquery_dataset.rb index a29fcef86..d6b28256b 100644 --- a/libraries/google_bigquery_dataset.rb +++ b/libraries/google_bigquery_dataset.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/bigquery/property/dataset_access' -require 'google/bigquery/property/dataset_dataset_reference' -require 'google/bigquery/property/dataset_default_encryption_configuration' +require "gcp_backend" +require "google/bigquery/property/dataset_access" +require "google/bigquery/property/dataset_dataset_reference" +require "google/bigquery/property/dataset_default_encryption_configuration" # A provider to manage BigQuery resources. class BigQueryDataset < GcpResourceBase - name 'google_bigquery_dataset' - desc 'Dataset' - supports platform: 'gcp' + name "google_bigquery_dataset" + desc "Dataset" + supports platform: "gcp" attr_reader :params attr_reader :access @@ -42,24 +42,24 @@ class BigQueryDataset < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @access = GoogleInSpec::BigQuery::Property::DatasetAccessArray.parse(@fetched['access'], to_s) - @creation_time = @fetched['creationTime'] - @dataset_reference = GoogleInSpec::BigQuery::Property::DatasetDatasetReference.new(@fetched['datasetReference'], to_s) - @default_table_expiration_ms = @fetched['defaultTableExpirationMs'] - @default_partition_expiration_ms = @fetched['defaultPartitionExpirationMs'] - @description = @fetched['description'] - @etag = @fetched['etag'] - @friendly_name = @fetched['friendlyName'] - @id = @fetched['id'] - @labels = @fetched['labels'] - @last_modified_time = @fetched['lastModifiedTime'] - @location = @fetched['location'] - @default_encryption_configuration = GoogleInSpec::BigQuery::Property::DatasetDefaultEncryptionConfiguration.new(@fetched['defaultEncryptionConfiguration'], to_s) + @access = GoogleInSpec::BigQuery::Property::DatasetAccessArray.parse(@fetched["access"], to_s) + @creation_time = @fetched["creationTime"] + @dataset_reference = GoogleInSpec::BigQuery::Property::DatasetDatasetReference.new(@fetched["datasetReference"], to_s) + @default_table_expiration_ms = @fetched["defaultTableExpirationMs"] + @default_partition_expiration_ms = @fetched["defaultPartitionExpirationMs"] + @description = @fetched["description"] + @etag = @fetched["etag"] + @friendly_name = @fetched["friendlyName"] + @id = @fetched["id"] + @labels = @fetched["labels"] + @last_modified_time = @fetched["lastModifiedTime"] + @location = @fetched["location"] + @default_encryption_configuration = GoogleInSpec::BigQuery::Property::DatasetDefaultEncryptionConfiguration.new(@fetched["defaultEncryptionConfiguration"], to_s) end def exists? @@ -77,10 +77,10 @@ def name private def product_url(_ = nil) - 'https://bigquery.googleapis.com/bigquery/v2/' + "https://bigquery.googleapis.com/bigquery/v2/" end def resource_base_url - 'projects/{{project}}/datasets/{{name}}' + "projects/{{project}}/datasets/{{name}}" end end diff --git a/libraries/google_bigquery_datasets.rb b/libraries/google_bigquery_datasets.rb index 9e8852ff3..a30ee5457 100644 --- a/libraries/google_bigquery_datasets.rb +++ b/libraries/google_bigquery_datasets.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class BigQueryDatasets < GcpResourceBase - name 'google_bigquery_datasets' - desc 'Dataset plural resource' - supports platform: 'gcp' + name "google_bigquery_datasets" + desc "Dataset plural resource" + supports platform: "gcp" attr_reader :table @@ -37,12 +37,12 @@ class BigQueryDatasets < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('datasets') + @table = fetch_wrapped_resource("datasets") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -70,24 +70,24 @@ def transform(key, value) def transformers { - 'datasetReference' => ->(obj) { [:dataset_reference, GoogleInSpec::BigQuery::Property::DatasetDatasetReference.new(obj['datasetReference'], to_s)] }, - 'defaultPartitionExpirationMs' => ->(obj) { [:default_partition_expiration_ms, obj['defaultPartitionExpirationMs']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'friendlyName' => ->(obj) { [:friendly_name, obj['friendlyName']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'location' => ->(obj) { [:location, obj['location']] }, - 'defaultEncryptionConfiguration' => ->(obj) { [:default_encryption_configuration, GoogleInSpec::BigQuery::Property::DatasetDefaultEncryptionConfiguration.new(obj['defaultEncryptionConfiguration'], to_s)] }, + "datasetReference" => ->(obj) { [:dataset_reference, GoogleInSpec::BigQuery::Property::DatasetDatasetReference.new(obj["datasetReference"], to_s)] }, + "defaultPartitionExpirationMs" => ->(obj) { [:default_partition_expiration_ms, obj["defaultPartitionExpirationMs"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "friendlyName" => ->(obj) { [:friendly_name, obj["friendlyName"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "location" => ->(obj) { [:location, obj["location"]] }, + "defaultEncryptionConfiguration" => ->(obj) { [:default_encryption_configuration, GoogleInSpec::BigQuery::Property::DatasetDefaultEncryptionConfiguration.new(obj["defaultEncryptionConfiguration"], to_s)] }, } end private def product_url(_ = nil) - 'https://bigquery.googleapis.com/bigquery/v2/' + "https://bigquery.googleapis.com/bigquery/v2/" end def resource_base_url - 'projects/{{project}}/datasets' + "projects/{{project}}/datasets" end end diff --git a/libraries/google_bigquery_table.rb b/libraries/google_bigquery_table.rb index 85d5a13bb..5d730185c 100644 --- a/libraries/google_bigquery_table.rb +++ b/libraries/google_bigquery_table.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,28 +13,28 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/bigquery/property/table_encryption_configuration' -require 'google/bigquery/property/table_external_data_configuration' -require 'google/bigquery/property/table_external_data_configuration_bigtable_options' -require 'google/bigquery/property/table_external_data_configuration_bigtable_options_column_families' -require 'google/bigquery/property/table_external_data_configuration_csv_options' -require 'google/bigquery/property/table_external_data_configuration_google_sheets_options' -require 'google/bigquery/property/table_external_data_configuration_schema' -require 'google/bigquery/property/table_external_data_configuration_schema_fields' -require 'google/bigquery/property/table_schema' -require 'google/bigquery/property/table_schema_fields' -require 'google/bigquery/property/table_streaming_buffer' -require 'google/bigquery/property/table_table_reference' -require 'google/bigquery/property/table_time_partitioning' -require 'google/bigquery/property/table_view' -require 'google/bigquery/property/table_view_user_defined_function_resources' +require "gcp_backend" +require "google/bigquery/property/table_encryption_configuration" +require "google/bigquery/property/table_external_data_configuration" +require "google/bigquery/property/table_external_data_configuration_bigtable_options" +require "google/bigquery/property/table_external_data_configuration_bigtable_options_column_families" +require "google/bigquery/property/table_external_data_configuration_csv_options" +require "google/bigquery/property/table_external_data_configuration_google_sheets_options" +require "google/bigquery/property/table_external_data_configuration_schema" +require "google/bigquery/property/table_external_data_configuration_schema_fields" +require "google/bigquery/property/table_schema" +require "google/bigquery/property/table_schema_fields" +require "google/bigquery/property/table_streaming_buffer" +require "google/bigquery/property/table_table_reference" +require "google/bigquery/property/table_time_partitioning" +require "google/bigquery/property/table_view" +require "google/bigquery/property/table_view_user_defined_function_resources" # A provider to manage BigQuery resources. class BigQueryTable < GcpResourceBase - name 'google_bigquery_table' - desc 'Table' - supports platform: 'gcp' + name "google_bigquery_table" + desc "Table" + supports platform: "gcp" attr_reader :params attr_reader :table_reference @@ -64,34 +64,34 @@ class BigQueryTable < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @table_reference = GoogleInSpec::BigQuery::Property::TableTableReference.new(@fetched['tableReference'], to_s) - @clustering = @fetched['clustering'] - @creation_time = @fetched['creationTime'] - @description = @fetched['description'] - @friendly_name = @fetched['friendlyName'] - @id = @fetched['id'] - @labels = @fetched['labels'] - @last_modified_time = @fetched['lastModifiedTime'] - @location = @fetched['location'] - @name = @fetched['name'] - @num_bytes = @fetched['numBytes'] - @num_long_term_bytes = @fetched['numLongTermBytes'] - @num_rows = @fetched['numRows'] - @require_partition_filter = @fetched['requirePartitionFilter'] - @type = @fetched['type'] - @view = GoogleInSpec::BigQuery::Property::TableView.new(@fetched['view'], to_s) - @time_partitioning = GoogleInSpec::BigQuery::Property::TableTimePartitioning.new(@fetched['timePartitioning'], to_s) - @streaming_buffer = GoogleInSpec::BigQuery::Property::TableStreamingBuffer.new(@fetched['streamingBuffer'], to_s) - @schema = GoogleInSpec::BigQuery::Property::TableSchema.new(@fetched['schema'], to_s) - @encryption_configuration = GoogleInSpec::BigQuery::Property::TableEncryptionConfiguration.new(@fetched['encryptionConfiguration'], to_s) - @expiration_time = @fetched['expirationTime'] - @external_data_configuration = GoogleInSpec::BigQuery::Property::TableExternalDataConfiguration.new(@fetched['externalDataConfiguration'], to_s) - @dataset = @fetched['dataset'] + @table_reference = GoogleInSpec::BigQuery::Property::TableTableReference.new(@fetched["tableReference"], to_s) + @clustering = @fetched["clustering"] + @creation_time = @fetched["creationTime"] + @description = @fetched["description"] + @friendly_name = @fetched["friendlyName"] + @id = @fetched["id"] + @labels = @fetched["labels"] + @last_modified_time = @fetched["lastModifiedTime"] + @location = @fetched["location"] + @name = @fetched["name"] + @num_bytes = @fetched["numBytes"] + @num_long_term_bytes = @fetched["numLongTermBytes"] + @num_rows = @fetched["numRows"] + @require_partition_filter = @fetched["requirePartitionFilter"] + @type = @fetched["type"] + @view = GoogleInSpec::BigQuery::Property::TableView.new(@fetched["view"], to_s) + @time_partitioning = GoogleInSpec::BigQuery::Property::TableTimePartitioning.new(@fetched["timePartitioning"], to_s) + @streaming_buffer = GoogleInSpec::BigQuery::Property::TableStreamingBuffer.new(@fetched["streamingBuffer"], to_s) + @schema = GoogleInSpec::BigQuery::Property::TableSchema.new(@fetched["schema"], to_s) + @encryption_configuration = GoogleInSpec::BigQuery::Property::TableEncryptionConfiguration.new(@fetched["encryptionConfiguration"], to_s) + @expiration_time = @fetched["expirationTime"] + @external_data_configuration = GoogleInSpec::BigQuery::Property::TableExternalDataConfiguration.new(@fetched["externalDataConfiguration"], to_s) + @dataset = @fetched["dataset"] end def exists? @@ -105,10 +105,10 @@ def to_s private def product_url(_ = nil) - 'https://bigquery.googleapis.com/bigquery/v2/' + "https://bigquery.googleapis.com/bigquery/v2/" end def resource_base_url - 'projects/{{project}}/datasets/{{dataset}}/tables/{{name}}' + "projects/{{project}}/datasets/{{dataset}}/tables/{{name}}" end end diff --git a/libraries/google_bigquery_tables.rb b/libraries/google_bigquery_tables.rb index 63a2b706e..da55dfec7 100644 --- a/libraries/google_bigquery_tables.rb +++ b/libraries/google_bigquery_tables.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class BigQueryTables < GcpResourceBase - name 'google_bigquery_tables' - desc 'Table plural resource' - supports platform: 'gcp' + name "google_bigquery_tables" + desc "Table plural resource" + supports platform: "gcp" attr_reader :table @@ -50,12 +50,12 @@ class BigQueryTables < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('tables') + @table = fetch_wrapped_resource("tables") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -83,37 +83,37 @@ def transform(key, value) def transformers { - 'tableReference' => ->(obj) { [:table_reference, GoogleInSpec::BigQuery::Property::TableTableReference.new(obj['tableReference'], to_s)] }, - 'clustering' => ->(obj) { [:clustering, obj['clustering']] }, - 'creationTime' => ->(obj) { [:creation_time, obj['creationTime']] }, - 'friendlyName' => ->(obj) { [:friendly_name, obj['friendlyName']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'lastModifiedTime' => ->(obj) { [:last_modified_time, obj['lastModifiedTime']] }, - 'location' => ->(obj) { [:location, obj['location']] }, - 'numBytes' => ->(obj) { [:num_bytes, obj['numBytes']] }, - 'numLongTermBytes' => ->(obj) { [:num_long_term_bytes, obj['numLongTermBytes']] }, - 'numRows' => ->(obj) { [:num_rows, obj['numRows']] }, - 'requirePartitionFilter' => ->(obj) { [:require_partition_filter, obj['requirePartitionFilter']] }, - 'type' => ->(obj) { [:type, obj['type']] }, - 'view' => ->(obj) { [:view, GoogleInSpec::BigQuery::Property::TableView.new(obj['view'], to_s)] }, - 'timePartitioning' => ->(obj) { [:time_partitioning, GoogleInSpec::BigQuery::Property::TableTimePartitioning.new(obj['timePartitioning'], to_s)] }, - 'streamingBuffer' => ->(obj) { [:streaming_buffer, GoogleInSpec::BigQuery::Property::TableStreamingBuffer.new(obj['streamingBuffer'], to_s)] }, - 'schema' => ->(obj) { [:schema, GoogleInSpec::BigQuery::Property::TableSchema.new(obj['schema'], to_s)] }, - 'encryptionConfiguration' => ->(obj) { [:encryption_configuration, GoogleInSpec::BigQuery::Property::TableEncryptionConfiguration.new(obj['encryptionConfiguration'], to_s)] }, - 'expirationTime' => ->(obj) { [:expiration_time, obj['expirationTime']] }, - 'externalDataConfiguration' => ->(obj) { [:external_data_configuration, GoogleInSpec::BigQuery::Property::TableExternalDataConfiguration.new(obj['externalDataConfiguration'], to_s)] }, - 'dataset' => ->(obj) { [:dataset, obj['dataset']] }, + "tableReference" => ->(obj) { [:table_reference, GoogleInSpec::BigQuery::Property::TableTableReference.new(obj["tableReference"], to_s)] }, + "clustering" => ->(obj) { [:clustering, obj["clustering"]] }, + "creationTime" => ->(obj) { [:creation_time, obj["creationTime"]] }, + "friendlyName" => ->(obj) { [:friendly_name, obj["friendlyName"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "lastModifiedTime" => ->(obj) { [:last_modified_time, obj["lastModifiedTime"]] }, + "location" => ->(obj) { [:location, obj["location"]] }, + "numBytes" => ->(obj) { [:num_bytes, obj["numBytes"]] }, + "numLongTermBytes" => ->(obj) { [:num_long_term_bytes, obj["numLongTermBytes"]] }, + "numRows" => ->(obj) { [:num_rows, obj["numRows"]] }, + "requirePartitionFilter" => ->(obj) { [:require_partition_filter, obj["requirePartitionFilter"]] }, + "type" => ->(obj) { [:type, obj["type"]] }, + "view" => ->(obj) { [:view, GoogleInSpec::BigQuery::Property::TableView.new(obj["view"], to_s)] }, + "timePartitioning" => ->(obj) { [:time_partitioning, GoogleInSpec::BigQuery::Property::TableTimePartitioning.new(obj["timePartitioning"], to_s)] }, + "streamingBuffer" => ->(obj) { [:streaming_buffer, GoogleInSpec::BigQuery::Property::TableStreamingBuffer.new(obj["streamingBuffer"], to_s)] }, + "schema" => ->(obj) { [:schema, GoogleInSpec::BigQuery::Property::TableSchema.new(obj["schema"], to_s)] }, + "encryptionConfiguration" => ->(obj) { [:encryption_configuration, GoogleInSpec::BigQuery::Property::TableEncryptionConfiguration.new(obj["encryptionConfiguration"], to_s)] }, + "expirationTime" => ->(obj) { [:expiration_time, obj["expirationTime"]] }, + "externalDataConfiguration" => ->(obj) { [:external_data_configuration, GoogleInSpec::BigQuery::Property::TableExternalDataConfiguration.new(obj["externalDataConfiguration"], to_s)] }, + "dataset" => ->(obj) { [:dataset, obj["dataset"]] }, } end private def product_url(_ = nil) - 'https://bigquery.googleapis.com/bigquery/v2/' + "https://bigquery.googleapis.com/bigquery/v2/" end def resource_base_url - 'projects/{{project}}/datasets/{{dataset}}/tables' + "projects/{{project}}/datasets/{{dataset}}/tables" end end diff --git a/libraries/google_billing_project_billing_info.rb b/libraries/google_billing_project_billing_info.rb index 1fa539644..9536ed31a 100644 --- a/libraries/google_billing_project_billing_info.rb +++ b/libraries/google_billing_project_billing_info.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud Billing resources. class BillingProjectBillingInfo < GcpResourceBase - name 'google_billing_project_billing_info' - desc 'ProjectBillingInfo' - supports platform: 'gcp' + name "google_billing_project_billing_info" + desc "ProjectBillingInfo" + supports platform: "gcp" attr_reader :params attr_reader :project_id @@ -29,14 +29,14 @@ class BillingProjectBillingInfo < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @project_id = @fetched['projectId'] - @billing_account_name = @fetched['billingAccountName'] - @billing_enabled = @fetched['billingEnabled'] + @project_id = @fetched["projectId"] + @billing_account_name = @fetched["billingAccountName"] + @billing_enabled = @fetched["billingEnabled"] end def exists? @@ -50,10 +50,10 @@ def to_s private def product_url(_ = nil) - 'https://cloudbilling.googleapis.com/v1/' + "https://cloudbilling.googleapis.com/v1/" end def resource_base_url - 'projects/{{project_id}}/billingInfo' + "projects/{{project_id}}/billingInfo" end end diff --git a/libraries/google_cloud_scheduler_job.rb b/libraries/google_cloud_scheduler_job.rb index dc29f1b20..0658d78f0 100644 --- a/libraries/google_cloud_scheduler_job.rb +++ b/libraries/google_cloud_scheduler_job.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,20 +13,20 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/cloudscheduler/property/job_app_engine_http_target' -require 'google/cloudscheduler/property/job_app_engine_http_target_app_engine_routing' -require 'google/cloudscheduler/property/job_http_target' -require 'google/cloudscheduler/property/job_http_target_oauth_token' -require 'google/cloudscheduler/property/job_http_target_oidc_token' -require 'google/cloudscheduler/property/job_pubsub_target' -require 'google/cloudscheduler/property/job_retry_config' +require "gcp_backend" +require "google/cloudscheduler/property/job_app_engine_http_target" +require "google/cloudscheduler/property/job_app_engine_http_target_app_engine_routing" +require "google/cloudscheduler/property/job_http_target" +require "google/cloudscheduler/property/job_http_target_oauth_token" +require "google/cloudscheduler/property/job_http_target_oidc_token" +require "google/cloudscheduler/property/job_pubsub_target" +require "google/cloudscheduler/property/job_retry_config" # A provider to manage Cloud Scheduler resources. class CloudSchedulerJob < GcpResourceBase - name 'google_cloud_scheduler_job' - desc 'Job' - supports platform: 'gcp' + name "google_cloud_scheduler_job" + desc "Job" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -44,22 +44,22 @@ class CloudSchedulerJob < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @description = @fetched['description'] - @schedule = @fetched['schedule'] - @time_zone = @fetched['timeZone'] - @state = @fetched['state'] - @attempt_deadline = @fetched['attemptDeadline'] - @retry_config = GoogleInSpec::CloudScheduler::Property::JobRetryConfig.new(@fetched['retryConfig'], to_s) - @pubsub_target = GoogleInSpec::CloudScheduler::Property::JobPubsubTarget.new(@fetched['pubsubTarget'], to_s) - @app_engine_http_target = GoogleInSpec::CloudScheduler::Property::JobAppEngineHttpTarget.new(@fetched['appEngineHttpTarget'], to_s) - @http_target = GoogleInSpec::CloudScheduler::Property::JobHttpTarget.new(@fetched['httpTarget'], to_s) - @region = @fetched['region'] + @name = @fetched["name"] + @description = @fetched["description"] + @schedule = @fetched["schedule"] + @time_zone = @fetched["timeZone"] + @state = @fetched["state"] + @attempt_deadline = @fetched["attemptDeadline"] + @retry_config = GoogleInSpec::CloudScheduler::Property::JobRetryConfig.new(@fetched["retryConfig"], to_s) + @pubsub_target = GoogleInSpec::CloudScheduler::Property::JobPubsubTarget.new(@fetched["pubsubTarget"], to_s) + @app_engine_http_target = GoogleInSpec::CloudScheduler::Property::JobAppEngineHttpTarget.new(@fetched["appEngineHttpTarget"], to_s) + @http_target = GoogleInSpec::CloudScheduler::Property::JobHttpTarget.new(@fetched["httpTarget"], to_s) + @region = @fetched["region"] end def exists? @@ -73,10 +73,10 @@ def to_s private def product_url(_ = nil) - 'https://cloudscheduler.googleapis.com/v1/' + "https://cloudscheduler.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{region}}/jobs/{{name}}' + "projects/{{project}}/locations/{{region}}/jobs/{{name}}" end end diff --git a/libraries/google_cloud_scheduler_jobs.rb b/libraries/google_cloud_scheduler_jobs.rb index d1759c31d..e36c98c73 100644 --- a/libraries/google_cloud_scheduler_jobs.rb +++ b/libraries/google_cloud_scheduler_jobs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class CloudSchedulerJobs < GcpResourceBase - name 'google_cloud_scheduler_jobs' - desc 'Job plural resource' - supports platform: 'gcp' + name "google_cloud_scheduler_jobs" + desc "Job plural resource" + supports platform: "gcp" attr_reader :table @@ -40,12 +40,12 @@ class CloudSchedulerJobs < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('jobs') + @table = fetch_wrapped_resource("jobs") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -73,27 +73,27 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'schedule' => ->(obj) { [:schedule, obj['schedule']] }, - 'timeZone' => ->(obj) { [:time_zone, obj['timeZone']] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'attemptDeadline' => ->(obj) { [:attempt_deadline, obj['attemptDeadline']] }, - 'retryConfig' => ->(obj) { [:retry_config, GoogleInSpec::CloudScheduler::Property::JobRetryConfig.new(obj['retryConfig'], to_s)] }, - 'pubsubTarget' => ->(obj) { [:pubsub_target, GoogleInSpec::CloudScheduler::Property::JobPubsubTarget.new(obj['pubsubTarget'], to_s)] }, - 'appEngineHttpTarget' => ->(obj) { [:app_engine_http_target, GoogleInSpec::CloudScheduler::Property::JobAppEngineHttpTarget.new(obj['appEngineHttpTarget'], to_s)] }, - 'httpTarget' => ->(obj) { [:http_target, GoogleInSpec::CloudScheduler::Property::JobHttpTarget.new(obj['httpTarget'], to_s)] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "schedule" => ->(obj) { [:schedule, obj["schedule"]] }, + "timeZone" => ->(obj) { [:time_zone, obj["timeZone"]] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "attemptDeadline" => ->(obj) { [:attempt_deadline, obj["attemptDeadline"]] }, + "retryConfig" => ->(obj) { [:retry_config, GoogleInSpec::CloudScheduler::Property::JobRetryConfig.new(obj["retryConfig"], to_s)] }, + "pubsubTarget" => ->(obj) { [:pubsub_target, GoogleInSpec::CloudScheduler::Property::JobPubsubTarget.new(obj["pubsubTarget"], to_s)] }, + "appEngineHttpTarget" => ->(obj) { [:app_engine_http_target, GoogleInSpec::CloudScheduler::Property::JobAppEngineHttpTarget.new(obj["appEngineHttpTarget"], to_s)] }, + "httpTarget" => ->(obj) { [:http_target, GoogleInSpec::CloudScheduler::Property::JobHttpTarget.new(obj["httpTarget"], to_s)] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end private def product_url(_ = nil) - 'https://cloudscheduler.googleapis.com/v1/' + "https://cloudscheduler.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{region}}/jobs' + "projects/{{project}}/locations/{{region}}/jobs" end end diff --git a/libraries/google_cloudbuild_trigger.rb b/libraries/google_cloudbuild_trigger.rb index e14e02626..07e9334ee 100644 --- a/libraries/google_cloudbuild_trigger.rb +++ b/libraries/google_cloudbuild_trigger.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,28 +13,28 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/cloudbuild/property/trigger_build' -require 'google/cloudbuild/property/trigger_build_artifacts' -require 'google/cloudbuild/property/trigger_build_artifacts_objects' -require 'google/cloudbuild/property/trigger_build_artifacts_objects_timing' -require 'google/cloudbuild/property/trigger_build_options' -require 'google/cloudbuild/property/trigger_build_options_volumes' -require 'google/cloudbuild/property/trigger_build_secrets' -require 'google/cloudbuild/property/trigger_build_source' -require 'google/cloudbuild/property/trigger_build_source_repo_source' -require 'google/cloudbuild/property/trigger_build_source_storage_source' -require 'google/cloudbuild/property/trigger_build_steps' -require 'google/cloudbuild/property/trigger_github' -require 'google/cloudbuild/property/trigger_github_pull_request' -require 'google/cloudbuild/property/trigger_github_push' -require 'google/cloudbuild/property/trigger_trigger_template' +require "gcp_backend" +require "google/cloudbuild/property/trigger_build" +require "google/cloudbuild/property/trigger_build_artifacts" +require "google/cloudbuild/property/trigger_build_artifacts_objects" +require "google/cloudbuild/property/trigger_build_artifacts_objects_timing" +require "google/cloudbuild/property/trigger_build_options" +require "google/cloudbuild/property/trigger_build_options_volumes" +require "google/cloudbuild/property/trigger_build_secrets" +require "google/cloudbuild/property/trigger_build_source" +require "google/cloudbuild/property/trigger_build_source_repo_source" +require "google/cloudbuild/property/trigger_build_source_storage_source" +require "google/cloudbuild/property/trigger_build_steps" +require "google/cloudbuild/property/trigger_github" +require "google/cloudbuild/property/trigger_github_pull_request" +require "google/cloudbuild/property/trigger_github_push" +require "google/cloudbuild/property/trigger_trigger_template" # A provider to manage Cloud Build resources. class CloudBuildTrigger < GcpResourceBase - name 'google_cloudbuild_trigger' - desc 'Trigger' - supports platform: 'gcp' + name "google_cloudbuild_trigger" + desc "Trigger" + supports platform: "gcp" attr_reader :params attr_reader :id @@ -54,24 +54,24 @@ class CloudBuildTrigger < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @id = @fetched['id'] - @name = @fetched['name'] - @description = @fetched['description'] - @tags = @fetched['tags'] - @disabled = @fetched['disabled'] - @create_time = parse_time_string(@fetched['createTime']) - @substitutions = @fetched['substitutions'] - @filename = @fetched['filename'] - @ignored_files = @fetched['ignoredFiles'] - @included_files = @fetched['includedFiles'] - @trigger_template = GoogleInSpec::CloudBuild::Property::TriggerTriggerTemplate.new(@fetched['triggerTemplate'], to_s) - @github = GoogleInSpec::CloudBuild::Property::TriggerGithub.new(@fetched['github'], to_s) - @build = GoogleInSpec::CloudBuild::Property::TriggerBuild.new(@fetched['build'], to_s) + @id = @fetched["id"] + @name = @fetched["name"] + @description = @fetched["description"] + @tags = @fetched["tags"] + @disabled = @fetched["disabled"] + @create_time = parse_time_string(@fetched["createTime"]) + @substitutions = @fetched["substitutions"] + @filename = @fetched["filename"] + @ignored_files = @fetched["ignoredFiles"] + @included_files = @fetched["includedFiles"] + @trigger_template = GoogleInSpec::CloudBuild::Property::TriggerTriggerTemplate.new(@fetched["triggerTemplate"], to_s) + @github = GoogleInSpec::CloudBuild::Property::TriggerGithub.new(@fetched["github"], to_s) + @build = GoogleInSpec::CloudBuild::Property::TriggerBuild.new(@fetched["build"], to_s) end # Handles parsing RFC3339 time string @@ -90,10 +90,10 @@ def to_s private def product_url(_ = nil) - 'https://cloudbuild.googleapis.com/v1/' + "https://cloudbuild.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/triggers/{{id}}' + "projects/{{project}}/triggers/{{id}}" end end diff --git a/libraries/google_cloudbuild_triggers.rb b/libraries/google_cloudbuild_triggers.rb index 64c6fabe4..0887dc03c 100644 --- a/libraries/google_cloudbuild_triggers.rb +++ b/libraries/google_cloudbuild_triggers.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class CloudBuildTriggers < GcpResourceBase - name 'google_cloudbuild_triggers' - desc 'Trigger plural resource' - supports platform: 'gcp' + name "google_cloudbuild_triggers" + desc "Trigger plural resource" + supports platform: "gcp" attr_reader :table @@ -42,12 +42,12 @@ class CloudBuildTriggers < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('triggers') + @table = fetch_wrapped_resource("triggers") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'tags' => ->(obj) { [:tags, obj['tags']] }, - 'disabled' => ->(obj) { [:disabled, obj['disabled']] }, - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'substitutions' => ->(obj) { [:substitutions, obj['substitutions']] }, - 'filename' => ->(obj) { [:filename, obj['filename']] }, - 'ignoredFiles' => ->(obj) { [:ignored_files, obj['ignoredFiles']] }, - 'includedFiles' => ->(obj) { [:included_files, obj['includedFiles']] }, - 'triggerTemplate' => ->(obj) { [:trigger_template, GoogleInSpec::CloudBuild::Property::TriggerTriggerTemplate.new(obj['triggerTemplate'], to_s)] }, - 'github' => ->(obj) { [:github, GoogleInSpec::CloudBuild::Property::TriggerGithub.new(obj['github'], to_s)] }, - 'build' => ->(obj) { [:build, GoogleInSpec::CloudBuild::Property::TriggerBuild.new(obj['build'], to_s)] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "tags" => ->(obj) { [:tags, obj["tags"]] }, + "disabled" => ->(obj) { [:disabled, obj["disabled"]] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "substitutions" => ->(obj) { [:substitutions, obj["substitutions"]] }, + "filename" => ->(obj) { [:filename, obj["filename"]] }, + "ignoredFiles" => ->(obj) { [:ignored_files, obj["ignoredFiles"]] }, + "includedFiles" => ->(obj) { [:included_files, obj["includedFiles"]] }, + "triggerTemplate" => ->(obj) { [:trigger_template, GoogleInSpec::CloudBuild::Property::TriggerTriggerTemplate.new(obj["triggerTemplate"], to_s)] }, + "github" => ->(obj) { [:github, GoogleInSpec::CloudBuild::Property::TriggerGithub.new(obj["github"], to_s)] }, + "build" => ->(obj) { [:build, GoogleInSpec::CloudBuild::Property::TriggerBuild.new(obj["build"], to_s)] }, } end @@ -99,10 +99,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://cloudbuild.googleapis.com/v1/' + "https://cloudbuild.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/triggers' + "projects/{{project}}/triggers" end end diff --git a/libraries/google_cloudfunctions_cloud_function.rb b/libraries/google_cloudfunctions_cloud_function.rb index 2048426b8..8b75d007a 100644 --- a/libraries/google_cloudfunctions_cloud_function.rb +++ b/libraries/google_cloudfunctions_cloud_function.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/cloudfunctions/property/cloudfunction_event_trigger' -require 'google/cloudfunctions/property/cloudfunction_https_trigger' -require 'google/cloudfunctions/property/cloudfunction_source_repository' +require "gcp_backend" +require "google/cloudfunctions/property/cloudfunction_event_trigger" +require "google/cloudfunctions/property/cloudfunction_https_trigger" +require "google/cloudfunctions/property/cloudfunction_source_repository" # A provider to manage Cloud Functions resources. class CloudFunctionsCloudFunction < GcpResourceBase - name 'google_cloudfunctions_cloud_function' - desc 'CloudFunction' - supports platform: 'gcp' + name "google_cloudfunctions_cloud_function" + desc "CloudFunction" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -47,29 +47,29 @@ class CloudFunctionsCloudFunction < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @description = @fetched['description'] - @status = @fetched['status'] - @entry_point = @fetched['entryPoint'] - @runtime = @fetched['runtime'] - @timeout = @fetched['timeout'] - @available_memory_mb = @fetched['availableMemoryMb'] - @service_account_email = @fetched['serviceAccountEmail'] - @update_time = @fetched['updateTime'] - @version_id = @fetched['versionId'] - @labels = @fetched['labels'] - @environment_variables = @fetched['environmentVariables'] - @source_archive_url = @fetched['sourceArchiveUrl'] - @source_upload_url = @fetched['sourceUploadUrl'] - @source_repository = GoogleInSpec::CloudFunctions::Property::CloudFunctionSourceRepository.new(@fetched['sourceRepository'], to_s) - @https_trigger = GoogleInSpec::CloudFunctions::Property::CloudFunctionHttpsTrigger.new(@fetched['httpsTrigger'], to_s) - @event_trigger = GoogleInSpec::CloudFunctions::Property::CloudFunctionEventTrigger.new(@fetched['eventTrigger'], to_s) - @location = @fetched['location'] + @name = @fetched["name"] + @description = @fetched["description"] + @status = @fetched["status"] + @entry_point = @fetched["entryPoint"] + @runtime = @fetched["runtime"] + @timeout = @fetched["timeout"] + @available_memory_mb = @fetched["availableMemoryMb"] + @service_account_email = @fetched["serviceAccountEmail"] + @update_time = @fetched["updateTime"] + @version_id = @fetched["versionId"] + @labels = @fetched["labels"] + @environment_variables = @fetched["environmentVariables"] + @source_archive_url = @fetched["sourceArchiveUrl"] + @source_upload_url = @fetched["sourceUploadUrl"] + @source_repository = GoogleInSpec::CloudFunctions::Property::CloudFunctionSourceRepository.new(@fetched["sourceRepository"], to_s) + @https_trigger = GoogleInSpec::CloudFunctions::Property::CloudFunctionHttpsTrigger.new(@fetched["httpsTrigger"], to_s) + @event_trigger = GoogleInSpec::CloudFunctions::Property::CloudFunctionEventTrigger.new(@fetched["eventTrigger"], to_s) + @location = @fetched["location"] end def exists? @@ -83,10 +83,10 @@ def to_s private def product_url(_ = nil) - 'https://cloudfunctions.googleapis.com/v1/' + "https://cloudfunctions.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/functions/{{name}}' + "projects/{{project}}/locations/{{location}}/functions/{{name}}" end end diff --git a/libraries/google_cloudfunctions_cloud_functions.rb b/libraries/google_cloudfunctions_cloud_functions.rb index 99ebfb8ea..2c303f9c4 100644 --- a/libraries/google_cloudfunctions_cloud_functions.rb +++ b/libraries/google_cloudfunctions_cloud_functions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class CloudFunctionsCloudFunctions < GcpResourceBase - name 'google_cloudfunctions_cloud_functions' - desc 'CloudFunction plural resource' - supports platform: 'gcp' + name "google_cloudfunctions_cloud_functions" + desc "CloudFunction plural resource" + supports platform: "gcp" attr_reader :table @@ -47,12 +47,12 @@ class CloudFunctionsCloudFunctions < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('functions') + @table = fetch_wrapped_resource("functions") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -80,34 +80,34 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'status' => ->(obj) { [:status, obj['status']] }, - 'entryPoint' => ->(obj) { [:entry_point, obj['entryPoint']] }, - 'runtime' => ->(obj) { [:runtime, obj['runtime']] }, - 'timeout' => ->(obj) { [:timeout, obj['timeout']] }, - 'availableMemoryMb' => ->(obj) { [:available_memory_mb, obj['availableMemoryMb']] }, - 'serviceAccountEmail' => ->(obj) { [:service_account_email, obj['serviceAccountEmail']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'versionId' => ->(obj) { [:version_id, obj['versionId']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'environmentVariables' => ->(obj) { [:environment_variables, obj['environmentVariables']] }, - 'sourceArchiveUrl' => ->(obj) { [:source_archive_url, obj['sourceArchiveUrl']] }, - 'sourceUploadUrl' => ->(obj) { [:source_upload_url, obj['sourceUploadUrl']] }, - 'sourceRepository' => ->(obj) { [:source_repository, GoogleInSpec::CloudFunctions::Property::CloudFunctionSourceRepository.new(obj['sourceRepository'], to_s)] }, - 'httpsTrigger' => ->(obj) { [:https_trigger, GoogleInSpec::CloudFunctions::Property::CloudFunctionHttpsTrigger.new(obj['httpsTrigger'], to_s)] }, - 'eventTrigger' => ->(obj) { [:event_trigger, GoogleInSpec::CloudFunctions::Property::CloudFunctionEventTrigger.new(obj['eventTrigger'], to_s)] }, - 'location' => ->(obj) { [:location, obj['location']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "status" => ->(obj) { [:status, obj["status"]] }, + "entryPoint" => ->(obj) { [:entry_point, obj["entryPoint"]] }, + "runtime" => ->(obj) { [:runtime, obj["runtime"]] }, + "timeout" => ->(obj) { [:timeout, obj["timeout"]] }, + "availableMemoryMb" => ->(obj) { [:available_memory_mb, obj["availableMemoryMb"]] }, + "serviceAccountEmail" => ->(obj) { [:service_account_email, obj["serviceAccountEmail"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "versionId" => ->(obj) { [:version_id, obj["versionId"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "environmentVariables" => ->(obj) { [:environment_variables, obj["environmentVariables"]] }, + "sourceArchiveUrl" => ->(obj) { [:source_archive_url, obj["sourceArchiveUrl"]] }, + "sourceUploadUrl" => ->(obj) { [:source_upload_url, obj["sourceUploadUrl"]] }, + "sourceRepository" => ->(obj) { [:source_repository, GoogleInSpec::CloudFunctions::Property::CloudFunctionSourceRepository.new(obj["sourceRepository"], to_s)] }, + "httpsTrigger" => ->(obj) { [:https_trigger, GoogleInSpec::CloudFunctions::Property::CloudFunctionHttpsTrigger.new(obj["httpsTrigger"], to_s)] }, + "eventTrigger" => ->(obj) { [:event_trigger, GoogleInSpec::CloudFunctions::Property::CloudFunctionEventTrigger.new(obj["eventTrigger"], to_s)] }, + "location" => ->(obj) { [:location, obj["location"]] }, } end private def product_url(_ = nil) - 'https://cloudfunctions.googleapis.com/v1/' + "https://cloudfunctions.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/functions' + "projects/{{project}}/locations/{{location}}/functions" end end diff --git a/libraries/google_composer_project_location_environment.rb b/libraries/google_composer_project_location_environment.rb index fab23c92a..9b9e9258b 100644 --- a/libraries/google_composer_project_location_environment.rb +++ b/libraries/google_composer_project_location_environment.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,40 +13,40 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/composer/property/projectlocationenvironment_config' -require 'google/composer/property/projectlocationenvironment_config_database_config' -require 'google/composer/property/projectlocationenvironment_config_encryption_config' -require 'google/composer/property/projectlocationenvironment_config_maintenance_window' -require 'google/composer/property/projectlocationenvironment_config_master_authorized_networks_config' -require 'google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks' -require 'google/composer/property/projectlocationenvironment_config_node_config' -require 'google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy' -require 'google/composer/property/projectlocationenvironment_config_private_environment_config' -require 'google/composer/property/projectlocationenvironment_config_private_environment_config_networking_config' -require 'google/composer/property/projectlocationenvironment_config_private_environment_config_private_cluster_config' -require 'google/composer/property/projectlocationenvironment_config_recovery_config' -require 'google/composer/property/projectlocationenvironment_config_recovery_config_scheduled_snapshots_config' -require 'google/composer/property/projectlocationenvironment_config_software_config' -require 'google/composer/property/projectlocationenvironment_config_software_config_airflow_config_overrides' -require 'google/composer/property/projectlocationenvironment_config_software_config_env_variables' -require 'google/composer/property/projectlocationenvironment_config_software_config_pypi_packages' -require 'google/composer/property/projectlocationenvironment_config_web_server_config' -require 'google/composer/property/projectlocationenvironment_config_web_server_network_access_control' -require 'google/composer/property/projectlocationenvironment_config_web_server_network_access_control_allowed_ip_ranges' -require 'google/composer/property/projectlocationenvironment_config_workloads_config' -require 'google/composer/property/projectlocationenvironment_config_workloads_config_scheduler' -require 'google/composer/property/projectlocationenvironment_config_workloads_config_triggerer' -require 'google/composer/property/projectlocationenvironment_config_workloads_config_web_server' -require 'google/composer/property/projectlocationenvironment_config_workloads_config_worker' -require 'google/composer/property/projectlocationenvironment_labels' -require 'google/composer/property/projectlocationenvironment_storage_config' +require "gcp_backend" +require "google/composer/property/projectlocationenvironment_config" +require "google/composer/property/projectlocationenvironment_config_database_config" +require "google/composer/property/projectlocationenvironment_config_encryption_config" +require "google/composer/property/projectlocationenvironment_config_maintenance_window" +require "google/composer/property/projectlocationenvironment_config_master_authorized_networks_config" +require "google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks" +require "google/composer/property/projectlocationenvironment_config_node_config" +require "google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy" +require "google/composer/property/projectlocationenvironment_config_private_environment_config" +require "google/composer/property/projectlocationenvironment_config_private_environment_config_networking_config" +require "google/composer/property/projectlocationenvironment_config_private_environment_config_private_cluster_config" +require "google/composer/property/projectlocationenvironment_config_recovery_config" +require "google/composer/property/projectlocationenvironment_config_recovery_config_scheduled_snapshots_config" +require "google/composer/property/projectlocationenvironment_config_software_config" +require "google/composer/property/projectlocationenvironment_config_software_config_airflow_config_overrides" +require "google/composer/property/projectlocationenvironment_config_software_config_env_variables" +require "google/composer/property/projectlocationenvironment_config_software_config_pypi_packages" +require "google/composer/property/projectlocationenvironment_config_web_server_config" +require "google/composer/property/projectlocationenvironment_config_web_server_network_access_control" +require "google/composer/property/projectlocationenvironment_config_web_server_network_access_control_allowed_ip_ranges" +require "google/composer/property/projectlocationenvironment_config_workloads_config" +require "google/composer/property/projectlocationenvironment_config_workloads_config_scheduler" +require "google/composer/property/projectlocationenvironment_config_workloads_config_triggerer" +require "google/composer/property/projectlocationenvironment_config_workloads_config_web_server" +require "google/composer/property/projectlocationenvironment_config_workloads_config_worker" +require "google/composer/property/projectlocationenvironment_labels" +require "google/composer/property/projectlocationenvironment_storage_config" # A provider to manage composer resources. class ComposerProjectLocationEnvironment < GcpResourceBase - name 'google_composer_project_location_environment' - desc 'ProjectLocationEnvironment' - supports platform: 'gcp' + name "google_composer_project_location_environment" + desc "ProjectLocationEnvironment" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -62,20 +62,20 @@ class ComposerProjectLocationEnvironment < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfig.new(@fetched['config'], to_s) - @uuid = @fetched['uuid'] - @state = @fetched['state'] - @create_time = @fetched['createTime'] - @update_time = @fetched['updateTime'] - @labels = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentLabels.new(@fetched['labels'], to_s) - @satisfies_pzs = @fetched['satisfiesPzs'] - @storage_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentStorageConfig.new(@fetched['storageConfig'], to_s) + @name = @fetched["name"] + @config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfig.new(@fetched["config"], to_s) + @uuid = @fetched["uuid"] + @state = @fetched["state"] + @create_time = @fetched["createTime"] + @update_time = @fetched["updateTime"] + @labels = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentLabels.new(@fetched["labels"], to_s) + @satisfies_pzs = @fetched["satisfiesPzs"] + @storage_config = GoogleInSpec::Composer::Property::ProjectLocationEnvironmentStorageConfig.new(@fetched["storageConfig"], to_s) end def exists? @@ -89,10 +89,10 @@ def to_s private def product_url(_ = nil) - 'https://composer.googleapis.com/v1/' + "https://composer.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_composer_project_location_environments.rb b/libraries/google_composer_project_location_environments.rb index df635d5fe..8c3f4fa9c 100644 --- a/libraries/google_composer_project_location_environments.rb +++ b/libraries/google_composer_project_location_environments.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComposerProjectLocationEnvironments < GcpResourceBase - name 'google_composer_project_location_environments' - desc 'ProjectLocationEnvironment plural resource' - supports platform: 'gcp' + name "google_composer_project_location_environments" + desc "ProjectLocationEnvironment plural resource" + supports platform: "gcp" attr_reader :table @@ -38,12 +38,12 @@ class ComposerProjectLocationEnvironments < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('environments') + @table = fetch_wrapped_resource("environments") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -71,25 +71,25 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'config' => ->(obj) { [:config, GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfig.new(obj['config'], to_s)] }, - 'uuid' => ->(obj) { [:uuid, obj['uuid']] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::Composer::Property::ProjectLocationEnvironmentLabels.new(obj['labels'], to_s)] }, - 'satisfiesPzs' => ->(obj) { [:satisfies_pzs, obj['satisfiesPzs']] }, - 'storageConfig' => ->(obj) { [:storage_config, GoogleInSpec::Composer::Property::ProjectLocationEnvironmentStorageConfig.new(obj['storageConfig'], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "config" => ->(obj) { [:config, GoogleInSpec::Composer::Property::ProjectLocationEnvironmentConfig.new(obj["config"], to_s)] }, + "uuid" => ->(obj) { [:uuid, obj["uuid"]] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::Composer::Property::ProjectLocationEnvironmentLabels.new(obj["labels"], to_s)] }, + "satisfiesPzs" => ->(obj) { [:satisfies_pzs, obj["satisfiesPzs"]] }, + "storageConfig" => ->(obj) { [:storage_config, GoogleInSpec::Composer::Property::ProjectLocationEnvironmentStorageConfig.new(obj["storageConfig"], to_s)] }, } end private def product_url(_ = nil) - 'https://composer.googleapis.com/v1/' + "https://composer.googleapis.com/v1/" end def resource_base_url - '{{parent}}/environments' + "{{parent}}/environments" end end diff --git a/libraries/google_composer_project_location_image_versions.rb b/libraries/google_composer_project_location_image_versions.rb index 7f4fa830a..0318c565f 100644 --- a/libraries/google_composer_project_location_image_versions.rb +++ b/libraries/google_composer_project_location_image_versions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComposerProjectLocationImageVersions < GcpResourceBase - name 'google_composer_project_location_image_versions' - desc 'ProjectLocationImageVersion plural resource' - supports platform: 'gcp' + name "google_composer_project_location_image_versions" + desc "ProjectLocationImageVersion plural resource" + supports platform: "gcp" attr_reader :table @@ -31,12 +31,12 @@ class ComposerProjectLocationImageVersions < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('imageVersions') + @table = fetch_wrapped_resource("imageVersions") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -64,18 +64,18 @@ def transform(key, value) def transformers { - 'imageVersions' => ->(obj) { [:image_versions, obj['imageVersions']] }, - 'nextPageToken' => ->(obj) { [:next_page_token, obj['nextPageToken']] }, + "imageVersions" => ->(obj) { [:image_versions, obj["imageVersions"]] }, + "nextPageToken" => ->(obj) { [:next_page_token, obj["nextPageToken"]] }, } end private def product_url(_ = nil) - 'https://composer.googleapis.com/v1/' + "https://composer.googleapis.com/v1/" end def resource_base_url - '{{parent}}/imageVersions' + "{{parent}}/imageVersions" end end diff --git a/libraries/google_compute_accelerator_type.rb b/libraries/google_compute_accelerator_type.rb index 7273196b3..65e503272 100644 --- a/libraries/google_compute_accelerator_type.rb +++ b/libraries/google_compute_accelerator_type.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/acceleratortype_deprecated' +require "gcp_backend" +require "google/compute/property/acceleratortype_deprecated" # A provider to manage Compute Engine resources. class ComputeAcceleratorType < GcpResourceBase - name 'google_compute_accelerator_type' - desc 'AcceleratorType' - supports platform: 'gcp' + name "google_compute_accelerator_type" + desc "AcceleratorType" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -33,17 +33,17 @@ class ComputeAcceleratorType < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @deprecated = GoogleInSpec::Compute::Property::AcceleratorTypeDeprecated.new(@fetched['deprecated'], to_s) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @zone = @fetched['zone'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @deprecated = GoogleInSpec::Compute::Property::AcceleratorTypeDeprecated.new(@fetched["deprecated"], to_s) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @zone = @fetched["zone"] end # Handles parsing RFC3339 time string @@ -62,10 +62,10 @@ def to_s private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/acceleratorTypes/{{name}}' + "projects/{{project}}/zones/{{zone}}/acceleratorTypes/{{name}}" end end diff --git a/libraries/google_compute_accelerator_types.rb b/libraries/google_compute_accelerator_types.rb index b99f94bd7..e603e72e3 100644 --- a/libraries/google_compute_accelerator_types.rb +++ b/libraries/google_compute_accelerator_types.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeAcceleratorTypes < GcpResourceBase - name 'google_compute_accelerator_types' - desc 'AcceleratorType plural resource' - supports platform: 'gcp' + name "google_compute_accelerator_types" + desc "AcceleratorType plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class ComputeAcceleratorTypes < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'deprecated' => ->(obj) { [:deprecated, GoogleInSpec::Compute::Property::AcceleratorTypeDeprecated.new(obj['deprecated'], to_s)] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "deprecated" => ->(obj) { [:deprecated, GoogleInSpec::Compute::Property::AcceleratorTypeDeprecated.new(obj["deprecated"], to_s)] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, } end @@ -85,10 +85,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/acceleratorTypes' + "projects/{{project}}/zones/{{zone}}/acceleratorTypes" end end diff --git a/libraries/google_compute_address.rb b/libraries/google_compute_address.rb index d2d2de0bd..b49973254 100644 --- a/libraries/google_compute_address.rb +++ b/libraries/google_compute_address.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeAddress < GcpResourceBase - name 'google_compute_address' - desc 'Address' - supports platform: 'gcp' + name "google_compute_address" + desc "Address" + supports platform: "gcp" attr_reader :params attr_reader :address @@ -40,25 +40,25 @@ class ComputeAddress < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @address = @fetched['address'] - @address_type = @fetched['addressType'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @purpose = @fetched['purpose'] - @network_tier = @fetched['networkTier'] - @subnetwork = @fetched['subnetwork'] - @users = @fetched['users'] - @labels = @fetched['labels'] - @label_fingerprint = @fetched['labelFingerprint'] - @status = @fetched['status'] - @region = @fetched['region'] + @address = @fetched["address"] + @address_type = @fetched["addressType"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @purpose = @fetched["purpose"] + @network_tier = @fetched["networkTier"] + @subnetwork = @fetched["subnetwork"] + @users = @fetched["users"] + @labels = @fetched["labels"] + @label_fingerprint = @fetched["labelFingerprint"] + @status = @fetched["status"] + @region = @fetched["region"] end # Handles parsing RFC3339 time string @@ -86,20 +86,20 @@ def user_count # Return the first user resource base name def user_resource_name - @users.first.split('/').last + @users.first.split("/").last end private def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{location}}/addresses/{{name}}' + "projects/{{project}}/regions/{{location}}/addresses/{{name}}" end end diff --git a/libraries/google_compute_addresses.rb b/libraries/google_compute_addresses.rb index f3e569cca..b48d659c2 100644 --- a/libraries/google_compute_addresses.rb +++ b/libraries/google_compute_addresses.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeAddresss < GcpResourceBase - name 'google_compute_addresses' - desc 'Address plural resource' - supports platform: 'gcp' + name "google_compute_addresses" + desc "Address plural resource" + supports platform: "gcp" attr_reader :table @@ -43,12 +43,12 @@ class ComputeAddresss < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -76,20 +76,20 @@ def transform(key, value) def transformers { - 'address' => ->(obj) { [:address, obj['address']] }, - 'addressType' => ->(obj) { [:address_type, obj['addressType']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'purpose' => ->(obj) { [:purpose, obj['purpose']] }, - 'networkTier' => ->(obj) { [:network_tier, obj['networkTier']] }, - 'subnetwork' => ->(obj) { [:subnetwork, obj['subnetwork']] }, - 'users' => ->(obj) { [:users, obj['users']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, - 'status' => ->(obj) { [:status, obj['status']] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "address" => ->(obj) { [:address, obj["address"]] }, + "addressType" => ->(obj) { [:address_type, obj["addressType"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "purpose" => ->(obj) { [:purpose, obj["purpose"]] }, + "networkTier" => ->(obj) { [:network_tier, obj["networkTier"]] }, + "subnetwork" => ->(obj) { [:subnetwork, obj["subnetwork"]] }, + "users" => ->(obj) { [:users, obj["users"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "labelFingerprint" => ->(obj) { [:label_fingerprint, obj["labelFingerprint"]] }, + "status" => ->(obj) { [:status, obj["status"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end @@ -102,13 +102,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{location}}/addresses' + "projects/{{project}}/regions/{{location}}/addresses" end end diff --git a/libraries/google_compute_autoscaler.rb b/libraries/google_compute_autoscaler.rb index 3e82d03ca..97c3fd06a 100644 --- a/libraries/google_compute_autoscaler.rb +++ b/libraries/google_compute_autoscaler.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,22 +13,22 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/autoscaler_autoscaling_policy' -require 'google/compute/property/autoscaler_autoscaling_policy_cpu_utilization' -require 'google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations' -require 'google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization' -require 'google/compute/property/autoscaler_autoscaling_policy_scale_down_control' -require 'google/compute/property/autoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas' -require 'google/compute/property/autoscaler_autoscaling_policy_scale_in_control' -require 'google/compute/property/autoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas' -require 'google/compute/property/autoscaler_autoscaling_policy_scaling_schedules' +require "gcp_backend" +require "google/compute/property/autoscaler_autoscaling_policy" +require "google/compute/property/autoscaler_autoscaling_policy_cpu_utilization" +require "google/compute/property/autoscaler_autoscaling_policy_custom_metric_utilizations" +require "google/compute/property/autoscaler_autoscaling_policy_load_balancing_utilization" +require "google/compute/property/autoscaler_autoscaling_policy_scale_down_control" +require "google/compute/property/autoscaler_autoscaling_policy_scale_down_control_max_scaled_down_replicas" +require "google/compute/property/autoscaler_autoscaling_policy_scale_in_control" +require "google/compute/property/autoscaler_autoscaling_policy_scale_in_control_max_scaled_in_replicas" +require "google/compute/property/autoscaler_autoscaling_policy_scaling_schedules" # A provider to manage Compute Engine resources. class ComputeAutoscaler < GcpResourceBase - name 'google_compute_autoscaler' - desc 'Autoscaler' - supports platform: 'gcp' + name "google_compute_autoscaler" + desc "Autoscaler" + supports platform: "gcp" attr_reader :params attr_reader :id @@ -42,18 +42,18 @@ class ComputeAutoscaler < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @id = @fetched['id'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @name = @fetched['name'] - @description = @fetched['description'] - @autoscaling_policy = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicy.new(@fetched['autoscalingPolicy'], to_s) - @target = @fetched['target'] - @zone = @fetched['zone'] + @id = @fetched["id"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @name = @fetched["name"] + @description = @fetched["description"] + @autoscaling_policy = GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicy.new(@fetched["autoscalingPolicy"], to_s) + @target = @fetched["target"] + @zone = @fetched["zone"] end # Handles parsing RFC3339 time string @@ -73,13 +73,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/autoscalers/{{name}}' + "projects/{{project}}/zones/{{zone}}/autoscalers/{{name}}" end end diff --git a/libraries/google_compute_autoscalers.rb b/libraries/google_compute_autoscalers.rb index 1ef20f5cb..14b80af0f 100644 --- a/libraries/google_compute_autoscalers.rb +++ b/libraries/google_compute_autoscalers.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeAutoscalers < GcpResourceBase - name 'google_compute_autoscalers' - desc 'Autoscaler plural resource' - supports platform: 'gcp' + name "google_compute_autoscalers" + desc "Autoscaler plural resource" + supports platform: "gcp" attr_reader :table @@ -36,12 +36,12 @@ class ComputeAutoscalers < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { [:id, obj['id']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'autoscalingPolicy' => ->(obj) { [:autoscaling_policy, GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicy.new(obj['autoscalingPolicy'], to_s)] }, - 'target' => ->(obj) { [:target, obj['target']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "autoscalingPolicy" => ->(obj) { [:autoscaling_policy, GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicy.new(obj["autoscalingPolicy"], to_s)] }, + "target" => ->(obj) { [:target, obj["target"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, } end @@ -88,13 +88,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/autoscalers' + "projects/{{project}}/zones/{{zone}}/autoscalers" end end diff --git a/libraries/google_compute_backend_bucket.rb b/libraries/google_compute_backend_bucket.rb index c65017cc1..46516d9a1 100644 --- a/libraries/google_compute_backend_bucket.rb +++ b/libraries/google_compute_backend_bucket.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/backendbucket_cdn_policy' -require 'google/compute/property/backendbucket_cdn_policy_negative_caching_policy' +require "gcp_backend" +require "google/compute/property/backendbucket_cdn_policy" +require "google/compute/property/backendbucket_cdn_policy_negative_caching_policy" # A provider to manage Compute Engine resources. class ComputeBackendBucket < GcpResourceBase - name 'google_compute_backend_bucket' - desc 'BackendBucket' - supports platform: 'gcp' + name "google_compute_backend_bucket" + desc "BackendBucket" + supports platform: "gcp" attr_reader :params attr_reader :bucket_name @@ -36,19 +36,19 @@ class ComputeBackendBucket < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bucket_name = @fetched['bucketName'] - @cdn_policy = GoogleInSpec::Compute::Property::BackendBucketCdnPolicy.new(@fetched['cdnPolicy'], to_s) - @custom_response_headers = @fetched['customResponseHeaders'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @enable_cdn = @fetched['enableCdn'] - @id = @fetched['id'] - @name = @fetched['name'] + @bucket_name = @fetched["bucketName"] + @cdn_policy = GoogleInSpec::Compute::Property::BackendBucketCdnPolicy.new(@fetched["cdnPolicy"], to_s) + @custom_response_headers = @fetched["customResponseHeaders"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @enable_cdn = @fetched["enableCdn"] + @id = @fetched["id"] + @name = @fetched["name"] end # Handles parsing RFC3339 time string @@ -68,13 +68,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/backendBuckets/{{name}}' + "projects/{{project}}/global/backendBuckets/{{name}}" end end diff --git a/libraries/google_compute_backend_buckets.rb b/libraries/google_compute_backend_buckets.rb index cfb109d90..777b4f249 100644 --- a/libraries/google_compute_backend_buckets.rb +++ b/libraries/google_compute_backend_buckets.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeBackendBuckets < GcpResourceBase - name 'google_compute_backend_buckets' - desc 'BackendBucket plural resource' - supports platform: 'gcp' + name "google_compute_backend_buckets" + desc "BackendBucket plural resource" + supports platform: "gcp" attr_reader :table @@ -37,12 +37,12 @@ class ComputeBackendBuckets < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'bucketName' => ->(obj) { [:bucket_name, obj['bucketName']] }, - 'cdnPolicy' => ->(obj) { [:cdn_policy, GoogleInSpec::Compute::Property::BackendBucketCdnPolicy.new(obj['cdnPolicy'], to_s)] }, - 'customResponseHeaders' => ->(obj) { [:custom_response_headers, obj['customResponseHeaders']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'enableCdn' => ->(obj) { [:enable_cdn, obj['enableCdn']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, + "bucketName" => ->(obj) { [:bucket_name, obj["bucketName"]] }, + "cdnPolicy" => ->(obj) { [:cdn_policy, GoogleInSpec::Compute::Property::BackendBucketCdnPolicy.new(obj["cdnPolicy"], to_s)] }, + "customResponseHeaders" => ->(obj) { [:custom_response_headers, obj["customResponseHeaders"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "enableCdn" => ->(obj) { [:enable_cdn, obj["enableCdn"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, } end @@ -90,13 +90,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/backendBuckets' + "projects/{{project}}/global/backendBuckets" end end diff --git a/libraries/google_compute_backend_service.rb b/libraries/google_compute_backend_service.rb index bebd6d90d..acae21b98 100644 --- a/libraries/google_compute_backend_service.rb +++ b/libraries/google_compute_backend_service.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,28 +13,28 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/backendservice_backends' -require 'google/compute/property/backendservice_cdn_policy' -require 'google/compute/property/backendservice_cdn_policy_cache_key_policy' -require 'google/compute/property/backendservice_cdn_policy_negative_caching_policy' -require 'google/compute/property/backendservice_circuit_breakers' -require 'google/compute/property/backendservice_circuit_breakers_connect_timeout' -require 'google/compute/property/backendservice_connection_draining' -require 'google/compute/property/backendservice_consistent_hash' -require 'google/compute/property/backendservice_consistent_hash_http_cookie' -require 'google/compute/property/backendservice_consistent_hash_http_cookie_ttl' -require 'google/compute/property/backendservice_iap' -require 'google/compute/property/backendservice_log_config' -require 'google/compute/property/backendservice_outlier_detection' -require 'google/compute/property/backendservice_outlier_detection_base_ejection_time' -require 'google/compute/property/backendservice_outlier_detection_interval' +require "gcp_backend" +require "google/compute/property/backendservice_backends" +require "google/compute/property/backendservice_cdn_policy" +require "google/compute/property/backendservice_cdn_policy_cache_key_policy" +require "google/compute/property/backendservice_cdn_policy_negative_caching_policy" +require "google/compute/property/backendservice_circuit_breakers" +require "google/compute/property/backendservice_circuit_breakers_connect_timeout" +require "google/compute/property/backendservice_connection_draining" +require "google/compute/property/backendservice_consistent_hash" +require "google/compute/property/backendservice_consistent_hash_http_cookie" +require "google/compute/property/backendservice_consistent_hash_http_cookie_ttl" +require "google/compute/property/backendservice_iap" +require "google/compute/property/backendservice_log_config" +require "google/compute/property/backendservice_outlier_detection" +require "google/compute/property/backendservice_outlier_detection_base_ejection_time" +require "google/compute/property/backendservice_outlier_detection_interval" # A provider to manage Compute Engine resources. class ComputeBackendService < GcpResourceBase - name 'google_compute_backend_service' - desc 'BackendService' - supports platform: 'gcp' + name "google_compute_backend_service" + desc "BackendService" + supports platform: "gcp" attr_reader :params attr_reader :affinity_cookie_ttl_sec @@ -66,36 +66,36 @@ class ComputeBackendService < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @affinity_cookie_ttl_sec = @fetched['affinityCookieTtlSec'] - @backends = GoogleInSpec::Compute::Property::BackendServiceBackendsArray.parse(@fetched['backends'], to_s) - @circuit_breakers = GoogleInSpec::Compute::Property::BackendServiceCircuitBreakers.new(@fetched['circuitBreakers'], to_s) - @consistent_hash = GoogleInSpec::Compute::Property::BackendServiceConsistentHash.new(@fetched['consistentHash'], to_s) - @cdn_policy = GoogleInSpec::Compute::Property::BackendServiceCdnPolicy.new(@fetched['cdnPolicy'], to_s) - @connection_draining = GoogleInSpec::Compute::Property::BackendServiceConnectionDraining.new(@fetched['connectionDraining'], to_s) - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @custom_request_headers = @fetched['customRequestHeaders'] - @custom_response_headers = @fetched['customResponseHeaders'] - @fingerprint = @fetched['fingerprint'] - @description = @fetched['description'] - @enable_cdn = @fetched['enableCDN'] - @health_checks = @fetched['healthChecks'] - @id = @fetched['id'] - @iap = GoogleInSpec::Compute::Property::BackendServiceIap.new(@fetched['iap'], to_s) - @load_balancing_scheme = @fetched['loadBalancingScheme'] - @locality_lb_policy = @fetched['localityLbPolicy'] - @name = @fetched['name'] - @outlier_detection = GoogleInSpec::Compute::Property::BackendServiceOutlierDetection.new(@fetched['outlierDetection'], to_s) - @port_name = @fetched['portName'] - @protocol = @fetched['protocol'] - @security_policy = @fetched['securityPolicy'] - @session_affinity = @fetched['sessionAffinity'] - @timeout_sec = @fetched['timeoutSec'] - @log_config = GoogleInSpec::Compute::Property::BackendServiceLogConfig.new(@fetched['logConfig'], to_s) + @affinity_cookie_ttl_sec = @fetched["affinityCookieTtlSec"] + @backends = GoogleInSpec::Compute::Property::BackendServiceBackendsArray.parse(@fetched["backends"], to_s) + @circuit_breakers = GoogleInSpec::Compute::Property::BackendServiceCircuitBreakers.new(@fetched["circuitBreakers"], to_s) + @consistent_hash = GoogleInSpec::Compute::Property::BackendServiceConsistentHash.new(@fetched["consistentHash"], to_s) + @cdn_policy = GoogleInSpec::Compute::Property::BackendServiceCdnPolicy.new(@fetched["cdnPolicy"], to_s) + @connection_draining = GoogleInSpec::Compute::Property::BackendServiceConnectionDraining.new(@fetched["connectionDraining"], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @custom_request_headers = @fetched["customRequestHeaders"] + @custom_response_headers = @fetched["customResponseHeaders"] + @fingerprint = @fetched["fingerprint"] + @description = @fetched["description"] + @enable_cdn = @fetched["enableCDN"] + @health_checks = @fetched["healthChecks"] + @id = @fetched["id"] + @iap = GoogleInSpec::Compute::Property::BackendServiceIap.new(@fetched["iap"], to_s) + @load_balancing_scheme = @fetched["loadBalancingScheme"] + @locality_lb_policy = @fetched["localityLbPolicy"] + @name = @fetched["name"] + @outlier_detection = GoogleInSpec::Compute::Property::BackendServiceOutlierDetection.new(@fetched["outlierDetection"], to_s) + @port_name = @fetched["portName"] + @protocol = @fetched["protocol"] + @security_policy = @fetched["securityPolicy"] + @session_affinity = @fetched["sessionAffinity"] + @timeout_sec = @fetched["timeoutSec"] + @log_config = GoogleInSpec::Compute::Property::BackendServiceLogConfig.new(@fetched["logConfig"], to_s) end # Handles parsing RFC3339 time string @@ -115,13 +115,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/backendServices/{{name}}' + "projects/{{project}}/global/backendServices/{{name}}" end end diff --git a/libraries/google_compute_backend_services.rb b/libraries/google_compute_backend_services.rb index c86ae42b8..7dab5805a 100644 --- a/libraries/google_compute_backend_services.rb +++ b/libraries/google_compute_backend_services.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeBackendServices < GcpResourceBase - name 'google_compute_backend_services' - desc 'BackendService plural resource' - supports platform: 'gcp' + name "google_compute_backend_services" + desc "BackendService plural resource" + supports platform: "gcp" attr_reader :table @@ -54,12 +54,12 @@ class ComputeBackendServices < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -87,31 +87,31 @@ def transform(key, value) def transformers { - 'affinityCookieTtlSec' => ->(obj) { [:affinity_cookie_ttl_sec, obj['affinityCookieTtlSec']] }, - 'backends' => ->(obj) { [:backends, GoogleInSpec::Compute::Property::BackendServiceBackendsArray.parse(obj['backends'], to_s)] }, - 'circuitBreakers' => ->(obj) { [:circuit_breakers, GoogleInSpec::Compute::Property::BackendServiceCircuitBreakers.new(obj['circuitBreakers'], to_s)] }, - 'consistentHash' => ->(obj) { [:consistent_hash, GoogleInSpec::Compute::Property::BackendServiceConsistentHash.new(obj['consistentHash'], to_s)] }, - 'cdnPolicy' => ->(obj) { [:cdn_policy, GoogleInSpec::Compute::Property::BackendServiceCdnPolicy.new(obj['cdnPolicy'], to_s)] }, - 'connectionDraining' => ->(obj) { [:connection_draining, GoogleInSpec::Compute::Property::BackendServiceConnectionDraining.new(obj['connectionDraining'], to_s)] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'customRequestHeaders' => ->(obj) { [:custom_request_headers, obj['customRequestHeaders']] }, - 'customResponseHeaders' => ->(obj) { [:custom_response_headers, obj['customResponseHeaders']] }, - 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'enableCDN' => ->(obj) { [:enable_cdn, obj['enableCDN']] }, - 'healthChecks' => ->(obj) { [:health_checks, obj['healthChecks']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'iap' => ->(obj) { [:iap, GoogleInSpec::Compute::Property::BackendServiceIap.new(obj['iap'], to_s)] }, - 'loadBalancingScheme' => ->(obj) { [:load_balancing_scheme, obj['loadBalancingScheme']] }, - 'localityLbPolicy' => ->(obj) { [:locality_lb_policy, obj['localityLbPolicy']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'outlierDetection' => ->(obj) { [:outlier_detection, GoogleInSpec::Compute::Property::BackendServiceOutlierDetection.new(obj['outlierDetection'], to_s)] }, - 'portName' => ->(obj) { [:port_name, obj['portName']] }, - 'protocol' => ->(obj) { [:protocol, obj['protocol']] }, - 'securityPolicy' => ->(obj) { [:security_policy, obj['securityPolicy']] }, - 'sessionAffinity' => ->(obj) { [:session_affinity, obj['sessionAffinity']] }, - 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, - 'logConfig' => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::BackendServiceLogConfig.new(obj['logConfig'], to_s)] }, + "affinityCookieTtlSec" => ->(obj) { [:affinity_cookie_ttl_sec, obj["affinityCookieTtlSec"]] }, + "backends" => ->(obj) { [:backends, GoogleInSpec::Compute::Property::BackendServiceBackendsArray.parse(obj["backends"], to_s)] }, + "circuitBreakers" => ->(obj) { [:circuit_breakers, GoogleInSpec::Compute::Property::BackendServiceCircuitBreakers.new(obj["circuitBreakers"], to_s)] }, + "consistentHash" => ->(obj) { [:consistent_hash, GoogleInSpec::Compute::Property::BackendServiceConsistentHash.new(obj["consistentHash"], to_s)] }, + "cdnPolicy" => ->(obj) { [:cdn_policy, GoogleInSpec::Compute::Property::BackendServiceCdnPolicy.new(obj["cdnPolicy"], to_s)] }, + "connectionDraining" => ->(obj) { [:connection_draining, GoogleInSpec::Compute::Property::BackendServiceConnectionDraining.new(obj["connectionDraining"], to_s)] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "customRequestHeaders" => ->(obj) { [:custom_request_headers, obj["customRequestHeaders"]] }, + "customResponseHeaders" => ->(obj) { [:custom_response_headers, obj["customResponseHeaders"]] }, + "fingerprint" => ->(obj) { [:fingerprint, obj["fingerprint"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "enableCDN" => ->(obj) { [:enable_cdn, obj["enableCDN"]] }, + "healthChecks" => ->(obj) { [:health_checks, obj["healthChecks"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "iap" => ->(obj) { [:iap, GoogleInSpec::Compute::Property::BackendServiceIap.new(obj["iap"], to_s)] }, + "loadBalancingScheme" => ->(obj) { [:load_balancing_scheme, obj["loadBalancingScheme"]] }, + "localityLbPolicy" => ->(obj) { [:locality_lb_policy, obj["localityLbPolicy"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "outlierDetection" => ->(obj) { [:outlier_detection, GoogleInSpec::Compute::Property::BackendServiceOutlierDetection.new(obj["outlierDetection"], to_s)] }, + "portName" => ->(obj) { [:port_name, obj["portName"]] }, + "protocol" => ->(obj) { [:protocol, obj["protocol"]] }, + "securityPolicy" => ->(obj) { [:security_policy, obj["securityPolicy"]] }, + "sessionAffinity" => ->(obj) { [:session_affinity, obj["sessionAffinity"]] }, + "timeoutSec" => ->(obj) { [:timeout_sec, obj["timeoutSec"]] }, + "logConfig" => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::BackendServiceLogConfig.new(obj["logConfig"], to_s)] }, } end @@ -124,13 +124,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/backendServices' + "projects/{{project}}/global/backendServices" end end diff --git a/libraries/google_compute_disk.rb b/libraries/google_compute_disk.rb index e9a64a595..aca1c145b 100644 --- a/libraries/google_compute_disk.rb +++ b/libraries/google_compute_disk.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/disk_disk_encryption_key' -require 'google/compute/property/disk_source_image_encryption_key' -require 'google/compute/property/disk_source_snapshot_encryption_key' +require "gcp_backend" +require "google/compute/property/disk_disk_encryption_key" +require "google/compute/property/disk_source_image_encryption_key" +require "google/compute/property/disk_source_snapshot_encryption_key" # A provider to manage Compute Engine resources. class ComputeDisk < GcpResourceBase - name 'google_compute_disk' - desc 'Disk' - supports platform: 'gcp' + name "google_compute_disk" + desc "Disk" + supports platform: "gcp" attr_reader :params attr_reader :label_fingerprint @@ -53,35 +53,35 @@ class ComputeDisk < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @label_fingerprint = @fetched['labelFingerprint'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @last_attach_timestamp = parse_time_string(@fetched['lastAttachTimestamp']) - @last_detach_timestamp = parse_time_string(@fetched['lastDetachTimestamp']) - @labels = @fetched['labels'] - @licenses = @fetched['licenses'] - @name = @fetched['name'] - @size_gb = @fetched['sizeGb'] - @users = @fetched['users'] - @physical_block_size_bytes = @fetched['physicalBlockSizeBytes'] - @interface = @fetched['interface'] - @type = @fetched['type'] - @source_image = @fetched['sourceImage'] - @resource_policies = @fetched['resourcePolicies'] - @multi_writer = @fetched['multiWriter'] - @zone = @fetched['zone'] - @source_image_encryption_key = GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(@fetched['sourceImageEncryptionKey'], to_s) - @source_image_id = @fetched['sourceImageId'] - @disk_encryption_key = GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(@fetched['diskEncryptionKey'], to_s) - @source_snapshot = @fetched['sourceSnapshot'] - @source_snapshot_encryption_key = GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(@fetched['sourceSnapshotEncryptionKey'], to_s) - @source_snapshot_id = @fetched['sourceSnapshotId'] + @label_fingerprint = @fetched["labelFingerprint"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @last_attach_timestamp = parse_time_string(@fetched["lastAttachTimestamp"]) + @last_detach_timestamp = parse_time_string(@fetched["lastDetachTimestamp"]) + @labels = @fetched["labels"] + @licenses = @fetched["licenses"] + @name = @fetched["name"] + @size_gb = @fetched["sizeGb"] + @users = @fetched["users"] + @physical_block_size_bytes = @fetched["physicalBlockSizeBytes"] + @interface = @fetched["interface"] + @type = @fetched["type"] + @source_image = @fetched["sourceImage"] + @resource_policies = @fetched["resourcePolicies"] + @multi_writer = @fetched["multiWriter"] + @zone = @fetched["zone"] + @source_image_encryption_key = GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(@fetched["sourceImageEncryptionKey"], to_s) + @source_image_id = @fetched["sourceImageId"] + @disk_encryption_key = GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(@fetched["diskEncryptionKey"], to_s) + @source_snapshot = @fetched["sourceSnapshot"] + @source_snapshot_encryption_key = GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(@fetched["sourceSnapshotEncryptionKey"], to_s) + @source_snapshot_id = @fetched["sourceSnapshotId"] end # Handles parsing RFC3339 time string @@ -101,13 +101,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/disks/{{name}}' + "projects/{{project}}/zones/{{zone}}/disks/{{name}}" end end diff --git a/libraries/google_compute_disk_type.rb b/libraries/google_compute_disk_type.rb index 3dcca7bc8..1b1d6e2c5 100644 --- a/libraries/google_compute_disk_type.rb +++ b/libraries/google_compute_disk_type.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/disktype_deprecated' +require "gcp_backend" +require "google/compute/property/disktype_deprecated" # A provider to manage Compute Engine resources. class ComputeDiskType < GcpResourceBase - name 'google_compute_disk_type' - desc 'DiskType' - supports platform: 'gcp' + name "google_compute_disk_type" + desc "DiskType" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -35,19 +35,19 @@ class ComputeDiskType < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @default_disk_size_gb = @fetched['defaultDiskSizeGb'] - @deprecated = GoogleInSpec::Compute::Property::DiskTypeDeprecated.new(@fetched['deprecated'], to_s) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @valid_disk_size = @fetched['validDiskSize'] - @zone = @fetched['zone'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @default_disk_size_gb = @fetched["defaultDiskSizeGb"] + @deprecated = GoogleInSpec::Compute::Property::DiskTypeDeprecated.new(@fetched["deprecated"], to_s) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @valid_disk_size = @fetched["validDiskSize"] + @zone = @fetched["zone"] end # Handles parsing RFC3339 time string @@ -66,10 +66,10 @@ def to_s private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/diskTypes/{{name}}' + "projects/{{project}}/zones/{{zone}}/diskTypes/{{name}}" end end diff --git a/libraries/google_compute_disk_types.rb b/libraries/google_compute_disk_types.rb index da54b8fdc..1b846af96 100644 --- a/libraries/google_compute_disk_types.rb +++ b/libraries/google_compute_disk_types.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeDiskTypes < GcpResourceBase - name 'google_compute_disk_types' - desc 'DiskType plural resource' - supports platform: 'gcp' + name "google_compute_disk_types" + desc "DiskType plural resource" + supports platform: "gcp" attr_reader :table @@ -37,12 +37,12 @@ class ComputeDiskTypes < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'defaultDiskSizeGb' => ->(obj) { [:default_disk_size_gb, obj['defaultDiskSizeGb']] }, - 'deprecated' => ->(obj) { [:deprecated, GoogleInSpec::Compute::Property::DiskTypeDeprecated.new(obj['deprecated'], to_s)] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'validDiskSize' => ->(obj) { [:valid_disk_size, obj['validDiskSize']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "defaultDiskSizeGb" => ->(obj) { [:default_disk_size_gb, obj["defaultDiskSizeGb"]] }, + "deprecated" => ->(obj) { [:deprecated, GoogleInSpec::Compute::Property::DiskTypeDeprecated.new(obj["deprecated"], to_s)] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "validDiskSize" => ->(obj) { [:valid_disk_size, obj["validDiskSize"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, } end @@ -89,10 +89,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/diskTypes' + "projects/{{project}}/zones/{{zone}}/diskTypes" end end diff --git a/libraries/google_compute_disks.rb b/libraries/google_compute_disks.rb index 793eef0d0..f3629c863 100644 --- a/libraries/google_compute_disks.rb +++ b/libraries/google_compute_disks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeDisks < GcpResourceBase - name 'google_compute_disks' - desc 'Disk plural resource' - supports platform: 'gcp' + name "google_compute_disks" + desc "Disk plural resource" + supports platform: "gcp" attr_reader :table @@ -53,12 +53,12 @@ class ComputeDisks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -86,30 +86,30 @@ def transform(key, value) def transformers { - 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'lastAttachTimestamp' => ->(obj) { [:last_attach_timestamp, parse_time_string(obj['lastAttachTimestamp'])] }, - 'lastDetachTimestamp' => ->(obj) { [:last_detach_timestamp, parse_time_string(obj['lastDetachTimestamp'])] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'licenses' => ->(obj) { [:licenses, obj['licenses']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'sizeGb' => ->(obj) { [:size_gb, obj['sizeGb']] }, - 'users' => ->(obj) { [:users, obj['users']] }, - 'physicalBlockSizeBytes' => ->(obj) { [:physical_block_size_bytes, obj['physicalBlockSizeBytes']] }, - 'interface' => ->(obj) { [:interface, obj['interface']] }, - 'type' => ->(obj) { [:type, obj['type']] }, - 'sourceImage' => ->(obj) { [:source_image, obj['sourceImage']] }, - 'resourcePolicies' => ->(obj) { [:resource_policies, obj['resourcePolicies']] }, - 'multiWriter' => ->(obj) { [:multi_writer, obj['multiWriter']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, - 'sourceImageEncryptionKey' => ->(obj) { [:source_image_encryption_key, GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(obj['sourceImageEncryptionKey'], to_s)] }, - 'sourceImageId' => ->(obj) { [:source_image_id, obj['sourceImageId']] }, - 'diskEncryptionKey' => ->(obj) { [:disk_encryption_key, GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(obj['diskEncryptionKey'], to_s)] }, - 'sourceSnapshot' => ->(obj) { [:source_snapshot, obj['sourceSnapshot']] }, - 'sourceSnapshotEncryptionKey' => ->(obj) { [:source_snapshot_encryption_key, GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(obj['sourceSnapshotEncryptionKey'], to_s)] }, - 'sourceSnapshotId' => ->(obj) { [:source_snapshot_id, obj['sourceSnapshotId']] }, + "labelFingerprint" => ->(obj) { [:label_fingerprint, obj["labelFingerprint"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "lastAttachTimestamp" => ->(obj) { [:last_attach_timestamp, parse_time_string(obj["lastAttachTimestamp"])] }, + "lastDetachTimestamp" => ->(obj) { [:last_detach_timestamp, parse_time_string(obj["lastDetachTimestamp"])] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "licenses" => ->(obj) { [:licenses, obj["licenses"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "sizeGb" => ->(obj) { [:size_gb, obj["sizeGb"]] }, + "users" => ->(obj) { [:users, obj["users"]] }, + "physicalBlockSizeBytes" => ->(obj) { [:physical_block_size_bytes, obj["physicalBlockSizeBytes"]] }, + "interface" => ->(obj) { [:interface, obj["interface"]] }, + "type" => ->(obj) { [:type, obj["type"]] }, + "sourceImage" => ->(obj) { [:source_image, obj["sourceImage"]] }, + "resourcePolicies" => ->(obj) { [:resource_policies, obj["resourcePolicies"]] }, + "multiWriter" => ->(obj) { [:multi_writer, obj["multiWriter"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, + "sourceImageEncryptionKey" => ->(obj) { [:source_image_encryption_key, GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(obj["sourceImageEncryptionKey"], to_s)] }, + "sourceImageId" => ->(obj) { [:source_image_id, obj["sourceImageId"]] }, + "diskEncryptionKey" => ->(obj) { [:disk_encryption_key, GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(obj["diskEncryptionKey"], to_s)] }, + "sourceSnapshot" => ->(obj) { [:source_snapshot, obj["sourceSnapshot"]] }, + "sourceSnapshotEncryptionKey" => ->(obj) { [:source_snapshot_encryption_key, GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(obj["sourceSnapshotEncryptionKey"], to_s)] }, + "sourceSnapshotId" => ->(obj) { [:source_snapshot_id, obj["sourceSnapshotId"]] }, } end @@ -122,13 +122,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/disks' + "projects/{{project}}/zones/{{zone}}/disks" end end diff --git a/libraries/google_compute_external_vpn_gateway.rb b/libraries/google_compute_external_vpn_gateway.rb index a7461dd6e..19f1e7dd7 100644 --- a/libraries/google_compute_external_vpn_gateway.rb +++ b/libraries/google_compute_external_vpn_gateway.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/externalvpngateway_interfaces' +require "gcp_backend" +require "google/compute/property/externalvpngateway_interfaces" # A provider to manage Compute Engine resources. class ComputeexternalVpnGateway < GcpResourceBase - name 'google_compute_external_vpn_gateway' - desc 'externalVpnGateway' - supports platform: 'gcp' + name "google_compute_external_vpn_gateway" + desc "externalVpnGateway" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -36,20 +36,20 @@ class ComputeexternalVpnGateway < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @redundancy_type = @fetched['redundancyType'] - @interfaces = GoogleInSpec::Compute::Property::ExternalVpnGatewayInterfacesArray.parse(@fetched['interfaces'], to_s) - @labels = @fetched['labels'] - @label_fingerprint = @fetched['labelFingerprint'] - @next_page_token = @fetched['nextPageToken'] - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @redundancy_type = @fetched["redundancyType"] + @interfaces = GoogleInSpec::Compute::Property::ExternalVpnGatewayInterfacesArray.parse(@fetched["interfaces"], to_s) + @labels = @fetched["labels"] + @label_fingerprint = @fetched["labelFingerprint"] + @next_page_token = @fetched["nextPageToken"] + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] end # Handles parsing RFC3339 time string @@ -68,10 +68,10 @@ def to_s private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/externalVpnGateways/{{name}}' + "projects/{{project}}/global/externalVpnGateways/{{name}}" end end diff --git a/libraries/google_compute_external_vpn_gateways.rb b/libraries/google_compute_external_vpn_gateways.rb index ea7f63215..2ec8b9a54 100644 --- a/libraries/google_compute_external_vpn_gateways.rb +++ b/libraries/google_compute_external_vpn_gateways.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeexternalVpnGateways < GcpResourceBase - name 'google_compute_external_vpn_gateways' - desc 'externalVpnGateway plural resource' - supports platform: 'gcp' + name "google_compute_external_vpn_gateways" + desc "externalVpnGateway plural resource" + supports platform: "gcp" attr_reader :table @@ -38,12 +38,12 @@ class ComputeexternalVpnGateways < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'redundancyType' => ->(obj) { [:redundancy_type, obj['redundancyType']] }, - 'interfaces' => ->(obj) { [:interfaces, GoogleInSpec::Compute::Property::ExternalVpnGatewayInterfacesArray.parse(obj['interfaces'], to_s)] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, - 'nextPageToken' => ->(obj) { [:next_page_token, obj['nextPageToken']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "redundancyType" => ->(obj) { [:redundancy_type, obj["redundancyType"]] }, + "interfaces" => ->(obj) { [:interfaces, GoogleInSpec::Compute::Property::ExternalVpnGatewayInterfacesArray.parse(obj["interfaces"], to_s)] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "labelFingerprint" => ->(obj) { [:label_fingerprint, obj["labelFingerprint"]] }, + "nextPageToken" => ->(obj) { [:next_page_token, obj["nextPageToken"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, } end @@ -91,10 +91,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/externalVpnGateways' + "projects/{{project}}/global/externalVpnGateways" end end diff --git a/libraries/google_compute_firewall.rb b/libraries/google_compute_firewall.rb index 3bb58e365..90d8449a9 100644 --- a/libraries/google_compute_firewall.rb +++ b/libraries/google_compute_firewall.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/firewall_allowed' -require 'google/compute/property/firewall_denied' -require 'google/compute/property/firewall_log_config' +require "gcp_backend" +require "google/compute/property/firewall_allowed" +require "google/compute/property/firewall_denied" +require "google/compute/property/firewall_log_config" # A provider to manage Compute Engine resources. class ComputeFirewall < GcpResourceBase - name 'google_compute_firewall' - desc 'Firewall' - supports platform: 'gcp' + name "google_compute_firewall" + desc "Firewall" + supports platform: "gcp" attr_reader :params attr_reader :allowed @@ -47,29 +47,29 @@ class ComputeFirewall < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @allowed = GoogleInSpec::Compute::Property::FirewallAllowedArray.parse(@fetched['allowed'], to_s) - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @denied = GoogleInSpec::Compute::Property::FirewallDeniedArray.parse(@fetched['denied'], to_s) - @description = @fetched['description'] - @destination_ranges = @fetched['destinationRanges'] - @direction = @fetched['direction'] - @disabled = @fetched['disabled'] - @log_config = GoogleInSpec::Compute::Property::FirewallLogConfig.new(@fetched['logConfig'], to_s) - @id = @fetched['id'] - @name = @fetched['name'] - @network = @fetched['network'] - @priority = @fetched['priority'] - @source_ranges = @fetched['sourceRanges'] - @source_service_accounts = @fetched['sourceServiceAccounts'] - @source_tags = @fetched['sourceTags'] - @target_service_accounts = @fetched['targetServiceAccounts'] - @target_tags = @fetched['targetTags'] - @action = @allowed.nil? ? 'deny' : 'allow' + @allowed = GoogleInSpec::Compute::Property::FirewallAllowedArray.parse(@fetched["allowed"], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @denied = GoogleInSpec::Compute::Property::FirewallDeniedArray.parse(@fetched["denied"], to_s) + @description = @fetched["description"] + @destination_ranges = @fetched["destinationRanges"] + @direction = @fetched["direction"] + @disabled = @fetched["disabled"] + @log_config = GoogleInSpec::Compute::Property::FirewallLogConfig.new(@fetched["logConfig"], to_s) + @id = @fetched["id"] + @name = @fetched["name"] + @network = @fetched["network"] + @priority = @fetched["priority"] + @source_ranges = @fetched["sourceRanges"] + @source_service_accounts = @fetched["sourceServiceAccounts"] + @source_tags = @fetched["sourceTags"] + @target_service_accounts = @fetched["targetServiceAccounts"] + @target_tags = @fetched["targetTags"] + @action = @allowed.nil? ? "deny" : "allow" end # Handles parsing RFC3339 time string @@ -87,116 +87,116 @@ def to_s # Check whether the firewall rule allows HTTP access (tcp ingress on port 80) def allowed_http? - port_protocol_allowed('80') + port_protocol_allowed("80") end def denied_http? - port_protocol_denied('80') + port_protocol_denied("80") end # Check whether the firewall rule allows SSH access (tcp ingress on port 22) def allowed_ssh? - port_protocol_allowed('22') + port_protocol_allowed("22") end def denied_ssh? - port_protocol_denied('22') + port_protocol_denied("22") end def allowed_https? - port_protocol_allowed('443') + port_protocol_allowed("443") end def denied_https? - port_protocol_denied('443') + port_protocol_denied("443") end def allowed_rdp? - port_protocol_allowed('3389') + port_protocol_allowed("3389") end def denied_rdp? - port_protocol_denied('3389') + port_protocol_denied("3389") end def allowed_dns? - port_protocol_allowed('53') || port_protocol_allowed('53', 'udp') + port_protocol_allowed("53") || port_protocol_allowed("53", "udp") end def allowed_cifs? - port_protocol_allowed('445', 'udp') + port_protocol_allowed("445", "udp") end def allowed_ftp? - port_protocol_allowed('20') || port_protocol_allowed('21') + port_protocol_allowed("20") || port_protocol_allowed("21") end def allowed_hdfs_name_node_service? - port_protocol_allowed('8020') + port_protocol_allowed("8020") end def allowed_name_node_webui_service? - port_protocol_allowed('50070') || port_protocol_allowed('50470') + port_protocol_allowed("50070") || port_protocol_allowed("50470") end def allowed_kibana? - port_protocol_allowed('5601') + port_protocol_allowed("5601") end def allowed_mysql? - port_protocol_allowed('4333') || port_protocol_allowed('3306') + port_protocol_allowed("4333") || port_protocol_allowed("3306") end def allowed_net_bios? - port_protocol_allowed('137', 'udp') || port_protocol_allowed('138', 'udp') + port_protocol_allowed("137", "udp") || port_protocol_allowed("138", "udp") end def allowed_oracle? - port_protocol_allowed('1521') + port_protocol_allowed("1521") end def allowed_postgre_sql? - port_protocol_allowed('5432') + port_protocol_allowed("5432") end def allowed_rpc? - port_protocol_allowed('135') + port_protocol_allowed("135") end def allowed_sql_server? - port_protocol_allowed('1434') || port_protocol_allowed('1433') + port_protocol_allowed("1434") || port_protocol_allowed("1433") end def allowed_smtp? - port_protocol_allowed('25') + port_protocol_allowed("25") end def allowed_windows_smb? - port_protocol_allowed('445') + port_protocol_allowed("445") end def allowed_vnc_server? - port_protocol_allowed('5900') + port_protocol_allowed("5900") end def allowed_vnc_client? - port_protocol_allowed('5500') + port_protocol_allowed("5500") end def allowed_telnet? - port_protocol_allowed('23') + port_protocol_allowed("23") end def allowed_oracle_auto_data_warehouse? - port_protocol_allowed('1522') + port_protocol_allowed("1522") end def allowed_salt_master? - port_protocol_allowed('4505') || port_protocol_allowed('4506') + port_protocol_allowed("4505") || port_protocol_allowed("4506") end def allowed_docker? - port_protocol_allowed('2375') || port_protocol_allowed('2376') + port_protocol_allowed("2375") || port_protocol_allowed("2376") end def allow_port_protocol?(port, protocol) @@ -318,7 +318,7 @@ def allow_ip_range_list(ip_range_list, only = false) # end # direction affects what the property is e.g. INGRESS->source_ranges, EGRESS->destination_ranges ranges = nil - if direction == 'INGRESS' + if direction == "INGRESS" return false if !defined?(source_ranges) || source_ranges.nil? ranges = source_ranges else @@ -334,7 +334,7 @@ def deny_ip_range_list(ip_range_list, only = false) raise Inspec::Exceptions::ResourceFailed, "google_compute_firewall is missing expected property 'direction'" if !defined?(direction) || direction.nil? raise Inspec::Exceptions::ResourceFailed, "google_compute_firewall is missing expected property 'denied'" if !defined?(denied) || denied.nil? ranges = nil - if direction == 'INGRESS' + if direction == "INGRESS" return false if !defined?(source_ranges) || source_ranges.nil? ranges = source_ranges else @@ -351,7 +351,7 @@ def match_rule_protocol(property, single_port, protocol, allowed_flag) # however in the case of 'denied' the logic of allowed is inverted # first consider the special case of 'all' where no ports/protocols are listed explicitly # and applies to all protocols - if property.count == 1 and property[0].ip_protocol == 'all' + if property.count == 1 and property[0].ip_protocol == "all" return true if allowed_flag # an allowed rule that will match all ports/protocols return false # i.e. this is a deny all rule and will block all ports/protocols end @@ -384,7 +384,7 @@ def match_rule_protocol(property, single_port, protocol, allowed_flag) end # NOTE: that port_list only accepts individual ports to match, not ranges - def port_protocol_allowed(single_port, protocol = 'tcp') + def port_protocol_allowed(single_port, protocol = "tcp") raise Inspec::Exceptions::ResourceFailed, "google_compute_firewall is missing expected property 'allowed' or 'denied'" if !defined?(allowed) || !defined?(denied) raise Inspec::Exceptions::ResourceFailed, "google_compute_firewall 'allowed' and 'denied' cannot both be nil" if allowed.nil? && denied.nil? allowed_flag = denied.nil? @@ -392,20 +392,20 @@ def port_protocol_allowed(single_port, protocol = 'tcp') match_rule_protocol(denied, single_port, protocol, allowed_flag) end - def port_protocol_denied(single_port, protocol = 'tcp') + def port_protocol_denied(single_port, protocol = "tcp") port_protocol_allowed(single_port, protocol) end def single_port_matches(rule_port, single_port) # if '-' in there it means we should check each provided port for existence in a range - if !rule_port.include? '-' + if !rule_port.include? "-" # simplest case, only one port string specified return true if rule_port == single_port # if not, no match else # the rule_port here is a range such as "4000-5000", protect against any non-integer input by checking for nil values - upper_limit = rule_port.split('-')[1].to_i - lower_limit = rule_port.split('-')[0].to_i + upper_limit = rule_port.split("-")[1].to_i + lower_limit = rule_port.split("-")[0].to_i raise Inspec::Exceptions::ResourceFailed, "google_compute_firewall unexpected port range specified: '#{rule_port}'" if upper_limit.nil? || lower_limit.nil? return true if single_port.to_i.between?(lower_limit, upper_limit) # if not, no match @@ -422,13 +422,13 @@ def log_config_enabled? def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/firewalls/{{name}}' + "projects/{{project}}/global/firewalls/{{name}}" end end diff --git a/libraries/google_compute_firewalls.rb b/libraries/google_compute_firewalls.rb index 7cb5322d1..da1a325c4 100644 --- a/libraries/google_compute_firewalls.rb +++ b/libraries/google_compute_firewalls.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeFirewalls < GcpResourceBase - name 'google_compute_firewalls' - desc 'Firewall plural resource' - supports platform: 'gcp' + name "google_compute_firewalls" + desc "Firewall plural resource" + supports platform: "gcp" attr_reader :table @@ -46,12 +46,12 @@ class ComputeFirewalls < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -79,23 +79,23 @@ def transform(key, value) def transformers { - 'allowed' => ->(obj) { [:allowed, GoogleInSpec::Compute::Property::FirewallAllowedArray.parse(obj['allowed'], to_s)] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'denied' => ->(obj) { [:denied, GoogleInSpec::Compute::Property::FirewallDeniedArray.parse(obj['denied'], to_s)] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'destinationRanges' => ->(obj) { [:destination_ranges, obj['destinationRanges']] }, - 'direction' => ->(obj) { [:firewall_direction, obj['direction']] }, - 'disabled' => ->(obj) { [:disabled, obj['disabled']] }, - 'logConfig' => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::FirewallLogConfig.new(obj['logConfig'], to_s)] }, - 'id' => ->(obj) { [:firewall_id, obj['id']] }, - 'name' => ->(obj) { [:firewall_name, obj['name']] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'priority' => ->(obj) { [:priority, obj['priority']] }, - 'sourceRanges' => ->(obj) { [:source_ranges, obj['sourceRanges']] }, - 'sourceServiceAccounts' => ->(obj) { [:source_service_accounts, obj['sourceServiceAccounts']] }, - 'sourceTags' => ->(obj) { [:source_tags, obj['sourceTags']] }, - 'targetServiceAccounts' => ->(obj) { [:target_service_accounts, obj['targetServiceAccounts']] }, - 'targetTags' => ->(obj) { [:target_tags, obj['targetTags']] }, + "allowed" => ->(obj) { [:allowed, GoogleInSpec::Compute::Property::FirewallAllowedArray.parse(obj["allowed"], to_s)] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "denied" => ->(obj) { [:denied, GoogleInSpec::Compute::Property::FirewallDeniedArray.parse(obj["denied"], to_s)] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "destinationRanges" => ->(obj) { [:destination_ranges, obj["destinationRanges"]] }, + "direction" => ->(obj) { [:firewall_direction, obj["direction"]] }, + "disabled" => ->(obj) { [:disabled, obj["disabled"]] }, + "logConfig" => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::FirewallLogConfig.new(obj["logConfig"], to_s)] }, + "id" => ->(obj) { [:firewall_id, obj["id"]] }, + "name" => ->(obj) { [:firewall_name, obj["name"]] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "priority" => ->(obj) { [:priority, obj["priority"]] }, + "sourceRanges" => ->(obj) { [:source_ranges, obj["sourceRanges"]] }, + "sourceServiceAccounts" => ->(obj) { [:source_service_accounts, obj["sourceServiceAccounts"]] }, + "sourceTags" => ->(obj) { [:source_tags, obj["sourceTags"]] }, + "targetServiceAccounts" => ->(obj) { [:target_service_accounts, obj["targetServiceAccounts"]] }, + "targetTags" => ->(obj) { [:target_tags, obj["targetTags"]] }, } end @@ -108,13 +108,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/firewalls' + "projects/{{project}}/global/firewalls" end end diff --git a/libraries/google_compute_forwarding_rule.rb b/libraries/google_compute_forwarding_rule.rb index c189b0883..f6111dd5f 100644 --- a/libraries/google_compute_forwarding_rule.rb +++ b/libraries/google_compute_forwarding_rule.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeForwardingRule < GcpResourceBase - name 'google_compute_forwarding_rule' - desc 'ForwardingRule' - supports platform: 'gcp' + name "google_compute_forwarding_rule" + desc "ForwardingRule" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -48,33 +48,33 @@ class ComputeForwardingRule < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @is_mirroring_collector = @fetched['isMirroringCollector'] - @description = @fetched['description'] - @id = @fetched['id'] - @ip_address = @fetched['IPAddress'] - @ip_protocol = @fetched['IPProtocol'] - @backend_service = @fetched['backendService'] - @load_balancing_scheme = @fetched['loadBalancingScheme'] - @name = @fetched['name'] - @network = name_from_self_link(@fetched['network']) - @port_range = @fetched['portRange'] - @ports = @fetched['ports'] - @subnetwork = @fetched['subnetwork'] - @target = @fetched['target'] - @allow_global_access = @fetched['allowGlobalAccess'] - @labels = @fetched['labels'] - @label_fingerprint = @fetched['labelFingerprint'] - @all_ports = @fetched['allPorts'] - @network_tier = @fetched['networkTier'] - @service_label = @fetched['serviceLabel'] - @service_name = @fetched['serviceName'] - @region = @fetched['region'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @is_mirroring_collector = @fetched["isMirroringCollector"] + @description = @fetched["description"] + @id = @fetched["id"] + @ip_address = @fetched["IPAddress"] + @ip_protocol = @fetched["IPProtocol"] + @backend_service = @fetched["backendService"] + @load_balancing_scheme = @fetched["loadBalancingScheme"] + @name = @fetched["name"] + @network = name_from_self_link(@fetched["network"]) + @port_range = @fetched["portRange"] + @ports = @fetched["ports"] + @subnetwork = @fetched["subnetwork"] + @target = @fetched["target"] + @allow_global_access = @fetched["allowGlobalAccess"] + @labels = @fetched["labels"] + @label_fingerprint = @fetched["labelFingerprint"] + @all_ports = @fetched["allPorts"] + @network_tier = @fetched["networkTier"] + @service_label = @fetched["serviceLabel"] + @service_name = @fetched["serviceName"] + @region = @fetched["region"] end # Handles parsing RFC3339 time string @@ -94,13 +94,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/forwardingRules/{{name}}' + "projects/{{project}}/regions/{{region}}/forwardingRules/{{name}}" end end diff --git a/libraries/google_compute_forwarding_rules.rb b/libraries/google_compute_forwarding_rules.rb index a3a3aba56..cafff6d2d 100644 --- a/libraries/google_compute_forwarding_rules.rb +++ b/libraries/google_compute_forwarding_rules.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeForwardingRules < GcpResourceBase - name 'google_compute_forwarding_rules' - desc 'ForwardingRule plural resource' - supports platform: 'gcp' + name "google_compute_forwarding_rules" + desc "ForwardingRule plural resource" + supports platform: "gcp" attr_reader :table @@ -51,12 +51,12 @@ class ComputeForwardingRules < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -84,28 +84,28 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'isMirroringCollector' => ->(obj) { [:is_mirroring_collector, obj['isMirroringCollector']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:forwarding_rule_id, obj['id']] }, - 'IPAddress' => ->(obj) { [:ip_address, obj['IPAddress']] }, - 'IPProtocol' => ->(obj) { [:ip_protocol, obj['IPProtocol']] }, - 'backendService' => ->(obj) { [:backend_service, obj['backendService']] }, - 'loadBalancingScheme' => ->(obj) { [:forwarding_rule_load_balancing_scheme, obj['loadBalancingScheme']] }, - 'name' => ->(obj) { [:forwarding_rule_name, obj['name']] }, - 'network' => ->(obj) { [:forwarding_rule_network, name_from_self_link(obj['network'])] }, - 'portRange' => ->(obj) { [:port_range, obj['portRange']] }, - 'ports' => ->(obj) { [:ports, obj['ports']] }, - 'subnetwork' => ->(obj) { [:subnetwork, obj['subnetwork']] }, - 'target' => ->(obj) { [:target, obj['target']] }, - 'allowGlobalAccess' => ->(obj) { [:allow_global_access, obj['allowGlobalAccess']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, - 'allPorts' => ->(obj) { [:all_ports, obj['allPorts']] }, - 'networkTier' => ->(obj) { [:network_tier, obj['networkTier']] }, - 'serviceLabel' => ->(obj) { [:service_label, obj['serviceLabel']] }, - 'serviceName' => ->(obj) { [:service_name, obj['serviceName']] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "isMirroringCollector" => ->(obj) { [:is_mirroring_collector, obj["isMirroringCollector"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:forwarding_rule_id, obj["id"]] }, + "IPAddress" => ->(obj) { [:ip_address, obj["IPAddress"]] }, + "IPProtocol" => ->(obj) { [:ip_protocol, obj["IPProtocol"]] }, + "backendService" => ->(obj) { [:backend_service, obj["backendService"]] }, + "loadBalancingScheme" => ->(obj) { [:forwarding_rule_load_balancing_scheme, obj["loadBalancingScheme"]] }, + "name" => ->(obj) { [:forwarding_rule_name, obj["name"]] }, + "network" => ->(obj) { [:forwarding_rule_network, name_from_self_link(obj["network"])] }, + "portRange" => ->(obj) { [:port_range, obj["portRange"]] }, + "ports" => ->(obj) { [:ports, obj["ports"]] }, + "subnetwork" => ->(obj) { [:subnetwork, obj["subnetwork"]] }, + "target" => ->(obj) { [:target, obj["target"]] }, + "allowGlobalAccess" => ->(obj) { [:allow_global_access, obj["allowGlobalAccess"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "labelFingerprint" => ->(obj) { [:label_fingerprint, obj["labelFingerprint"]] }, + "allPorts" => ->(obj) { [:all_ports, obj["allPorts"]] }, + "networkTier" => ->(obj) { [:network_tier, obj["networkTier"]] }, + "serviceLabel" => ->(obj) { [:service_label, obj["serviceLabel"]] }, + "serviceName" => ->(obj) { [:service_name, obj["serviceName"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end @@ -118,13 +118,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/forwardingRules' + "projects/{{project}}/regions/{{region}}/forwardingRules" end end diff --git a/libraries/google_compute_global_address.rb b/libraries/google_compute_global_address.rb index eea487b97..466c5846b 100644 --- a/libraries/google_compute_global_address.rb +++ b/libraries/google_compute_global_address.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeGlobalAddress < GcpResourceBase - name 'google_compute_global_address' - desc 'GlobalAddress' - supports platform: 'gcp' + name "google_compute_global_address" + desc "GlobalAddress" + supports platform: "gcp" attr_reader :params attr_reader :address @@ -39,24 +39,24 @@ class ComputeGlobalAddress < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @address = @fetched['address'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @labels = @fetched['labels'] - @label_fingerprint = @fetched['labelFingerprint'] - @ip_version = @fetched['ipVersion'] - @region = @fetched['region'] - @prefix_length = @fetched['prefixLength'] - @address_type = @fetched['addressType'] - @purpose = @fetched['purpose'] - @network = @fetched['network'] + @address = @fetched["address"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @labels = @fetched["labels"] + @label_fingerprint = @fetched["labelFingerprint"] + @ip_version = @fetched["ipVersion"] + @region = @fetched["region"] + @prefix_length = @fetched["prefixLength"] + @address_type = @fetched["addressType"] + @purpose = @fetched["purpose"] + @network = @fetched["network"] end # Handles parsing RFC3339 time string @@ -76,13 +76,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/addresses/{{name}}' + "projects/{{project}}/global/addresses/{{name}}" end end diff --git a/libraries/google_compute_global_addresses.rb b/libraries/google_compute_global_addresses.rb index 1e41691ea..50b8d08a3 100644 --- a/libraries/google_compute_global_addresses.rb +++ b/libraries/google_compute_global_addresses.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeGlobalAddresss < GcpResourceBase - name 'google_compute_global_addresses' - desc 'GlobalAddress plural resource' - supports platform: 'gcp' + name "google_compute_global_addresses" + desc "GlobalAddress plural resource" + supports platform: "gcp" attr_reader :table @@ -42,12 +42,12 @@ class ComputeGlobalAddresss < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'address' => ->(obj) { [:address, obj['address']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, - 'ipVersion' => ->(obj) { [:ip_version, obj['ipVersion']] }, - 'region' => ->(obj) { [:region, obj['region']] }, - 'prefixLength' => ->(obj) { [:prefix_length, obj['prefixLength']] }, - 'addressType' => ->(obj) { [:address_type, obj['addressType']] }, - 'purpose' => ->(obj) { [:purpose, obj['purpose']] }, - 'network' => ->(obj) { [:network, obj['network']] }, + "address" => ->(obj) { [:address, obj["address"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "labelFingerprint" => ->(obj) { [:label_fingerprint, obj["labelFingerprint"]] }, + "ipVersion" => ->(obj) { [:ip_version, obj["ipVersion"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, + "prefixLength" => ->(obj) { [:prefix_length, obj["prefixLength"]] }, + "addressType" => ->(obj) { [:address_type, obj["addressType"]] }, + "purpose" => ->(obj) { [:purpose, obj["purpose"]] }, + "network" => ->(obj) { [:network, obj["network"]] }, } end @@ -100,13 +100,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/addresses' + "projects/{{project}}/global/addresses" end end diff --git a/libraries/google_compute_global_forwarding_rule.rb b/libraries/google_compute_global_forwarding_rule.rb index d64127513..511585adc 100644 --- a/libraries/google_compute_global_forwarding_rule.rb +++ b/libraries/google_compute_global_forwarding_rule.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/globalforwardingrule_metadata_filters' +require "gcp_backend" +require "google/compute/property/globalforwardingrule_metadata_filters" # A provider to manage Compute Engine resources. class ComputeGlobalForwardingRule < GcpResourceBase - name 'google_compute_global_forwarding_rule' - desc 'GlobalForwardingRule' - supports platform: 'gcp' + name "google_compute_global_forwarding_rule" + desc "GlobalForwardingRule" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -41,25 +41,25 @@ class ComputeGlobalForwardingRule < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @ip_address = @fetched['IPAddress'] - @ip_protocol = @fetched['IPProtocol'] - @ip_version = @fetched['ipVersion'] - @labels = @fetched['labels'] - @label_fingerprint = @fetched['labelFingerprint'] - @load_balancing_scheme = @fetched['loadBalancingScheme'] - @metadata_filters = GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersArray.parse(@fetched['metadataFilters'], to_s) - @name = @fetched['name'] - @network = @fetched['network'] - @port_range = @fetched['portRange'] - @target = @fetched['target'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @ip_address = @fetched["IPAddress"] + @ip_protocol = @fetched["IPProtocol"] + @ip_version = @fetched["ipVersion"] + @labels = @fetched["labels"] + @label_fingerprint = @fetched["labelFingerprint"] + @load_balancing_scheme = @fetched["loadBalancingScheme"] + @metadata_filters = GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersArray.parse(@fetched["metadataFilters"], to_s) + @name = @fetched["name"] + @network = @fetched["network"] + @port_range = @fetched["portRange"] + @target = @fetched["target"] end # Handles parsing RFC3339 time string @@ -79,13 +79,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/forwardingRules/{{name}}' + "projects/{{project}}/global/forwardingRules/{{name}}" end end diff --git a/libraries/google_compute_global_forwarding_rules.rb b/libraries/google_compute_global_forwarding_rules.rb index 4986c043b..e6aaf89be 100644 --- a/libraries/google_compute_global_forwarding_rules.rb +++ b/libraries/google_compute_global_forwarding_rules.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeGlobalForwardingRules < GcpResourceBase - name 'google_compute_global_forwarding_rules' - desc 'GlobalForwardingRule plural resource' - supports platform: 'gcp' + name "google_compute_global_forwarding_rules" + desc "GlobalForwardingRule plural resource" + supports platform: "gcp" attr_reader :table @@ -43,12 +43,12 @@ class ComputeGlobalForwardingRules < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -76,20 +76,20 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'IPAddress' => ->(obj) { [:ip_address, obj['IPAddress']] }, - 'IPProtocol' => ->(obj) { [:ip_protocol, obj['IPProtocol']] }, - 'ipVersion' => ->(obj) { [:ip_version, obj['ipVersion']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, - 'loadBalancingScheme' => ->(obj) { [:load_balancing_scheme, obj['loadBalancingScheme']] }, - 'metadataFilters' => ->(obj) { [:metadata_filters, GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersArray.parse(obj['metadataFilters'], to_s)] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'portRange' => ->(obj) { [:port_range, obj['portRange']] }, - 'target' => ->(obj) { [:target, obj['target']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "IPAddress" => ->(obj) { [:ip_address, obj["IPAddress"]] }, + "IPProtocol" => ->(obj) { [:ip_protocol, obj["IPProtocol"]] }, + "ipVersion" => ->(obj) { [:ip_version, obj["ipVersion"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "labelFingerprint" => ->(obj) { [:label_fingerprint, obj["labelFingerprint"]] }, + "loadBalancingScheme" => ->(obj) { [:load_balancing_scheme, obj["loadBalancingScheme"]] }, + "metadataFilters" => ->(obj) { [:metadata_filters, GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersArray.parse(obj["metadataFilters"], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "portRange" => ->(obj) { [:port_range, obj["portRange"]] }, + "target" => ->(obj) { [:target, obj["target"]] }, } end @@ -102,13 +102,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/forwardingRules' + "projects/{{project}}/global/forwardingRules" end end diff --git a/libraries/google_compute_global_network_endpoint_group.rb b/libraries/google_compute_global_network_endpoint_group.rb index 48bdb855d..2989525ce 100644 --- a/libraries/google_compute_global_network_endpoint_group.rb +++ b/libraries/google_compute_global_network_endpoint_group.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeGlobalNetworkEndpointGroup < GcpResourceBase - name 'google_compute_global_network_endpoint_group' - desc 'GlobalNetworkEndpointGroup' - supports platform: 'gcp' + name "google_compute_global_network_endpoint_group" + desc "GlobalNetworkEndpointGroup" + supports platform: "gcp" attr_reader :params attr_reader :id @@ -31,16 +31,16 @@ class ComputeGlobalNetworkEndpointGroup < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @id = @fetched['id'] - @name = @fetched['name'] - @description = @fetched['description'] - @network_endpoint_type = @fetched['networkEndpointType'] - @default_port = @fetched['defaultPort'] + @id = @fetched["id"] + @name = @fetched["name"] + @description = @fetched["description"] + @network_endpoint_type = @fetched["networkEndpointType"] + @default_port = @fetched["defaultPort"] end def exists? @@ -54,10 +54,10 @@ def to_s private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/networkEndpointGroups/{{name}}' + "projects/{{project}}/global/networkEndpointGroups/{{name}}" end end diff --git a/libraries/google_compute_global_network_endpoint_groups.rb b/libraries/google_compute_global_network_endpoint_groups.rb index a904e9639..f5f60d414 100644 --- a/libraries/google_compute_global_network_endpoint_groups.rb +++ b/libraries/google_compute_global_network_endpoint_groups.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeGlobalNetworkEndpointGroups < GcpResourceBase - name 'google_compute_global_network_endpoint_groups' - desc 'GlobalNetworkEndpointGroup plural resource' - supports platform: 'gcp' + name "google_compute_global_network_endpoint_groups" + desc "GlobalNetworkEndpointGroup plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class ComputeGlobalNetworkEndpointGroups < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,21 +67,21 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'networkEndpointType' => ->(obj) { [:network_endpoint_type, obj['networkEndpointType']] }, - 'defaultPort' => ->(obj) { [:default_port, obj['defaultPort']] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "networkEndpointType" => ->(obj) { [:network_endpoint_type, obj["networkEndpointType"]] }, + "defaultPort" => ->(obj) { [:default_port, obj["defaultPort"]] }, } end private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/networkEndpointGroups' + "projects/{{project}}/global/networkEndpointGroups" end end diff --git a/libraries/google_compute_global_operation.rb b/libraries/google_compute_global_operation.rb index 303c6e46e..240ee85a5 100644 --- a/libraries/google_compute_global_operation.rb +++ b/libraries/google_compute_global_operation.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeGlobalOperation < GcpResourceBase - name 'google_compute_global_operation' - desc 'GlobalOperation' - supports platform: 'gcp' + name "google_compute_global_operation" + desc "GlobalOperation" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -40,25 +40,25 @@ class ComputeGlobalOperation < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @zone = @fetched['zone'] - @client_operation_id = @fetched['clientOperationId'] - @operation_type = @fetched['operationType'] - @user = @fetched['user'] - @progress = @fetched['progress'] - @insert_time = parse_time_string(@fetched['insertTime']) - @start_time = parse_time_string(@fetched['startTime']) - @end_time = parse_time_string(@fetched['endTime']) - @status = @fetched['status'] - @status_message = @fetched['statusMessage'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @zone = @fetched["zone"] + @client_operation_id = @fetched["clientOperationId"] + @operation_type = @fetched["operationType"] + @user = @fetched["user"] + @progress = @fetched["progress"] + @insert_time = parse_time_string(@fetched["insertTime"]) + @start_time = parse_time_string(@fetched["startTime"]) + @end_time = parse_time_string(@fetched["endTime"]) + @status = @fetched["status"] + @status_message = @fetched["statusMessage"] end # Handles parsing RFC3339 time string @@ -77,10 +77,10 @@ def to_s private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/operations/{{name}}' + "projects/{{project}}/global/operations/{{name}}" end end diff --git a/libraries/google_compute_global_operations.rb b/libraries/google_compute_global_operations.rb index 87f3cf9fd..04f62c6f5 100644 --- a/libraries/google_compute_global_operations.rb +++ b/libraries/google_compute_global_operations.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeGlobalOperations < GcpResourceBase - name 'google_compute_global_operations' - desc 'GlobalOperation plural resource' - supports platform: 'gcp' + name "google_compute_global_operations" + desc "GlobalOperation plural resource" + supports platform: "gcp" attr_reader :table @@ -43,12 +43,12 @@ class ComputeGlobalOperations < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -76,20 +76,20 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, - 'clientOperationId' => ->(obj) { [:client_operation_id, obj['clientOperationId']] }, - 'operationType' => ->(obj) { [:operation_type, obj['operationType']] }, - 'user' => ->(obj) { [:user, obj['user']] }, - 'progress' => ->(obj) { [:progress, obj['progress']] }, - 'insertTime' => ->(obj) { [:insert_time, parse_time_string(obj['insertTime'])] }, - 'startTime' => ->(obj) { [:start_time, parse_time_string(obj['startTime'])] }, - 'endTime' => ->(obj) { [:end_time, parse_time_string(obj['endTime'])] }, - 'status' => ->(obj) { [:status, obj['status']] }, - 'statusMessage' => ->(obj) { [:status_message, obj['statusMessage']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, + "clientOperationId" => ->(obj) { [:client_operation_id, obj["clientOperationId"]] }, + "operationType" => ->(obj) { [:operation_type, obj["operationType"]] }, + "user" => ->(obj) { [:user, obj["user"]] }, + "progress" => ->(obj) { [:progress, obj["progress"]] }, + "insertTime" => ->(obj) { [:insert_time, parse_time_string(obj["insertTime"])] }, + "startTime" => ->(obj) { [:start_time, parse_time_string(obj["startTime"])] }, + "endTime" => ->(obj) { [:end_time, parse_time_string(obj["endTime"])] }, + "status" => ->(obj) { [:status, obj["status"]] }, + "statusMessage" => ->(obj) { [:status_message, obj["statusMessage"]] }, } end @@ -101,10 +101,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/operations' + "projects/{{project}}/global/operations" end end diff --git a/libraries/google_compute_health_check.rb b/libraries/google_compute_health_check.rb index d3f5b1047..80db3c1f4 100644 --- a/libraries/google_compute_health_check.rb +++ b/libraries/google_compute_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,20 +13,20 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/healthcheck_grpc_health_check' -require 'google/compute/property/healthcheck_http2_health_check' -require 'google/compute/property/healthcheck_http_health_check' -require 'google/compute/property/healthcheck_https_health_check' -require 'google/compute/property/healthcheck_log_config' -require 'google/compute/property/healthcheck_ssl_health_check' -require 'google/compute/property/healthcheck_tcp_health_check' +require "gcp_backend" +require "google/compute/property/healthcheck_grpc_health_check" +require "google/compute/property/healthcheck_http2_health_check" +require "google/compute/property/healthcheck_http_health_check" +require "google/compute/property/healthcheck_https_health_check" +require "google/compute/property/healthcheck_log_config" +require "google/compute/property/healthcheck_ssl_health_check" +require "google/compute/property/healthcheck_tcp_health_check" # A provider to manage Compute Engine resources. class ComputeHealthCheck < GcpResourceBase - name 'google_compute_health_check' - desc 'HealthCheck' - supports platform: 'gcp' + name "google_compute_health_check" + desc "HealthCheck" + supports platform: "gcp" attr_reader :params attr_reader :check_interval_sec @@ -49,27 +49,27 @@ class ComputeHealthCheck < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @check_interval_sec = @fetched['checkIntervalSec'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @healthy_threshold = @fetched['healthyThreshold'] - @id = @fetched['id'] - @name = @fetched['name'] - @timeout_sec = @fetched['timeoutSec'] - @unhealthy_threshold = @fetched['unhealthyThreshold'] - @type = @fetched['type'] - @http_health_check = GoogleInSpec::Compute::Property::HealthCheckHttpHealthCheck.new(@fetched['httpHealthCheck'], to_s) - @https_health_check = GoogleInSpec::Compute::Property::HealthCheckHttpsHealthCheck.new(@fetched['httpsHealthCheck'], to_s) - @tcp_health_check = GoogleInSpec::Compute::Property::HealthCheckTcpHealthCheck.new(@fetched['tcpHealthCheck'], to_s) - @ssl_health_check = GoogleInSpec::Compute::Property::HealthCheckSslHealthCheck.new(@fetched['sslHealthCheck'], to_s) - @http2_health_check = GoogleInSpec::Compute::Property::HealthCheckHttp2HealthCheck.new(@fetched['http2HealthCheck'], to_s) - @grpc_health_check = GoogleInSpec::Compute::Property::HealthCheckGrpcHealthCheck.new(@fetched['grpcHealthCheck'], to_s) - @log_config = GoogleInSpec::Compute::Property::HealthCheckLogConfig.new(@fetched['logConfig'], to_s) + @check_interval_sec = @fetched["checkIntervalSec"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @healthy_threshold = @fetched["healthyThreshold"] + @id = @fetched["id"] + @name = @fetched["name"] + @timeout_sec = @fetched["timeoutSec"] + @unhealthy_threshold = @fetched["unhealthyThreshold"] + @type = @fetched["type"] + @http_health_check = GoogleInSpec::Compute::Property::HealthCheckHttpHealthCheck.new(@fetched["httpHealthCheck"], to_s) + @https_health_check = GoogleInSpec::Compute::Property::HealthCheckHttpsHealthCheck.new(@fetched["httpsHealthCheck"], to_s) + @tcp_health_check = GoogleInSpec::Compute::Property::HealthCheckTcpHealthCheck.new(@fetched["tcpHealthCheck"], to_s) + @ssl_health_check = GoogleInSpec::Compute::Property::HealthCheckSslHealthCheck.new(@fetched["sslHealthCheck"], to_s) + @http2_health_check = GoogleInSpec::Compute::Property::HealthCheckHttp2HealthCheck.new(@fetched["http2HealthCheck"], to_s) + @grpc_health_check = GoogleInSpec::Compute::Property::HealthCheckGrpcHealthCheck.new(@fetched["grpcHealthCheck"], to_s) + @log_config = GoogleInSpec::Compute::Property::HealthCheckLogConfig.new(@fetched["logConfig"], to_s) end # Handles parsing RFC3339 time string @@ -89,13 +89,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/healthChecks/{{name}}' + "projects/{{project}}/global/healthChecks/{{name}}" end end diff --git a/libraries/google_compute_health_check_service.rb b/libraries/google_compute_health_check_service.rb index 44419ffd5..6e2d9eb2c 100644 --- a/libraries/google_compute_health_check_service.rb +++ b/libraries/google_compute_health_check_service.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeHealthCheckService < GcpResourceBase - name 'google_compute_health_check_service' - desc 'HealthCheckService' - supports platform: 'gcp' + name "google_compute_health_check_service" + desc "HealthCheckService" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -36,21 +36,21 @@ class ComputeHealthCheckService < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @health_status_aggregation_policy = @fetched['healthStatusAggregationPolicy'] - @health_checks = @fetched['healthChecks'] - @network_endpoint_groups = @fetched['networkEndpointGroups'] - @notification_endpoints = @fetched['notificationEndpoints'] - @fingerprint = @fetched['fingerprint'] - @next_page_token = @fetched['nextPageToken'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @health_status_aggregation_policy = @fetched["healthStatusAggregationPolicy"] + @health_checks = @fetched["healthChecks"] + @network_endpoint_groups = @fetched["networkEndpointGroups"] + @notification_endpoints = @fetched["notificationEndpoints"] + @fingerprint = @fetched["fingerprint"] + @next_page_token = @fetched["nextPageToken"] end # Handles parsing RFC3339 time string @@ -69,10 +69,10 @@ def to_s private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/healthCheckServices/{{name}}' + "projects/{{project}}/regions/{{region}}/healthCheckServices/{{name}}" end end diff --git a/libraries/google_compute_health_check_services.rb b/libraries/google_compute_health_check_services.rb index a10e2da09..ed64a4f8e 100644 --- a/libraries/google_compute_health_check_services.rb +++ b/libraries/google_compute_health_check_services.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeHealthCheckServices < GcpResourceBase - name 'google_compute_health_check_services' - desc 'HealthCheckService plural resource' - supports platform: 'gcp' + name "google_compute_health_check_services" + desc "HealthCheckService plural resource" + supports platform: "gcp" attr_reader :table @@ -39,12 +39,12 @@ class ComputeHealthCheckServices < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'healthStatusAggregationPolicy' => ->(obj) { [:health_status_aggregation_policy, obj['healthStatusAggregationPolicy']] }, - 'healthChecks' => ->(obj) { [:health_checks, obj['healthChecks']] }, - 'networkEndpointGroups' => ->(obj) { [:network_endpoint_groups, obj['networkEndpointGroups']] }, - 'notificationEndpoints' => ->(obj) { [:notification_endpoints, obj['notificationEndpoints']] }, - 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, - 'nextPageToken' => ->(obj) { [:next_page_token, obj['nextPageToken']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "healthStatusAggregationPolicy" => ->(obj) { [:health_status_aggregation_policy, obj["healthStatusAggregationPolicy"]] }, + "healthChecks" => ->(obj) { [:health_checks, obj["healthChecks"]] }, + "networkEndpointGroups" => ->(obj) { [:network_endpoint_groups, obj["networkEndpointGroups"]] }, + "notificationEndpoints" => ->(obj) { [:notification_endpoints, obj["notificationEndpoints"]] }, + "fingerprint" => ->(obj) { [:fingerprint, obj["fingerprint"]] }, + "nextPageToken" => ->(obj) { [:next_page_token, obj["nextPageToken"]] }, } end @@ -93,10 +93,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/healthCheckServices' + "projects/{{project}}/regions/{{region}}/healthCheckServices" end end diff --git a/libraries/google_compute_health_checks.rb b/libraries/google_compute_health_checks.rb index 8591bfc81..2c2fcd14e 100644 --- a/libraries/google_compute_health_checks.rb +++ b/libraries/google_compute_health_checks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeHealthChecks < GcpResourceBase - name 'google_compute_health_checks' - desc 'HealthCheck plural resource' - supports platform: 'gcp' + name "google_compute_health_checks" + desc "HealthCheck plural resource" + supports platform: "gcp" attr_reader :table @@ -45,12 +45,12 @@ class ComputeHealthChecks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -78,22 +78,22 @@ def transform(key, value) def transformers { - 'checkIntervalSec' => ->(obj) { [:check_interval_sec, obj['checkIntervalSec']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'healthyThreshold' => ->(obj) { [:healthy_threshold, obj['healthyThreshold']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, - 'unhealthyThreshold' => ->(obj) { [:unhealthy_threshold, obj['unhealthyThreshold']] }, - 'type' => ->(obj) { [:type, obj['type']] }, - 'httpHealthCheck' => ->(obj) { [:http_health_check, GoogleInSpec::Compute::Property::HealthCheckHttpHealthCheck.new(obj['httpHealthCheck'], to_s)] }, - 'httpsHealthCheck' => ->(obj) { [:https_health_check, GoogleInSpec::Compute::Property::HealthCheckHttpsHealthCheck.new(obj['httpsHealthCheck'], to_s)] }, - 'tcpHealthCheck' => ->(obj) { [:tcp_health_check, GoogleInSpec::Compute::Property::HealthCheckTcpHealthCheck.new(obj['tcpHealthCheck'], to_s)] }, - 'sslHealthCheck' => ->(obj) { [:ssl_health_check, GoogleInSpec::Compute::Property::HealthCheckSslHealthCheck.new(obj['sslHealthCheck'], to_s)] }, - 'http2HealthCheck' => ->(obj) { [:http2_health_check, GoogleInSpec::Compute::Property::HealthCheckHttp2HealthCheck.new(obj['http2HealthCheck'], to_s)] }, - 'grpcHealthCheck' => ->(obj) { [:grpc_health_check, GoogleInSpec::Compute::Property::HealthCheckGrpcHealthCheck.new(obj['grpcHealthCheck'], to_s)] }, - 'logConfig' => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::HealthCheckLogConfig.new(obj['logConfig'], to_s)] }, + "checkIntervalSec" => ->(obj) { [:check_interval_sec, obj["checkIntervalSec"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "healthyThreshold" => ->(obj) { [:healthy_threshold, obj["healthyThreshold"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "timeoutSec" => ->(obj) { [:timeout_sec, obj["timeoutSec"]] }, + "unhealthyThreshold" => ->(obj) { [:unhealthy_threshold, obj["unhealthyThreshold"]] }, + "type" => ->(obj) { [:type, obj["type"]] }, + "httpHealthCheck" => ->(obj) { [:http_health_check, GoogleInSpec::Compute::Property::HealthCheckHttpHealthCheck.new(obj["httpHealthCheck"], to_s)] }, + "httpsHealthCheck" => ->(obj) { [:https_health_check, GoogleInSpec::Compute::Property::HealthCheckHttpsHealthCheck.new(obj["httpsHealthCheck"], to_s)] }, + "tcpHealthCheck" => ->(obj) { [:tcp_health_check, GoogleInSpec::Compute::Property::HealthCheckTcpHealthCheck.new(obj["tcpHealthCheck"], to_s)] }, + "sslHealthCheck" => ->(obj) { [:ssl_health_check, GoogleInSpec::Compute::Property::HealthCheckSslHealthCheck.new(obj["sslHealthCheck"], to_s)] }, + "http2HealthCheck" => ->(obj) { [:http2_health_check, GoogleInSpec::Compute::Property::HealthCheckHttp2HealthCheck.new(obj["http2HealthCheck"], to_s)] }, + "grpcHealthCheck" => ->(obj) { [:grpc_health_check, GoogleInSpec::Compute::Property::HealthCheckGrpcHealthCheck.new(obj["grpcHealthCheck"], to_s)] }, + "logConfig" => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::HealthCheckLogConfig.new(obj["logConfig"], to_s)] }, } end @@ -106,13 +106,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/healthChecks' + "projects/{{project}}/global/healthChecks" end end diff --git a/libraries/google_compute_http_health_check.rb b/libraries/google_compute_http_health_check.rb index 5cb0a2a9e..0336ca084 100644 --- a/libraries/google_compute_http_health_check.rb +++ b/libraries/google_compute_http_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeHttpHealthCheck < GcpResourceBase - name 'google_compute_http_health_check' - desc 'HttpHealthCheck' - supports platform: 'gcp' + name "google_compute_http_health_check" + desc "HttpHealthCheck" + supports platform: "gcp" attr_reader :params attr_reader :check_interval_sec @@ -37,22 +37,22 @@ class ComputeHttpHealthCheck < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @check_interval_sec = @fetched['checkIntervalSec'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @healthy_threshold = @fetched['healthyThreshold'] - @host = @fetched['host'] - @id = @fetched['id'] - @name = @fetched['name'] - @port = @fetched['port'] - @request_path = @fetched['requestPath'] - @timeout_sec = @fetched['timeoutSec'] - @unhealthy_threshold = @fetched['unhealthyThreshold'] + @check_interval_sec = @fetched["checkIntervalSec"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @healthy_threshold = @fetched["healthyThreshold"] + @host = @fetched["host"] + @id = @fetched["id"] + @name = @fetched["name"] + @port = @fetched["port"] + @request_path = @fetched["requestPath"] + @timeout_sec = @fetched["timeoutSec"] + @unhealthy_threshold = @fetched["unhealthyThreshold"] end # Handles parsing RFC3339 time string @@ -72,13 +72,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/httpHealthChecks/{{name}}' + "projects/{{project}}/global/httpHealthChecks/{{name}}" end end diff --git a/libraries/google_compute_http_health_checks.rb b/libraries/google_compute_http_health_checks.rb index 1d798dfe4..31702f8d9 100644 --- a/libraries/google_compute_http_health_checks.rb +++ b/libraries/google_compute_http_health_checks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeHttpHealthChecks < GcpResourceBase - name 'google_compute_http_health_checks' - desc 'HttpHealthCheck plural resource' - supports platform: 'gcp' + name "google_compute_http_health_checks" + desc "HttpHealthCheck plural resource" + supports platform: "gcp" attr_reader :table @@ -40,12 +40,12 @@ class ComputeHttpHealthChecks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -73,17 +73,17 @@ def transform(key, value) def transformers { - 'checkIntervalSec' => ->(obj) { [:check_interval_sec, obj['checkIntervalSec']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'healthyThreshold' => ->(obj) { [:healthy_threshold, obj['healthyThreshold']] }, - 'host' => ->(obj) { [:host, obj['host']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'port' => ->(obj) { [:port, obj['port']] }, - 'requestPath' => ->(obj) { [:request_path, obj['requestPath']] }, - 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, - 'unhealthyThreshold' => ->(obj) { [:unhealthy_threshold, obj['unhealthyThreshold']] }, + "checkIntervalSec" => ->(obj) { [:check_interval_sec, obj["checkIntervalSec"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "healthyThreshold" => ->(obj) { [:healthy_threshold, obj["healthyThreshold"]] }, + "host" => ->(obj) { [:host, obj["host"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "port" => ->(obj) { [:port, obj["port"]] }, + "requestPath" => ->(obj) { [:request_path, obj["requestPath"]] }, + "timeoutSec" => ->(obj) { [:timeout_sec, obj["timeoutSec"]] }, + "unhealthyThreshold" => ->(obj) { [:unhealthy_threshold, obj["unhealthyThreshold"]] }, } end @@ -96,13 +96,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/httpHealthChecks' + "projects/{{project}}/global/httpHealthChecks" end end diff --git a/libraries/google_compute_https_health_check.rb b/libraries/google_compute_https_health_check.rb index 6c64c5632..fcd2ace8e 100644 --- a/libraries/google_compute_https_health_check.rb +++ b/libraries/google_compute_https_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeHttpsHealthCheck < GcpResourceBase - name 'google_compute_https_health_check' - desc 'HttpsHealthCheck' - supports platform: 'gcp' + name "google_compute_https_health_check" + desc "HttpsHealthCheck" + supports platform: "gcp" attr_reader :params attr_reader :check_interval_sec @@ -37,22 +37,22 @@ class ComputeHttpsHealthCheck < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @check_interval_sec = @fetched['checkIntervalSec'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @healthy_threshold = @fetched['healthyThreshold'] - @host = @fetched['host'] - @id = @fetched['id'] - @name = @fetched['name'] - @port = @fetched['port'] - @request_path = @fetched['requestPath'] - @timeout_sec = @fetched['timeoutSec'] - @unhealthy_threshold = @fetched['unhealthyThreshold'] + @check_interval_sec = @fetched["checkIntervalSec"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @healthy_threshold = @fetched["healthyThreshold"] + @host = @fetched["host"] + @id = @fetched["id"] + @name = @fetched["name"] + @port = @fetched["port"] + @request_path = @fetched["requestPath"] + @timeout_sec = @fetched["timeoutSec"] + @unhealthy_threshold = @fetched["unhealthyThreshold"] end # Handles parsing RFC3339 time string @@ -72,13 +72,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/httpsHealthChecks/{{name}}' + "projects/{{project}}/global/httpsHealthChecks/{{name}}" end end diff --git a/libraries/google_compute_https_health_checks.rb b/libraries/google_compute_https_health_checks.rb index 1fb4bcf0b..5a098eff4 100644 --- a/libraries/google_compute_https_health_checks.rb +++ b/libraries/google_compute_https_health_checks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeHttpsHealthChecks < GcpResourceBase - name 'google_compute_https_health_checks' - desc 'HttpsHealthCheck plural resource' - supports platform: 'gcp' + name "google_compute_https_health_checks" + desc "HttpsHealthCheck plural resource" + supports platform: "gcp" attr_reader :table @@ -40,12 +40,12 @@ class ComputeHttpsHealthChecks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -73,17 +73,17 @@ def transform(key, value) def transformers { - 'checkIntervalSec' => ->(obj) { [:check_interval_sec, obj['checkIntervalSec']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'healthyThreshold' => ->(obj) { [:healthy_threshold, obj['healthyThreshold']] }, - 'host' => ->(obj) { [:host, obj['host']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'port' => ->(obj) { [:port, obj['port']] }, - 'requestPath' => ->(obj) { [:request_path, obj['requestPath']] }, - 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, - 'unhealthyThreshold' => ->(obj) { [:unhealthy_threshold, obj['unhealthyThreshold']] }, + "checkIntervalSec" => ->(obj) { [:check_interval_sec, obj["checkIntervalSec"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "healthyThreshold" => ->(obj) { [:healthy_threshold, obj["healthyThreshold"]] }, + "host" => ->(obj) { [:host, obj["host"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "port" => ->(obj) { [:port, obj["port"]] }, + "requestPath" => ->(obj) { [:request_path, obj["requestPath"]] }, + "timeoutSec" => ->(obj) { [:timeout_sec, obj["timeoutSec"]] }, + "unhealthyThreshold" => ->(obj) { [:unhealthy_threshold, obj["unhealthyThreshold"]] }, } end @@ -96,13 +96,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/httpsHealthChecks' + "projects/{{project}}/global/httpsHealthChecks" end end diff --git a/libraries/google_compute_image.rb b/libraries/google_compute_image.rb index 313eac7fe..21817a305 100644 --- a/libraries/google_compute_image.rb +++ b/libraries/google_compute_image.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,18 +13,18 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/image_deprecated' -require 'google/compute/property/image_guest_os_features' -require 'google/compute/property/image_image_encryption_key' -require 'google/compute/property/image_raw_disk' -require 'google/compute/property/image_source_disk_encryption_key' +require "gcp_backend" +require "google/compute/property/image_deprecated" +require "google/compute/property/image_guest_os_features" +require "google/compute/property/image_image_encryption_key" +require "google/compute/property/image_raw_disk" +require "google/compute/property/image_source_disk_encryption_key" # A provider to manage Compute Engine resources. class ComputeImage < GcpResourceBase - name 'google_compute_image' - desc 'Image' - supports platform: 'gcp' + name "google_compute_image" + desc "Image" + supports platform: "gcp" attr_reader :params attr_reader :archive_size_bytes @@ -53,36 +53,36 @@ class ComputeImage < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") if @fetched.nil? - @fetched = @connection.fetch(product_url(params[:beta]), 'projects/{{project}}/global/images/family/{{name}}', params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), "projects/{{project}}/global/images/family/{{name}}", params, "Get") end parse unless @fetched.nil? end def parse - @archive_size_bytes = @fetched['archiveSizeBytes'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @deprecated = GoogleInSpec::Compute::Property::ImageDeprecated.new(@fetched['deprecated'], to_s) - @description = @fetched['description'] - @disk_size_gb = @fetched['diskSizeGb'] - @family = @fetched['family'] - @guest_os_features = GoogleInSpec::Compute::Property::ImageGuestOsFeaturesArray.parse(@fetched['guestOsFeatures'], to_s) - @id = @fetched['id'] - @image_encryption_key = GoogleInSpec::Compute::Property::ImageImageEncryptionKey.new(@fetched['imageEncryptionKey'], to_s) - @labels = @fetched['labels'] - @label_fingerprint = @fetched['labelFingerprint'] - @licenses = @fetched['licenses'] - @name = @fetched['name'] - @raw_disk = GoogleInSpec::Compute::Property::ImageRawDisk.new(@fetched['rawDisk'], to_s) - @source_disk = @fetched['sourceDisk'] - @source_disk_encryption_key = GoogleInSpec::Compute::Property::ImageSourceDiskEncryptionKey.new(@fetched['sourceDiskEncryptionKey'], to_s) - @source_disk_id = @fetched['sourceDiskId'] - @source_image = @fetched['sourceImage'] - @source_snapshot = @fetched['sourceSnapshot'] - @source_type = @fetched['sourceType'] - @self_link = @fetched['selfLink'] - @status = @fetched['status'] + @archive_size_bytes = @fetched["archiveSizeBytes"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @deprecated = GoogleInSpec::Compute::Property::ImageDeprecated.new(@fetched["deprecated"], to_s) + @description = @fetched["description"] + @disk_size_gb = @fetched["diskSizeGb"] + @family = @fetched["family"] + @guest_os_features = GoogleInSpec::Compute::Property::ImageGuestOsFeaturesArray.parse(@fetched["guestOsFeatures"], to_s) + @id = @fetched["id"] + @image_encryption_key = GoogleInSpec::Compute::Property::ImageImageEncryptionKey.new(@fetched["imageEncryptionKey"], to_s) + @labels = @fetched["labels"] + @label_fingerprint = @fetched["labelFingerprint"] + @licenses = @fetched["licenses"] + @name = @fetched["name"] + @raw_disk = GoogleInSpec::Compute::Property::ImageRawDisk.new(@fetched["rawDisk"], to_s) + @source_disk = @fetched["sourceDisk"] + @source_disk_encryption_key = GoogleInSpec::Compute::Property::ImageSourceDiskEncryptionKey.new(@fetched["sourceDiskEncryptionKey"], to_s) + @source_disk_id = @fetched["sourceDiskId"] + @source_image = @fetched["sourceImage"] + @source_snapshot = @fetched["sourceSnapshot"] + @source_type = @fetched["sourceType"] + @self_link = @fetched["selfLink"] + @status = @fetched["status"] end # Handles parsing RFC3339 time string @@ -102,13 +102,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/images/{{name}}' + "projects/{{project}}/global/images/{{name}}" end end diff --git a/libraries/google_compute_image_family_view.rb b/libraries/google_compute_image_family_view.rb index ad7fde877..b24136567 100644 --- a/libraries/google_compute_image_family_view.rb +++ b/libraries/google_compute_image_family_view.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,23 +13,23 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/imagefamilyview_image' -require 'google/compute/property/imagefamilyview_image_deprecated' -require 'google/compute/property/imagefamilyview_image_image_encryption_key' -require 'google/compute/property/imagefamilyview_image_raw_disk' -require 'google/compute/property/imagefamilyview_image_source_disk_encryption_key' -require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key' -require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbs' -require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbxs' -require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_keks' -require 'google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_pk' +require "gcp_backend" +require "google/compute/property/imagefamilyview_image" +require "google/compute/property/imagefamilyview_image_deprecated" +require "google/compute/property/imagefamilyview_image_image_encryption_key" +require "google/compute/property/imagefamilyview_image_raw_disk" +require "google/compute/property/imagefamilyview_image_source_disk_encryption_key" +require "google/compute/property/imagefamilyview_image_source_snapshot_encryption_key" +require "google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbs" +require "google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_dbxs" +require "google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_keks" +require "google/compute/property/imagefamilyview_image_source_snapshot_encryption_key_pk" # A provider to manage Compute Engine resources. class ComputeImageFamilyView < GcpResourceBase - name 'google_compute_image_family_view' - desc 'ImageFamilyView' - supports platform: 'gcp' + name "google_compute_image_family_view" + desc "ImageFamilyView" + supports platform: "gcp" attr_reader :params attr_reader :image @@ -37,12 +37,12 @@ class ComputeImageFamilyView < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @image = GoogleInSpec::Compute::Property::ImageFamilyViewImage.new(@fetched['image'], to_s) + @image = GoogleInSpec::Compute::Property::ImageFamilyViewImage.new(@fetched["image"], to_s) end def exists? @@ -56,10 +56,10 @@ def to_s private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/imageFamilyViews/{{name}}' + "projects/{{project}}/zones/{{zone}}/imageFamilyViews/{{name}}" end end diff --git a/libraries/google_compute_instance.rb b/libraries/google_compute_instance.rb index 1f4dc57dd..c4745e73a 100644 --- a/libraries/google_compute_instance.rb +++ b/libraries/google_compute_instance.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,20 +13,20 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/instance_disks' -require 'google/compute/property/instance_guest_accelerators' -require 'google/compute/property/instance_network_interfaces' -require 'google/compute/property/instance_scheduling' -require 'google/compute/property/instance_service_accounts' -require 'google/compute/property/instance_shielded_instance_config' -require 'google/compute/property/instance_tags' +require "gcp_backend" +require "google/compute/property/instance_disks" +require "google/compute/property/instance_guest_accelerators" +require "google/compute/property/instance_network_interfaces" +require "google/compute/property/instance_scheduling" +require "google/compute/property/instance_service_accounts" +require "google/compute/property/instance_shielded_instance_config" +require "google/compute/property/instance_tags" # A provider to manage Compute Engine resources. class ComputeInstance < GcpResourceBase - name 'google_compute_instance' - desc 'Instance' - supports platform: 'gcp' + name "google_compute_instance" + desc "Instance" + supports platform: "gcp" attr_reader :params attr_reader :can_ip_forward @@ -55,33 +55,33 @@ class ComputeInstance < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @can_ip_forward = @fetched['canIpForward'] - @cpu_platform = @fetched['cpuPlatform'] - @creation_timestamp = @fetched['creationTimestamp'] - @deletion_protection = @fetched['deletionProtection'] - @disks = GoogleInSpec::Compute::Property::InstanceDisksArray.parse(@fetched['disks'], to_s) - @guest_accelerators = GoogleInSpec::Compute::Property::InstanceGuestAcceleratorsArray.parse(@fetched['guestAccelerators'], to_s) - @hostname = @fetched['hostname'] - @id = @fetched['id'] - @label_fingerprint = @fetched['labelFingerprint'] - @labels = @fetched['labels'] - @metadata = @fetched['metadata'] - @machine_type = @fetched['machineType'] - @min_cpu_platform = @fetched['minCpuPlatform'] - @name = @fetched['name'] - @network_interfaces = GoogleInSpec::Compute::Property::InstanceNetworkInterfacesArray.parse(@fetched['networkInterfaces'], to_s) - @scheduling = GoogleInSpec::Compute::Property::InstanceScheduling.new(@fetched['scheduling'], to_s) - @service_accounts = GoogleInSpec::Compute::Property::InstanceServiceAccountsArray.parse(@fetched['serviceAccounts'], to_s) - @shielded_instance_config = GoogleInSpec::Compute::Property::InstanceShieldedInstanceConfig.new(@fetched['shieldedInstanceConfig'], to_s) - @status = @fetched['status'] - @status_message = @fetched['statusMessage'] - @tags = GoogleInSpec::Compute::Property::InstanceTags.new(@fetched['tags'], to_s) - @zone = @fetched['zone'] + @can_ip_forward = @fetched["canIpForward"] + @cpu_platform = @fetched["cpuPlatform"] + @creation_timestamp = @fetched["creationTimestamp"] + @deletion_protection = @fetched["deletionProtection"] + @disks = GoogleInSpec::Compute::Property::InstanceDisksArray.parse(@fetched["disks"], to_s) + @guest_accelerators = GoogleInSpec::Compute::Property::InstanceGuestAcceleratorsArray.parse(@fetched["guestAccelerators"], to_s) + @hostname = @fetched["hostname"] + @id = @fetched["id"] + @label_fingerprint = @fetched["labelFingerprint"] + @labels = @fetched["labels"] + @metadata = @fetched["metadata"] + @machine_type = @fetched["machineType"] + @min_cpu_platform = @fetched["minCpuPlatform"] + @name = @fetched["name"] + @network_interfaces = GoogleInSpec::Compute::Property::InstanceNetworkInterfacesArray.parse(@fetched["networkInterfaces"], to_s) + @scheduling = GoogleInSpec::Compute::Property::InstanceScheduling.new(@fetched["scheduling"], to_s) + @service_accounts = GoogleInSpec::Compute::Property::InstanceServiceAccountsArray.parse(@fetched["serviceAccounts"], to_s) + @shielded_instance_config = GoogleInSpec::Compute::Property::InstanceShieldedInstanceConfig.new(@fetched["shieldedInstanceConfig"], to_s) + @status = @fetched["status"] + @status_message = @fetched["statusMessage"] + @tags = GoogleInSpec::Compute::Property::InstanceTags.new(@fetched["tags"], to_s) + @zone = @fetched["zone"] end def exists? @@ -128,7 +128,7 @@ def first_disks_first_license end def second_disks_device_name - return '' if @disks[1].nil? || !defined?(@disks[1].device_name) || @disks[1].device_name.nil? + return "" if @disks[1].nil? || !defined?(@disks[1].device_name) || @disks[1].device_name.nil? disks[1].device_name end @@ -142,19 +142,19 @@ def second_disks_first_license # helper method for retrieving a disk source basename def disks_source_name(index = 0) - return '' if @disks[index].nil? || !defined?(@disks[index].source) || @disks[index].source.nil? - @disks[index].source.split('/').last + return "" if @disks[index].nil? || !defined?(@disks[index].source) || @disks[index].source.nil? + @disks[index].source.split("/").last end # helper method for retrieving a disk license string def disks_license(disk_index = 0, license_index = 0) - return '' if @disks[disk_index].nil? || !defined?(@disks[disk_index].licenses[license_index]) || @disks[disk_index].licenses[license_index].nil? + return "" if @disks[disk_index].nil? || !defined?(@disks[disk_index].licenses[license_index]) || @disks[disk_index].licenses[license_index].nil? @disks[disk_index].licenses[license_index].downcase end def machine_size - return '' if !defined?(@machine_type) || @machine_type.nil? - @machine_type.split('/').last + return "" if !defined?(@machine_type) || @machine_type.nil? + @machine_type.split("/").last end # helper for returning label keys to perform checks @@ -176,19 +176,19 @@ def label_value_by_key(label_key) def metadata_keys return [] if !defined?(@metadata) || @metadata.nil? - @metadata['items']&.map { |m| m['key'] } + @metadata["items"]&.map { |m| m["key"] } end def metadata_values return [] if !defined?(@metadata) || @metadata.nil? - @metadata['items']&.map { |m| m['value'] } + @metadata["items"]&.map { |m| m["value"] } end def metadata_value_by_key(metadata_key) return [] if !defined?(@metadata) || @metadata.nil? - @metadata['items']&.each do |item| - if item['key'] == metadata_key - return item['value'] + @metadata["items"]&.each do |item| + if item["key"] == metadata_key + return item["value"] end end [] @@ -201,19 +201,19 @@ def service_account_scopes end def block_project_ssh_keys - return false if !defined?(@metadata['items']) || @metadata['items'].nil? - @metadata['items'].each do |element| - return true if element['key']=='block-project-ssh-keys' and element['value'].casecmp('true').zero? - return true if element['key']=='block-project-ssh-keys' and element['value']=='1' + return false if !defined?(@metadata["items"]) || @metadata["items"].nil? + @metadata["items"].each do |element| + return true if element["key"]=="block-project-ssh-keys" and element["value"].casecmp("true") == 0 + return true if element["key"]=="block-project-ssh-keys" and element["value"]=="1" end false end def has_serial_port_disabled? - return false if !defined?(@metadata['items']) || @metadata['items'].nil? - @metadata['items'].each do |element| - return false if element['key']=='serial-port-enable' and element['value'].casecmp('true').zero? - return false if element['key']=='serial-port-enable' and element['value']=='1' + return false if !defined?(@metadata["items"]) || @metadata["items"].nil? + @metadata["items"].each do |element| + return false if element["key"]=="serial-port-enable" and element["value"].casecmp("true") == 0 + return false if element["key"]=="serial-port-enable" and element["value"]=="1" end true end @@ -233,13 +233,13 @@ def has_disks_encrypted_with_csek? def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/instances/{{name}}' + "projects/{{project}}/zones/{{zone}}/instances/{{name}}" end end diff --git a/libraries/google_compute_instance_group.rb b/libraries/google_compute_instance_group.rb index 7789c9bb0..2518cf602 100644 --- a/libraries/google_compute_instance_group.rb +++ b/libraries/google_compute_instance_group.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/instancegroup_named_ports' +require "gcp_backend" +require "google/compute/property/instancegroup_named_ports" # A provider to manage Compute Engine resources. class ComputeInstanceGroup < GcpResourceBase - name 'google_compute_instance_group' - desc 'InstanceGroup' - supports platform: 'gcp' + name "google_compute_instance_group" + desc "InstanceGroup" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -36,20 +36,20 @@ class ComputeInstanceGroup < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @named_ports = GoogleInSpec::Compute::Property::InstanceGroupNamedPortsArray.parse(@fetched['namedPorts'], to_s) - @network = @fetched['network'] - @region = @fetched['region'] - @subnetwork = @fetched['subnetwork'] - @zone = @fetched['zone'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @named_ports = GoogleInSpec::Compute::Property::InstanceGroupNamedPortsArray.parse(@fetched["namedPorts"], to_s) + @network = @fetched["network"] + @region = @fetched["region"] + @subnetwork = @fetched["subnetwork"] + @zone = @fetched["zone"] end # Handles parsing RFC3339 time string @@ -88,13 +88,13 @@ def find_named_ports(key = :name) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/instanceGroups/{{name}}' + "projects/{{project}}/zones/{{zone}}/instanceGroups/{{name}}" end end diff --git a/libraries/google_compute_instance_group_manager.rb b/libraries/google_compute_instance_group_manager.rb index a72bad8e4..a837345f6 100644 --- a/libraries/google_compute_instance_group_manager.rb +++ b/libraries/google_compute_instance_group_manager.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/instancegroupmanager_current_actions' -require 'google/compute/property/instancegroupmanager_named_ports' +require "gcp_backend" +require "google/compute/property/instancegroupmanager_current_actions" +require "google/compute/property/instancegroupmanager_named_ports" # A provider to manage Compute Engine resources. class ComputeInstanceGroupManager < GcpResourceBase - name 'google_compute_instance_group_manager' - desc 'InstanceGroupManager' - supports platform: 'gcp' + name "google_compute_instance_group_manager" + desc "InstanceGroupManager" + supports platform: "gcp" attr_reader :params attr_reader :base_instance_name @@ -41,24 +41,24 @@ class ComputeInstanceGroupManager < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @base_instance_name = @fetched['baseInstanceName'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @current_actions = GoogleInSpec::Compute::Property::InstanceGroupManagerCurrentActions.new(@fetched['currentActions'], to_s) - @description = @fetched['description'] - @id = @fetched['id'] - @instance_group = @fetched['instanceGroup'] - @instance_template = @fetched['instanceTemplate'] - @name = @fetched['name'] - @named_ports = GoogleInSpec::Compute::Property::InstanceGroupManagerNamedPortsArray.parse(@fetched['namedPorts'], to_s) - @region = @fetched['region'] - @target_pools = @fetched['targetPools'] - @target_size = @fetched['targetSize'] - @zone = @fetched['zone'] + @base_instance_name = @fetched["baseInstanceName"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @current_actions = GoogleInSpec::Compute::Property::InstanceGroupManagerCurrentActions.new(@fetched["currentActions"], to_s) + @description = @fetched["description"] + @id = @fetched["id"] + @instance_group = @fetched["instanceGroup"] + @instance_template = @fetched["instanceTemplate"] + @name = @fetched["name"] + @named_ports = GoogleInSpec::Compute::Property::InstanceGroupManagerNamedPortsArray.parse(@fetched["namedPorts"], to_s) + @region = @fetched["region"] + @target_pools = @fetched["targetPools"] + @target_size = @fetched["targetSize"] + @zone = @fetched["zone"] end # Handles parsing RFC3339 time string @@ -78,13 +78,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/instanceGroupManagers/{{name}}' + "projects/{{project}}/zones/{{zone}}/instanceGroupManagers/{{name}}" end end diff --git a/libraries/google_compute_instance_group_managers.rb b/libraries/google_compute_instance_group_managers.rb index 1b027ebab..0bba8fa0c 100644 --- a/libraries/google_compute_instance_group_managers.rb +++ b/libraries/google_compute_instance_group_managers.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeInstanceGroupManagers < GcpResourceBase - name 'google_compute_instance_group_managers' - desc 'InstanceGroupManager plural resource' - supports platform: 'gcp' + name "google_compute_instance_group_managers" + desc "InstanceGroupManager plural resource" + supports platform: "gcp" attr_reader :table @@ -42,12 +42,12 @@ class ComputeInstanceGroupManagers < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'baseInstanceName' => ->(obj) { [:base_instance_name, obj['baseInstanceName']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'currentActions' => ->(obj) { [:current_actions, GoogleInSpec::Compute::Property::InstanceGroupManagerCurrentActions.new(obj['currentActions'], to_s)] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'instanceGroup' => ->(obj) { [:instance_group, obj['instanceGroup']] }, - 'instanceTemplate' => ->(obj) { [:instance_template, obj['instanceTemplate']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'namedPorts' => ->(obj) { [:named_ports, GoogleInSpec::Compute::Property::InstanceGroupManagerNamedPortsArray.parse(obj['namedPorts'], to_s)] }, - 'region' => ->(obj) { [:region, obj['region']] }, - 'targetPools' => ->(obj) { [:target_pools, obj['targetPools']] }, - 'targetSize' => ->(obj) { [:target_size, obj['targetSize']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, + "baseInstanceName" => ->(obj) { [:base_instance_name, obj["baseInstanceName"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "currentActions" => ->(obj) { [:current_actions, GoogleInSpec::Compute::Property::InstanceGroupManagerCurrentActions.new(obj["currentActions"], to_s)] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "instanceGroup" => ->(obj) { [:instance_group, obj["instanceGroup"]] }, + "instanceTemplate" => ->(obj) { [:instance_template, obj["instanceTemplate"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "namedPorts" => ->(obj) { [:named_ports, GoogleInSpec::Compute::Property::InstanceGroupManagerNamedPortsArray.parse(obj["namedPorts"], to_s)] }, + "region" => ->(obj) { [:region, obj["region"]] }, + "targetPools" => ->(obj) { [:target_pools, obj["targetPools"]] }, + "targetSize" => ->(obj) { [:target_size, obj["targetSize"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, } end @@ -100,13 +100,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/instanceGroupManagers' + "projects/{{project}}/zones/{{zone}}/instanceGroupManagers" end end diff --git a/libraries/google_compute_instance_groups.rb b/libraries/google_compute_instance_groups.rb index eeacbcb6f..41d3ebe8e 100644 --- a/libraries/google_compute_instance_groups.rb +++ b/libraries/google_compute_instance_groups.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeInstanceGroups < GcpResourceBase - name 'google_compute_instance_groups' - desc 'InstanceGroup plural resource' - supports platform: 'gcp' + name "google_compute_instance_groups" + desc "InstanceGroup plural resource" + supports platform: "gcp" attr_reader :table @@ -38,12 +38,12 @@ class ComputeInstanceGroups < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:instance_group_id, obj['id']] }, - 'name' => ->(obj) { [:instance_group_name, obj['name']] }, - 'namedPorts' => ->(obj) { [:named_ports, GoogleInSpec::Compute::Property::InstanceGroupNamedPortsArray.parse(obj['namedPorts'], to_s)] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'region' => ->(obj) { [:region, obj['region']] }, - 'subnetwork' => ->(obj) { [:subnetwork, obj['subnetwork']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:instance_group_id, obj["id"]] }, + "name" => ->(obj) { [:instance_group_name, obj["name"]] }, + "namedPorts" => ->(obj) { [:named_ports, GoogleInSpec::Compute::Property::InstanceGroupNamedPortsArray.parse(obj["namedPorts"], to_s)] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, + "subnetwork" => ->(obj) { [:subnetwork, obj["subnetwork"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, } end @@ -92,13 +92,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/instanceGroups' + "projects/{{project}}/zones/{{zone}}/instanceGroups" end end diff --git a/libraries/google_compute_instance_template.rb b/libraries/google_compute_instance_template.rb index f5ca9fb1f..e0b545873 100644 --- a/libraries/google_compute_instance_template.rb +++ b/libraries/google_compute_instance_template.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,20 +13,20 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/instancetemplate_properties' -require 'google/compute/property/instancetemplate_properties_disks' -require 'google/compute/property/instancetemplate_properties_guest_accelerators' -require 'google/compute/property/instancetemplate_properties_network_interfaces' -require 'google/compute/property/instancetemplate_properties_scheduling' -require 'google/compute/property/instancetemplate_properties_service_accounts' -require 'google/compute/property/instancetemplate_properties_tags' +require "gcp_backend" +require "google/compute/property/instancetemplate_properties" +require "google/compute/property/instancetemplate_properties_disks" +require "google/compute/property/instancetemplate_properties_guest_accelerators" +require "google/compute/property/instancetemplate_properties_network_interfaces" +require "google/compute/property/instancetemplate_properties_scheduling" +require "google/compute/property/instancetemplate_properties_service_accounts" +require "google/compute/property/instancetemplate_properties_tags" # A provider to manage Compute Engine resources. class ComputeInstanceTemplate < GcpResourceBase - name 'google_compute_instance_template' - desc 'InstanceTemplate' - supports platform: 'gcp' + name "google_compute_instance_template" + desc "InstanceTemplate" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -38,16 +38,16 @@ class ComputeInstanceTemplate < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @properties = GoogleInSpec::Compute::Property::InstanceTemplateProperties.new(@fetched['properties'], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @properties = GoogleInSpec::Compute::Property::InstanceTemplateProperties.new(@fetched["properties"], to_s) end # Handles parsing RFC3339 time string @@ -67,13 +67,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/instanceTemplates/{{name}}' + "projects/{{project}}/global/instanceTemplates/{{name}}" end end diff --git a/libraries/google_compute_instance_templates.rb b/libraries/google_compute_instance_templates.rb index facadaf84..b3db2535a 100644 --- a/libraries/google_compute_instance_templates.rb +++ b/libraries/google_compute_instance_templates.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeInstanceTemplates < GcpResourceBase - name 'google_compute_instance_templates' - desc 'InstanceTemplate plural resource' - supports platform: 'gcp' + name "google_compute_instance_templates" + desc "InstanceTemplate plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class ComputeInstanceTemplates < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'properties' => ->(obj) { [:properties, GoogleInSpec::Compute::Property::InstanceTemplateProperties.new(obj['properties'], to_s)] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "properties" => ->(obj) { [:properties, GoogleInSpec::Compute::Property::InstanceTemplateProperties.new(obj["properties"], to_s)] }, } end @@ -84,13 +84,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/instanceTemplates' + "projects/{{project}}/global/instanceTemplates" end end diff --git a/libraries/google_compute_instances.rb b/libraries/google_compute_instances.rb index 725bb9145..97c600d0b 100644 --- a/libraries/google_compute_instances.rb +++ b/libraries/google_compute_instances.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeInstances < GcpResourceBase - name 'google_compute_instances' - desc 'Instance plural resource' - supports platform: 'gcp' + name "google_compute_instances" + desc "Instance plural resource" + supports platform: "gcp" attr_reader :table @@ -51,12 +51,12 @@ class ComputeInstances < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -84,28 +84,28 @@ def transform(key, value) def transformers { - 'canIpForward' => ->(obj) { [:can_ip_forward, obj['canIpForward']] }, - 'cpuPlatform' => ->(obj) { [:cpu_platform, obj['cpuPlatform']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, - 'deletionProtection' => ->(obj) { [:deletion_protection, obj['deletionProtection']] }, - 'disks' => ->(obj) { [:disks, GoogleInSpec::Compute::Property::InstanceDisksArray.parse(obj['disks'], to_s)] }, - 'guestAccelerators' => ->(obj) { [:guest_accelerators, GoogleInSpec::Compute::Property::InstanceGuestAcceleratorsArray.parse(obj['guestAccelerators'], to_s)] }, - 'hostname' => ->(obj) { [:hostname, obj['hostname']] }, - 'id' => ->(obj) { [:instance_id, obj['id']] }, - 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'metadata' => ->(obj) { [:metadata, obj['metadata']] }, - 'machineType' => ->(obj) { [:machine_type, obj['machineType']] }, - 'minCpuPlatform' => ->(obj) { [:min_cpu_platform, obj['minCpuPlatform']] }, - 'name' => ->(obj) { [:instance_name, obj['name']] }, - 'networkInterfaces' => ->(obj) { [:network_interfaces, GoogleInSpec::Compute::Property::InstanceNetworkInterfacesArray.parse(obj['networkInterfaces'], to_s)] }, - 'scheduling' => ->(obj) { [:scheduling, GoogleInSpec::Compute::Property::InstanceScheduling.new(obj['scheduling'], to_s)] }, - 'serviceAccounts' => ->(obj) { [:service_accounts, GoogleInSpec::Compute::Property::InstanceServiceAccountsArray.parse(obj['serviceAccounts'], to_s)] }, - 'shieldedInstanceConfig' => ->(obj) { [:shielded_instance_config, GoogleInSpec::Compute::Property::InstanceShieldedInstanceConfig.new(obj['shieldedInstanceConfig'], to_s)] }, - 'status' => ->(obj) { [:status, obj['status']] }, - 'statusMessage' => ->(obj) { [:status_message, obj['statusMessage']] }, - 'tags' => ->(obj) { [:tags, GoogleInSpec::Compute::Property::InstanceTags.new(obj['tags'], to_s)] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, + "canIpForward" => ->(obj) { [:can_ip_forward, obj["canIpForward"]] }, + "cpuPlatform" => ->(obj) { [:cpu_platform, obj["cpuPlatform"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, obj["creationTimestamp"]] }, + "deletionProtection" => ->(obj) { [:deletion_protection, obj["deletionProtection"]] }, + "disks" => ->(obj) { [:disks, GoogleInSpec::Compute::Property::InstanceDisksArray.parse(obj["disks"], to_s)] }, + "guestAccelerators" => ->(obj) { [:guest_accelerators, GoogleInSpec::Compute::Property::InstanceGuestAcceleratorsArray.parse(obj["guestAccelerators"], to_s)] }, + "hostname" => ->(obj) { [:hostname, obj["hostname"]] }, + "id" => ->(obj) { [:instance_id, obj["id"]] }, + "labelFingerprint" => ->(obj) { [:label_fingerprint, obj["labelFingerprint"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "metadata" => ->(obj) { [:metadata, obj["metadata"]] }, + "machineType" => ->(obj) { [:machine_type, obj["machineType"]] }, + "minCpuPlatform" => ->(obj) { [:min_cpu_platform, obj["minCpuPlatform"]] }, + "name" => ->(obj) { [:instance_name, obj["name"]] }, + "networkInterfaces" => ->(obj) { [:network_interfaces, GoogleInSpec::Compute::Property::InstanceNetworkInterfacesArray.parse(obj["networkInterfaces"], to_s)] }, + "scheduling" => ->(obj) { [:scheduling, GoogleInSpec::Compute::Property::InstanceScheduling.new(obj["scheduling"], to_s)] }, + "serviceAccounts" => ->(obj) { [:service_accounts, GoogleInSpec::Compute::Property::InstanceServiceAccountsArray.parse(obj["serviceAccounts"], to_s)] }, + "shieldedInstanceConfig" => ->(obj) { [:shielded_instance_config, GoogleInSpec::Compute::Property::InstanceShieldedInstanceConfig.new(obj["shieldedInstanceConfig"], to_s)] }, + "status" => ->(obj) { [:status, obj["status"]] }, + "statusMessage" => ->(obj) { [:status_message, obj["statusMessage"]] }, + "tags" => ->(obj) { [:tags, GoogleInSpec::Compute::Property::InstanceTags.new(obj["tags"], to_s)] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, } end @@ -113,13 +113,13 @@ def transformers def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/instances' + "projects/{{project}}/zones/{{zone}}/instances" end end diff --git a/libraries/google_compute_interconnect.rb b/libraries/google_compute_interconnect.rb index 51e405331..c2e35f8a4 100644 --- a/libraries/google_compute_interconnect.rb +++ b/libraries/google_compute_interconnect.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/interconnect_circuit_infos' -require 'google/compute/property/interconnect_expected_outages' +require "gcp_backend" +require "google/compute/property/interconnect_circuit_infos" +require "google/compute/property/interconnect_expected_outages" # A provider to manage Compute Engine resources. class ComputeInterconnect < GcpResourceBase - name 'google_compute_interconnect' - desc 'Interconnect' - supports platform: 'gcp' + name "google_compute_interconnect" + desc "Interconnect" + supports platform: "gcp" attr_reader :params attr_reader :admin_enabled @@ -49,32 +49,32 @@ class ComputeInterconnect < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @admin_enabled = @fetched['adminEnabled'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @location = @fetched['location'] - @id = @fetched['id'] - @name = @fetched['name'] - @noc_contact_email = @fetched['nocContactEmail'] - @peer_ip_address = @fetched['peerIpAddress'] - @google_ip_address = @fetched['googleIpAddress'] - @client_operation_id = @fetched['clientOperationId'] - @google_reference_id = @fetched['googleReferenceId'] - @provisioned_link_count = @fetched['provisionedLinkCount'] - @customer_name = @fetched['customerName'] - @requested_link_count = @fetched['requestedLinkCount'] - @operational_status = @fetched['operationalStatus'] - @link_type = @fetched['linkType'] - @interconnect_type = @fetched['interconnectType'] - @interconnect_attachments = @fetched['interconnectAttachments'] - @expected_outages = GoogleInSpec::Compute::Property::InterconnectExpectedOutagesArray.parse(@fetched['expectedOutages'], to_s) - @circuit_infos = GoogleInSpec::Compute::Property::InterconnectCircuitInfosArray.parse(@fetched['circuitInfos'], to_s) - @satisfies_pzs = @fetched['satisfiesPzs'] + @admin_enabled = @fetched["adminEnabled"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @location = @fetched["location"] + @id = @fetched["id"] + @name = @fetched["name"] + @noc_contact_email = @fetched["nocContactEmail"] + @peer_ip_address = @fetched["peerIpAddress"] + @google_ip_address = @fetched["googleIpAddress"] + @client_operation_id = @fetched["clientOperationId"] + @google_reference_id = @fetched["googleReferenceId"] + @provisioned_link_count = @fetched["provisionedLinkCount"] + @customer_name = @fetched["customerName"] + @requested_link_count = @fetched["requestedLinkCount"] + @operational_status = @fetched["operationalStatus"] + @link_type = @fetched["linkType"] + @interconnect_type = @fetched["interconnectType"] + @interconnect_attachments = @fetched["interconnectAttachments"] + @expected_outages = GoogleInSpec::Compute::Property::InterconnectExpectedOutagesArray.parse(@fetched["expectedOutages"], to_s) + @circuit_infos = GoogleInSpec::Compute::Property::InterconnectCircuitInfosArray.parse(@fetched["circuitInfos"], to_s) + @satisfies_pzs = @fetched["satisfiesPzs"] end # Handles parsing RFC3339 time string @@ -93,10 +93,10 @@ def to_s private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/interconnects/{{name}}' + "projects/{{project}}/global/interconnects/{{name}}" end end diff --git a/libraries/google_compute_interconnect_location.rb b/libraries/google_compute_interconnect_location.rb index c29c21d98..245817557 100644 --- a/libraries/google_compute_interconnect_location.rb +++ b/libraries/google_compute_interconnect_location.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeInterconnectLocation < GcpResourceBase - name 'google_compute_interconnect_location' - desc 'InterconnectLocation' - supports platform: 'gcp' + name "google_compute_interconnect_location" + desc "InterconnectLocation" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -35,20 +35,20 @@ class ComputeInterconnectLocation < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @availability_zone = @fetched['availabilityZone'] - @client_operation_id = @fetched['clientOperationId'] - @facility_provider = @fetched['facilityProvider'] - @facility_provider_facility_id = @fetched['facilityProviderFacilityId'] - @status = @fetched['status'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @availability_zone = @fetched["availabilityZone"] + @client_operation_id = @fetched["clientOperationId"] + @facility_provider = @fetched["facilityProvider"] + @facility_provider_facility_id = @fetched["facilityProviderFacilityId"] + @status = @fetched["status"] end # Handles parsing RFC3339 time string @@ -67,10 +67,10 @@ def to_s private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/interconnectLocations/{{name}}' + "projects/{{project}}/global/interconnectLocations/{{name}}" end end diff --git a/libraries/google_compute_interconnect_locations.rb b/libraries/google_compute_interconnect_locations.rb index 4c2a90643..f31c0fce3 100644 --- a/libraries/google_compute_interconnect_locations.rb +++ b/libraries/google_compute_interconnect_locations.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeInterconnectLocations < GcpResourceBase - name 'google_compute_interconnect_locations' - desc 'InterconnectLocation plural resource' - supports platform: 'gcp' + name "google_compute_interconnect_locations" + desc "InterconnectLocation plural resource" + supports platform: "gcp" attr_reader :table @@ -38,12 +38,12 @@ class ComputeInterconnectLocations < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'availabilityZone' => ->(obj) { [:availability_zone, obj['availabilityZone']] }, - 'clientOperationId' => ->(obj) { [:client_operation_id, obj['clientOperationId']] }, - 'facilityProvider' => ->(obj) { [:facility_provider, obj['facilityProvider']] }, - 'facilityProviderFacilityId' => ->(obj) { [:facility_provider_facility_id, obj['facilityProviderFacilityId']] }, - 'status' => ->(obj) { [:status, obj['status']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "availabilityZone" => ->(obj) { [:availability_zone, obj["availabilityZone"]] }, + "clientOperationId" => ->(obj) { [:client_operation_id, obj["clientOperationId"]] }, + "facilityProvider" => ->(obj) { [:facility_provider, obj["facilityProvider"]] }, + "facilityProviderFacilityId" => ->(obj) { [:facility_provider_facility_id, obj["facilityProviderFacilityId"]] }, + "status" => ->(obj) { [:status, obj["status"]] }, } end @@ -91,10 +91,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/interconnectLocations' + "projects/{{project}}/global/interconnectLocations" end end diff --git a/libraries/google_compute_interconnects.rb b/libraries/google_compute_interconnects.rb index 34355b985..89b0193b4 100644 --- a/libraries/google_compute_interconnects.rb +++ b/libraries/google_compute_interconnects.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeInterconnects < GcpResourceBase - name 'google_compute_interconnects' - desc 'Interconnect plural resource' - supports platform: 'gcp' + name "google_compute_interconnects" + desc "Interconnect plural resource" + supports platform: "gcp" attr_reader :table @@ -50,12 +50,12 @@ class ComputeInterconnects < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -83,27 +83,27 @@ def transform(key, value) def transformers { - 'adminEnabled' => ->(obj) { [:admin_enabled, obj['adminEnabled']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'location' => ->(obj) { [:location, obj['location']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'nocContactEmail' => ->(obj) { [:noc_contact_email, obj['nocContactEmail']] }, - 'peerIpAddress' => ->(obj) { [:peer_ip_address, obj['peerIpAddress']] }, - 'googleIpAddress' => ->(obj) { [:google_ip_address, obj['googleIpAddress']] }, - 'clientOperationId' => ->(obj) { [:client_operation_id, obj['clientOperationId']] }, - 'googleReferenceId' => ->(obj) { [:google_reference_id, obj['googleReferenceId']] }, - 'provisionedLinkCount' => ->(obj) { [:provisioned_link_count, obj['provisionedLinkCount']] }, - 'customerName' => ->(obj) { [:customer_name, obj['customerName']] }, - 'requestedLinkCount' => ->(obj) { [:requested_link_count, obj['requestedLinkCount']] }, - 'operationalStatus' => ->(obj) { [:operational_status, obj['operationalStatus']] }, - 'linkType' => ->(obj) { [:link_type, obj['linkType']] }, - 'interconnectType' => ->(obj) { [:interconnect_type, obj['interconnectType']] }, - 'interconnectAttachments' => ->(obj) { [:interconnect_attachments, obj['interconnectAttachments']] }, - 'expectedOutages' => ->(obj) { [:expected_outages, GoogleInSpec::Compute::Property::InterconnectExpectedOutagesArray.parse(obj['expectedOutages'], to_s)] }, - 'circuitInfos' => ->(obj) { [:circuit_infos, GoogleInSpec::Compute::Property::InterconnectCircuitInfosArray.parse(obj['circuitInfos'], to_s)] }, - 'satisfiesPzs' => ->(obj) { [:satisfies_pzs, obj['satisfiesPzs']] }, + "adminEnabled" => ->(obj) { [:admin_enabled, obj["adminEnabled"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "location" => ->(obj) { [:location, obj["location"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "nocContactEmail" => ->(obj) { [:noc_contact_email, obj["nocContactEmail"]] }, + "peerIpAddress" => ->(obj) { [:peer_ip_address, obj["peerIpAddress"]] }, + "googleIpAddress" => ->(obj) { [:google_ip_address, obj["googleIpAddress"]] }, + "clientOperationId" => ->(obj) { [:client_operation_id, obj["clientOperationId"]] }, + "googleReferenceId" => ->(obj) { [:google_reference_id, obj["googleReferenceId"]] }, + "provisionedLinkCount" => ->(obj) { [:provisioned_link_count, obj["provisionedLinkCount"]] }, + "customerName" => ->(obj) { [:customer_name, obj["customerName"]] }, + "requestedLinkCount" => ->(obj) { [:requested_link_count, obj["requestedLinkCount"]] }, + "operationalStatus" => ->(obj) { [:operational_status, obj["operationalStatus"]] }, + "linkType" => ->(obj) { [:link_type, obj["linkType"]] }, + "interconnectType" => ->(obj) { [:interconnect_type, obj["interconnectType"]] }, + "interconnectAttachments" => ->(obj) { [:interconnect_attachments, obj["interconnectAttachments"]] }, + "expectedOutages" => ->(obj) { [:expected_outages, GoogleInSpec::Compute::Property::InterconnectExpectedOutagesArray.parse(obj["expectedOutages"], to_s)] }, + "circuitInfos" => ->(obj) { [:circuit_infos, GoogleInSpec::Compute::Property::InterconnectCircuitInfosArray.parse(obj["circuitInfos"], to_s)] }, + "satisfiesPzs" => ->(obj) { [:satisfies_pzs, obj["satisfiesPzs"]] }, } end @@ -115,10 +115,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/interconnects' + "projects/{{project}}/global/interconnects" end end diff --git a/libraries/google_compute_license_code.rb b/libraries/google_compute_license_code.rb index 7394b1d64..963d0b5a9 100644 --- a/libraries/google_compute_license_code.rb +++ b/libraries/google_compute_license_code.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/licensecode_license_alias' +require "gcp_backend" +require "google/compute/property/licensecode_license_alias" # A provider to manage Compute Engine resources. class ComputeLicenseCode < GcpResourceBase - name 'google_compute_license_code' - desc 'LicenseCode' - supports platform: 'gcp' + name "google_compute_license_code" + desc "LicenseCode" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -34,18 +34,18 @@ class ComputeLicenseCode < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @transferable = @fetched['transferable'] - @state = @fetched['state'] - @license_alias = GoogleInSpec::Compute::Property::LicenseCodeLicenseAliasArray.parse(@fetched['licenseAlias'], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @transferable = @fetched["transferable"] + @state = @fetched["state"] + @license_alias = GoogleInSpec::Compute::Property::LicenseCodeLicenseAliasArray.parse(@fetched["licenseAlias"], to_s) end # Handles parsing RFC3339 time string @@ -64,10 +64,10 @@ def to_s private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/global/licenseCodes/{{name}}' + "projects/{{project}}/global/licenseCodes/{{name}}" end end diff --git a/libraries/google_compute_network.rb b/libraries/google_compute_network.rb index ceab7ea44..0f9f49322 100644 --- a/libraries/google_compute_network.rb +++ b/libraries/google_compute_network.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/network_peerings' -require 'google/compute/property/network_routing_config' +require "gcp_backend" +require "google/compute/property/network_peerings" +require "google/compute/property/network_routing_config" # A provider to manage Compute Engine resources. class ComputeNetwork < GcpResourceBase - name 'google_compute_network' - desc 'Network' - supports platform: 'gcp' + name "google_compute_network" + desc "Network" + supports platform: "gcp" attr_reader :params attr_reader :description @@ -38,21 +38,21 @@ class ComputeNetwork < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @description = @fetched['description'] - @gateway_ipv4 = @fetched['gatewayIPv4'] - @id = @fetched['id'] - @name = @fetched['name'] - @subnetworks = @fetched['subnetworks'] - @auto_create_subnetworks = @fetched['autoCreateSubnetworks'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @routing_config = GoogleInSpec::Compute::Property::NetworkRoutingConfig.new(@fetched['routingConfig'], to_s) - @peerings = GoogleInSpec::Compute::Property::NetworkPeeringsArray.parse(@fetched['peerings'], to_s) - @mtu = @fetched['mtu'] + @description = @fetched["description"] + @gateway_ipv4 = @fetched["gatewayIPv4"] + @id = @fetched["id"] + @name = @fetched["name"] + @subnetworks = @fetched["subnetworks"] + @auto_create_subnetworks = @fetched["autoCreateSubnetworks"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @routing_config = GoogleInSpec::Compute::Property::NetworkRoutingConfig.new(@fetched["routingConfig"], to_s) + @peerings = GoogleInSpec::Compute::Property::NetworkPeeringsArray.parse(@fetched["peerings"], to_s) + @mtu = @fetched["mtu"] end # Handles parsing RFC3339 time string @@ -85,13 +85,13 @@ def creation_timestamp_date def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/networks/{{name}}' + "projects/{{project}}/global/networks/{{name}}" end end diff --git a/libraries/google_compute_network_endpoint_group.rb b/libraries/google_compute_network_endpoint_group.rb index b68e8a9ed..387e252c8 100644 --- a/libraries/google_compute_network_endpoint_group.rb +++ b/libraries/google_compute_network_endpoint_group.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeNetworkEndpointGroup < GcpResourceBase - name 'google_compute_network_endpoint_group' - desc 'NetworkEndpointGroup' - supports platform: 'gcp' + name "google_compute_network_endpoint_group" + desc "NetworkEndpointGroup" + supports platform: "gcp" attr_reader :params attr_reader :id @@ -35,20 +35,20 @@ class ComputeNetworkEndpointGroup < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @id = @fetched['id'] - @name = @fetched['name'] - @description = @fetched['description'] - @network_endpoint_type = @fetched['networkEndpointType'] - @size = @fetched['size'] - @network = @fetched['network'] - @subnetwork = @fetched['subnetwork'] - @default_port = @fetched['defaultPort'] - @zone = @fetched['zone'] + @id = @fetched["id"] + @name = @fetched["name"] + @description = @fetched["description"] + @network_endpoint_type = @fetched["networkEndpointType"] + @size = @fetched["size"] + @network = @fetched["network"] + @subnetwork = @fetched["subnetwork"] + @default_port = @fetched["defaultPort"] + @zone = @fetched["zone"] end def exists? @@ -63,13 +63,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/networkEndpointGroups/{{name}}' + "projects/{{project}}/zones/{{zone}}/networkEndpointGroups/{{name}}" end end diff --git a/libraries/google_compute_network_endpoint_groups.rb b/libraries/google_compute_network_endpoint_groups.rb index 0e13e4758..11386ffa7 100644 --- a/libraries/google_compute_network_endpoint_groups.rb +++ b/libraries/google_compute_network_endpoint_groups.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeNetworkEndpointGroups < GcpResourceBase - name 'google_compute_network_endpoint_groups' - desc 'NetworkEndpointGroup plural resource' - supports platform: 'gcp' + name "google_compute_network_endpoint_groups" + desc "NetworkEndpointGroup plural resource" + supports platform: "gcp" attr_reader :table @@ -38,12 +38,12 @@ class ComputeNetworkEndpointGroups < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'networkEndpointType' => ->(obj) { [:network_endpoint_type, obj['networkEndpointType']] }, - 'size' => ->(obj) { [:size, obj['size']] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'subnetwork' => ->(obj) { [:subnetwork, obj['subnetwork']] }, - 'defaultPort' => ->(obj) { [:default_port, obj['defaultPort']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "networkEndpointType" => ->(obj) { [:network_endpoint_type, obj["networkEndpointType"]] }, + "size" => ->(obj) { [:size, obj["size"]] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "subnetwork" => ->(obj) { [:subnetwork, obj["subnetwork"]] }, + "defaultPort" => ->(obj) { [:default_port, obj["defaultPort"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, } end @@ -87,13 +87,13 @@ def transformers def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/networkEndpointGroups' + "projects/{{project}}/zones/{{zone}}/networkEndpointGroups" end end diff --git a/libraries/google_compute_networks.rb b/libraries/google_compute_networks.rb index 85f41b5bf..c22c153f8 100644 --- a/libraries/google_compute_networks.rb +++ b/libraries/google_compute_networks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeNetworks < GcpResourceBase - name 'google_compute_networks' - desc 'Network plural resource' - supports platform: 'gcp' + name "google_compute_networks" + desc "Network plural resource" + supports platform: "gcp" attr_reader :table @@ -39,12 +39,12 @@ class ComputeNetworks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'description' => ->(obj) { [:description, obj['description']] }, - 'gatewayIPv4' => ->(obj) { [:gateway_ipv4, obj['gatewayIPv4']] }, - 'id' => ->(obj) { [:network_id, obj['id']] }, - 'name' => ->(obj) { [:network_name, obj['name']] }, - 'subnetworks' => ->(obj) { [:subnetworks, obj['subnetworks']] }, - 'autoCreateSubnetworks' => ->(obj) { [:auto_create_subnetworks, obj['autoCreateSubnetworks']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'routingConfig' => ->(obj) { [:routing_config, GoogleInSpec::Compute::Property::NetworkRoutingConfig.new(obj['routingConfig'], to_s)] }, - 'peerings' => ->(obj) { [:peerings, GoogleInSpec::Compute::Property::NetworkPeeringsArray.parse(obj['peerings'], to_s)] }, - 'mtu' => ->(obj) { [:mtu, obj['mtu']] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "gatewayIPv4" => ->(obj) { [:gateway_ipv4, obj["gatewayIPv4"]] }, + "id" => ->(obj) { [:network_id, obj["id"]] }, + "name" => ->(obj) { [:network_name, obj["name"]] }, + "subnetworks" => ->(obj) { [:subnetworks, obj["subnetworks"]] }, + "autoCreateSubnetworks" => ->(obj) { [:auto_create_subnetworks, obj["autoCreateSubnetworks"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "routingConfig" => ->(obj) { [:routing_config, GoogleInSpec::Compute::Property::NetworkRoutingConfig.new(obj["routingConfig"], to_s)] }, + "peerings" => ->(obj) { [:peerings, GoogleInSpec::Compute::Property::NetworkPeeringsArray.parse(obj["peerings"], to_s)] }, + "mtu" => ->(obj) { [:mtu, obj["mtu"]] }, } end @@ -94,13 +94,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/networks' + "projects/{{project}}/global/networks" end end diff --git a/libraries/google_compute_node_group.rb b/libraries/google_compute_node_group.rb index a9f9cf5cc..4135775bc 100644 --- a/libraries/google_compute_node_group.rb +++ b/libraries/google_compute_node_group.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/nodegroup_autoscaling_policy' +require "gcp_backend" +require "google/compute/property/nodegroup_autoscaling_policy" # A provider to manage Compute Engine resources. class ComputeNodeGroup < GcpResourceBase - name 'google_compute_node_group' - desc 'NodeGroup' - supports platform: 'gcp' + name "google_compute_node_group" + desc "NodeGroup" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -35,19 +35,19 @@ class ComputeNodeGroup < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @name = @fetched['name'] - @node_template = @fetched['nodeTemplate'] - @size = @fetched['size'] - @maintenance_policy = @fetched['maintenancePolicy'] - @autoscaling_policy = GoogleInSpec::Compute::Property::NodeGroupAutoscalingPolicy.new(@fetched['autoscalingPolicy'], to_s) - @zone = @fetched['zone'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @name = @fetched["name"] + @node_template = @fetched["nodeTemplate"] + @size = @fetched["size"] + @maintenance_policy = @fetched["maintenancePolicy"] + @autoscaling_policy = GoogleInSpec::Compute::Property::NodeGroupAutoscalingPolicy.new(@fetched["autoscalingPolicy"], to_s) + @zone = @fetched["zone"] end # Handles parsing RFC3339 time string @@ -67,13 +67,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/nodeGroups/{{name}}' + "projects/{{project}}/zones/{{zone}}/nodeGroups/{{name}}" end end diff --git a/libraries/google_compute_node_groups.rb b/libraries/google_compute_node_groups.rb index b0b2764f7..5f020d3d1 100644 --- a/libraries/google_compute_node_groups.rb +++ b/libraries/google_compute_node_groups.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeNodeGroups < GcpResourceBase - name 'google_compute_node_groups' - desc 'NodeGroup plural resource' - supports platform: 'gcp' + name "google_compute_node_groups" + desc "NodeGroup plural resource" + supports platform: "gcp" attr_reader :table @@ -37,12 +37,12 @@ class ComputeNodeGroups < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'nodeTemplate' => ->(obj) { [:node_template, obj['nodeTemplate']] }, - 'size' => ->(obj) { [:size, obj['size']] }, - 'maintenancePolicy' => ->(obj) { [:maintenance_policy, obj['maintenancePolicy']] }, - 'autoscalingPolicy' => ->(obj) { [:autoscaling_policy, GoogleInSpec::Compute::Property::NodeGroupAutoscalingPolicy.new(obj['autoscalingPolicy'], to_s)] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "nodeTemplate" => ->(obj) { [:node_template, obj["nodeTemplate"]] }, + "size" => ->(obj) { [:size, obj["size"]] }, + "maintenancePolicy" => ->(obj) { [:maintenance_policy, obj["maintenancePolicy"]] }, + "autoscalingPolicy" => ->(obj) { [:autoscaling_policy, GoogleInSpec::Compute::Property::NodeGroupAutoscalingPolicy.new(obj["autoscalingPolicy"], to_s)] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, } end @@ -90,13 +90,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/nodeGroups' + "projects/{{project}}/zones/{{zone}}/nodeGroups" end end diff --git a/libraries/google_compute_node_template.rb b/libraries/google_compute_node_template.rb index 0c23ad476..cb236492b 100644 --- a/libraries/google_compute_node_template.rb +++ b/libraries/google_compute_node_template.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/nodetemplate_node_type_flexibility' -require 'google/compute/property/nodetemplate_server_binding' +require "gcp_backend" +require "google/compute/property/nodetemplate_node_type_flexibility" +require "google/compute/property/nodetemplate_server_binding" # A provider to manage Compute Engine resources. class ComputeNodeTemplate < GcpResourceBase - name 'google_compute_node_template' - desc 'NodeTemplate' - supports platform: 'gcp' + name "google_compute_node_template" + desc "NodeTemplate" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -37,20 +37,20 @@ class ComputeNodeTemplate < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @name = @fetched['name'] - @node_affinity_labels = @fetched['nodeAffinityLabels'] - @node_type = @fetched['nodeType'] - @node_type_flexibility = GoogleInSpec::Compute::Property::NodeTemplateNodeTypeFlexibility.new(@fetched['nodeTypeFlexibility'], to_s) - @server_binding = GoogleInSpec::Compute::Property::NodeTemplateServerBinding.new(@fetched['serverBinding'], to_s) - @cpu_overcommit_type = @fetched['cpuOvercommitType'] - @region = @fetched['region'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @name = @fetched["name"] + @node_affinity_labels = @fetched["nodeAffinityLabels"] + @node_type = @fetched["nodeType"] + @node_type_flexibility = GoogleInSpec::Compute::Property::NodeTemplateNodeTypeFlexibility.new(@fetched["nodeTypeFlexibility"], to_s) + @server_binding = GoogleInSpec::Compute::Property::NodeTemplateServerBinding.new(@fetched["serverBinding"], to_s) + @cpu_overcommit_type = @fetched["cpuOvercommitType"] + @region = @fetched["region"] end # Handles parsing RFC3339 time string @@ -70,13 +70,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/nodeTemplates/{{name}}' + "projects/{{project}}/regions/{{region}}/nodeTemplates/{{name}}" end end diff --git a/libraries/google_compute_node_templates.rb b/libraries/google_compute_node_templates.rb index 4503cd0f8..9ae26c1fd 100644 --- a/libraries/google_compute_node_templates.rb +++ b/libraries/google_compute_node_templates.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeNodeTemplates < GcpResourceBase - name 'google_compute_node_templates' - desc 'NodeTemplate plural resource' - supports platform: 'gcp' + name "google_compute_node_templates" + desc "NodeTemplate plural resource" + supports platform: "gcp" attr_reader :table @@ -38,12 +38,12 @@ class ComputeNodeTemplates < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'nodeAffinityLabels' => ->(obj) { [:node_affinity_labels, obj['nodeAffinityLabels']] }, - 'nodeType' => ->(obj) { [:node_type, obj['nodeType']] }, - 'nodeTypeFlexibility' => ->(obj) { [:node_type_flexibility, GoogleInSpec::Compute::Property::NodeTemplateNodeTypeFlexibility.new(obj['nodeTypeFlexibility'], to_s)] }, - 'serverBinding' => ->(obj) { [:server_binding, GoogleInSpec::Compute::Property::NodeTemplateServerBinding.new(obj['serverBinding'], to_s)] }, - 'cpuOvercommitType' => ->(obj) { [:cpu_overcommit_type, obj['cpuOvercommitType']] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "nodeAffinityLabels" => ->(obj) { [:node_affinity_labels, obj["nodeAffinityLabels"]] }, + "nodeType" => ->(obj) { [:node_type, obj["nodeType"]] }, + "nodeTypeFlexibility" => ->(obj) { [:node_type_flexibility, GoogleInSpec::Compute::Property::NodeTemplateNodeTypeFlexibility.new(obj["nodeTypeFlexibility"], to_s)] }, + "serverBinding" => ->(obj) { [:server_binding, GoogleInSpec::Compute::Property::NodeTemplateServerBinding.new(obj["serverBinding"], to_s)] }, + "cpuOvercommitType" => ->(obj) { [:cpu_overcommit_type, obj["cpuOvercommitType"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end @@ -92,13 +92,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/nodeTemplates' + "projects/{{project}}/regions/{{region}}/nodeTemplates" end end diff --git a/libraries/google_compute_project_info.rb b/libraries/google_compute_project_info.rb index 52916e51f..502709931 100644 --- a/libraries/google_compute_project_info.rb +++ b/libraries/google_compute_project_info.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/projectinfo_common_instance_metadata' -require 'google/compute/property/projectinfo_common_instance_metadata_items' -require 'google/compute/property/projectinfo_quotas' +require "gcp_backend" +require "google/compute/property/projectinfo_common_instance_metadata" +require "google/compute/property/projectinfo_common_instance_metadata_items" +require "google/compute/property/projectinfo_quotas" # A provider to manage Compute Engine resources. class ComputeProjectInfo < GcpResourceBase - name 'google_compute_project_info' - desc 'ProjectInfo' - supports platform: 'gcp' + name "google_compute_project_info" + desc "ProjectInfo" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -37,19 +37,19 @@ class ComputeProjectInfo < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @common_instance_metadata = GoogleInSpec::Compute::Property::ProjectInfoCommonInstanceMetadata.new(@fetched['commonInstanceMetadata'], to_s) - @enabled_features = @fetched['enabledFeatures'] - @default_service_account = @fetched['defaultServiceAccount'] - @xpn_project_status = @fetched['xpnProjectStatus'] - @default_network_tier = @fetched['defaultNetworkTier'] - @quotas = GoogleInSpec::Compute::Property::ProjectInfoQuotasArray.parse(@fetched['quotas'], to_s) - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) + @name = @fetched["name"] + @common_instance_metadata = GoogleInSpec::Compute::Property::ProjectInfoCommonInstanceMetadata.new(@fetched["commonInstanceMetadata"], to_s) + @enabled_features = @fetched["enabledFeatures"] + @default_service_account = @fetched["defaultServiceAccount"] + @xpn_project_status = @fetched["xpnProjectStatus"] + @default_network_tier = @fetched["defaultNetworkTier"] + @quotas = GoogleInSpec::Compute::Property::ProjectInfoQuotasArray.parse(@fetched["quotas"], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) end # Handles parsing RFC3339 time string @@ -67,7 +67,7 @@ def to_s def has_enabled_oslogin? @common_instance_metadata&.items&.each do |element| - return true if element.key=='enable-oslogin' and element.value.casecmp('true').zero? + return true if element.key=="enable-oslogin" and element.value.casecmp("true") == 0 end false end @@ -76,13 +76,13 @@ def has_enabled_oslogin? def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}' + "projects/{{project}}" end end diff --git a/libraries/google_compute_public_delegated_prefix.rb b/libraries/google_compute_public_delegated_prefix.rb index 8d1e8646f..021a57728 100644 --- a/libraries/google_compute_public_delegated_prefix.rb +++ b/libraries/google_compute_public_delegated_prefix.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputePublicDelegatedPrefix < GcpResourceBase - name 'google_compute_public_delegated_prefix' - desc 'PublicDelegatedPrefix' - supports platform: 'gcp' + name "google_compute_public_delegated_prefix" + desc "PublicDelegatedPrefix" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -35,20 +35,20 @@ class ComputePublicDelegatedPrefix < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @ip_cidr_range = @fetched['ipCidrRange'] - @parent_prefix = @fetched['parentPrefix'] - @is_live_migration = @fetched['isLiveMigration'] - @fingerprint = @fetched['fingerprint'] - @status = @fetched['status'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @ip_cidr_range = @fetched["ipCidrRange"] + @parent_prefix = @fetched["parentPrefix"] + @is_live_migration = @fetched["isLiveMigration"] + @fingerprint = @fetched["fingerprint"] + @status = @fetched["status"] end # Handles parsing RFC3339 time string @@ -67,10 +67,10 @@ def to_s private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/publicDelegatedPrefixes/{{name}}' + "projects/{{project}}/regions/{{region}}/publicDelegatedPrefixes/{{name}}" end end diff --git a/libraries/google_compute_public_delegated_prefixes.rb b/libraries/google_compute_public_delegated_prefixes.rb index ca005368d..1043f9e42 100644 --- a/libraries/google_compute_public_delegated_prefixes.rb +++ b/libraries/google_compute_public_delegated_prefixes.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputePublicDelegatedPrefixs < GcpResourceBase - name 'google_compute_public_delegated_prefixes' - desc 'PublicDelegatedPrefix plural resource' - supports platform: 'gcp' + name "google_compute_public_delegated_prefixes" + desc "PublicDelegatedPrefix plural resource" + supports platform: "gcp" attr_reader :table @@ -38,12 +38,12 @@ class ComputePublicDelegatedPrefixs < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'ipCidrRange' => ->(obj) { [:ip_cidr_range, obj['ipCidrRange']] }, - 'parentPrefix' => ->(obj) { [:parent_prefix, obj['parentPrefix']] }, - 'isLiveMigration' => ->(obj) { [:is_live_migration, obj['isLiveMigration']] }, - 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, - 'status' => ->(obj) { [:status, obj['status']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "ipCidrRange" => ->(obj) { [:ip_cidr_range, obj["ipCidrRange"]] }, + "parentPrefix" => ->(obj) { [:parent_prefix, obj["parentPrefix"]] }, + "isLiveMigration" => ->(obj) { [:is_live_migration, obj["isLiveMigration"]] }, + "fingerprint" => ->(obj) { [:fingerprint, obj["fingerprint"]] }, + "status" => ->(obj) { [:status, obj["status"]] }, } end @@ -91,10 +91,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/publicDelegatedPrefixes' + "projects/{{project}}/regions/{{region}}/publicDelegatedPrefixes" end end diff --git a/libraries/google_compute_region.rb b/libraries/google_compute_region.rb index 7992aeb5f..a654905b9 100644 --- a/libraries/google_compute_region.rb +++ b/libraries/google_compute_region.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/region_deprecated' -require 'google/compute/property/region_quotas' +require "gcp_backend" +require "google/compute/property/region_deprecated" +require "google/compute/property/region_quotas" # A provider to manage Compute Engine resources. class ComputeRegion < GcpResourceBase - name 'google_compute_region' - desc 'Region' - supports platform: 'gcp' + name "google_compute_region" + desc "Region" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -36,19 +36,19 @@ class ComputeRegion < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @deprecated = GoogleInSpec::Compute::Property::RegionDeprecated.new(@fetched['deprecated'], to_s) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @quotas = GoogleInSpec::Compute::Property::RegionQuotasArray.parse(@fetched['quotas'], to_s) - @status = @fetched['status'] - @zones = @fetched['zones'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @deprecated = GoogleInSpec::Compute::Property::RegionDeprecated.new(@fetched["deprecated"], to_s) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @quotas = GoogleInSpec::Compute::Property::RegionQuotasArray.parse(@fetched["quotas"], to_s) + @status = @fetched["status"] + @zones = @fetched["zones"] end # Handles parsing RFC3339 time string @@ -68,25 +68,25 @@ def to_s # https://www.googleapis.com/compute/v1/projects/spaterson-project/zones/asia-east1-a def zone_names return [] if !exists? - @zones.map { |zone| zone.split('/').last } + @zones.map { |zone| zone.split("/").last } end def up? return false if !exists? - @status == 'UP' + @status == "UP" end private def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{name}}' + "projects/{{project}}/regions/{{name}}" end end diff --git a/libraries/google_compute_region_backend_service.rb b/libraries/google_compute_region_backend_service.rb index 6ae4270fe..d570be381 100644 --- a/libraries/google_compute_region_backend_service.rb +++ b/libraries/google_compute_region_backend_service.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,28 +13,28 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/regionbackendservice_backends' -require 'google/compute/property/regionbackendservice_cdn_policy' -require 'google/compute/property/regionbackendservice_cdn_policy_cache_key_policy' -require 'google/compute/property/regionbackendservice_cdn_policy_negative_caching_policy' -require 'google/compute/property/regionbackendservice_circuit_breakers' -require 'google/compute/property/regionbackendservice_circuit_breakers_connect_timeout' -require 'google/compute/property/regionbackendservice_connection_draining' -require 'google/compute/property/regionbackendservice_consistent_hash' -require 'google/compute/property/regionbackendservice_consistent_hash_http_cookie' -require 'google/compute/property/regionbackendservice_consistent_hash_http_cookie_ttl' -require 'google/compute/property/regionbackendservice_failover_policy' -require 'google/compute/property/regionbackendservice_log_config' -require 'google/compute/property/regionbackendservice_outlier_detection' -require 'google/compute/property/regionbackendservice_outlier_detection_base_ejection_time' -require 'google/compute/property/regionbackendservice_outlier_detection_interval' +require "gcp_backend" +require "google/compute/property/regionbackendservice_backends" +require "google/compute/property/regionbackendservice_cdn_policy" +require "google/compute/property/regionbackendservice_cdn_policy_cache_key_policy" +require "google/compute/property/regionbackendservice_cdn_policy_negative_caching_policy" +require "google/compute/property/regionbackendservice_circuit_breakers" +require "google/compute/property/regionbackendservice_circuit_breakers_connect_timeout" +require "google/compute/property/regionbackendservice_connection_draining" +require "google/compute/property/regionbackendservice_consistent_hash" +require "google/compute/property/regionbackendservice_consistent_hash_http_cookie" +require "google/compute/property/regionbackendservice_consistent_hash_http_cookie_ttl" +require "google/compute/property/regionbackendservice_failover_policy" +require "google/compute/property/regionbackendservice_log_config" +require "google/compute/property/regionbackendservice_outlier_detection" +require "google/compute/property/regionbackendservice_outlier_detection_base_ejection_time" +require "google/compute/property/regionbackendservice_outlier_detection_interval" # A provider to manage Compute Engine resources. class ComputeRegionBackendService < GcpResourceBase - name 'google_compute_region_backend_service' - desc 'RegionBackendService' - supports platform: 'gcp' + name "google_compute_region_backend_service" + desc "RegionBackendService" + supports platform: "gcp" attr_reader :params attr_reader :affinity_cookie_ttl_sec @@ -65,35 +65,35 @@ class ComputeRegionBackendService < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @affinity_cookie_ttl_sec = @fetched['affinityCookieTtlSec'] - @backends = GoogleInSpec::Compute::Property::RegionBackendServiceBackendsArray.parse(@fetched['backends'], to_s) - @circuit_breakers = GoogleInSpec::Compute::Property::RegionBackendServiceCircuitBreakers.new(@fetched['circuitBreakers'], to_s) - @consistent_hash = GoogleInSpec::Compute::Property::RegionBackendServiceConsistentHash.new(@fetched['consistentHash'], to_s) - @cdn_policy = GoogleInSpec::Compute::Property::RegionBackendServiceCdnPolicy.new(@fetched['cdnPolicy'], to_s) - @connection_draining = GoogleInSpec::Compute::Property::RegionBackendServiceConnectionDraining.new(@fetched['connectionDraining'], to_s) - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @failover_policy = GoogleInSpec::Compute::Property::RegionBackendServiceFailoverPolicy.new(@fetched['failoverPolicy'], to_s) - @enable_cdn = @fetched['enableCDN'] - @fingerprint = @fetched['fingerprint'] - @health_checks = @fetched['healthChecks'] - @id = @fetched['id'] - @load_balancing_scheme = @fetched['loadBalancingScheme'] - @locality_lb_policy = @fetched['localityLbPolicy'] - @name = @fetched['name'] - @outlier_detection = GoogleInSpec::Compute::Property::RegionBackendServiceOutlierDetection.new(@fetched['outlierDetection'], to_s) - @port_name = @fetched['portName'] - @protocol = @fetched['protocol'] - @session_affinity = @fetched['sessionAffinity'] - @timeout_sec = @fetched['timeoutSec'] - @log_config = GoogleInSpec::Compute::Property::RegionBackendServiceLogConfig.new(@fetched['logConfig'], to_s) - @network = @fetched['network'] - @region = @fetched['region'] + @affinity_cookie_ttl_sec = @fetched["affinityCookieTtlSec"] + @backends = GoogleInSpec::Compute::Property::RegionBackendServiceBackendsArray.parse(@fetched["backends"], to_s) + @circuit_breakers = GoogleInSpec::Compute::Property::RegionBackendServiceCircuitBreakers.new(@fetched["circuitBreakers"], to_s) + @consistent_hash = GoogleInSpec::Compute::Property::RegionBackendServiceConsistentHash.new(@fetched["consistentHash"], to_s) + @cdn_policy = GoogleInSpec::Compute::Property::RegionBackendServiceCdnPolicy.new(@fetched["cdnPolicy"], to_s) + @connection_draining = GoogleInSpec::Compute::Property::RegionBackendServiceConnectionDraining.new(@fetched["connectionDraining"], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @failover_policy = GoogleInSpec::Compute::Property::RegionBackendServiceFailoverPolicy.new(@fetched["failoverPolicy"], to_s) + @enable_cdn = @fetched["enableCDN"] + @fingerprint = @fetched["fingerprint"] + @health_checks = @fetched["healthChecks"] + @id = @fetched["id"] + @load_balancing_scheme = @fetched["loadBalancingScheme"] + @locality_lb_policy = @fetched["localityLbPolicy"] + @name = @fetched["name"] + @outlier_detection = GoogleInSpec::Compute::Property::RegionBackendServiceOutlierDetection.new(@fetched["outlierDetection"], to_s) + @port_name = @fetched["portName"] + @protocol = @fetched["protocol"] + @session_affinity = @fetched["sessionAffinity"] + @timeout_sec = @fetched["timeoutSec"] + @log_config = GoogleInSpec::Compute::Property::RegionBackendServiceLogConfig.new(@fetched["logConfig"], to_s) + @network = @fetched["network"] + @region = @fetched["region"] end # Handles parsing RFC3339 time string @@ -113,13 +113,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/backendServices/{{name}}' + "projects/{{project}}/regions/{{region}}/backendServices/{{name}}" end end diff --git a/libraries/google_compute_region_backend_services.rb b/libraries/google_compute_region_backend_services.rb index dc8d3b829..09692e3bc 100644 --- a/libraries/google_compute_region_backend_services.rb +++ b/libraries/google_compute_region_backend_services.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeRegionBackendServices < GcpResourceBase - name 'google_compute_region_backend_services' - desc 'RegionBackendService plural resource' - supports platform: 'gcp' + name "google_compute_region_backend_services" + desc "RegionBackendService plural resource" + supports platform: "gcp" attr_reader :table @@ -53,12 +53,12 @@ class ComputeRegionBackendServices < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -86,30 +86,30 @@ def transform(key, value) def transformers { - 'affinityCookieTtlSec' => ->(obj) { [:affinity_cookie_ttl_sec, obj['affinityCookieTtlSec']] }, - 'backends' => ->(obj) { [:backends, GoogleInSpec::Compute::Property::RegionBackendServiceBackendsArray.parse(obj['backends'], to_s)] }, - 'circuitBreakers' => ->(obj) { [:circuit_breakers, GoogleInSpec::Compute::Property::RegionBackendServiceCircuitBreakers.new(obj['circuitBreakers'], to_s)] }, - 'consistentHash' => ->(obj) { [:consistent_hash, GoogleInSpec::Compute::Property::RegionBackendServiceConsistentHash.new(obj['consistentHash'], to_s)] }, - 'cdnPolicy' => ->(obj) { [:cdn_policy, GoogleInSpec::Compute::Property::RegionBackendServiceCdnPolicy.new(obj['cdnPolicy'], to_s)] }, - 'connectionDraining' => ->(obj) { [:connection_draining, GoogleInSpec::Compute::Property::RegionBackendServiceConnectionDraining.new(obj['connectionDraining'], to_s)] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'failoverPolicy' => ->(obj) { [:failover_policy, GoogleInSpec::Compute::Property::RegionBackendServiceFailoverPolicy.new(obj['failoverPolicy'], to_s)] }, - 'enableCDN' => ->(obj) { [:enable_cdn, obj['enableCDN']] }, - 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, - 'healthChecks' => ->(obj) { [:health_checks, obj['healthChecks']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'loadBalancingScheme' => ->(obj) { [:load_balancing_scheme, obj['loadBalancingScheme']] }, - 'localityLbPolicy' => ->(obj) { [:locality_lb_policy, obj['localityLbPolicy']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'outlierDetection' => ->(obj) { [:outlier_detection, GoogleInSpec::Compute::Property::RegionBackendServiceOutlierDetection.new(obj['outlierDetection'], to_s)] }, - 'portName' => ->(obj) { [:port_name, obj['portName']] }, - 'protocol' => ->(obj) { [:protocol, obj['protocol']] }, - 'sessionAffinity' => ->(obj) { [:session_affinity, obj['sessionAffinity']] }, - 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, - 'logConfig' => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::RegionBackendServiceLogConfig.new(obj['logConfig'], to_s)] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "affinityCookieTtlSec" => ->(obj) { [:affinity_cookie_ttl_sec, obj["affinityCookieTtlSec"]] }, + "backends" => ->(obj) { [:backends, GoogleInSpec::Compute::Property::RegionBackendServiceBackendsArray.parse(obj["backends"], to_s)] }, + "circuitBreakers" => ->(obj) { [:circuit_breakers, GoogleInSpec::Compute::Property::RegionBackendServiceCircuitBreakers.new(obj["circuitBreakers"], to_s)] }, + "consistentHash" => ->(obj) { [:consistent_hash, GoogleInSpec::Compute::Property::RegionBackendServiceConsistentHash.new(obj["consistentHash"], to_s)] }, + "cdnPolicy" => ->(obj) { [:cdn_policy, GoogleInSpec::Compute::Property::RegionBackendServiceCdnPolicy.new(obj["cdnPolicy"], to_s)] }, + "connectionDraining" => ->(obj) { [:connection_draining, GoogleInSpec::Compute::Property::RegionBackendServiceConnectionDraining.new(obj["connectionDraining"], to_s)] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "failoverPolicy" => ->(obj) { [:failover_policy, GoogleInSpec::Compute::Property::RegionBackendServiceFailoverPolicy.new(obj["failoverPolicy"], to_s)] }, + "enableCDN" => ->(obj) { [:enable_cdn, obj["enableCDN"]] }, + "fingerprint" => ->(obj) { [:fingerprint, obj["fingerprint"]] }, + "healthChecks" => ->(obj) { [:health_checks, obj["healthChecks"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "loadBalancingScheme" => ->(obj) { [:load_balancing_scheme, obj["loadBalancingScheme"]] }, + "localityLbPolicy" => ->(obj) { [:locality_lb_policy, obj["localityLbPolicy"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "outlierDetection" => ->(obj) { [:outlier_detection, GoogleInSpec::Compute::Property::RegionBackendServiceOutlierDetection.new(obj["outlierDetection"], to_s)] }, + "portName" => ->(obj) { [:port_name, obj["portName"]] }, + "protocol" => ->(obj) { [:protocol, obj["protocol"]] }, + "sessionAffinity" => ->(obj) { [:session_affinity, obj["sessionAffinity"]] }, + "timeoutSec" => ->(obj) { [:timeout_sec, obj["timeoutSec"]] }, + "logConfig" => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::RegionBackendServiceLogConfig.new(obj["logConfig"], to_s)] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end @@ -122,13 +122,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/backendServices' + "projects/{{project}}/regions/{{region}}/backendServices" end end diff --git a/libraries/google_compute_region_health_check.rb b/libraries/google_compute_region_health_check.rb index f33fadd0c..21096c794 100644 --- a/libraries/google_compute_region_health_check.rb +++ b/libraries/google_compute_region_health_check.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,20 +13,20 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/regionhealthcheck_grpc_health_check' -require 'google/compute/property/regionhealthcheck_http2_health_check' -require 'google/compute/property/regionhealthcheck_http_health_check' -require 'google/compute/property/regionhealthcheck_https_health_check' -require 'google/compute/property/regionhealthcheck_log_config' -require 'google/compute/property/regionhealthcheck_ssl_health_check' -require 'google/compute/property/regionhealthcheck_tcp_health_check' +require "gcp_backend" +require "google/compute/property/regionhealthcheck_grpc_health_check" +require "google/compute/property/regionhealthcheck_http2_health_check" +require "google/compute/property/regionhealthcheck_http_health_check" +require "google/compute/property/regionhealthcheck_https_health_check" +require "google/compute/property/regionhealthcheck_log_config" +require "google/compute/property/regionhealthcheck_ssl_health_check" +require "google/compute/property/regionhealthcheck_tcp_health_check" # A provider to manage Compute Engine resources. class ComputeRegionHealthCheck < GcpResourceBase - name 'google_compute_region_health_check' - desc 'RegionHealthCheck' - supports platform: 'gcp' + name "google_compute_region_health_check" + desc "RegionHealthCheck" + supports platform: "gcp" attr_reader :params attr_reader :check_interval_sec @@ -50,28 +50,28 @@ class ComputeRegionHealthCheck < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @check_interval_sec = @fetched['checkIntervalSec'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @healthy_threshold = @fetched['healthyThreshold'] - @id = @fetched['id'] - @name = @fetched['name'] - @unhealthy_threshold = @fetched['unhealthyThreshold'] - @timeout_sec = @fetched['timeoutSec'] - @type = @fetched['type'] - @http_health_check = GoogleInSpec::Compute::Property::RegionHealthCheckHttpHealthCheck.new(@fetched['httpHealthCheck'], to_s) - @https_health_check = GoogleInSpec::Compute::Property::RegionHealthCheckHttpsHealthCheck.new(@fetched['httpsHealthCheck'], to_s) - @tcp_health_check = GoogleInSpec::Compute::Property::RegionHealthCheckTcpHealthCheck.new(@fetched['tcpHealthCheck'], to_s) - @ssl_health_check = GoogleInSpec::Compute::Property::RegionHealthCheckSslHealthCheck.new(@fetched['sslHealthCheck'], to_s) - @http2_health_check = GoogleInSpec::Compute::Property::RegionHealthCheckHttp2HealthCheck.new(@fetched['http2HealthCheck'], to_s) - @grpc_health_check = GoogleInSpec::Compute::Property::RegionHealthCheckGrpcHealthCheck.new(@fetched['grpcHealthCheck'], to_s) - @log_config = GoogleInSpec::Compute::Property::RegionHealthCheckLogConfig.new(@fetched['logConfig'], to_s) - @region = @fetched['region'] + @check_interval_sec = @fetched["checkIntervalSec"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @healthy_threshold = @fetched["healthyThreshold"] + @id = @fetched["id"] + @name = @fetched["name"] + @unhealthy_threshold = @fetched["unhealthyThreshold"] + @timeout_sec = @fetched["timeoutSec"] + @type = @fetched["type"] + @http_health_check = GoogleInSpec::Compute::Property::RegionHealthCheckHttpHealthCheck.new(@fetched["httpHealthCheck"], to_s) + @https_health_check = GoogleInSpec::Compute::Property::RegionHealthCheckHttpsHealthCheck.new(@fetched["httpsHealthCheck"], to_s) + @tcp_health_check = GoogleInSpec::Compute::Property::RegionHealthCheckTcpHealthCheck.new(@fetched["tcpHealthCheck"], to_s) + @ssl_health_check = GoogleInSpec::Compute::Property::RegionHealthCheckSslHealthCheck.new(@fetched["sslHealthCheck"], to_s) + @http2_health_check = GoogleInSpec::Compute::Property::RegionHealthCheckHttp2HealthCheck.new(@fetched["http2HealthCheck"], to_s) + @grpc_health_check = GoogleInSpec::Compute::Property::RegionHealthCheckGrpcHealthCheck.new(@fetched["grpcHealthCheck"], to_s) + @log_config = GoogleInSpec::Compute::Property::RegionHealthCheckLogConfig.new(@fetched["logConfig"], to_s) + @region = @fetched["region"] end # Handles parsing RFC3339 time string @@ -90,10 +90,10 @@ def to_s private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/healthChecks/{{name}}' + "projects/{{project}}/regions/{{region}}/healthChecks/{{name}}" end end diff --git a/libraries/google_compute_region_health_checks.rb b/libraries/google_compute_region_health_checks.rb index 60b5162bd..74e4ff084 100644 --- a/libraries/google_compute_region_health_checks.rb +++ b/libraries/google_compute_region_health_checks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeRegionHealthChecks < GcpResourceBase - name 'google_compute_region_health_checks' - desc 'RegionHealthCheck plural resource' - supports platform: 'gcp' + name "google_compute_region_health_checks" + desc "RegionHealthCheck plural resource" + supports platform: "gcp" attr_reader :table @@ -46,12 +46,12 @@ class ComputeRegionHealthChecks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -79,23 +79,23 @@ def transform(key, value) def transformers { - 'checkIntervalSec' => ->(obj) { [:check_interval_sec, obj['checkIntervalSec']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'healthyThreshold' => ->(obj) { [:healthy_threshold, obj['healthyThreshold']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'unhealthyThreshold' => ->(obj) { [:unhealthy_threshold, obj['unhealthyThreshold']] }, - 'timeoutSec' => ->(obj) { [:timeout_sec, obj['timeoutSec']] }, - 'type' => ->(obj) { [:type, obj['type']] }, - 'httpHealthCheck' => ->(obj) { [:http_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckHttpHealthCheck.new(obj['httpHealthCheck'], to_s)] }, - 'httpsHealthCheck' => ->(obj) { [:https_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckHttpsHealthCheck.new(obj['httpsHealthCheck'], to_s)] }, - 'tcpHealthCheck' => ->(obj) { [:tcp_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckTcpHealthCheck.new(obj['tcpHealthCheck'], to_s)] }, - 'sslHealthCheck' => ->(obj) { [:ssl_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckSslHealthCheck.new(obj['sslHealthCheck'], to_s)] }, - 'http2HealthCheck' => ->(obj) { [:http2_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckHttp2HealthCheck.new(obj['http2HealthCheck'], to_s)] }, - 'grpcHealthCheck' => ->(obj) { [:grpc_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckGrpcHealthCheck.new(obj['grpcHealthCheck'], to_s)] }, - 'logConfig' => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::RegionHealthCheckLogConfig.new(obj['logConfig'], to_s)] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "checkIntervalSec" => ->(obj) { [:check_interval_sec, obj["checkIntervalSec"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "healthyThreshold" => ->(obj) { [:healthy_threshold, obj["healthyThreshold"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "unhealthyThreshold" => ->(obj) { [:unhealthy_threshold, obj["unhealthyThreshold"]] }, + "timeoutSec" => ->(obj) { [:timeout_sec, obj["timeoutSec"]] }, + "type" => ->(obj) { [:type, obj["type"]] }, + "httpHealthCheck" => ->(obj) { [:http_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckHttpHealthCheck.new(obj["httpHealthCheck"], to_s)] }, + "httpsHealthCheck" => ->(obj) { [:https_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckHttpsHealthCheck.new(obj["httpsHealthCheck"], to_s)] }, + "tcpHealthCheck" => ->(obj) { [:tcp_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckTcpHealthCheck.new(obj["tcpHealthCheck"], to_s)] }, + "sslHealthCheck" => ->(obj) { [:ssl_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckSslHealthCheck.new(obj["sslHealthCheck"], to_s)] }, + "http2HealthCheck" => ->(obj) { [:http2_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckHttp2HealthCheck.new(obj["http2HealthCheck"], to_s)] }, + "grpcHealthCheck" => ->(obj) { [:grpc_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckGrpcHealthCheck.new(obj["grpcHealthCheck"], to_s)] }, + "logConfig" => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::RegionHealthCheckLogConfig.new(obj["logConfig"], to_s)] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end @@ -107,10 +107,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/healthChecks' + "projects/{{project}}/regions/{{region}}/healthChecks" end end diff --git a/libraries/google_compute_region_instance_group.rb b/libraries/google_compute_region_instance_group.rb index 605c2596b..f6b2c0656 100644 --- a/libraries/google_compute_region_instance_group.rb +++ b/libraries/google_compute_region_instance_group.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/regioninstancegroup_named_ports' +require "gcp_backend" +require "google/compute/property/regioninstancegroup_named_ports" # A provider to manage Compute Engine resources. class ComputeRegionInstanceGroup < GcpResourceBase - name 'google_compute_region_instance_group' - desc 'RegionInstanceGroup' - supports platform: 'gcp' + name "google_compute_region_instance_group" + desc "RegionInstanceGroup" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -37,21 +37,21 @@ class ComputeRegionInstanceGroup < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @fingerprint = @fetched['fingerprint'] - @network = @fetched['network'] - @zone = @fetched['zone'] - @size = @fetched['size'] - @region = @fetched['region'] - @named_ports = GoogleInSpec::Compute::Property::RegionInstanceGroupNamedPortsArray.parse(@fetched['namedPorts'], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @fingerprint = @fetched["fingerprint"] + @network = @fetched["network"] + @zone = @fetched["zone"] + @size = @fetched["size"] + @region = @fetched["region"] + @named_ports = GoogleInSpec::Compute::Property::RegionInstanceGroupNamedPortsArray.parse(@fetched["namedPorts"], to_s) end # Handles parsing RFC3339 time string @@ -70,10 +70,10 @@ def to_s private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/instanceGroups/{{name}}' + "projects/{{project}}/regions/{{region}}/instanceGroups/{{name}}" end end diff --git a/libraries/google_compute_region_instance_group_manager.rb b/libraries/google_compute_region_instance_group_manager.rb index 65192b0be..2742f00f0 100644 --- a/libraries/google_compute_region_instance_group_manager.rb +++ b/libraries/google_compute_region_instance_group_manager.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/regioninstancegroupmanager_auto_healing_policies' -require 'google/compute/property/regioninstancegroupmanager_current_actions' -require 'google/compute/property/regioninstancegroupmanager_named_ports' +require "gcp_backend" +require "google/compute/property/regioninstancegroupmanager_auto_healing_policies" +require "google/compute/property/regioninstancegroupmanager_current_actions" +require "google/compute/property/regioninstancegroupmanager_named_ports" # A provider to manage Compute Engine resources. class ComputeRegionInstanceGroupManager < GcpResourceBase - name 'google_compute_region_instance_group_manager' - desc 'RegionInstanceGroupManager' - supports platform: 'gcp' + name "google_compute_region_instance_group_manager" + desc "RegionInstanceGroupManager" + supports platform: "gcp" attr_reader :params attr_reader :base_instance_name @@ -42,24 +42,24 @@ class ComputeRegionInstanceGroupManager < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @base_instance_name = @fetched['baseInstanceName'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @current_actions = GoogleInSpec::Compute::Property::RegionInstanceGroupManagerCurrentActions.new(@fetched['currentActions'], to_s) - @description = @fetched['description'] - @id = @fetched['id'] - @instance_group = @fetched['instanceGroup'] - @instance_template = @fetched['instanceTemplate'] - @name = @fetched['name'] - @named_ports = GoogleInSpec::Compute::Property::RegionInstanceGroupManagerNamedPortsArray.parse(@fetched['namedPorts'], to_s) - @target_pools = @fetched['targetPools'] - @target_size = @fetched['targetSize'] - @auto_healing_policies = GoogleInSpec::Compute::Property::RegionInstanceGroupManagerAutoHealingPoliciesArray.parse(@fetched['autoHealingPolicies'], to_s) - @region = @fetched['region'] + @base_instance_name = @fetched["baseInstanceName"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @current_actions = GoogleInSpec::Compute::Property::RegionInstanceGroupManagerCurrentActions.new(@fetched["currentActions"], to_s) + @description = @fetched["description"] + @id = @fetched["id"] + @instance_group = @fetched["instanceGroup"] + @instance_template = @fetched["instanceTemplate"] + @name = @fetched["name"] + @named_ports = GoogleInSpec::Compute::Property::RegionInstanceGroupManagerNamedPortsArray.parse(@fetched["namedPorts"], to_s) + @target_pools = @fetched["targetPools"] + @target_size = @fetched["targetSize"] + @auto_healing_policies = GoogleInSpec::Compute::Property::RegionInstanceGroupManagerAutoHealingPoliciesArray.parse(@fetched["autoHealingPolicies"], to_s) + @region = @fetched["region"] end # Handles parsing RFC3339 time string @@ -99,13 +99,13 @@ def find_named_ports(key = :name) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/instanceGroupManagers/{{name}}' + "projects/{{project}}/regions/{{region}}/instanceGroupManagers/{{name}}" end end diff --git a/libraries/google_compute_region_instance_group_managers.rb b/libraries/google_compute_region_instance_group_managers.rb index b060ba8c7..30054d5b1 100644 --- a/libraries/google_compute_region_instance_group_managers.rb +++ b/libraries/google_compute_region_instance_group_managers.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeRegionInstanceGroupManagers < GcpResourceBase - name 'google_compute_region_instance_group_managers' - desc 'RegionInstanceGroupManager plural resource' - supports platform: 'gcp' + name "google_compute_region_instance_group_managers" + desc "RegionInstanceGroupManager plural resource" + supports platform: "gcp" attr_reader :table @@ -42,12 +42,12 @@ class ComputeRegionInstanceGroupManagers < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'baseInstanceName' => ->(obj) { [:base_instance_name, obj['baseInstanceName']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'currentActions' => ->(obj) { [:current_actions, GoogleInSpec::Compute::Property::RegionInstanceGroupManagerCurrentActions.new(obj['currentActions'], to_s)] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:instance_group_manager_id, obj['id']] }, - 'instanceGroup' => ->(obj) { [:instance_group, obj['instanceGroup']] }, - 'instanceTemplate' => ->(obj) { [:instance_template, obj['instanceTemplate']] }, - 'name' => ->(obj) { [:instance_group_manager_name, obj['name']] }, - 'namedPorts' => ->(obj) { [:named_ports, GoogleInSpec::Compute::Property::RegionInstanceGroupManagerNamedPortsArray.parse(obj['namedPorts'], to_s)] }, - 'targetPools' => ->(obj) { [:target_pools, obj['targetPools']] }, - 'targetSize' => ->(obj) { [:target_size, obj['targetSize']] }, - 'autoHealingPolicies' => ->(obj) { [:auto_healing_policies, GoogleInSpec::Compute::Property::RegionInstanceGroupManagerAutoHealingPoliciesArray.parse(obj['autoHealingPolicies'], to_s)] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "baseInstanceName" => ->(obj) { [:base_instance_name, obj["baseInstanceName"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "currentActions" => ->(obj) { [:current_actions, GoogleInSpec::Compute::Property::RegionInstanceGroupManagerCurrentActions.new(obj["currentActions"], to_s)] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:instance_group_manager_id, obj["id"]] }, + "instanceGroup" => ->(obj) { [:instance_group, obj["instanceGroup"]] }, + "instanceTemplate" => ->(obj) { [:instance_template, obj["instanceTemplate"]] }, + "name" => ->(obj) { [:instance_group_manager_name, obj["name"]] }, + "namedPorts" => ->(obj) { [:named_ports, GoogleInSpec::Compute::Property::RegionInstanceGroupManagerNamedPortsArray.parse(obj["namedPorts"], to_s)] }, + "targetPools" => ->(obj) { [:target_pools, obj["targetPools"]] }, + "targetSize" => ->(obj) { [:target_size, obj["targetSize"]] }, + "autoHealingPolicies" => ->(obj) { [:auto_healing_policies, GoogleInSpec::Compute::Property::RegionInstanceGroupManagerAutoHealingPoliciesArray.parse(obj["autoHealingPolicies"], to_s)] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end @@ -100,13 +100,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/instanceGroupManagers' + "projects/{{project}}/regions/{{region}}/instanceGroupManagers" end end diff --git a/libraries/google_compute_region_instance_groups.rb b/libraries/google_compute_region_instance_groups.rb index f774ccb85..0a862ed23 100644 --- a/libraries/google_compute_region_instance_groups.rb +++ b/libraries/google_compute_region_instance_groups.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeRegionInstanceGroups < GcpResourceBase - name 'google_compute_region_instance_groups' - desc 'RegionInstanceGroup plural resource' - supports platform: 'gcp' + name "google_compute_region_instance_groups" + desc "RegionInstanceGroup plural resource" + supports platform: "gcp" attr_reader :table @@ -39,12 +39,12 @@ class ComputeRegionInstanceGroups < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, - 'size' => ->(obj) { [:size, obj['size']] }, - 'region' => ->(obj) { [:region, obj['region']] }, - 'namedPorts' => ->(obj) { [:named_ports, GoogleInSpec::Compute::Property::RegionInstanceGroupNamedPortsArray.parse(obj['namedPorts'], to_s)] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "fingerprint" => ->(obj) { [:fingerprint, obj["fingerprint"]] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, + "size" => ->(obj) { [:size, obj["size"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, + "namedPorts" => ->(obj) { [:named_ports, GoogleInSpec::Compute::Property::RegionInstanceGroupNamedPortsArray.parse(obj["namedPorts"], to_s)] }, } end @@ -93,10 +93,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/instanceGroups' + "projects/{{project}}/regions/{{region}}/instanceGroups" end end diff --git a/libraries/google_compute_region_operation.rb b/libraries/google_compute_region_operation.rb index e557fdaa2..61878a07f 100644 --- a/libraries/google_compute_region_operation.rb +++ b/libraries/google_compute_region_operation.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeRegionOperation < GcpResourceBase - name 'google_compute_region_operation' - desc 'RegionOperation' - supports platform: 'gcp' + name "google_compute_region_operation" + desc "RegionOperation" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -38,23 +38,23 @@ class ComputeRegionOperation < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @target_id = @fetched['targetId'] - @status = @fetched['status'] - @user = @fetched['user'] - @insert_time = @fetched['insertTime'] - @start_time = @fetched['startTime'] - @end_time = @fetched['endTime'] - @progress = @fetched['progress'] - @zone = @fetched['zone'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @target_id = @fetched["targetId"] + @status = @fetched["status"] + @user = @fetched["user"] + @insert_time = @fetched["insertTime"] + @start_time = @fetched["startTime"] + @end_time = @fetched["endTime"] + @progress = @fetched["progress"] + @zone = @fetched["zone"] end # Handles parsing RFC3339 time string @@ -73,10 +73,10 @@ def to_s private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/operations/{{name}}' + "projects/{{project}}/regions/{{region}}/operations/{{name}}" end end diff --git a/libraries/google_compute_region_operations.rb b/libraries/google_compute_region_operations.rb index acd14e49c..e7f93bfe8 100644 --- a/libraries/google_compute_region_operations.rb +++ b/libraries/google_compute_region_operations.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeRegionOperations < GcpResourceBase - name 'google_compute_region_operations' - desc 'RegionOperation plural resource' - supports platform: 'gcp' + name "google_compute_region_operations" + desc "RegionOperation plural resource" + supports platform: "gcp" attr_reader :table @@ -41,12 +41,12 @@ class ComputeRegionOperations < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -74,18 +74,18 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'targetId' => ->(obj) { [:target_id, obj['targetId']] }, - 'status' => ->(obj) { [:status, obj['status']] }, - 'user' => ->(obj) { [:user, obj['user']] }, - 'insertTime' => ->(obj) { [:insert_time, obj['insertTime']] }, - 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, - 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, - 'progress' => ->(obj) { [:progress, obj['progress']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "targetId" => ->(obj) { [:target_id, obj["targetId"]] }, + "status" => ->(obj) { [:status, obj["status"]] }, + "user" => ->(obj) { [:user, obj["user"]] }, + "insertTime" => ->(obj) { [:insert_time, obj["insertTime"]] }, + "startTime" => ->(obj) { [:start_time, obj["startTime"]] }, + "endTime" => ->(obj) { [:end_time, obj["endTime"]] }, + "progress" => ->(obj) { [:progress, obj["progress"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, } end @@ -97,10 +97,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/operations' + "projects/{{project}}/regions/{{region}}/operations" end end diff --git a/libraries/google_compute_region_security_policies.rb b/libraries/google_compute_region_security_policies.rb index 4a9535988..e0c4ac597 100644 --- a/libraries/google_compute_region_security_policies.rb +++ b/libraries/google_compute_region_security_policies.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeRegionSecurityPolicys < GcpResourceBase - name 'google_compute_region_security_policies' - desc 'RegionSecurityPolicy plural resource' - supports platform: 'gcp' + name "google_compute_region_security_policies" + desc "RegionSecurityPolicy plural resource" + supports platform: "gcp" attr_reader :table @@ -45,12 +45,12 @@ class ComputeRegionSecurityPolicys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -78,32 +78,32 @@ def transform(key, value) def transformers { - 'kind' => ->(obj) { [:kind, obj['kind']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'rules' => ->(obj) { [:rules, GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesArray.parse(obj['rules'], to_s)] }, - 'adaptiveProtectionConfig' => ->(obj) { [:adaptive_protection_config, GoogleInSpec::Compute::Property::RegionSecurityPolicyAdaptiveProtectionConfig.new(obj['adaptiveProtectionConfig'], to_s)] }, - 'ddosProtectionConfig' => ->(obj) { [:ddos_protection_config, GoogleInSpec::Compute::Property::RegionSecurityPolicyDdosProtectionConfig.new(obj['ddosProtectionConfig'], to_s)] }, - 'advancedOptionsConfig' => ->(obj) { [:advanced_options_config, GoogleInSpec::Compute::Property::RegionSecurityPolicyAdvancedOptionsConfig.new(obj['advancedOptionsConfig'], to_s)] }, - 'recaptchaOptionsConfig' => ->(obj) { [:recaptcha_options_config, GoogleInSpec::Compute::Property::RegionSecurityPolicyRecaptchaOptionsConfig.new(obj['recaptchaOptionsConfig'], to_s)] }, - 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, - 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, - 'type' => ->(obj) { [:type, obj['type']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::Compute::Property::RegionSecurityPolicyLabels.new(obj['labels'], to_s)] }, - 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "kind" => ->(obj) { [:kind, obj["kind"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, obj["creationTimestamp"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "rules" => ->(obj) { [:rules, GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesArray.parse(obj["rules"], to_s)] }, + "adaptiveProtectionConfig" => ->(obj) { [:adaptive_protection_config, GoogleInSpec::Compute::Property::RegionSecurityPolicyAdaptiveProtectionConfig.new(obj["adaptiveProtectionConfig"], to_s)] }, + "ddosProtectionConfig" => ->(obj) { [:ddos_protection_config, GoogleInSpec::Compute::Property::RegionSecurityPolicyDdosProtectionConfig.new(obj["ddosProtectionConfig"], to_s)] }, + "advancedOptionsConfig" => ->(obj) { [:advanced_options_config, GoogleInSpec::Compute::Property::RegionSecurityPolicyAdvancedOptionsConfig.new(obj["advancedOptionsConfig"], to_s)] }, + "recaptchaOptionsConfig" => ->(obj) { [:recaptcha_options_config, GoogleInSpec::Compute::Property::RegionSecurityPolicyRecaptchaOptionsConfig.new(obj["recaptchaOptionsConfig"], to_s)] }, + "fingerprint" => ->(obj) { [:fingerprint, obj["fingerprint"]] }, + "selfLink" => ->(obj) { [:self_link, obj["selfLink"]] }, + "type" => ->(obj) { [:type, obj["type"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::Compute::Property::RegionSecurityPolicyLabels.new(obj["labels"], to_s)] }, + "labelFingerprint" => ->(obj) { [:label_fingerprint, obj["labelFingerprint"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/securityPolicies/{{securityPolicy}}' + "projects/{{project}}/regions/{{region}}/securityPolicies/{{securityPolicy}}" end end diff --git a/libraries/google_compute_region_security_policy.rb b/libraries/google_compute_region_security_policy.rb index d90268ac9..518388285 100644 --- a/libraries/google_compute_region_security_policy.rb +++ b/libraries/google_compute_region_security_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,22 +13,22 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/regionsecuritypolicy_adaptive_protection_config' -require 'google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config' -require 'google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config_threshold_configs' -require 'google/compute/property/regionsecuritypolicy_advanced_options_config' -require 'google/compute/property/regionsecuritypolicy_advanced_options_config_json_custom_config' -require 'google/compute/property/regionsecuritypolicy_ddos_protection_config' -require 'google/compute/property/regionsecuritypolicy_labels' -require 'google/compute/property/regionsecuritypolicy_recaptcha_options_config' -require 'google/compute/property/regionsecuritypolicy_rules' +require "gcp_backend" +require "google/compute/property/regionsecuritypolicy_adaptive_protection_config" +require "google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config" +require "google/compute/property/regionsecuritypolicy_adaptive_protection_config_layer7_ddos_defense_config_threshold_configs" +require "google/compute/property/regionsecuritypolicy_advanced_options_config" +require "google/compute/property/regionsecuritypolicy_advanced_options_config_json_custom_config" +require "google/compute/property/regionsecuritypolicy_ddos_protection_config" +require "google/compute/property/regionsecuritypolicy_labels" +require "google/compute/property/regionsecuritypolicy_recaptcha_options_config" +require "google/compute/property/regionsecuritypolicy_rules" # A provider to manage Compute Engine resources. class ComputeRegionSecurityPolicy < GcpResourceBase - name 'google_compute_region_security_policy' - desc 'RegionSecurityPolicy' - supports platform: 'gcp' + name "google_compute_region_security_policy" + desc "RegionSecurityPolicy" + supports platform: "gcp" attr_reader :params attr_reader :kind @@ -51,27 +51,27 @@ class ComputeRegionSecurityPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @kind = @fetched['kind'] - @id = @fetched['id'] - @creation_timestamp = @fetched['creationTimestamp'] - @name = @fetched['name'] - @description = @fetched['description'] - @rules = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesArray.parse(@fetched['rules'], to_s) - @adaptive_protection_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyAdaptiveProtectionConfig.new(@fetched['adaptiveProtectionConfig'], to_s) - @ddos_protection_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyDdosProtectionConfig.new(@fetched['ddosProtectionConfig'], to_s) - @advanced_options_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyAdvancedOptionsConfig.new(@fetched['advancedOptionsConfig'], to_s) - @recaptcha_options_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyRecaptchaOptionsConfig.new(@fetched['recaptchaOptionsConfig'], to_s) - @fingerprint = @fetched['fingerprint'] - @self_link = @fetched['selfLink'] - @type = @fetched['type'] - @labels = GoogleInSpec::Compute::Property::RegionSecurityPolicyLabels.new(@fetched['labels'], to_s) - @label_fingerprint = @fetched['labelFingerprint'] - @region = @fetched['region'] + @kind = @fetched["kind"] + @id = @fetched["id"] + @creation_timestamp = @fetched["creationTimestamp"] + @name = @fetched["name"] + @description = @fetched["description"] + @rules = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesArray.parse(@fetched["rules"], to_s) + @adaptive_protection_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyAdaptiveProtectionConfig.new(@fetched["adaptiveProtectionConfig"], to_s) + @ddos_protection_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyDdosProtectionConfig.new(@fetched["ddosProtectionConfig"], to_s) + @advanced_options_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyAdvancedOptionsConfig.new(@fetched["advancedOptionsConfig"], to_s) + @recaptcha_options_config = GoogleInSpec::Compute::Property::RegionSecurityPolicyRecaptchaOptionsConfig.new(@fetched["recaptchaOptionsConfig"], to_s) + @fingerprint = @fetched["fingerprint"] + @self_link = @fetched["selfLink"] + @type = @fetched["type"] + @labels = GoogleInSpec::Compute::Property::RegionSecurityPolicyLabels.new(@fetched["labels"], to_s) + @label_fingerprint = @fetched["labelFingerprint"] + @region = @fetched["region"] end def exists? @@ -85,10 +85,10 @@ def to_s private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/securityPolicies/{{security_policy}}/{{name}}' + "projects/{{project}}/regions/{{region}}/securityPolicies/{{security_policy}}/{{name}}" end end diff --git a/libraries/google_compute_regional_disk.rb b/libraries/google_compute_regional_disk.rb index 639db3e76..a9a73c214 100644 --- a/libraries/google_compute_regional_disk.rb +++ b/libraries/google_compute_regional_disk.rb @@ -1,15 +1,15 @@ -# frozen_string_literal: false -require 'gcp_backend' -require 'google/compute/property/disk_disk_encryption_key' -require 'google/compute/property/disk_source_image_encryption_key' -require 'google/compute/property/disk_source_snapshot_encryption_key' + +require "gcp_backend" +require "google/compute/property/disk_disk_encryption_key" +require "google/compute/property/disk_source_image_encryption_key" +require "google/compute/property/disk_source_snapshot_encryption_key" # A provider to manage Compute Engine resources. class RegionalDisk < GcpResourceBase - name 'google_compute_regional_disk' - desc 'RegionalDisk' - supports platform: 'gcp' + name "google_compute_regional_disk" + desc "RegionalDisk" + supports platform: "gcp" attr_reader :id attr_reader :creation_timestamp @@ -45,30 +45,30 @@ def initialize(params) end def parse - @id = @fetched['id'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @name = @fetched['name'] - @size_gb = @fetched['sizeGb'] - @type = @fetched['type'] - @label_fingerprint = @fetched['labelFingerprint'] - @region = @fetched['region'] - @replica_zones = @fetched['replicaZones'] - @physical_block_size_bytes = @fetched['physicalBlockSizeBytes'] - @description = @fetched['description'] - @last_attach_timestamp = parse_time_string(@fetched['lastAttachTimestamp']) - @last_detach_timestamp = parse_time_string(@fetched['lastDetachTimestamp']) - @labels = @fetched['labels'] - @licenses = @fetched['licenses'] - @users = @fetched['users'] - @source_image = @fetched['sourceImage'] - @zone = @fetched['zone'] - @source_image_encryption_key = GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(@fetched['sourceImageEncryptionKey'], to_s) - @source_image_id = @fetched['sourceImageId'] - @disk_encryption_key = GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(@fetched['diskEncryptionKey'], to_s) - @source_snapshot = @fetched['sourceSnapshot'] - @source_snapshot_encryption_key = GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(@fetched['sourceSnapshotEncryptionKey'], to_s) - @source_snapshot_id = @fetched['sourceSnapshotId'] - @stat = @fetched['status'] + @id = @fetched["id"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @name = @fetched["name"] + @size_gb = @fetched["sizeGb"] + @type = @fetched["type"] + @label_fingerprint = @fetched["labelFingerprint"] + @region = @fetched["region"] + @replica_zones = @fetched["replicaZones"] + @physical_block_size_bytes = @fetched["physicalBlockSizeBytes"] + @description = @fetched["description"] + @last_attach_timestamp = parse_time_string(@fetched["lastAttachTimestamp"]) + @last_detach_timestamp = parse_time_string(@fetched["lastDetachTimestamp"]) + @labels = @fetched["labels"] + @licenses = @fetched["licenses"] + @users = @fetched["users"] + @source_image = @fetched["sourceImage"] + @zone = @fetched["zone"] + @source_image_encryption_key = GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(@fetched["sourceImageEncryptionKey"], to_s) + @source_image_id = @fetched["sourceImageId"] + @disk_encryption_key = GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(@fetched["diskEncryptionKey"], to_s) + @source_snapshot = @fetched["sourceSnapshot"] + @source_snapshot_encryption_key = GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(@fetched["sourceSnapshotEncryptionKey"], to_s) + @source_snapshot_id = @fetched["sourceSnapshotId"] + @stat = @fetched["status"] end # Handles parsing RFC3339 time string @@ -87,10 +87,10 @@ def to_s private def product_url - 'https://www.googleapis.com/compute/v1/' + "https://www.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/disks/{{name}}' + "projects/{{project}}/regions/{{region}}/disks/{{name}}" end end diff --git a/libraries/google_compute_regional_disks.rb b/libraries/google_compute_regional_disks.rb index 26ba93310..60c70dc9f 100644 --- a/libraries/google_compute_regional_disks.rb +++ b/libraries/google_compute_regional_disks.rb @@ -1,10 +1,10 @@ -# frozen_string_literal: false -require 'gcp_backend' + +require "gcp_backend" class RegionalDisks < GcpResourceBase - name 'google_compute_regional_disks' - desc 'RegionalDisk plural resource' - supports platform: 'gcp' + name "google_compute_regional_disks" + desc "RegionalDisk plural resource" + supports platform: "gcp" attr_reader :table @@ -40,12 +40,12 @@ class RegionalDisks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -73,30 +73,30 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { [:id, obj['id']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'sizeGb' => ->(obj) { [:size_gb, obj['sizeGb']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, - 'sourceSnapshot' => ->(obj) { [:source_snapshot, obj['sourceSnapshot']] }, - 'sourceSnapshotId' => ->(obj) { [:source_snapshot_id, obj['sourceSnapshotId']] }, - 'sourceSnapshotEncryptionKey' => ->(obj) { [:source_snapshot_encryption_key, GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(obj['sourceSnapshotEncryptionKey'], to_s)] }, - 'sourceImage' => ->(obj) { [:source_image, obj['sourceImage']] }, - 'sourceImageId' => ->(obj) { [:source_image_id, obj['sourceImageId']] }, - 'sourceImageEncryptionKey' => ->(obj) { [:source_image_encryption_key, GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(obj['sourceImageEncryptionKey'], to_s)] }, - 'type' => ->(obj) { [:type, obj['type']] }, - 'licenses' => ->(obj) { [:licenses, obj['licenses']] }, - 'lastAttachTimestamp' => ->(obj) { [:last_attach_timestamp, parse_time_string(obj['lastAttachTimestamp'])] }, - 'lastDetachTimestamp' => ->(obj) { [:last_detach_timestamp, parse_time_string(obj['lastDetachTimestamp'])] }, - 'users' => ->(obj) { [:users, obj['users']] }, - 'diskEncryptionKey' => ->(obj) { [:disk_encryption_key, GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(obj['diskEncryptionKey'], to_s)] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, - 'physicalBlockSizeBytes' => ->(obj) { [:physical_block_size_bytes, obj['physicalBlockSizeBytes']] }, - 'region' => ->(obj) { [:region, obj['region']] }, - 'replica_zones' => ->(obj) { [:replica_zones, obj['replica_zones']] }, - 'status' => ->(obj) { [:status, obj['status']] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "sizeGb" => ->(obj) { [:size_gb, obj["sizeGb"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, + "sourceSnapshot" => ->(obj) { [:source_snapshot, obj["sourceSnapshot"]] }, + "sourceSnapshotId" => ->(obj) { [:source_snapshot_id, obj["sourceSnapshotId"]] }, + "sourceSnapshotEncryptionKey" => ->(obj) { [:source_snapshot_encryption_key, GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(obj["sourceSnapshotEncryptionKey"], to_s)] }, + "sourceImage" => ->(obj) { [:source_image, obj["sourceImage"]] }, + "sourceImageId" => ->(obj) { [:source_image_id, obj["sourceImageId"]] }, + "sourceImageEncryptionKey" => ->(obj) { [:source_image_encryption_key, GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(obj["sourceImageEncryptionKey"], to_s)] }, + "type" => ->(obj) { [:type, obj["type"]] }, + "licenses" => ->(obj) { [:licenses, obj["licenses"]] }, + "lastAttachTimestamp" => ->(obj) { [:last_attach_timestamp, parse_time_string(obj["lastAttachTimestamp"])] }, + "lastDetachTimestamp" => ->(obj) { [:last_detach_timestamp, parse_time_string(obj["lastDetachTimestamp"])] }, + "users" => ->(obj) { [:users, obj["users"]] }, + "diskEncryptionKey" => ->(obj) { [:disk_encryption_key, GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(obj["diskEncryptionKey"], to_s)] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "labelFingerprint" => ->(obj) { [:label_fingerprint, obj["labelFingerprint"]] }, + "physicalBlockSizeBytes" => ->(obj) { [:physical_block_size_bytes, obj["physicalBlockSizeBytes"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, + "replica_zones" => ->(obj) { [:replica_zones, obj["replica_zones"]] }, + "status" => ->(obj) { [:status, obj["status"]] }, } end @@ -109,13 +109,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/disks' + "projects/{{project}}/regions/{{region}}/disks" end end diff --git a/libraries/google_compute_regions.rb b/libraries/google_compute_regions.rb index 5878bc619..10aad911e 100644 --- a/libraries/google_compute_regions.rb +++ b/libraries/google_compute_regions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeRegions < GcpResourceBase - name 'google_compute_regions' - desc 'Region plural resource' - supports platform: 'gcp' + name "google_compute_regions" + desc "Region plural resource" + supports platform: "gcp" attr_reader :table @@ -37,12 +37,12 @@ class ComputeRegions < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'deprecated' => ->(obj) { [:deprecated, GoogleInSpec::Compute::Property::RegionDeprecated.new(obj['deprecated'], to_s)] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:region_id, obj['id']] }, - 'name' => ->(obj) { [:region_name, obj['name']] }, - 'quotas' => ->(obj) { [:quotas, GoogleInSpec::Compute::Property::RegionQuotasArray.parse(obj['quotas'], to_s)] }, - 'status' => ->(obj) { [:region_status, obj['status']] }, - 'zones' => ->(obj) { [:zones, obj['zones']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "deprecated" => ->(obj) { [:deprecated, GoogleInSpec::Compute::Property::RegionDeprecated.new(obj["deprecated"], to_s)] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:region_id, obj["id"]] }, + "name" => ->(obj) { [:region_name, obj["name"]] }, + "quotas" => ->(obj) { [:quotas, GoogleInSpec::Compute::Property::RegionQuotasArray.parse(obj["quotas"], to_s)] }, + "status" => ->(obj) { [:region_status, obj["status"]] }, + "zones" => ->(obj) { [:zones, obj["zones"]] }, } end @@ -90,13 +90,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions' + "projects/{{project}}/regions" end end diff --git a/libraries/google_compute_route.rb b/libraries/google_compute_route.rb index b70d7ce9e..a25469ce0 100644 --- a/libraries/google_compute_route.rb +++ b/libraries/google_compute_route.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeRoute < GcpResourceBase - name 'google_compute_route' - desc 'Route' - supports platform: 'gcp' + name "google_compute_route" + desc "Route" + supports platform: "gcp" attr_reader :params attr_reader :dest_range @@ -38,23 +38,23 @@ class ComputeRoute < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @dest_range = @fetched['destRange'] - @description = @fetched['description'] - @name = @fetched['name'] - @network = @fetched['network'] - @priority = @fetched['priority'] - @tags = @fetched['tags'] - @next_hop_gateway = @fetched['nextHopGateway'] - @next_hop_instance = @fetched['nextHopInstance'] - @next_hop_ip = @fetched['nextHopIp'] - @next_hop_vpn_tunnel = @fetched['nextHopVpnTunnel'] - @next_hop_network = @fetched['nextHopNetwork'] - @next_hop_ilb = @fetched['nextHopIlb'] + @dest_range = @fetched["destRange"] + @description = @fetched["description"] + @name = @fetched["name"] + @network = @fetched["network"] + @priority = @fetched["priority"] + @tags = @fetched["tags"] + @next_hop_gateway = @fetched["nextHopGateway"] + @next_hop_instance = @fetched["nextHopInstance"] + @next_hop_ip = @fetched["nextHopIp"] + @next_hop_vpn_tunnel = @fetched["nextHopVpnTunnel"] + @next_hop_network = @fetched["nextHopNetwork"] + @next_hop_ilb = @fetched["nextHopIlb"] end def exists? @@ -69,13 +69,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/routes/{{name}}' + "projects/{{project}}/global/routes/{{name}}" end end diff --git a/libraries/google_compute_router.rb b/libraries/google_compute_router.rb index 533731211..731a27426 100644 --- a/libraries/google_compute_router.rb +++ b/libraries/google_compute_router.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/router_bgp' -require 'google/compute/property/router_bgp_advertised_ip_ranges' +require "gcp_backend" +require "google/compute/property/router_bgp" +require "google/compute/property/router_bgp_advertised_ip_ranges" # A provider to manage Compute Engine resources. class ComputeRouter < GcpResourceBase - name 'google_compute_router' - desc 'Router' - supports platform: 'gcp' + name "google_compute_router" + desc "Router" + supports platform: "gcp" attr_reader :params attr_reader :id @@ -35,18 +35,18 @@ class ComputeRouter < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @id = @fetched['id'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @name = @fetched['name'] - @description = @fetched['description'] - @network = @fetched['network'] - @bgp = GoogleInSpec::Compute::Property::RouterBgp.new(@fetched['bgp'], to_s) - @region = @fetched['region'] + @id = @fetched["id"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @name = @fetched["name"] + @description = @fetched["description"] + @network = @fetched["network"] + @bgp = GoogleInSpec::Compute::Property::RouterBgp.new(@fetched["bgp"], to_s) + @region = @fetched["region"] end # Handles parsing RFC3339 time string @@ -66,13 +66,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/routers/{{name}}' + "projects/{{project}}/regions/{{region}}/routers/{{name}}" end end diff --git a/libraries/google_compute_router_nat.rb b/libraries/google_compute_router_nat.rb index 184789413..7cc8bdeac 100644 --- a/libraries/google_compute_router_nat.rb +++ b/libraries/google_compute_router_nat.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/routernat_log_config' -require 'google/compute/property/routernat_subnetwork' +require "gcp_backend" +require "google/compute/property/routernat_log_config" +require "google/compute/property/routernat_subnetwork" # A provider to manage Compute Engine resources. class ComputeRouterNat < GcpResourceBase - name 'google_compute_router_nat' - desc 'RouterNat' - supports platform: 'gcp' + name "google_compute_router_nat" + desc "RouterNat" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -43,7 +43,7 @@ class ComputeRouterNat < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") @fetched = unwrap(fetched, params) parse unless @fetched.nil? end @@ -53,7 +53,7 @@ def identity end def collection_item - 'nats' + "nats" end def unwrap(fetched, params) @@ -61,21 +61,21 @@ def unwrap(fetched, params) end def parse - @name = @fetched['name'] - @nat_ip_allocate_option = @fetched['natIpAllocateOption'] - @nat_ips = @fetched['natIps'] - @drain_nat_ips = @fetched['drainNatIps'] - @source_subnetwork_ip_ranges_to_nat = @fetched['sourceSubnetworkIpRangesToNat'] - @subnetwork = GoogleInSpec::Compute::Property::RouterNatSubnetworkArray.parse(@fetched['subnetworks'], to_s) - @min_ports_per_vm = @fetched['minPortsPerVm'] - @udp_idle_timeout_sec = @fetched['udpIdleTimeoutSec'] - @icmp_idle_timeout_sec = @fetched['icmpIdleTimeoutSec'] - @tcp_established_idle_timeout_sec = @fetched['tcpEstablishedIdleTimeoutSec'] - @tcp_transitory_idle_timeout_sec = @fetched['tcpTransitoryIdleTimeoutSec'] - @log_config = GoogleInSpec::Compute::Property::RouterNatLogConfig.new(@fetched['logConfig'], to_s) - @enable_endpoint_independent_mapping = @fetched['enableEndpointIndependentMapping'] - @router = @fetched['router'] - @region = @fetched['region'] + @name = @fetched["name"] + @nat_ip_allocate_option = @fetched["natIpAllocateOption"] + @nat_ips = @fetched["natIps"] + @drain_nat_ips = @fetched["drainNatIps"] + @source_subnetwork_ip_ranges_to_nat = @fetched["sourceSubnetworkIpRangesToNat"] + @subnetwork = GoogleInSpec::Compute::Property::RouterNatSubnetworkArray.parse(@fetched["subnetworks"], to_s) + @min_ports_per_vm = @fetched["minPortsPerVm"] + @udp_idle_timeout_sec = @fetched["udpIdleTimeoutSec"] + @icmp_idle_timeout_sec = @fetched["icmpIdleTimeoutSec"] + @tcp_established_idle_timeout_sec = @fetched["tcpEstablishedIdleTimeoutSec"] + @tcp_transitory_idle_timeout_sec = @fetched["tcpTransitoryIdleTimeoutSec"] + @log_config = GoogleInSpec::Compute::Property::RouterNatLogConfig.new(@fetched["logConfig"], to_s) + @enable_endpoint_independent_mapping = @fetched["enableEndpointIndependentMapping"] + @router = @fetched["router"] + @region = @fetched["region"] end def exists? @@ -90,13 +90,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/routers/{{router}}' + "projects/{{project}}/regions/{{region}}/routers/{{router}}" end end diff --git a/libraries/google_compute_router_nats.rb b/libraries/google_compute_router_nats.rb index 5a6fc2dd3..174ca2096 100644 --- a/libraries/google_compute_router_nats.rb +++ b/libraries/google_compute_router_nats.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeRouterNats < GcpResourceBase - name 'google_compute_router_nats' - desc 'RouterNat plural resource' - supports platform: 'gcp' + name "google_compute_router_nats" + desc "RouterNat plural resource" + supports platform: "gcp" attr_reader :table @@ -44,12 +44,12 @@ class ComputeRouterNats < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('nats') + @table = fetch_wrapped_resource("nats") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -77,21 +77,21 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'natIpAllocateOption' => ->(obj) { [:nat_ip_allocate_option, obj['natIpAllocateOption']] }, - 'natIps' => ->(obj) { [:nat_ips, obj['natIps']] }, - 'drainNatIps' => ->(obj) { [:drain_nat_ips, obj['drainNatIps']] }, - 'sourceSubnetworkIpRangesToNat' => ->(obj) { [:source_subnetwork_ip_ranges_to_nat, obj['sourceSubnetworkIpRangesToNat']] }, - 'subnetworks' => ->(obj) { [:subnetwork, GoogleInSpec::Compute::Property::RouterNatSubnetworkArray.parse(obj['subnetworks'], to_s)] }, - 'minPortsPerVm' => ->(obj) { [:min_ports_per_vm, obj['minPortsPerVm']] }, - 'udpIdleTimeoutSec' => ->(obj) { [:udp_idle_timeout_sec, obj['udpIdleTimeoutSec']] }, - 'icmpIdleTimeoutSec' => ->(obj) { [:icmp_idle_timeout_sec, obj['icmpIdleTimeoutSec']] }, - 'tcpEstablishedIdleTimeoutSec' => ->(obj) { [:tcp_established_idle_timeout_sec, obj['tcpEstablishedIdleTimeoutSec']] }, - 'tcpTransitoryIdleTimeoutSec' => ->(obj) { [:tcp_transitory_idle_timeout_sec, obj['tcpTransitoryIdleTimeoutSec']] }, - 'logConfig' => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::RouterNatLogConfig.new(obj['logConfig'], to_s)] }, - 'enableEndpointIndependentMapping' => ->(obj) { [:enable_endpoint_independent_mapping, obj['enableEndpointIndependentMapping']] }, - 'router' => ->(obj) { [:router, obj['router']] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "natIpAllocateOption" => ->(obj) { [:nat_ip_allocate_option, obj["natIpAllocateOption"]] }, + "natIps" => ->(obj) { [:nat_ips, obj["natIps"]] }, + "drainNatIps" => ->(obj) { [:drain_nat_ips, obj["drainNatIps"]] }, + "sourceSubnetworkIpRangesToNat" => ->(obj) { [:source_subnetwork_ip_ranges_to_nat, obj["sourceSubnetworkIpRangesToNat"]] }, + "subnetworks" => ->(obj) { [:subnetwork, GoogleInSpec::Compute::Property::RouterNatSubnetworkArray.parse(obj["subnetworks"], to_s)] }, + "minPortsPerVm" => ->(obj) { [:min_ports_per_vm, obj["minPortsPerVm"]] }, + "udpIdleTimeoutSec" => ->(obj) { [:udp_idle_timeout_sec, obj["udpIdleTimeoutSec"]] }, + "icmpIdleTimeoutSec" => ->(obj) { [:icmp_idle_timeout_sec, obj["icmpIdleTimeoutSec"]] }, + "tcpEstablishedIdleTimeoutSec" => ->(obj) { [:tcp_established_idle_timeout_sec, obj["tcpEstablishedIdleTimeoutSec"]] }, + "tcpTransitoryIdleTimeoutSec" => ->(obj) { [:tcp_transitory_idle_timeout_sec, obj["tcpTransitoryIdleTimeoutSec"]] }, + "logConfig" => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::RouterNatLogConfig.new(obj["logConfig"], to_s)] }, + "enableEndpointIndependentMapping" => ->(obj) { [:enable_endpoint_independent_mapping, obj["enableEndpointIndependentMapping"]] }, + "router" => ->(obj) { [:router, obj["router"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end @@ -99,13 +99,13 @@ def transformers def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/routers/{{router}}' + "projects/{{project}}/regions/{{region}}/routers/{{router}}" end end diff --git a/libraries/google_compute_routers.rb b/libraries/google_compute_routers.rb index 7d632e13a..81ca2ed08 100644 --- a/libraries/google_compute_routers.rb +++ b/libraries/google_compute_routers.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeRouters < GcpResourceBase - name 'google_compute_routers' - desc 'Router plural resource' - supports platform: 'gcp' + name "google_compute_routers" + desc "Router plural resource" + supports platform: "gcp" attr_reader :table @@ -36,12 +36,12 @@ class ComputeRouters < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { [:id, obj['id']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'bgp' => ->(obj) { [:bgp, GoogleInSpec::Compute::Property::RouterBgp.new(obj['bgp'], to_s)] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "bgp" => ->(obj) { [:bgp, GoogleInSpec::Compute::Property::RouterBgp.new(obj["bgp"], to_s)] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end @@ -88,13 +88,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/routers' + "projects/{{project}}/regions/{{region}}/routers" end end diff --git a/libraries/google_compute_routes.rb b/libraries/google_compute_routes.rb index 552ff124e..4ef823a89 100644 --- a/libraries/google_compute_routes.rb +++ b/libraries/google_compute_routes.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeRoutes < GcpResourceBase - name 'google_compute_routes' - desc 'Route plural resource' - supports platform: 'gcp' + name "google_compute_routes" + desc "Route plural resource" + supports platform: "gcp" attr_reader :table @@ -41,12 +41,12 @@ class ComputeRoutes < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -74,18 +74,18 @@ def transform(key, value) def transformers { - 'destRange' => ->(obj) { [:dest_range, obj['destRange']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'priority' => ->(obj) { [:priority, obj['priority']] }, - 'tags' => ->(obj) { [:tags, obj['tags']] }, - 'nextHopGateway' => ->(obj) { [:next_hop_gateway, obj['nextHopGateway']] }, - 'nextHopInstance' => ->(obj) { [:next_hop_instance, obj['nextHopInstance']] }, - 'nextHopIp' => ->(obj) { [:next_hop_ip, obj['nextHopIp']] }, - 'nextHopVpnTunnel' => ->(obj) { [:next_hop_vpn_tunnel, obj['nextHopVpnTunnel']] }, - 'nextHopNetwork' => ->(obj) { [:next_hop_network, obj['nextHopNetwork']] }, - 'nextHopIlb' => ->(obj) { [:next_hop_ilb, obj['nextHopIlb']] }, + "destRange" => ->(obj) { [:dest_range, obj["destRange"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "priority" => ->(obj) { [:priority, obj["priority"]] }, + "tags" => ->(obj) { [:tags, obj["tags"]] }, + "nextHopGateway" => ->(obj) { [:next_hop_gateway, obj["nextHopGateway"]] }, + "nextHopInstance" => ->(obj) { [:next_hop_instance, obj["nextHopInstance"]] }, + "nextHopIp" => ->(obj) { [:next_hop_ip, obj["nextHopIp"]] }, + "nextHopVpnTunnel" => ->(obj) { [:next_hop_vpn_tunnel, obj["nextHopVpnTunnel"]] }, + "nextHopNetwork" => ->(obj) { [:next_hop_network, obj["nextHopNetwork"]] }, + "nextHopIlb" => ->(obj) { [:next_hop_ilb, obj["nextHopIlb"]] }, } end @@ -93,13 +93,13 @@ def transformers def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/routes' + "projects/{{project}}/global/routes" end end diff --git a/libraries/google_compute_security_policies.rb b/libraries/google_compute_security_policies.rb index 9f5f96812..535b63d34 100644 --- a/libraries/google_compute_security_policies.rb +++ b/libraries/google_compute_security_policies.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeSecurityPolicys < GcpResourceBase - name 'google_compute_security_policies' - desc 'SecurityPolicy plural resource' - supports platform: 'gcp' + name "google_compute_security_policies" + desc "SecurityPolicy plural resource" + supports platform: "gcp" attr_reader :table @@ -32,12 +32,12 @@ class ComputeSecurityPolicys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -65,9 +65,9 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'rules' => ->(obj) { [:rules, GoogleInSpec::Compute::Property::SecurityPolicyRulesArray.parse(obj['rules'], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "rules" => ->(obj) { [:rules, GoogleInSpec::Compute::Property::SecurityPolicyRulesArray.parse(obj["rules"], to_s)] }, } end @@ -75,13 +75,13 @@ def transformers def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/securityPolicies' + "projects/{{project}}/global/securityPolicies" end end diff --git a/libraries/google_compute_security_policy.rb b/libraries/google_compute_security_policy.rb index 4e3a78f14..9baba7c4f 100644 --- a/libraries/google_compute_security_policy.rb +++ b/libraries/google_compute_security_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/securitypolicy_rules' +require "gcp_backend" +require "google/compute/property/securitypolicy_rules" # A provider to manage Compute Engine resources. class ComputeSecurityPolicy < GcpResourceBase - name 'google_compute_security_policy' - desc 'SecurityPolicy' - supports platform: 'gcp' + name "google_compute_security_policy" + desc "SecurityPolicy" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -30,14 +30,14 @@ class ComputeSecurityPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @id = @fetched['id'] - @rules = GoogleInSpec::Compute::Property::SecurityPolicyRulesArray.parse(@fetched['rules'], to_s) + @name = @fetched["name"] + @id = @fetched["id"] + @rules = GoogleInSpec::Compute::Property::SecurityPolicyRulesArray.parse(@fetched["rules"], to_s) end def exists? @@ -52,13 +52,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/securityPolicies/{{name}}' + "projects/{{project}}/global/securityPolicies/{{name}}" end end diff --git a/libraries/google_compute_service_attachment.rb b/libraries/google_compute_service_attachment.rb index 20b0ac7f5..6dd2df463 100644 --- a/libraries/google_compute_service_attachment.rb +++ b/libraries/google_compute_service_attachment.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/serviceattachment_connected_endpoints' -require 'google/compute/property/serviceattachment_consumer_accept_lists' -require 'google/compute/property/serviceattachment_psc_service_attachment_id' +require "gcp_backend" +require "google/compute/property/serviceattachment_connected_endpoints" +require "google/compute/property/serviceattachment_consumer_accept_lists" +require "google/compute/property/serviceattachment_psc_service_attachment_id" # A provider to manage Compute Engine resources. class ComputeServiceAttachment < GcpResourceBase - name 'google_compute_service_attachment' - desc 'ServiceAttachment' - supports platform: 'gcp' + name "google_compute_service_attachment" + desc "ServiceAttachment" + supports platform: "gcp" attr_reader :params attr_reader :kind @@ -48,30 +48,30 @@ class ComputeServiceAttachment < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @kind = @fetched['kind'] - @id = @fetched['id'] - @creation_timestamp = @fetched['creationTimestamp'] - @name = @fetched['name'] - @description = @fetched['description'] - @self_link = @fetched['selfLink'] - @region = @fetched['region'] - @producer_forwarding_rule = @fetched['producerForwardingRule'] - @target_service = @fetched['targetService'] - @connection_preference = @fetched['connectionPreference'] - @connected_endpoints = GoogleInSpec::Compute::Property::ServiceAttachmentConnectedEndpointsArray.parse(@fetched['connectedEndpoints'], to_s) - @nat_subnets = @fetched['natSubnets'] - @enable_proxy_protocol = @fetched['enableProxyProtocol'] - @consumer_reject_lists = @fetched['consumerRejectLists'] - @consumer_accept_lists = GoogleInSpec::Compute::Property::ServiceAttachmentConsumerAcceptListsArray.parse(@fetched['consumerAcceptLists'], to_s) - @psc_service_attachment_id = GoogleInSpec::Compute::Property::ServiceAttachmentPscServiceAttachmentId.new(@fetched['pscServiceAttachmentId'], to_s) - @fingerprint = @fetched['fingerprint'] - @domain_names = @fetched['domainNames'] - @reconcile_connections = @fetched['reconcileConnections'] + @kind = @fetched["kind"] + @id = @fetched["id"] + @creation_timestamp = @fetched["creationTimestamp"] + @name = @fetched["name"] + @description = @fetched["description"] + @self_link = @fetched["selfLink"] + @region = @fetched["region"] + @producer_forwarding_rule = @fetched["producerForwardingRule"] + @target_service = @fetched["targetService"] + @connection_preference = @fetched["connectionPreference"] + @connected_endpoints = GoogleInSpec::Compute::Property::ServiceAttachmentConnectedEndpointsArray.parse(@fetched["connectedEndpoints"], to_s) + @nat_subnets = @fetched["natSubnets"] + @enable_proxy_protocol = @fetched["enableProxyProtocol"] + @consumer_reject_lists = @fetched["consumerRejectLists"] + @consumer_accept_lists = GoogleInSpec::Compute::Property::ServiceAttachmentConsumerAcceptListsArray.parse(@fetched["consumerAcceptLists"], to_s) + @psc_service_attachment_id = GoogleInSpec::Compute::Property::ServiceAttachmentPscServiceAttachmentId.new(@fetched["pscServiceAttachmentId"], to_s) + @fingerprint = @fetched["fingerprint"] + @domain_names = @fetched["domainNames"] + @reconcile_connections = @fetched["reconcileConnections"] end def exists? @@ -85,10 +85,10 @@ def to_s private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/serviceAttachments/{{service_attachment}}' + "projects/{{project}}/regions/{{region}}/serviceAttachments/{{service_attachment}}" end end diff --git a/libraries/google_compute_service_attachments.rb b/libraries/google_compute_service_attachments.rb index 13bec2868..062ed4408 100644 --- a/libraries/google_compute_service_attachments.rb +++ b/libraries/google_compute_service_attachments.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeServiceAttachments < GcpResourceBase - name 'google_compute_service_attachments' - desc 'ServiceAttachment plural resource' - supports platform: 'gcp' + name "google_compute_service_attachments" + desc "ServiceAttachment plural resource" + supports platform: "gcp" attr_reader :table @@ -48,12 +48,12 @@ class ComputeServiceAttachments < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -81,35 +81,35 @@ def transform(key, value) def transformers { - 'kind' => ->(obj) { [:kind, obj['kind']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, - 'region' => ->(obj) { [:region, obj['region']] }, - 'producerForwardingRule' => ->(obj) { [:producer_forwarding_rule, obj['producerForwardingRule']] }, - 'targetService' => ->(obj) { [:target_service, obj['targetService']] }, - 'connectionPreference' => ->(obj) { [:connection_preference, obj['connectionPreference']] }, - 'connectedEndpoints' => ->(obj) { [:connected_endpoints, GoogleInSpec::Compute::Property::ServiceAttachmentConnectedEndpointsArray.parse(obj['connectedEndpoints'], to_s)] }, - 'natSubnets' => ->(obj) { [:nat_subnets, obj['natSubnets']] }, - 'enableProxyProtocol' => ->(obj) { [:enable_proxy_protocol, obj['enableProxyProtocol']] }, - 'consumerRejectLists' => ->(obj) { [:consumer_reject_lists, obj['consumerRejectLists']] }, - 'consumerAcceptLists' => ->(obj) { [:consumer_accept_lists, GoogleInSpec::Compute::Property::ServiceAttachmentConsumerAcceptListsArray.parse(obj['consumerAcceptLists'], to_s)] }, - 'pscServiceAttachmentId' => ->(obj) { [:psc_service_attachment_id, GoogleInSpec::Compute::Property::ServiceAttachmentPscServiceAttachmentId.new(obj['pscServiceAttachmentId'], to_s)] }, - 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, - 'domainNames' => ->(obj) { [:domain_names, obj['domainNames']] }, - 'reconcileConnections' => ->(obj) { [:reconcile_connections, obj['reconcileConnections']] }, + "kind" => ->(obj) { [:kind, obj["kind"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, obj["creationTimestamp"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "selfLink" => ->(obj) { [:self_link, obj["selfLink"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, + "producerForwardingRule" => ->(obj) { [:producer_forwarding_rule, obj["producerForwardingRule"]] }, + "targetService" => ->(obj) { [:target_service, obj["targetService"]] }, + "connectionPreference" => ->(obj) { [:connection_preference, obj["connectionPreference"]] }, + "connectedEndpoints" => ->(obj) { [:connected_endpoints, GoogleInSpec::Compute::Property::ServiceAttachmentConnectedEndpointsArray.parse(obj["connectedEndpoints"], to_s)] }, + "natSubnets" => ->(obj) { [:nat_subnets, obj["natSubnets"]] }, + "enableProxyProtocol" => ->(obj) { [:enable_proxy_protocol, obj["enableProxyProtocol"]] }, + "consumerRejectLists" => ->(obj) { [:consumer_reject_lists, obj["consumerRejectLists"]] }, + "consumerAcceptLists" => ->(obj) { [:consumer_accept_lists, GoogleInSpec::Compute::Property::ServiceAttachmentConsumerAcceptListsArray.parse(obj["consumerAcceptLists"], to_s)] }, + "pscServiceAttachmentId" => ->(obj) { [:psc_service_attachment_id, GoogleInSpec::Compute::Property::ServiceAttachmentPscServiceAttachmentId.new(obj["pscServiceAttachmentId"], to_s)] }, + "fingerprint" => ->(obj) { [:fingerprint, obj["fingerprint"]] }, + "domainNames" => ->(obj) { [:domain_names, obj["domainNames"]] }, + "reconcileConnections" => ->(obj) { [:reconcile_connections, obj["reconcileConnections"]] }, } end private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/serviceAttachments' + "projects/{{project}}/regions/{{region}}/serviceAttachments" end end diff --git a/libraries/google_compute_snapshot.rb b/libraries/google_compute_snapshot.rb index fa94b37c6..f19abbdd9 100644 --- a/libraries/google_compute_snapshot.rb +++ b/libraries/google_compute_snapshot.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/snapshot_snapshot_encryption_key' -require 'google/compute/property/snapshot_source_disk_encryption_key' +require "gcp_backend" +require "google/compute/property/snapshot_snapshot_encryption_key" +require "google/compute/property/snapshot_source_disk_encryption_key" # A provider to manage Compute Engine resources. class ComputeSnapshot < GcpResourceBase - name 'google_compute_snapshot' - desc 'Snapshot' - supports platform: 'gcp' + name "google_compute_snapshot" + desc "Snapshot" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -42,25 +42,25 @@ class ComputeSnapshot < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @id = @fetched['id'] - @disk_size_gb = @fetched['diskSizeGb'] - @name = @fetched['name'] - @description = @fetched['description'] - @storage_bytes = @fetched['storageBytes'] - @storage_locations = @fetched['storageLocations'] - @licenses = @fetched['licenses'] - @labels = @fetched['labels'] - @label_fingerprint = @fetched['labelFingerprint'] - @source_disk = @fetched['sourceDisk'] - @zone = @fetched['zone'] - @snapshot_encryption_key = GoogleInSpec::Compute::Property::SnapshotSnapshotEncryptionKey.new(@fetched['snapshotEncryptionKey'], to_s) - @source_disk_encryption_key = GoogleInSpec::Compute::Property::SnapshotSourceDiskEncryptionKey.new(@fetched['sourceDiskEncryptionKey'], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @id = @fetched["id"] + @disk_size_gb = @fetched["diskSizeGb"] + @name = @fetched["name"] + @description = @fetched["description"] + @storage_bytes = @fetched["storageBytes"] + @storage_locations = @fetched["storageLocations"] + @licenses = @fetched["licenses"] + @labels = @fetched["labels"] + @label_fingerprint = @fetched["labelFingerprint"] + @source_disk = @fetched["sourceDisk"] + @zone = @fetched["zone"] + @snapshot_encryption_key = GoogleInSpec::Compute::Property::SnapshotSnapshotEncryptionKey.new(@fetched["snapshotEncryptionKey"], to_s) + @source_disk_encryption_key = GoogleInSpec::Compute::Property::SnapshotSourceDiskEncryptionKey.new(@fetched["sourceDiskEncryptionKey"], to_s) end # Handles parsing RFC3339 time string @@ -80,13 +80,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/snapshots/{{name}}' + "projects/{{project}}/global/snapshots/{{name}}" end end diff --git a/libraries/google_compute_snapshots.rb b/libraries/google_compute_snapshots.rb index ff3e2d495..3ea5c4ac4 100644 --- a/libraries/google_compute_snapshots.rb +++ b/libraries/google_compute_snapshots.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeSnapshots < GcpResourceBase - name 'google_compute_snapshots' - desc 'Snapshot plural resource' - supports platform: 'gcp' + name "google_compute_snapshots" + desc "Snapshot plural resource" + supports platform: "gcp" attr_reader :table @@ -43,12 +43,12 @@ class ComputeSnapshots < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -76,20 +76,20 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'diskSizeGb' => ->(obj) { [:disk_size_gb, obj['diskSizeGb']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'storageBytes' => ->(obj) { [:storage_bytes, obj['storageBytes']] }, - 'storageLocations' => ->(obj) { [:storage_locations, obj['storageLocations']] }, - 'licenses' => ->(obj) { [:licenses, obj['licenses']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, - 'sourceDisk' => ->(obj) { [:source_disk, obj['sourceDisk']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, - 'snapshotEncryptionKey' => ->(obj) { [:snapshot_encryption_key, GoogleInSpec::Compute::Property::SnapshotSnapshotEncryptionKey.new(obj['snapshotEncryptionKey'], to_s)] }, - 'sourceDiskEncryptionKey' => ->(obj) { [:source_disk_encryption_key, GoogleInSpec::Compute::Property::SnapshotSourceDiskEncryptionKey.new(obj['sourceDiskEncryptionKey'], to_s)] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "diskSizeGb" => ->(obj) { [:disk_size_gb, obj["diskSizeGb"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "storageBytes" => ->(obj) { [:storage_bytes, obj["storageBytes"]] }, + "storageLocations" => ->(obj) { [:storage_locations, obj["storageLocations"]] }, + "licenses" => ->(obj) { [:licenses, obj["licenses"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "labelFingerprint" => ->(obj) { [:label_fingerprint, obj["labelFingerprint"]] }, + "sourceDisk" => ->(obj) { [:source_disk, obj["sourceDisk"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, + "snapshotEncryptionKey" => ->(obj) { [:snapshot_encryption_key, GoogleInSpec::Compute::Property::SnapshotSnapshotEncryptionKey.new(obj["snapshotEncryptionKey"], to_s)] }, + "sourceDiskEncryptionKey" => ->(obj) { [:source_disk_encryption_key, GoogleInSpec::Compute::Property::SnapshotSourceDiskEncryptionKey.new(obj["sourceDiskEncryptionKey"], to_s)] }, } end @@ -102,13 +102,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/snapshots' + "projects/{{project}}/global/snapshots" end end diff --git a/libraries/google_compute_ssl_certificate.rb b/libraries/google_compute_ssl_certificate.rb index 72314a94f..be307e759 100644 --- a/libraries/google_compute_ssl_certificate.rb +++ b/libraries/google_compute_ssl_certificate.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeSslCertificate < GcpResourceBase - name 'google_compute_ssl_certificate' - desc 'SslCertificate' - supports platform: 'gcp' + name "google_compute_ssl_certificate" + desc "SslCertificate" + supports platform: "gcp" attr_reader :params attr_reader :certificate @@ -32,17 +32,17 @@ class ComputeSslCertificate < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @certificate = @fetched['certificate'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @private_key = @fetched['privateKey'] + @certificate = @fetched["certificate"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @private_key = @fetched["privateKey"] end # Handles parsing RFC3339 time string @@ -62,13 +62,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/sslCertificates/{{name}}' + "projects/{{project}}/global/sslCertificates/{{name}}" end end diff --git a/libraries/google_compute_ssl_certificates.rb b/libraries/google_compute_ssl_certificates.rb index 2c608533a..ed6336d7d 100644 --- a/libraries/google_compute_ssl_certificates.rb +++ b/libraries/google_compute_ssl_certificates.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeSslCertificates < GcpResourceBase - name 'google_compute_ssl_certificates' - desc 'SslCertificate plural resource' - supports platform: 'gcp' + name "google_compute_ssl_certificates" + desc "SslCertificate plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class ComputeSslCertificates < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'certificate' => ->(obj) { [:certificate, obj['certificate']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'privateKey' => ->(obj) { [:private_key, obj['privateKey']] }, + "certificate" => ->(obj) { [:certificate, obj["certificate"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "privateKey" => ->(obj) { [:private_key, obj["privateKey"]] }, } end @@ -86,13 +86,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/sslCertificates' + "projects/{{project}}/global/sslCertificates" end end diff --git a/libraries/google_compute_ssl_policies.rb b/libraries/google_compute_ssl_policies.rb index 594c9044a..bdadd02a6 100644 --- a/libraries/google_compute_ssl_policies.rb +++ b/libraries/google_compute_ssl_policies.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeSslPolicys < GcpResourceBase - name 'google_compute_ssl_policies' - desc 'SslPolicy plural resource' - supports platform: 'gcp' + name "google_compute_ssl_policies" + desc "SslPolicy plural resource" + supports platform: "gcp" attr_reader :table @@ -39,12 +39,12 @@ class ComputeSslPolicys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'profile' => ->(obj) { [:profile, obj['profile']] }, - 'minTlsVersion' => ->(obj) { [:min_tls_version, obj['minTlsVersion']] }, - 'enabledFeatures' => ->(obj) { [:enabled_features, obj['enabledFeatures']] }, - 'customFeatures' => ->(obj) { [:custom_features, obj['customFeatures']] }, - 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, - 'warnings' => ->(obj) { [:warnings, GoogleInSpec::Compute::Property::SslPolicyWarningsArray.parse(obj['warnings'], to_s)] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "profile" => ->(obj) { [:profile, obj["profile"]] }, + "minTlsVersion" => ->(obj) { [:min_tls_version, obj["minTlsVersion"]] }, + "enabledFeatures" => ->(obj) { [:enabled_features, obj["enabledFeatures"]] }, + "customFeatures" => ->(obj) { [:custom_features, obj["customFeatures"]] }, + "fingerprint" => ->(obj) { [:fingerprint, obj["fingerprint"]] }, + "warnings" => ->(obj) { [:warnings, GoogleInSpec::Compute::Property::SslPolicyWarningsArray.parse(obj["warnings"], to_s)] }, } end @@ -94,13 +94,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/sslPolicies' + "projects/{{project}}/global/sslPolicies" end end diff --git a/libraries/google_compute_ssl_policy.rb b/libraries/google_compute_ssl_policy.rb index 9853521fb..7890ca274 100644 --- a/libraries/google_compute_ssl_policy.rb +++ b/libraries/google_compute_ssl_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/sslpolicy_warnings' +require "gcp_backend" +require "google/compute/property/sslpolicy_warnings" # A provider to manage Compute Engine resources. class ComputeSslPolicy < GcpResourceBase - name 'google_compute_ssl_policy' - desc 'SslPolicy' - supports platform: 'gcp' + name "google_compute_ssl_policy" + desc "SslPolicy" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -37,21 +37,21 @@ class ComputeSslPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @profile = @fetched['profile'] - @min_tls_version = @fetched['minTlsVersion'] - @enabled_features = @fetched['enabledFeatures'] - @custom_features = @fetched['customFeatures'] - @fingerprint = @fetched['fingerprint'] - @warnings = GoogleInSpec::Compute::Property::SslPolicyWarningsArray.parse(@fetched['warnings'], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @profile = @fetched["profile"] + @min_tls_version = @fetched["minTlsVersion"] + @enabled_features = @fetched["enabledFeatures"] + @custom_features = @fetched["customFeatures"] + @fingerprint = @fetched["fingerprint"] + @warnings = GoogleInSpec::Compute::Property::SslPolicyWarningsArray.parse(@fetched["warnings"], to_s) end # Handles parsing RFC3339 time string @@ -71,13 +71,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/sslPolicies/{{name}}' + "projects/{{project}}/global/sslPolicies/{{name}}" end end diff --git a/libraries/google_compute_subnetwork.rb b/libraries/google_compute_subnetwork.rb index 23bb92107..4a8e16966 100644 --- a/libraries/google_compute_subnetwork.rb +++ b/libraries/google_compute_subnetwork.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/subnetwork_log_config' -require 'google/compute/property/subnetwork_secondary_ip_ranges' +require "gcp_backend" +require "google/compute/property/subnetwork_log_config" +require "google/compute/property/subnetwork_secondary_ip_ranges" # A provider to manage Compute Engine resources. class ComputeSubnetwork < GcpResourceBase - name 'google_compute_subnetwork' - desc 'Subnetwork' - supports platform: 'gcp' + name "google_compute_subnetwork" + desc "Subnetwork" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -42,25 +42,25 @@ class ComputeSubnetwork < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @gateway_address = @fetched['gatewayAddress'] - @id = @fetched['id'] - @ip_cidr_range = @fetched['ipCidrRange'] - @name = @fetched['name'] - @network = @fetched['network'] - @purpose = @fetched['purpose'] - @role = @fetched['role'] - @secondary_ip_ranges = GoogleInSpec::Compute::Property::SubnetworkSecondaryIpRangesArray.parse(@fetched['secondaryIpRanges'], to_s) - @private_ip_google_access = @fetched['privateIpGoogleAccess'] - @private_ipv6_google_access = @fetched['privateIpv6GoogleAccess'] - @region = @fetched['region'] - @log_config = GoogleInSpec::Compute::Property::SubnetworkLogConfig.new(@fetched['logConfig'], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @gateway_address = @fetched["gatewayAddress"] + @id = @fetched["id"] + @ip_cidr_range = @fetched["ipCidrRange"] + @name = @fetched["name"] + @network = @fetched["network"] + @purpose = @fetched["purpose"] + @role = @fetched["role"] + @secondary_ip_ranges = GoogleInSpec::Compute::Property::SubnetworkSecondaryIpRangesArray.parse(@fetched["secondaryIpRanges"], to_s) + @private_ip_google_access = @fetched["privateIpGoogleAccess"] + @private_ipv6_google_access = @fetched["privateIpv6GoogleAccess"] + @region = @fetched["region"] + @log_config = GoogleInSpec::Compute::Property::SubnetworkLogConfig.new(@fetched["logConfig"], to_s) end # Handles parsing RFC3339 time string @@ -84,13 +84,13 @@ def creation_timestamp_date def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/subnetworks/{{name}}' + "projects/{{project}}/regions/{{region}}/subnetworks/{{name}}" end end diff --git a/libraries/google_compute_subnetwork_iam_binding.rb b/libraries/google_compute_subnetwork_iam_binding.rb index 15019891d..2701bbfaa 100644 --- a/libraries/google_compute_subnetwork_iam_binding.rb +++ b/libraries/google_compute_subnetwork_iam_binding.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_bindings" # A provider to manage Compute Engine IAM Binding resources. class SubnetworkIamBinding < GcpResourceBase - name 'google_compute_subnetwork_iam_binding' - desc 'Subnetwork Iam Binding' - supports platform: 'gcp' + name "google_compute_subnetwork_iam_binding" + desc "Subnetwork Iam Binding" + supports platform: "gcp" attr_reader :params @@ -30,12 +30,12 @@ def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] @@ -75,10 +75,10 @@ def to_s private def product_url - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/subnetworks/{{name}}/getIamPolicy' + "projects/{{project}}/regions/{{region}}/subnetworks/{{name}}/getIamPolicy" end end diff --git a/libraries/google_compute_subnetwork_iam_policy.rb b/libraries/google_compute_subnetwork_iam_policy.rb index de6d1b120..468dc9a97 100644 --- a/libraries/google_compute_subnetwork_iam_policy.rb +++ b/libraries/google_compute_subnetwork_iam_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_audit_configs' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_audit_configs" +require "google/iam/property/iam_policy_bindings" # A provider to manage Compute Engine IAM Policy resources. class SubnetworkIamPolicy < GcpResourceBase - name 'google_compute_subnetwork_iam_policy' - desc 'Subnetwork Iam Policy' - supports platform: 'gcp' + name "google_compute_subnetwork_iam_policy" + desc "Subnetwork Iam Policy" + supports platform: "gcp" attr_reader :params attr_reader :bindings @@ -30,13 +30,13 @@ class SubnetworkIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) - @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) + @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched["auditConfigs"], to_s) end def exists? @@ -58,10 +58,10 @@ def count private def product_url - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/subnetworks/{{name}}/getIamPolicy' + "projects/{{project}}/regions/{{region}}/subnetworks/{{name}}/getIamPolicy" end end diff --git a/libraries/google_compute_subnetworks.rb b/libraries/google_compute_subnetworks.rb index 458ae9740..61637e05a 100644 --- a/libraries/google_compute_subnetworks.rb +++ b/libraries/google_compute_subnetworks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeSubnetworks < GcpResourceBase - name 'google_compute_subnetworks' - desc 'Subnetwork plural resource' - supports platform: 'gcp' + name "google_compute_subnetworks" + desc "Subnetwork plural resource" + supports platform: "gcp" attr_reader :table @@ -43,12 +43,12 @@ class ComputeSubnetworks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -76,20 +76,20 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'gatewayAddress' => ->(obj) { [:gateway_address, obj['gatewayAddress']] }, - 'id' => ->(obj) { [:subnetwork_id, obj['id']] }, - 'ipCidrRange' => ->(obj) { [:ip_cidr_range, obj['ipCidrRange']] }, - 'name' => ->(obj) { [:subnetwork_name, obj['name']] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'purpose' => ->(obj) { [:purpose, obj['purpose']] }, - 'role' => ->(obj) { [:role, obj['role']] }, - 'secondaryIpRanges' => ->(obj) { [:secondary_ip_ranges, GoogleInSpec::Compute::Property::SubnetworkSecondaryIpRangesArray.parse(obj['secondaryIpRanges'], to_s)] }, - 'privateIpGoogleAccess' => ->(obj) { [:private_ip_google_access, obj['privateIpGoogleAccess']] }, - 'privateIpv6GoogleAccess' => ->(obj) { [:private_ipv6_google_access, obj['privateIpv6GoogleAccess']] }, - 'region' => ->(obj) { [:region, obj['region']] }, - 'logConfig' => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::SubnetworkLogConfig.new(obj['logConfig'], to_s)] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "gatewayAddress" => ->(obj) { [:gateway_address, obj["gatewayAddress"]] }, + "id" => ->(obj) { [:subnetwork_id, obj["id"]] }, + "ipCidrRange" => ->(obj) { [:ip_cidr_range, obj["ipCidrRange"]] }, + "name" => ->(obj) { [:subnetwork_name, obj["name"]] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "purpose" => ->(obj) { [:purpose, obj["purpose"]] }, + "role" => ->(obj) { [:role, obj["role"]] }, + "secondaryIpRanges" => ->(obj) { [:secondary_ip_ranges, GoogleInSpec::Compute::Property::SubnetworkSecondaryIpRangesArray.parse(obj["secondaryIpRanges"], to_s)] }, + "privateIpGoogleAccess" => ->(obj) { [:private_ip_google_access, obj["privateIpGoogleAccess"]] }, + "privateIpv6GoogleAccess" => ->(obj) { [:private_ipv6_google_access, obj["privateIpv6GoogleAccess"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, + "logConfig" => ->(obj) { [:log_config, GoogleInSpec::Compute::Property::SubnetworkLogConfig.new(obj["logConfig"], to_s)] }, } end @@ -102,13 +102,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/subnetworks' + "projects/{{project}}/regions/{{region}}/subnetworks" end end diff --git a/libraries/google_compute_target_http_proxies.rb b/libraries/google_compute_target_http_proxies.rb index cb40068d8..ce3da55e4 100644 --- a/libraries/google_compute_target_http_proxies.rb +++ b/libraries/google_compute_target_http_proxies.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeTargetHttpProxys < GcpResourceBase - name 'google_compute_target_http_proxies' - desc 'TargetHttpProxy plural resource' - supports platform: 'gcp' + name "google_compute_target_http_proxies" + desc "TargetHttpProxy plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class ComputeTargetHttpProxys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'urlMap' => ->(obj) { [:url_map, obj['urlMap']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "urlMap" => ->(obj) { [:url_map, obj["urlMap"]] }, } end @@ -84,13 +84,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/targetHttpProxies' + "projects/{{project}}/global/targetHttpProxies" end end diff --git a/libraries/google_compute_target_http_proxy.rb b/libraries/google_compute_target_http_proxy.rb index 97f7db906..7d09c03c5 100644 --- a/libraries/google_compute_target_http_proxy.rb +++ b/libraries/google_compute_target_http_proxy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeTargetHttpProxy < GcpResourceBase - name 'google_compute_target_http_proxy' - desc 'TargetHttpProxy' - supports platform: 'gcp' + name "google_compute_target_http_proxy" + desc "TargetHttpProxy" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -31,16 +31,16 @@ class ComputeTargetHttpProxy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @url_map = @fetched['urlMap'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @url_map = @fetched["urlMap"] end # Handles parsing RFC3339 time string @@ -60,13 +60,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/targetHttpProxies/{{name}}' + "projects/{{project}}/global/targetHttpProxies/{{name}}" end end diff --git a/libraries/google_compute_target_https_proxies.rb b/libraries/google_compute_target_https_proxies.rb index 529b249de..db2fb7050 100644 --- a/libraries/google_compute_target_https_proxies.rb +++ b/libraries/google_compute_target_https_proxies.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeTargetHttpsProxys < GcpResourceBase - name 'google_compute_target_https_proxies' - desc 'TargetHttpsProxy plural resource' - supports platform: 'gcp' + name "google_compute_target_https_proxies" + desc "TargetHttpsProxy plural resource" + supports platform: "gcp" attr_reader :table @@ -37,12 +37,12 @@ class ComputeTargetHttpsProxys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'quicOverride' => ->(obj) { [:quic_override, obj['quicOverride']] }, - 'sslCertificates' => ->(obj) { [:ssl_certificates, obj['sslCertificates']] }, - 'sslPolicy' => ->(obj) { [:ssl_policy, obj['sslPolicy']] }, - 'urlMap' => ->(obj) { [:url_map, obj['urlMap']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "quicOverride" => ->(obj) { [:quic_override, obj["quicOverride"]] }, + "sslCertificates" => ->(obj) { [:ssl_certificates, obj["sslCertificates"]] }, + "sslPolicy" => ->(obj) { [:ssl_policy, obj["sslPolicy"]] }, + "urlMap" => ->(obj) { [:url_map, obj["urlMap"]] }, } end @@ -90,13 +90,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/targetHttpsProxies' + "projects/{{project}}/global/targetHttpsProxies" end end diff --git a/libraries/google_compute_target_https_proxy.rb b/libraries/google_compute_target_https_proxy.rb index 043d77a16..a732f5f0c 100644 --- a/libraries/google_compute_target_https_proxy.rb +++ b/libraries/google_compute_target_https_proxy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeTargetHttpsProxy < GcpResourceBase - name 'google_compute_target_https_proxy' - desc 'TargetHttpsProxy' - supports platform: 'gcp' + name "google_compute_target_https_proxy" + desc "TargetHttpsProxy" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -34,19 +34,19 @@ class ComputeTargetHttpsProxy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @quic_override = @fetched['quicOverride'] - @ssl_certificates = @fetched['sslCertificates'] - @ssl_policy = @fetched['sslPolicy'] - @url_map = @fetched['urlMap'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @quic_override = @fetched["quicOverride"] + @ssl_certificates = @fetched["sslCertificates"] + @ssl_policy = @fetched["sslPolicy"] + @url_map = @fetched["urlMap"] end # Handles parsing RFC3339 time string @@ -66,13 +66,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/targetHttpsProxies/{{name}}' + "projects/{{project}}/global/targetHttpsProxies/{{name}}" end end diff --git a/libraries/google_compute_target_pool.rb b/libraries/google_compute_target_pool.rb index 6717be0a9..5eea327c4 100644 --- a/libraries/google_compute_target_pool.rb +++ b/libraries/google_compute_target_pool.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeTargetPool < GcpResourceBase - name 'google_compute_target_pool' - desc 'TargetPool' - supports platform: 'gcp' + name "google_compute_target_pool" + desc "TargetPool" + supports platform: "gcp" attr_reader :params attr_reader :backup_pool @@ -36,21 +36,21 @@ class ComputeTargetPool < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @backup_pool = @fetched['backupPool'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @failover_ratio = @fetched['failoverRatio'] - @health_check = @fetched['healthCheck'] - @id = @fetched['id'] - @instances = @fetched['instances'] - @name = @fetched['name'] - @session_affinity = @fetched['sessionAffinity'] - @region = @fetched['region'] + @backup_pool = @fetched["backupPool"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @failover_ratio = @fetched["failoverRatio"] + @health_check = @fetched["healthCheck"] + @id = @fetched["id"] + @instances = @fetched["instances"] + @name = @fetched["name"] + @session_affinity = @fetched["sessionAffinity"] + @region = @fetched["region"] end # Handles parsing RFC3339 time string @@ -76,13 +76,13 @@ def has_target_instance?(name, zone) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/targetPools/{{name}}' + "projects/{{project}}/regions/{{region}}/targetPools/{{name}}" end end diff --git a/libraries/google_compute_target_pools.rb b/libraries/google_compute_target_pools.rb index dc739a622..f1d138724 100644 --- a/libraries/google_compute_target_pools.rb +++ b/libraries/google_compute_target_pools.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeTargetPools < GcpResourceBase - name 'google_compute_target_pools' - desc 'TargetPool plural resource' - supports platform: 'gcp' + name "google_compute_target_pools" + desc "TargetPool plural resource" + supports platform: "gcp" attr_reader :table @@ -39,12 +39,12 @@ class ComputeTargetPools < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'backupPool' => ->(obj) { [:backup_pool, obj['backupPool']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'failoverRatio' => ->(obj) { [:failover_ratio, obj['failoverRatio']] }, - 'healthCheck' => ->(obj) { [:health_check, obj['healthCheck']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'instances' => ->(obj) { [:instances, obj['instances']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'sessionAffinity' => ->(obj) { [:session_affinity, obj['sessionAffinity']] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "backupPool" => ->(obj) { [:backup_pool, obj["backupPool"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "failoverRatio" => ->(obj) { [:failover_ratio, obj["failoverRatio"]] }, + "healthCheck" => ->(obj) { [:health_check, obj["healthCheck"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "instances" => ->(obj) { [:instances, obj["instances"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "sessionAffinity" => ->(obj) { [:session_affinity, obj["sessionAffinity"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end @@ -94,13 +94,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/targetPools' + "projects/{{project}}/regions/{{region}}/targetPools" end end diff --git a/libraries/google_compute_target_tcp_proxies.rb b/libraries/google_compute_target_tcp_proxies.rb index 525ba1072..0692f550d 100644 --- a/libraries/google_compute_target_tcp_proxies.rb +++ b/libraries/google_compute_target_tcp_proxies.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeTargetTcpProxys < GcpResourceBase - name 'google_compute_target_tcp_proxies' - desc 'TargetTcpProxy plural resource' - supports platform: 'gcp' + name "google_compute_target_tcp_proxies" + desc "TargetTcpProxy plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class ComputeTargetTcpProxys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'proxyHeader' => ->(obj) { [:proxy_header, obj['proxyHeader']] }, - 'service' => ->(obj) { [:service, obj['service']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "proxyHeader" => ->(obj) { [:proxy_header, obj["proxyHeader"]] }, + "service" => ->(obj) { [:service, obj["service"]] }, } end @@ -86,13 +86,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/targetTcpProxies' + "projects/{{project}}/global/targetTcpProxies" end end diff --git a/libraries/google_compute_target_tcp_proxy.rb b/libraries/google_compute_target_tcp_proxy.rb index 6ffce7326..a8f425080 100644 --- a/libraries/google_compute_target_tcp_proxy.rb +++ b/libraries/google_compute_target_tcp_proxy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeTargetTcpProxy < GcpResourceBase - name 'google_compute_target_tcp_proxy' - desc 'TargetTcpProxy' - supports platform: 'gcp' + name "google_compute_target_tcp_proxy" + desc "TargetTcpProxy" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -32,17 +32,17 @@ class ComputeTargetTcpProxy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @proxy_header = @fetched['proxyHeader'] - @service = @fetched['service'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @proxy_header = @fetched["proxyHeader"] + @service = @fetched["service"] end # Handles parsing RFC3339 time string @@ -62,13 +62,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/targetTcpProxies/{{name}}' + "projects/{{project}}/global/targetTcpProxies/{{name}}" end end diff --git a/libraries/google_compute_url_map.rb b/libraries/google_compute_url_map.rb index b866c8fcf..2a1eeb064 100644 --- a/libraries/google_compute_url_map.rb +++ b/libraries/google_compute_url_map.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,32 +13,32 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/urlmap_default_route_action' -require 'google/compute/property/urlmap_default_route_action_cors_policy' -require 'google/compute/property/urlmap_default_route_action_fault_injection_policy' -require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_abort' -require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_delay' -require 'google/compute/property/urlmap_default_route_action_fault_injection_policy_delay_fixed_delay' -require 'google/compute/property/urlmap_default_route_action_request_mirror_policy' -require 'google/compute/property/urlmap_default_route_action_retry_policy' -require 'google/compute/property/urlmap_default_route_action_retry_policy_per_try_timeout' -require 'google/compute/property/urlmap_default_route_action_timeout' -require 'google/compute/property/urlmap_default_route_action_url_rewrite' -require 'google/compute/property/urlmap_default_route_action_weighted_backend_services' -require 'google/compute/property/urlmap_default_url_redirect' -require 'google/compute/property/urlmap_header_action' -require 'google/compute/property/urlmap_header_action_request_headers_to_add' -require 'google/compute/property/urlmap_header_action_response_headers_to_add' -require 'google/compute/property/urlmap_host_rules' -require 'google/compute/property/urlmap_path_matchers' -require 'google/compute/property/urlmap_tests' +require "gcp_backend" +require "google/compute/property/urlmap_default_route_action" +require "google/compute/property/urlmap_default_route_action_cors_policy" +require "google/compute/property/urlmap_default_route_action_fault_injection_policy" +require "google/compute/property/urlmap_default_route_action_fault_injection_policy_abort" +require "google/compute/property/urlmap_default_route_action_fault_injection_policy_delay" +require "google/compute/property/urlmap_default_route_action_fault_injection_policy_delay_fixed_delay" +require "google/compute/property/urlmap_default_route_action_request_mirror_policy" +require "google/compute/property/urlmap_default_route_action_retry_policy" +require "google/compute/property/urlmap_default_route_action_retry_policy_per_try_timeout" +require "google/compute/property/urlmap_default_route_action_timeout" +require "google/compute/property/urlmap_default_route_action_url_rewrite" +require "google/compute/property/urlmap_default_route_action_weighted_backend_services" +require "google/compute/property/urlmap_default_url_redirect" +require "google/compute/property/urlmap_header_action" +require "google/compute/property/urlmap_header_action_request_headers_to_add" +require "google/compute/property/urlmap_header_action_response_headers_to_add" +require "google/compute/property/urlmap_host_rules" +require "google/compute/property/urlmap_path_matchers" +require "google/compute/property/urlmap_tests" # A provider to manage Compute Engine resources. class ComputeUrlMap < GcpResourceBase - name 'google_compute_url_map' - desc 'UrlMap' - supports platform: 'gcp' + name "google_compute_url_map" + desc "UrlMap" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -57,23 +57,23 @@ class ComputeUrlMap < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @default_service = @fetched['defaultService'] - @description = @fetched['description'] - @id = @fetched['id'] - @fingerprint = @fetched['fingerprint'] - @header_action = GoogleInSpec::Compute::Property::UrlMapHeaderAction.new(@fetched['headerAction'], to_s) - @host_rules = GoogleInSpec::Compute::Property::UrlMapHostRulesArray.parse(@fetched['hostRules'], to_s) - @name = @fetched['name'] - @path_matchers = GoogleInSpec::Compute::Property::UrlMapPathMatchersArray.parse(@fetched['pathMatchers'], to_s) - @tests = GoogleInSpec::Compute::Property::UrlMapTestsArray.parse(@fetched['tests'], to_s) - @default_url_redirect = GoogleInSpec::Compute::Property::UrlMapDefaultUrlRedirect.new(@fetched['defaultUrlRedirect'], to_s) - @default_route_action = GoogleInSpec::Compute::Property::UrlMapDefaultRouteAction.new(@fetched['defaultRouteAction'], to_s) + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @default_service = @fetched["defaultService"] + @description = @fetched["description"] + @id = @fetched["id"] + @fingerprint = @fetched["fingerprint"] + @header_action = GoogleInSpec::Compute::Property::UrlMapHeaderAction.new(@fetched["headerAction"], to_s) + @host_rules = GoogleInSpec::Compute::Property::UrlMapHostRulesArray.parse(@fetched["hostRules"], to_s) + @name = @fetched["name"] + @path_matchers = GoogleInSpec::Compute::Property::UrlMapPathMatchersArray.parse(@fetched["pathMatchers"], to_s) + @tests = GoogleInSpec::Compute::Property::UrlMapTestsArray.parse(@fetched["tests"], to_s) + @default_url_redirect = GoogleInSpec::Compute::Property::UrlMapDefaultUrlRedirect.new(@fetched["defaultUrlRedirect"], to_s) + @default_route_action = GoogleInSpec::Compute::Property::UrlMapDefaultRouteAction.new(@fetched["defaultRouteAction"], to_s) end # Handles parsing RFC3339 time string @@ -93,13 +93,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/urlMaps/{{name}}' + "projects/{{project}}/global/urlMaps/{{name}}" end end diff --git a/libraries/google_compute_url_maps.rb b/libraries/google_compute_url_maps.rb index 3aea28e0a..da3cdcfdb 100644 --- a/libraries/google_compute_url_maps.rb +++ b/libraries/google_compute_url_maps.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeUrlMaps < GcpResourceBase - name 'google_compute_url_maps' - desc 'UrlMap plural resource' - supports platform: 'gcp' + name "google_compute_url_maps" + desc "UrlMap plural resource" + supports platform: "gcp" attr_reader :table @@ -41,12 +41,12 @@ class ComputeUrlMaps < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -74,18 +74,18 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'defaultService' => ->(obj) { [:default_service, obj['defaultService']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'fingerprint' => ->(obj) { [:fingerprint, obj['fingerprint']] }, - 'headerAction' => ->(obj) { [:header_action, GoogleInSpec::Compute::Property::UrlMapHeaderAction.new(obj['headerAction'], to_s)] }, - 'hostRules' => ->(obj) { [:host_rules, GoogleInSpec::Compute::Property::UrlMapHostRulesArray.parse(obj['hostRules'], to_s)] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'pathMatchers' => ->(obj) { [:path_matchers, GoogleInSpec::Compute::Property::UrlMapPathMatchersArray.parse(obj['pathMatchers'], to_s)] }, - 'tests' => ->(obj) { [:tests, GoogleInSpec::Compute::Property::UrlMapTestsArray.parse(obj['tests'], to_s)] }, - 'defaultUrlRedirect' => ->(obj) { [:default_url_redirect, GoogleInSpec::Compute::Property::UrlMapDefaultUrlRedirect.new(obj['defaultUrlRedirect'], to_s)] }, - 'defaultRouteAction' => ->(obj) { [:default_route_action, GoogleInSpec::Compute::Property::UrlMapDefaultRouteAction.new(obj['defaultRouteAction'], to_s)] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "defaultService" => ->(obj) { [:default_service, obj["defaultService"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "fingerprint" => ->(obj) { [:fingerprint, obj["fingerprint"]] }, + "headerAction" => ->(obj) { [:header_action, GoogleInSpec::Compute::Property::UrlMapHeaderAction.new(obj["headerAction"], to_s)] }, + "hostRules" => ->(obj) { [:host_rules, GoogleInSpec::Compute::Property::UrlMapHostRulesArray.parse(obj["hostRules"], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "pathMatchers" => ->(obj) { [:path_matchers, GoogleInSpec::Compute::Property::UrlMapPathMatchersArray.parse(obj["pathMatchers"], to_s)] }, + "tests" => ->(obj) { [:tests, GoogleInSpec::Compute::Property::UrlMapTestsArray.parse(obj["tests"], to_s)] }, + "defaultUrlRedirect" => ->(obj) { [:default_url_redirect, GoogleInSpec::Compute::Property::UrlMapDefaultUrlRedirect.new(obj["defaultUrlRedirect"], to_s)] }, + "defaultRouteAction" => ->(obj) { [:default_route_action, GoogleInSpec::Compute::Property::UrlMapDefaultRouteAction.new(obj["defaultRouteAction"], to_s)] }, } end @@ -98,13 +98,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/global/urlMaps' + "projects/{{project}}/global/urlMaps" end end diff --git a/libraries/google_compute_vpn_gateway.rb b/libraries/google_compute_vpn_gateway.rb index f9691e6f1..d75f36b66 100644 --- a/libraries/google_compute_vpn_gateway.rb +++ b/libraries/google_compute_vpn_gateway.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/vpngateway_labels' -require 'google/compute/property/vpngateway_vpn_interfaces' +require "gcp_backend" +require "google/compute/property/vpngateway_labels" +require "google/compute/property/vpngateway_vpn_interfaces" # A provider to manage Compute Engine resources. class ComputeVpnGateway < GcpResourceBase - name 'google_compute_vpn_gateway' - desc 'VpnGateway' - supports platform: 'gcp' + name "google_compute_vpn_gateway" + desc "VpnGateway" + supports platform: "gcp" attr_reader :params attr_reader :kind @@ -40,23 +40,23 @@ class ComputeVpnGateway < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @kind = @fetched['kind'] - @id = @fetched['id'] - @creation_timestamp = @fetched['creationTimestamp'] - @name = @fetched['name'] - @description = @fetched['description'] - @region = @fetched['region'] - @network = @fetched['network'] - @self_link = @fetched['selfLink'] - @labels = GoogleInSpec::Compute::Property::VpnGatewayLabels.new(@fetched['labels'], to_s) - @label_fingerprint = @fetched['labelFingerprint'] - @vpn_interfaces = GoogleInSpec::Compute::Property::VpnGatewayVpnInterfacesArray.parse(@fetched['vpnInterfaces'], to_s) - @stack_type = @fetched['stackType'] + @kind = @fetched["kind"] + @id = @fetched["id"] + @creation_timestamp = @fetched["creationTimestamp"] + @name = @fetched["name"] + @description = @fetched["description"] + @region = @fetched["region"] + @network = @fetched["network"] + @self_link = @fetched["selfLink"] + @labels = GoogleInSpec::Compute::Property::VpnGatewayLabels.new(@fetched["labels"], to_s) + @label_fingerprint = @fetched["labelFingerprint"] + @vpn_interfaces = GoogleInSpec::Compute::Property::VpnGatewayVpnInterfacesArray.parse(@fetched["vpnInterfaces"], to_s) + @stack_type = @fetched["stackType"] end def exists? @@ -70,10 +70,10 @@ def to_s private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/vpnGateways/{{vpn_gateway}}' + "projects/{{project}}/regions/{{region}}/vpnGateways/{{vpn_gateway}}" end end diff --git a/libraries/google_compute_vpn_gateways.rb b/libraries/google_compute_vpn_gateways.rb index cc49c72cf..e3ac795f5 100644 --- a/libraries/google_compute_vpn_gateways.rb +++ b/libraries/google_compute_vpn_gateways.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeVpnGateways < GcpResourceBase - name 'google_compute_vpn_gateways' - desc 'VpnGateway plural resource' - supports platform: 'gcp' + name "google_compute_vpn_gateways" + desc "VpnGateway plural resource" + supports platform: "gcp" attr_reader :table @@ -41,12 +41,12 @@ class ComputeVpnGateways < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -74,28 +74,28 @@ def transform(key, value) def transformers { - 'kind' => ->(obj) { [:kind, obj['kind']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, obj['creationTimestamp']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'region' => ->(obj) { [:region, obj['region']] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'selfLink' => ->(obj) { [:self_link, obj['selfLink']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::Compute::Property::VpnGatewayLabels.new(obj['labels'], to_s)] }, - 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, - 'vpnInterfaces' => ->(obj) { [:vpn_interfaces, GoogleInSpec::Compute::Property::VpnGatewayVpnInterfacesArray.parse(obj['vpnInterfaces'], to_s)] }, - 'stackType' => ->(obj) { [:stack_type, obj['stackType']] }, + "kind" => ->(obj) { [:kind, obj["kind"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, obj["creationTimestamp"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "selfLink" => ->(obj) { [:self_link, obj["selfLink"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::Compute::Property::VpnGatewayLabels.new(obj["labels"], to_s)] }, + "labelFingerprint" => ->(obj) { [:label_fingerprint, obj["labelFingerprint"]] }, + "vpnInterfaces" => ->(obj) { [:vpn_interfaces, GoogleInSpec::Compute::Property::VpnGatewayVpnInterfacesArray.parse(obj["vpnInterfaces"], to_s)] }, + "stackType" => ->(obj) { [:stack_type, obj["stackType"]] }, } end private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/regions/{{region}}/vpnGateways' + "projects/{{project}}/regions/{{region}}/vpnGateways" end end diff --git a/libraries/google_compute_vpn_tunnel.rb b/libraries/google_compute_vpn_tunnel.rb index e008c6015..020e5cd4b 100644 --- a/libraries/google_compute_vpn_tunnel.rb +++ b/libraries/google_compute_vpn_tunnel.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeVpnTunnel < GcpResourceBase - name 'google_compute_vpn_tunnel' - desc 'VpnTunnel' - supports platform: 'gcp' + name "google_compute_vpn_tunnel" + desc "VpnTunnel" + supports platform: "gcp" attr_reader :params attr_reader :id @@ -46,31 +46,31 @@ class ComputeVpnTunnel < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @id = @fetched['id'] - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @name = @fetched['name'] - @description = @fetched['description'] - @target_vpn_gateway = @fetched['targetVpnGateway'] - @vpn_gateway = @fetched['vpnGateway'] - @vpn_gateway_interface = @fetched['vpnGatewayInterface'] - @peer_external_gateway = @fetched['peerExternalGateway'] - @peer_external_gateway_interface = @fetched['peerExternalGatewayInterface'] - @peer_gcp_gateway = @fetched['peerGcpGateway'] - @router = @fetched['router'] - @peer_ip = @fetched['peerIp'] - @shared_secret = @fetched['sharedSecret'] - @shared_secret_hash = @fetched['sharedSecretHash'] - @ike_version = @fetched['ikeVersion'] - @local_traffic_selector = @fetched['localTrafficSelector'] - @remote_traffic_selector = @fetched['remoteTrafficSelector'] - @labels = @fetched['labels'] - @label_fingerprint = @fetched['labelFingerprint'] - @region = @fetched['region'] + @id = @fetched["id"] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @name = @fetched["name"] + @description = @fetched["description"] + @target_vpn_gateway = @fetched["targetVpnGateway"] + @vpn_gateway = @fetched["vpnGateway"] + @vpn_gateway_interface = @fetched["vpnGatewayInterface"] + @peer_external_gateway = @fetched["peerExternalGateway"] + @peer_external_gateway_interface = @fetched["peerExternalGatewayInterface"] + @peer_gcp_gateway = @fetched["peerGcpGateway"] + @router = @fetched["router"] + @peer_ip = @fetched["peerIp"] + @shared_secret = @fetched["sharedSecret"] + @shared_secret_hash = @fetched["sharedSecretHash"] + @ike_version = @fetched["ikeVersion"] + @local_traffic_selector = @fetched["localTrafficSelector"] + @remote_traffic_selector = @fetched["remoteTrafficSelector"] + @labels = @fetched["labels"] + @label_fingerprint = @fetched["labelFingerprint"] + @region = @fetched["region"] end # Handles parsing RFC3339 time string @@ -90,13 +90,13 @@ def to_s def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/vpnTunnels/{{name}}' + "projects/{{project}}/regions/{{region}}/vpnTunnels/{{name}}" end end diff --git a/libraries/google_compute_vpn_tunnels.rb b/libraries/google_compute_vpn_tunnels.rb index e43a4cd10..03c998742 100644 --- a/libraries/google_compute_vpn_tunnels.rb +++ b/libraries/google_compute_vpn_tunnels.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeVpnTunnels < GcpResourceBase - name 'google_compute_vpn_tunnels' - desc 'VpnTunnel plural resource' - supports platform: 'gcp' + name "google_compute_vpn_tunnels" + desc "VpnTunnel plural resource" + supports platform: "gcp" attr_reader :table @@ -49,12 +49,12 @@ class ComputeVpnTunnels < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -82,26 +82,26 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { [:id, obj['id']] }, - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'name' => ->(obj) { [:vpn_tunnel_name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'targetVpnGateway' => ->(obj) { [:target_vpn_gateway, obj['targetVpnGateway']] }, - 'vpnGateway' => ->(obj) { [:vpn_gateway, obj['vpnGateway']] }, - 'vpnGatewayInterface' => ->(obj) { [:vpn_gateway_interface, obj['vpnGatewayInterface']] }, - 'peerExternalGateway' => ->(obj) { [:peer_external_gateway, obj['peerExternalGateway']] }, - 'peerExternalGatewayInterface' => ->(obj) { [:peer_external_gateway_interface, obj['peerExternalGatewayInterface']] }, - 'peerGcpGateway' => ->(obj) { [:peer_gcp_gateway, obj['peerGcpGateway']] }, - 'router' => ->(obj) { [:router, obj['router']] }, - 'peerIp' => ->(obj) { [:peer_ip, obj['peerIp']] }, - 'sharedSecret' => ->(obj) { [:shared_secret, obj['sharedSecret']] }, - 'sharedSecretHash' => ->(obj) { [:shared_secret_hash, obj['sharedSecretHash']] }, - 'ikeVersion' => ->(obj) { [:ike_version, obj['ikeVersion']] }, - 'localTrafficSelector' => ->(obj) { [:local_traffic_selector, obj['localTrafficSelector']] }, - 'remoteTrafficSelector' => ->(obj) { [:remote_traffic_selector, obj['remoteTrafficSelector']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "name" => ->(obj) { [:vpn_tunnel_name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "targetVpnGateway" => ->(obj) { [:target_vpn_gateway, obj["targetVpnGateway"]] }, + "vpnGateway" => ->(obj) { [:vpn_gateway, obj["vpnGateway"]] }, + "vpnGatewayInterface" => ->(obj) { [:vpn_gateway_interface, obj["vpnGatewayInterface"]] }, + "peerExternalGateway" => ->(obj) { [:peer_external_gateway, obj["peerExternalGateway"]] }, + "peerExternalGatewayInterface" => ->(obj) { [:peer_external_gateway_interface, obj["peerExternalGatewayInterface"]] }, + "peerGcpGateway" => ->(obj) { [:peer_gcp_gateway, obj["peerGcpGateway"]] }, + "router" => ->(obj) { [:router, obj["router"]] }, + "peerIp" => ->(obj) { [:peer_ip, obj["peerIp"]] }, + "sharedSecret" => ->(obj) { [:shared_secret, obj["sharedSecret"]] }, + "sharedSecretHash" => ->(obj) { [:shared_secret_hash, obj["sharedSecretHash"]] }, + "ikeVersion" => ->(obj) { [:ike_version, obj["ikeVersion"]] }, + "localTrafficSelector" => ->(obj) { [:local_traffic_selector, obj["localTrafficSelector"]] }, + "remoteTrafficSelector" => ->(obj) { [:remote_traffic_selector, obj["remoteTrafficSelector"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "labelFingerprint" => ->(obj) { [:label_fingerprint, obj["labelFingerprint"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end @@ -114,13 +114,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/vpnTunnels' + "projects/{{project}}/regions/{{region}}/vpnTunnels" end end diff --git a/libraries/google_compute_zone.rb b/libraries/google_compute_zone.rb index 4b6200fb2..a7de50bf8 100644 --- a/libraries/google_compute_zone.rb +++ b/libraries/google_compute_zone.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/compute/property/zone_deprecated' +require "gcp_backend" +require "google/compute/property/zone_deprecated" # A provider to manage Compute Engine resources. class ComputeZone < GcpResourceBase - name 'google_compute_zone' - desc 'Zone' - supports platform: 'gcp' + name "google_compute_zone" + desc "Zone" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -35,19 +35,19 @@ class ComputeZone < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @deprecated = GoogleInSpec::Compute::Property::ZoneDeprecated.new(@fetched['deprecated'], to_s) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @region = @fetched['region'] - @status = @fetched['status'] - @available_cpu_platforms = @fetched['availableCpuPlatforms'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @deprecated = GoogleInSpec::Compute::Property::ZoneDeprecated.new(@fetched["deprecated"], to_s) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @region = @fetched["region"] + @status = @fetched["status"] + @available_cpu_platforms = @fetched["availableCpuPlatforms"] end # Handles parsing RFC3339 time string @@ -65,24 +65,24 @@ def to_s # helper method for retrieving a region name def region_name - @region&.split('/')&.last + @region&.split("/")&.last end def up? - @status == 'UP' + @status == "UP" end private def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/zones/{{name}}' + "projects/{{project}}/zones/{{name}}" end end diff --git a/libraries/google_compute_zone_operation.rb b/libraries/google_compute_zone_operation.rb index f9103c386..5959f5283 100644 --- a/libraries/google_compute_zone_operation.rb +++ b/libraries/google_compute_zone_operation.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Compute Engine resources. class ComputeZoneOperation < GcpResourceBase - name 'google_compute_zone_operation' - desc 'ZoneOperation' - supports platform: 'gcp' + name "google_compute_zone_operation" + desc "ZoneOperation" + supports platform: "gcp" attr_reader :params attr_reader :creation_timestamp @@ -39,24 +39,24 @@ class ComputeZoneOperation < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) - @description = @fetched['description'] - @id = @fetched['id'] - @name = @fetched['name'] - @status_message = @fetched['statusMessage'] - @target_id = @fetched['targetId'] - @status = @fetched['status'] - @user = @fetched['user'] - @insert_time = @fetched['insertTime'] - @start_time = @fetched['startTime'] - @end_time = @fetched['endTime'] - @progress = @fetched['progress'] - @region = @fetched['region'] + @creation_timestamp = parse_time_string(@fetched["creationTimestamp"]) + @description = @fetched["description"] + @id = @fetched["id"] + @name = @fetched["name"] + @status_message = @fetched["statusMessage"] + @target_id = @fetched["targetId"] + @status = @fetched["status"] + @user = @fetched["user"] + @insert_time = @fetched["insertTime"] + @start_time = @fetched["startTime"] + @end_time = @fetched["endTime"] + @progress = @fetched["progress"] + @region = @fetched["region"] end # Handles parsing RFC3339 time string @@ -75,10 +75,10 @@ def to_s private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/operations/{{name}}' + "projects/{{project}}/zones/{{zone}}/operations/{{name}}" end end diff --git a/libraries/google_compute_zone_operations.rb b/libraries/google_compute_zone_operations.rb index 204a37bd0..d8bb19188 100644 --- a/libraries/google_compute_zone_operations.rb +++ b/libraries/google_compute_zone_operations.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeZoneOperations < GcpResourceBase - name 'google_compute_zone_operations' - desc 'ZoneOperation plural resource' - supports platform: 'gcp' + name "google_compute_zone_operations" + desc "ZoneOperation plural resource" + supports platform: "gcp" attr_reader :table @@ -42,12 +42,12 @@ class ComputeZoneOperations < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'statusMessage' => ->(obj) { [:status_message, obj['statusMessage']] }, - 'targetId' => ->(obj) { [:target_id, obj['targetId']] }, - 'status' => ->(obj) { [:status, obj['status']] }, - 'user' => ->(obj) { [:user, obj['user']] }, - 'insertTime' => ->(obj) { [:insert_time, obj['insertTime']] }, - 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, - 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, - 'progress' => ->(obj) { [:progress, obj['progress']] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "statusMessage" => ->(obj) { [:status_message, obj["statusMessage"]] }, + "targetId" => ->(obj) { [:target_id, obj["targetId"]] }, + "status" => ->(obj) { [:status, obj["status"]] }, + "user" => ->(obj) { [:user, obj["user"]] }, + "insertTime" => ->(obj) { [:insert_time, obj["insertTime"]] }, + "startTime" => ->(obj) { [:start_time, obj["startTime"]] }, + "endTime" => ->(obj) { [:end_time, obj["endTime"]] }, + "progress" => ->(obj) { [:progress, obj["progress"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end @@ -99,10 +99,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end def resource_base_url - 'projects/{{project}}/zones/{{zone}}/operations' + "projects/{{project}}/zones/{{zone}}/operations" end end diff --git a/libraries/google_compute_zones.rb b/libraries/google_compute_zones.rb index d1eca5b19..784ff8615 100644 --- a/libraries/google_compute_zones.rb +++ b/libraries/google_compute_zones.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ComputeZones < GcpResourceBase - name 'google_compute_zones' - desc 'Zone plural resource' - supports platform: 'gcp' + name "google_compute_zones" + desc "Zone plural resource" + supports platform: "gcp" attr_reader :table @@ -37,12 +37,12 @@ class ComputeZones < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { [:creation_timestamp, parse_time_string(obj['creationTimestamp'])] }, - 'deprecated' => ->(obj) { [:deprecated, GoogleInSpec::Compute::Property::ZoneDeprecated.new(obj['deprecated'], to_s)] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'id' => ->(obj) { [:zone_id, obj['id']] }, - 'name' => ->(obj) { [:zone_name, obj['name']] }, - 'region' => ->(obj) { [:region, obj['region']] }, - 'status' => ->(obj) { [:zone_status, obj['status']] }, - 'availableCpuPlatforms' => ->(obj) { [:available_cpu_platforms, obj['availableCpuPlatforms']] }, + "creationTimestamp" => ->(obj) { [:creation_timestamp, parse_time_string(obj["creationTimestamp"])] }, + "deprecated" => ->(obj) { [:deprecated, GoogleInSpec::Compute::Property::ZoneDeprecated.new(obj["deprecated"], to_s)] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "id" => ->(obj) { [:zone_id, obj["id"]] }, + "name" => ->(obj) { [:zone_name, obj["name"]] }, + "region" => ->(obj) { [:region, obj["region"]] }, + "status" => ->(obj) { [:zone_status, obj["status"]] }, + "availableCpuPlatforms" => ->(obj) { [:available_cpu_platforms, obj["availableCpuPlatforms"]] }, } end @@ -90,13 +90,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://compute.googleapis.com/compute/beta/' + "https://compute.googleapis.com/compute/beta/" else - 'https://compute.googleapis.com/compute/v1/' + "https://compute.googleapis.com/compute/v1/" end end def resource_base_url - 'projects/{{project}}/zones' + "projects/{{project}}/zones" end end diff --git a/libraries/google_container_cluster.rb b/libraries/google_container_cluster.rb index 4300b9bd9..caa6516b0 100644 --- a/libraries/google_container_cluster.rb +++ b/libraries/google_container_cluster.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,39 +13,39 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/container/property/cluster_addons_config' -require 'google/container/property/cluster_addons_config_gce_persistent_disk_csi_driver_config' -require 'google/container/property/cluster_addons_config_horizontal_pod_autoscaling' -require 'google/container/property/cluster_addons_config_http_load_balancing' -require 'google/container/property/cluster_addons_config_kubernetes_dashboard' -require 'google/container/property/cluster_addons_config_network_policy_config' -require 'google/container/property/cluster_binary_authorization' -require 'google/container/property/cluster_conditions' -require 'google/container/property/cluster_database_encryption' -require 'google/container/property/cluster_default_max_pods_constraint' -require 'google/container/property/cluster_ip_allocation_policy' -require 'google/container/property/cluster_legacy_abac' -require 'google/container/property/cluster_master_auth' -require 'google/container/property/cluster_master_auth_client_certificate_config' -require 'google/container/property/cluster_master_authorized_networks_config' -require 'google/container/property/cluster_master_authorized_networks_config_cidr_blocks' -require 'google/container/property/cluster_network_config' -require 'google/container/property/cluster_network_policy' -require 'google/container/property/cluster_node_config' -require 'google/container/property/cluster_node_config_accelerators' -require 'google/container/property/cluster_node_config_shielded_instance_config' -require 'google/container/property/cluster_node_config_taints' -require 'google/container/property/cluster_node_pools' -require 'google/container/property/cluster_private_cluster_config' -require 'google/container/property/cluster_release_channel' -require 'google/container/property/cluster_shielded_nodes' +require "gcp_backend" +require "google/container/property/cluster_addons_config" +require "google/container/property/cluster_addons_config_gce_persistent_disk_csi_driver_config" +require "google/container/property/cluster_addons_config_horizontal_pod_autoscaling" +require "google/container/property/cluster_addons_config_http_load_balancing" +require "google/container/property/cluster_addons_config_kubernetes_dashboard" +require "google/container/property/cluster_addons_config_network_policy_config" +require "google/container/property/cluster_binary_authorization" +require "google/container/property/cluster_conditions" +require "google/container/property/cluster_database_encryption" +require "google/container/property/cluster_default_max_pods_constraint" +require "google/container/property/cluster_ip_allocation_policy" +require "google/container/property/cluster_legacy_abac" +require "google/container/property/cluster_master_auth" +require "google/container/property/cluster_master_auth_client_certificate_config" +require "google/container/property/cluster_master_authorized_networks_config" +require "google/container/property/cluster_master_authorized_networks_config_cidr_blocks" +require "google/container/property/cluster_network_config" +require "google/container/property/cluster_network_policy" +require "google/container/property/cluster_node_config" +require "google/container/property/cluster_node_config_accelerators" +require "google/container/property/cluster_node_config_shielded_instance_config" +require "google/container/property/cluster_node_config_taints" +require "google/container/property/cluster_node_pools" +require "google/container/property/cluster_private_cluster_config" +require "google/container/property/cluster_release_channel" +require "google/container/property/cluster_shielded_nodes" # A provider to manage Google Kubernetes Engine resources. class ContainerCluster < GcpResourceBase - name 'google_container_cluster' - desc 'Cluster' - supports platform: 'gcp' + name "google_container_cluster" + desc "Cluster" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -94,53 +94,53 @@ class ContainerCluster < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @description = @fetched['description'] - @initial_node_count = @fetched['initialNodeCount'] - @node_config = GoogleInSpec::Container::Property::ClusterNodeConfig.new(@fetched['nodeConfig'], to_s) - @master_auth = GoogleInSpec::Container::Property::ClusterMasterAuth.new(@fetched['masterAuth'], to_s) - @logging_service = @fetched['loggingService'] - @monitoring_service = @fetched['monitoringService'] - @network = @fetched['network'] - @database_encryption = GoogleInSpec::Container::Property::ClusterDatabaseEncryption.new(@fetched['databaseEncryption'], to_s) - @private_cluster_config = GoogleInSpec::Container::Property::ClusterPrivateClusterConfig.new(@fetched['privateClusterConfig'], to_s) - @cluster_ipv4_cidr = @fetched['clusterIpv4Cidr'] - @enable_tpu = @fetched['enableTpu'] - @tpu_ipv4_cidr_block = @fetched['tpuIpv4CidrBlock'] - @addons_config = GoogleInSpec::Container::Property::ClusterAddonsConfig.new(@fetched['addonsConfig'], to_s) - @subnetwork = @fetched['subnetwork'] - @locations = @fetched['locations'] - @resource_labels = @fetched['resourceLabels'] - @label_fingerprint = @fetched['labelFingerprint'] - @legacy_abac = GoogleInSpec::Container::Property::ClusterLegacyAbac.new(@fetched['legacyAbac'], to_s) - @network_policy = GoogleInSpec::Container::Property::ClusterNetworkPolicy.new(@fetched['networkPolicy'], to_s) - @default_max_pods_constraint = GoogleInSpec::Container::Property::ClusterDefaultMaxPodsConstraint.new(@fetched['defaultMaxPodsConstraint'], to_s) - @ip_allocation_policy = GoogleInSpec::Container::Property::ClusterIpAllocationPolicy.new(@fetched['ipAllocationPolicy'], to_s) - @endpoint = @fetched['endpoint'] - @initial_cluster_version = @fetched['initialClusterVersion'] - @current_master_version = @fetched['currentMasterVersion'] - @current_node_version = @fetched['currentNodeVersion'] - @create_time = parse_time_string(@fetched['createTime']) - @status = @fetched['status'] - @status_message = @fetched['statusMessage'] - @node_ipv4_cidr_size = @fetched['nodeIpv4CidrSize'] - @services_ipv4_cidr = @fetched['servicesIpv4Cidr'] - @current_node_count = @fetched['currentNodeCount'] - @expire_time = parse_time_string(@fetched['expireTime']) - @conditions = GoogleInSpec::Container::Property::ClusterConditionsArray.parse(@fetched['conditions'], to_s) - @master_authorized_networks_config = GoogleInSpec::Container::Property::ClusterMasterAuthorizedNetworksConfig.new(@fetched['masterAuthorizedNetworksConfig'], to_s) - @node_pools = GoogleInSpec::Container::Property::ClusterNodePoolsArray.parse(@fetched['nodePools'], to_s) - @binary_authorization = GoogleInSpec::Container::Property::ClusterBinaryAuthorization.new(@fetched['binaryAuthorization'], to_s) - @release_channel = GoogleInSpec::Container::Property::ClusterReleaseChannel.new(@fetched['releaseChannel'], to_s) - @shielded_nodes = GoogleInSpec::Container::Property::ClusterShieldedNodes.new(@fetched['shieldedNodes'], to_s) - @network_config = GoogleInSpec::Container::Property::ClusterNetworkConfig.new(@fetched['networkConfig'], to_s) - @enable_kubernetes_alpha = @fetched['enableKubernetesAlpha'] - @location = @fetched['location'] + @name = @fetched["name"] + @description = @fetched["description"] + @initial_node_count = @fetched["initialNodeCount"] + @node_config = GoogleInSpec::Container::Property::ClusterNodeConfig.new(@fetched["nodeConfig"], to_s) + @master_auth = GoogleInSpec::Container::Property::ClusterMasterAuth.new(@fetched["masterAuth"], to_s) + @logging_service = @fetched["loggingService"] + @monitoring_service = @fetched["monitoringService"] + @network = @fetched["network"] + @database_encryption = GoogleInSpec::Container::Property::ClusterDatabaseEncryption.new(@fetched["databaseEncryption"], to_s) + @private_cluster_config = GoogleInSpec::Container::Property::ClusterPrivateClusterConfig.new(@fetched["privateClusterConfig"], to_s) + @cluster_ipv4_cidr = @fetched["clusterIpv4Cidr"] + @enable_tpu = @fetched["enableTpu"] + @tpu_ipv4_cidr_block = @fetched["tpuIpv4CidrBlock"] + @addons_config = GoogleInSpec::Container::Property::ClusterAddonsConfig.new(@fetched["addonsConfig"], to_s) + @subnetwork = @fetched["subnetwork"] + @locations = @fetched["locations"] + @resource_labels = @fetched["resourceLabels"] + @label_fingerprint = @fetched["labelFingerprint"] + @legacy_abac = GoogleInSpec::Container::Property::ClusterLegacyAbac.new(@fetched["legacyAbac"], to_s) + @network_policy = GoogleInSpec::Container::Property::ClusterNetworkPolicy.new(@fetched["networkPolicy"], to_s) + @default_max_pods_constraint = GoogleInSpec::Container::Property::ClusterDefaultMaxPodsConstraint.new(@fetched["defaultMaxPodsConstraint"], to_s) + @ip_allocation_policy = GoogleInSpec::Container::Property::ClusterIpAllocationPolicy.new(@fetched["ipAllocationPolicy"], to_s) + @endpoint = @fetched["endpoint"] + @initial_cluster_version = @fetched["initialClusterVersion"] + @current_master_version = @fetched["currentMasterVersion"] + @current_node_version = @fetched["currentNodeVersion"] + @create_time = parse_time_string(@fetched["createTime"]) + @status = @fetched["status"] + @status_message = @fetched["statusMessage"] + @node_ipv4_cidr_size = @fetched["nodeIpv4CidrSize"] + @services_ipv4_cidr = @fetched["servicesIpv4Cidr"] + @current_node_count = @fetched["currentNodeCount"] + @expire_time = parse_time_string(@fetched["expireTime"]) + @conditions = GoogleInSpec::Container::Property::ClusterConditionsArray.parse(@fetched["conditions"], to_s) + @master_authorized_networks_config = GoogleInSpec::Container::Property::ClusterMasterAuthorizedNetworksConfig.new(@fetched["masterAuthorizedNetworksConfig"], to_s) + @node_pools = GoogleInSpec::Container::Property::ClusterNodePoolsArray.parse(@fetched["nodePools"], to_s) + @binary_authorization = GoogleInSpec::Container::Property::ClusterBinaryAuthorization.new(@fetched["binaryAuthorization"], to_s) + @release_channel = GoogleInSpec::Container::Property::ClusterReleaseChannel.new(@fetched["releaseChannel"], to_s) + @shielded_nodes = GoogleInSpec::Container::Property::ClusterShieldedNodes.new(@fetched["shieldedNodes"], to_s) + @network_config = GoogleInSpec::Container::Property::ClusterNetworkConfig.new(@fetched["networkConfig"], to_s) + @enable_kubernetes_alpha = @fetched["enableKubernetesAlpha"] + @location = @fetched["location"] end # Handles parsing RFC3339 time string @@ -204,7 +204,7 @@ def has_network_policy_enabled? def has_master_auth_client_key? return false if !defined?(@master_auth.client_key) return false if @master_auth.client_key.nil? - return false if @master_auth.client_key=='' + return false if @master_auth.client_key=="" true end @@ -229,10 +229,10 @@ def private_cluster? private def product_url(_ = nil) - 'https://container.googleapis.com/v1/' + "https://container.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/clusters/{{name}}' + "projects/{{project}}/locations/{{location}}/clusters/{{name}}" end end diff --git a/libraries/google_container_clusters.rb b/libraries/google_container_clusters.rb index c4694c1dd..c700dfcd4 100644 --- a/libraries/google_container_clusters.rb +++ b/libraries/google_container_clusters.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ContainerClusters < GcpResourceBase - name 'google_container_clusters' - desc 'Cluster plural resource' - supports platform: 'gcp' + name "google_container_clusters" + desc "Cluster plural resource" + supports platform: "gcp" attr_reader :table @@ -71,12 +71,12 @@ class ContainerClusters < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('clusters') + @table = fetch_wrapped_resource("clusters") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -104,48 +104,48 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:cluster_name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'initialNodeCount' => ->(obj) { [:initial_node_count, obj['initialNodeCount']] }, - 'nodeConfig' => ->(obj) { [:node_config, GoogleInSpec::Container::Property::ClusterNodeConfig.new(obj['nodeConfig'], to_s)] }, - 'masterAuth' => ->(obj) { [:master_auth, GoogleInSpec::Container::Property::ClusterMasterAuth.new(obj['masterAuth'], to_s)] }, - 'loggingService' => ->(obj) { [:logging_service, obj['loggingService']] }, - 'monitoringService' => ->(obj) { [:monitoring_service, obj['monitoringService']] }, - 'network' => ->(obj) { [:cluster_network, obj['network']] }, - 'databaseEncryption' => ->(obj) { [:database_encryption, GoogleInSpec::Container::Property::ClusterDatabaseEncryption.new(obj['databaseEncryption'], to_s)] }, - 'privateClusterConfig' => ->(obj) { [:private_cluster_config, GoogleInSpec::Container::Property::ClusterPrivateClusterConfig.new(obj['privateClusterConfig'], to_s)] }, - 'clusterIpv4Cidr' => ->(obj) { [:cluster_ipv4_cidr, obj['clusterIpv4Cidr']] }, - 'enableTpu' => ->(obj) { [:enable_tpu, obj['enableTpu']] }, - 'tpuIpv4CidrBlock' => ->(obj) { [:tpu_ipv4_cidr_block, obj['tpuIpv4CidrBlock']] }, - 'addonsConfig' => ->(obj) { [:addons_config, GoogleInSpec::Container::Property::ClusterAddonsConfig.new(obj['addonsConfig'], to_s)] }, - 'subnetwork' => ->(obj) { [:subnetwork, obj['subnetwork']] }, - 'locations' => ->(obj) { [:locations, obj['locations']] }, - 'resourceLabels' => ->(obj) { [:resource_labels, obj['resourceLabels']] }, - 'labelFingerprint' => ->(obj) { [:label_fingerprint, obj['labelFingerprint']] }, - 'legacyAbac' => ->(obj) { [:legacy_abac, GoogleInSpec::Container::Property::ClusterLegacyAbac.new(obj['legacyAbac'], to_s)] }, - 'networkPolicy' => ->(obj) { [:network_policy, GoogleInSpec::Container::Property::ClusterNetworkPolicy.new(obj['networkPolicy'], to_s)] }, - 'defaultMaxPodsConstraint' => ->(obj) { [:default_max_pods_constraint, GoogleInSpec::Container::Property::ClusterDefaultMaxPodsConstraint.new(obj['defaultMaxPodsConstraint'], to_s)] }, - 'ipAllocationPolicy' => ->(obj) { [:ip_allocation_policy, GoogleInSpec::Container::Property::ClusterIpAllocationPolicy.new(obj['ipAllocationPolicy'], to_s)] }, - 'endpoint' => ->(obj) { [:endpoint, obj['endpoint']] }, - 'initialClusterVersion' => ->(obj) { [:initial_cluster_version, obj['initialClusterVersion']] }, - 'currentMasterVersion' => ->(obj) { [:current_master_version, obj['currentMasterVersion']] }, - 'currentNodeVersion' => ->(obj) { [:current_node_version, obj['currentNodeVersion']] }, - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'status' => ->(obj) { [:cluster_status, obj['status']] }, - 'statusMessage' => ->(obj) { [:status_message, obj['statusMessage']] }, - 'nodeIpv4CidrSize' => ->(obj) { [:node_ipv4_cidr_size, obj['nodeIpv4CidrSize']] }, - 'servicesIpv4Cidr' => ->(obj) { [:services_ipv4_cidr, obj['servicesIpv4Cidr']] }, - 'currentNodeCount' => ->(obj) { [:current_node_count, obj['currentNodeCount']] }, - 'expireTime' => ->(obj) { [:expire_time, parse_time_string(obj['expireTime'])] }, - 'conditions' => ->(obj) { [:conditions, GoogleInSpec::Container::Property::ClusterConditionsArray.parse(obj['conditions'], to_s)] }, - 'masterAuthorizedNetworksConfig' => ->(obj) { [:master_authorized_networks_config, GoogleInSpec::Container::Property::ClusterMasterAuthorizedNetworksConfig.new(obj['masterAuthorizedNetworksConfig'], to_s)] }, - 'nodePools' => ->(obj) { [:node_pools, GoogleInSpec::Container::Property::ClusterNodePoolsArray.parse(obj['nodePools'], to_s)] }, - 'binaryAuthorization' => ->(obj) { [:binary_authorization, GoogleInSpec::Container::Property::ClusterBinaryAuthorization.new(obj['binaryAuthorization'], to_s)] }, - 'releaseChannel' => ->(obj) { [:release_channel, GoogleInSpec::Container::Property::ClusterReleaseChannel.new(obj['releaseChannel'], to_s)] }, - 'shieldedNodes' => ->(obj) { [:shielded_nodes, GoogleInSpec::Container::Property::ClusterShieldedNodes.new(obj['shieldedNodes'], to_s)] }, - 'networkConfig' => ->(obj) { [:network_config, GoogleInSpec::Container::Property::ClusterNetworkConfig.new(obj['networkConfig'], to_s)] }, - 'enableKubernetesAlpha' => ->(obj) { [:enable_kubernetes_alpha, obj['enableKubernetesAlpha']] }, - 'location' => ->(obj) { [:location, obj['location']] }, + "name" => ->(obj) { [:cluster_name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "initialNodeCount" => ->(obj) { [:initial_node_count, obj["initialNodeCount"]] }, + "nodeConfig" => ->(obj) { [:node_config, GoogleInSpec::Container::Property::ClusterNodeConfig.new(obj["nodeConfig"], to_s)] }, + "masterAuth" => ->(obj) { [:master_auth, GoogleInSpec::Container::Property::ClusterMasterAuth.new(obj["masterAuth"], to_s)] }, + "loggingService" => ->(obj) { [:logging_service, obj["loggingService"]] }, + "monitoringService" => ->(obj) { [:monitoring_service, obj["monitoringService"]] }, + "network" => ->(obj) { [:cluster_network, obj["network"]] }, + "databaseEncryption" => ->(obj) { [:database_encryption, GoogleInSpec::Container::Property::ClusterDatabaseEncryption.new(obj["databaseEncryption"], to_s)] }, + "privateClusterConfig" => ->(obj) { [:private_cluster_config, GoogleInSpec::Container::Property::ClusterPrivateClusterConfig.new(obj["privateClusterConfig"], to_s)] }, + "clusterIpv4Cidr" => ->(obj) { [:cluster_ipv4_cidr, obj["clusterIpv4Cidr"]] }, + "enableTpu" => ->(obj) { [:enable_tpu, obj["enableTpu"]] }, + "tpuIpv4CidrBlock" => ->(obj) { [:tpu_ipv4_cidr_block, obj["tpuIpv4CidrBlock"]] }, + "addonsConfig" => ->(obj) { [:addons_config, GoogleInSpec::Container::Property::ClusterAddonsConfig.new(obj["addonsConfig"], to_s)] }, + "subnetwork" => ->(obj) { [:subnetwork, obj["subnetwork"]] }, + "locations" => ->(obj) { [:locations, obj["locations"]] }, + "resourceLabels" => ->(obj) { [:resource_labels, obj["resourceLabels"]] }, + "labelFingerprint" => ->(obj) { [:label_fingerprint, obj["labelFingerprint"]] }, + "legacyAbac" => ->(obj) { [:legacy_abac, GoogleInSpec::Container::Property::ClusterLegacyAbac.new(obj["legacyAbac"], to_s)] }, + "networkPolicy" => ->(obj) { [:network_policy, GoogleInSpec::Container::Property::ClusterNetworkPolicy.new(obj["networkPolicy"], to_s)] }, + "defaultMaxPodsConstraint" => ->(obj) { [:default_max_pods_constraint, GoogleInSpec::Container::Property::ClusterDefaultMaxPodsConstraint.new(obj["defaultMaxPodsConstraint"], to_s)] }, + "ipAllocationPolicy" => ->(obj) { [:ip_allocation_policy, GoogleInSpec::Container::Property::ClusterIpAllocationPolicy.new(obj["ipAllocationPolicy"], to_s)] }, + "endpoint" => ->(obj) { [:endpoint, obj["endpoint"]] }, + "initialClusterVersion" => ->(obj) { [:initial_cluster_version, obj["initialClusterVersion"]] }, + "currentMasterVersion" => ->(obj) { [:current_master_version, obj["currentMasterVersion"]] }, + "currentNodeVersion" => ->(obj) { [:current_node_version, obj["currentNodeVersion"]] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "status" => ->(obj) { [:cluster_status, obj["status"]] }, + "statusMessage" => ->(obj) { [:status_message, obj["statusMessage"]] }, + "nodeIpv4CidrSize" => ->(obj) { [:node_ipv4_cidr_size, obj["nodeIpv4CidrSize"]] }, + "servicesIpv4Cidr" => ->(obj) { [:services_ipv4_cidr, obj["servicesIpv4Cidr"]] }, + "currentNodeCount" => ->(obj) { [:current_node_count, obj["currentNodeCount"]] }, + "expireTime" => ->(obj) { [:expire_time, parse_time_string(obj["expireTime"])] }, + "conditions" => ->(obj) { [:conditions, GoogleInSpec::Container::Property::ClusterConditionsArray.parse(obj["conditions"], to_s)] }, + "masterAuthorizedNetworksConfig" => ->(obj) { [:master_authorized_networks_config, GoogleInSpec::Container::Property::ClusterMasterAuthorizedNetworksConfig.new(obj["masterAuthorizedNetworksConfig"], to_s)] }, + "nodePools" => ->(obj) { [:node_pools, GoogleInSpec::Container::Property::ClusterNodePoolsArray.parse(obj["nodePools"], to_s)] }, + "binaryAuthorization" => ->(obj) { [:binary_authorization, GoogleInSpec::Container::Property::ClusterBinaryAuthorization.new(obj["binaryAuthorization"], to_s)] }, + "releaseChannel" => ->(obj) { [:release_channel, GoogleInSpec::Container::Property::ClusterReleaseChannel.new(obj["releaseChannel"], to_s)] }, + "shieldedNodes" => ->(obj) { [:shielded_nodes, GoogleInSpec::Container::Property::ClusterShieldedNodes.new(obj["shieldedNodes"], to_s)] }, + "networkConfig" => ->(obj) { [:network_config, GoogleInSpec::Container::Property::ClusterNetworkConfig.new(obj["networkConfig"], to_s)] }, + "enableKubernetesAlpha" => ->(obj) { [:enable_kubernetes_alpha, obj["enableKubernetesAlpha"]] }, + "location" => ->(obj) { [:location, obj["location"]] }, } end @@ -157,10 +157,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://container.googleapis.com/v1/' + "https://container.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/clusters' + "projects/{{project}}/locations/{{location}}/clusters" end end diff --git a/libraries/google_container_node_pool.rb b/libraries/google_container_node_pool.rb index a8bf16f1e..5f8a8e06b 100644 --- a/libraries/google_container_node_pool.rb +++ b/libraries/google_container_node_pool.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,23 +13,23 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/container/property/nodepool_autoscaling' -require 'google/container/property/nodepool_conditions' -require 'google/container/property/nodepool_config' -require 'google/container/property/nodepool_config_accelerators' -require 'google/container/property/nodepool_config_shielded_instance_config' -require 'google/container/property/nodepool_config_taints' -require 'google/container/property/nodepool_config_workload_meta_config' -require 'google/container/property/nodepool_management' -require 'google/container/property/nodepool_management_upgrade_options' -require 'google/container/property/nodepool_max_pods_constraint' +require "gcp_backend" +require "google/container/property/nodepool_autoscaling" +require "google/container/property/nodepool_conditions" +require "google/container/property/nodepool_config" +require "google/container/property/nodepool_config_accelerators" +require "google/container/property/nodepool_config_shielded_instance_config" +require "google/container/property/nodepool_config_taints" +require "google/container/property/nodepool_config_workload_meta_config" +require "google/container/property/nodepool_management" +require "google/container/property/nodepool_management_upgrade_options" +require "google/container/property/nodepool_max_pods_constraint" # A provider to manage Google Kubernetes Engine resources. class ContainerNodePool < GcpResourceBase - name 'google_container_node_pool' - desc 'NodePool' - supports platform: 'gcp' + name "google_container_node_pool" + desc "NodePool" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -49,24 +49,24 @@ class ContainerNodePool < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @config = GoogleInSpec::Container::Property::NodePoolConfig.new(@fetched['config'], to_s) - @initial_node_count = @fetched['initialNodeCount'] - @status = @fetched['status'] - @status_message = @fetched['statusMessage'] - @version = @fetched['version'] - @autoscaling = GoogleInSpec::Container::Property::NodePoolAutoscaling.new(@fetched['autoscaling'], to_s) - @management = GoogleInSpec::Container::Property::NodePoolManagement.new(@fetched['management'], to_s) - @max_pods_constraint = GoogleInSpec::Container::Property::NodePoolMaxPodsConstraint.new(@fetched['maxPodsConstraint'], to_s) - @conditions = GoogleInSpec::Container::Property::NodePoolConditionsArray.parse(@fetched['conditions'], to_s) - @pod_ipv4_cidr_size = @fetched['podIpv4CidrSize'] - @cluster = @fetched['cluster'] - @location = @fetched['location'] + @name = @fetched["name"] + @config = GoogleInSpec::Container::Property::NodePoolConfig.new(@fetched["config"], to_s) + @initial_node_count = @fetched["initialNodeCount"] + @status = @fetched["status"] + @status_message = @fetched["statusMessage"] + @version = @fetched["version"] + @autoscaling = GoogleInSpec::Container::Property::NodePoolAutoscaling.new(@fetched["autoscaling"], to_s) + @management = GoogleInSpec::Container::Property::NodePoolManagement.new(@fetched["management"], to_s) + @max_pods_constraint = GoogleInSpec::Container::Property::NodePoolMaxPodsConstraint.new(@fetched["maxPodsConstraint"], to_s) + @conditions = GoogleInSpec::Container::Property::NodePoolConditionsArray.parse(@fetched["conditions"], to_s) + @pod_ipv4_cidr_size = @fetched["podIpv4CidrSize"] + @cluster = @fetched["cluster"] + @location = @fetched["location"] end def exists? @@ -81,13 +81,13 @@ def to_s def product_url(beta = false) if beta - 'https://container.googleapis.com/v1beta1/' + "https://container.googleapis.com/v1beta1/" else - 'https://container.googleapis.com/v1/' + "https://container.googleapis.com/v1/" end end def resource_base_url - 'projects/{{project}}/locations/{{location}}/clusters/{{cluster_name}}/nodePools/{{nodepool_name}}' + "projects/{{project}}/locations/{{location}}/clusters/{{cluster_name}}/nodePools/{{nodepool_name}}" end end diff --git a/libraries/google_container_node_pools.rb b/libraries/google_container_node_pools.rb index f10129287..a1e38d462 100644 --- a/libraries/google_container_node_pools.rb +++ b/libraries/google_container_node_pools.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ContainerNodePools < GcpResourceBase - name 'google_container_node_pools' - desc 'NodePool plural resource' - supports platform: 'gcp' + name "google_container_node_pools" + desc "NodePool plural resource" + supports platform: "gcp" attr_reader :table @@ -42,12 +42,12 @@ class ContainerNodePools < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('nodePools') + @table = fetch_wrapped_resource("nodePools") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:node_pool_name, obj['name']] }, - 'config' => ->(obj) { [:config, GoogleInSpec::Container::Property::NodePoolConfig.new(obj['config'], to_s)] }, - 'initialNodeCount' => ->(obj) { [:initial_node_count, obj['initialNodeCount']] }, - 'status' => ->(obj) { [:node_pool_status, obj['status']] }, - 'statusMessage' => ->(obj) { [:status_message, obj['statusMessage']] }, - 'version' => ->(obj) { [:version, obj['version']] }, - 'autoscaling' => ->(obj) { [:autoscaling, GoogleInSpec::Container::Property::NodePoolAutoscaling.new(obj['autoscaling'], to_s)] }, - 'management' => ->(obj) { [:management, GoogleInSpec::Container::Property::NodePoolManagement.new(obj['management'], to_s)] }, - 'maxPodsConstraint' => ->(obj) { [:max_pods_constraint, GoogleInSpec::Container::Property::NodePoolMaxPodsConstraint.new(obj['maxPodsConstraint'], to_s)] }, - 'conditions' => ->(obj) { [:conditions, GoogleInSpec::Container::Property::NodePoolConditionsArray.parse(obj['conditions'], to_s)] }, - 'podIpv4CidrSize' => ->(obj) { [:pod_ipv4_cidr_size, obj['podIpv4CidrSize']] }, - 'cluster' => ->(obj) { [:cluster, obj['cluster']] }, - 'location' => ->(obj) { [:location, obj['location']] }, + "name" => ->(obj) { [:node_pool_name, obj["name"]] }, + "config" => ->(obj) { [:config, GoogleInSpec::Container::Property::NodePoolConfig.new(obj["config"], to_s)] }, + "initialNodeCount" => ->(obj) { [:initial_node_count, obj["initialNodeCount"]] }, + "status" => ->(obj) { [:node_pool_status, obj["status"]] }, + "statusMessage" => ->(obj) { [:status_message, obj["statusMessage"]] }, + "version" => ->(obj) { [:version, obj["version"]] }, + "autoscaling" => ->(obj) { [:autoscaling, GoogleInSpec::Container::Property::NodePoolAutoscaling.new(obj["autoscaling"], to_s)] }, + "management" => ->(obj) { [:management, GoogleInSpec::Container::Property::NodePoolManagement.new(obj["management"], to_s)] }, + "maxPodsConstraint" => ->(obj) { [:max_pods_constraint, GoogleInSpec::Container::Property::NodePoolMaxPodsConstraint.new(obj["maxPodsConstraint"], to_s)] }, + "conditions" => ->(obj) { [:conditions, GoogleInSpec::Container::Property::NodePoolConditionsArray.parse(obj["conditions"], to_s)] }, + "podIpv4CidrSize" => ->(obj) { [:pod_ipv4_cidr_size, obj["podIpv4CidrSize"]] }, + "cluster" => ->(obj) { [:cluster, obj["cluster"]] }, + "location" => ->(obj) { [:location, obj["location"]] }, } end @@ -95,13 +95,13 @@ def transformers def product_url(beta = false) if beta - 'https://container.googleapis.com/v1beta1/' + "https://container.googleapis.com/v1beta1/" else - 'https://container.googleapis.com/v1/' + "https://container.googleapis.com/v1/" end end def resource_base_url - 'projects/{{project}}/locations/{{location}}/clusters/{{cluster_name}}/nodePools' + "projects/{{project}}/locations/{{location}}/clusters/{{cluster_name}}/nodePools" end end diff --git a/libraries/google_container_server_config.rb b/libraries/google_container_server_config.rb index 5e502e201..8ac9b8402 100644 --- a/libraries/google_container_server_config.rb +++ b/libraries/google_container_server_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/container/property/serverconfig_channels' +require "gcp_backend" +require "google/container/property/serverconfig_channels" # A provider to manage Google Kubernetes Engine resources. class ContainerServerConfig < GcpResourceBase - name 'google_container_server_config' - desc 'ServerConfig' - supports platform: 'gcp' + name "google_container_server_config" + desc "ServerConfig" + supports platform: "gcp" attr_reader :params attr_reader :default_cluster_version @@ -34,18 +34,18 @@ class ContainerServerConfig < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @default_cluster_version = @fetched['defaultClusterVersion'] - @default_image_type = @fetched['defaultImageType'] - @valid_image_types = @fetched['validImageTypes'] - @valid_node_versions = @fetched['validNodeVersions'] - @valid_master_versions = @fetched['validMasterVersions'] - @channels = GoogleInSpec::Container::Property::ServerConfigChannelsArray.parse(@fetched['channels'], to_s) - @location = @fetched['location'] + @default_cluster_version = @fetched["defaultClusterVersion"] + @default_image_type = @fetched["defaultImageType"] + @valid_image_types = @fetched["validImageTypes"] + @valid_node_versions = @fetched["validNodeVersions"] + @valid_master_versions = @fetched["validMasterVersions"] + @channels = GoogleInSpec::Container::Property::ServerConfigChannelsArray.parse(@fetched["channels"], to_s) + @location = @fetched["location"] end def exists? @@ -59,10 +59,10 @@ def to_s private def product_url(_ = nil) - 'https://container.googleapis.com/v1/' + "https://container.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/serverConfig/' + "projects/{{project}}/locations/{{location}}/serverConfig/" end end diff --git a/libraries/google_dataproc_cluster.rb b/libraries/google_dataproc_cluster.rb index 46a363af2..7aa0c0008 100644 --- a/libraries/google_dataproc_cluster.rb +++ b/libraries/google_dataproc_cluster.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,29 +13,29 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/dataproc/property/cluster_config' -require 'google/dataproc/property/cluster_config_encryption_config' -require 'google/dataproc/property/cluster_config_gce_cluster_config' -require 'google/dataproc/property/cluster_config_initialization_actions' -require 'google/dataproc/property/cluster_config_master_config' -require 'google/dataproc/property/cluster_config_master_config_disk_config' -require 'google/dataproc/property/cluster_config_master_config_managed_group_config' -require 'google/dataproc/property/cluster_config_secondary_worker_config' -require 'google/dataproc/property/cluster_config_secondary_worker_config_disk_config' -require 'google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config' -require 'google/dataproc/property/cluster_config_security_config' -require 'google/dataproc/property/cluster_config_security_config_kerberos_config' -require 'google/dataproc/property/cluster_config_software_config' -require 'google/dataproc/property/cluster_config_worker_config' -require 'google/dataproc/property/cluster_config_worker_config_disk_config' -require 'google/dataproc/property/cluster_config_worker_config_managed_group_config' +require "gcp_backend" +require "google/dataproc/property/cluster_config" +require "google/dataproc/property/cluster_config_encryption_config" +require "google/dataproc/property/cluster_config_gce_cluster_config" +require "google/dataproc/property/cluster_config_initialization_actions" +require "google/dataproc/property/cluster_config_master_config" +require "google/dataproc/property/cluster_config_master_config_disk_config" +require "google/dataproc/property/cluster_config_master_config_managed_group_config" +require "google/dataproc/property/cluster_config_secondary_worker_config" +require "google/dataproc/property/cluster_config_secondary_worker_config_disk_config" +require "google/dataproc/property/cluster_config_secondary_worker_config_managed_group_config" +require "google/dataproc/property/cluster_config_security_config" +require "google/dataproc/property/cluster_config_security_config_kerberos_config" +require "google/dataproc/property/cluster_config_software_config" +require "google/dataproc/property/cluster_config_worker_config" +require "google/dataproc/property/cluster_config_worker_config_disk_config" +require "google/dataproc/property/cluster_config_worker_config_managed_group_config" # A provider to manage Dataproc resources. class DataprocCluster < GcpResourceBase - name 'google_dataproc_cluster' - desc 'Cluster' - supports platform: 'gcp' + name "google_dataproc_cluster" + desc "Cluster" + supports platform: "gcp" attr_reader :params attr_reader :cluster_name @@ -52,21 +52,21 @@ class DataprocCluster < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @cluster_name = @fetched['clusterName'] - @labels = @fetched['labels'] - @config = GoogleInSpec::Dataproc::Property::ClusterConfig.new(@fetched['config'], to_s) - @region = @fetched['region'] - @project_id = @fetched['projectId'] - @virtual_cluster_config = @fetched['virtualClusterConfig'] - @status = @fetched['status'] - @status_history = @fetched['statusHistory'] - @cluster_uuid = @fetched['clusterUuid'] - @metrics = @fetched['metrics'] + @cluster_name = @fetched["clusterName"] + @labels = @fetched["labels"] + @config = GoogleInSpec::Dataproc::Property::ClusterConfig.new(@fetched["config"], to_s) + @region = @fetched["region"] + @project_id = @fetched["projectId"] + @virtual_cluster_config = @fetched["virtualClusterConfig"] + @status = @fetched["status"] + @status_history = @fetched["statusHistory"] + @cluster_uuid = @fetched["clusterUuid"] + @metrics = @fetched["metrics"] end def exists? @@ -81,13 +81,13 @@ def to_s def product_url(beta = false) if beta - 'https://dataproc.googleapis.com/v1beta2/' + "https://dataproc.googleapis.com/v1beta2/" else - 'https://dataproc.googleapis.com/v1/' + "https://dataproc.googleapis.com/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/clusters/{{cluster_name}}' + "projects/{{project}}/regions/{{region}}/clusters/{{cluster_name}}" end end diff --git a/libraries/google_dataproc_clusters.rb b/libraries/google_dataproc_clusters.rb index f15c8a25f..4deee8c38 100644 --- a/libraries/google_dataproc_clusters.rb +++ b/libraries/google_dataproc_clusters.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class DataprocClusters < GcpResourceBase - name 'google_dataproc_clusters' - desc 'Cluster plural resource' - supports platform: 'gcp' + name "google_dataproc_clusters" + desc "Cluster plural resource" + supports platform: "gcp" attr_reader :table @@ -39,12 +39,12 @@ class DataprocClusters < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('clusters') + @table = fetch_wrapped_resource("clusters") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'clusterName' => ->(obj) { [:cluster_name, obj['clusterName']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'config' => ->(obj) { [:config, GoogleInSpec::Dataproc::Property::ClusterConfig.new(obj['config'], to_s)] }, - 'region' => ->(obj) { [:region, obj['region']] }, - 'projectId' => ->(obj) { [:project_id, obj['projectId']] }, - 'virtualClusterConfig' => ->(obj) { [:virtual_cluster_config, obj['virtualClusterConfig']] }, - 'status' => ->(obj) { [:status, obj['status']] }, - 'statusHistory' => ->(obj) { [:status_history, obj['statusHistory']] }, - 'clusterUuid' => ->(obj) { [:cluster_uuid, obj['clusterUuid']] }, - 'metrics' => ->(obj) { [:metrics, obj['metrics']] }, + "clusterName" => ->(obj) { [:cluster_name, obj["clusterName"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "config" => ->(obj) { [:config, GoogleInSpec::Dataproc::Property::ClusterConfig.new(obj["config"], to_s)] }, + "region" => ->(obj) { [:region, obj["region"]] }, + "projectId" => ->(obj) { [:project_id, obj["projectId"]] }, + "virtualClusterConfig" => ->(obj) { [:virtual_cluster_config, obj["virtualClusterConfig"]] }, + "status" => ->(obj) { [:status, obj["status"]] }, + "statusHistory" => ->(obj) { [:status_history, obj["statusHistory"]] }, + "clusterUuid" => ->(obj) { [:cluster_uuid, obj["clusterUuid"]] }, + "metrics" => ->(obj) { [:metrics, obj["metrics"]] }, } end @@ -89,13 +89,13 @@ def transformers def product_url(beta = false) if beta - 'https://dataproc.googleapis.com/v1beta2/' + "https://dataproc.googleapis.com/v1beta2/" else - 'https://dataproc.googleapis.com/v1/' + "https://dataproc.googleapis.com/v1/" end end def resource_base_url - 'projects/{{project}}/regions/{{region}}/clusters' + "projects/{{project}}/regions/{{region}}/clusters" end end diff --git a/libraries/google_dlp_dt.rb b/libraries/google_dlp_dt.rb index 56571cd7f..37b1a71e9 100644 --- a/libraries/google_dlp_dt.rb +++ b/libraries/google_dlp_dt.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/dlp/property/dt_config' -require 'google/dlp/property/dt_config_info_type_tf' -require 'google/dlp/property/dt_config_info_type_tf_tf' +require "gcp_backend" +require "google/dlp/property/dt_config" +require "google/dlp/property/dt_config_info_type_tf" +require "google/dlp/property/dt_config_info_type_tf_tf" # A provider to manage Dlp resources. class DLPDT < GcpResourceBase - name 'google_dlp_dt' - desc 'DT' - supports platform: 'gcp' + name "google_dlp_dt" + desc "DT" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -34,16 +34,16 @@ class DLPDT < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @description = @fetched['description'] - @display_name = @fetched['displayName'] - @config = GoogleInSpec::DLP::Property::DTConfig.new(@fetched['config'], to_s) - @parent = @fetched['parent'] + @name = @fetched["name"] + @description = @fetched["description"] + @display_name = @fetched["displayName"] + @config = GoogleInSpec::DLP::Property::DTConfig.new(@fetched["config"], to_s) + @parent = @fetched["parent"] end def exists? @@ -57,10 +57,10 @@ def to_s private def product_url(_ = nil) - 'https://dlp.googleapis.com/v2/' + "https://dlp.googleapis.com/v2/" end def resource_base_url - '{{parent}}/deidentifyTemplates/{{name}}' + "{{parent}}/deidentifyTemplates/{{name}}" end end diff --git a/libraries/google_dlp_dts.rb b/libraries/google_dlp_dts.rb index a5a0516a1..42a75354d 100644 --- a/libraries/google_dlp_dts.rb +++ b/libraries/google_dlp_dts.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class DLPDTs < GcpResourceBase - name 'google_dlp_dts' - desc 'DT plural resource' - supports platform: 'gcp' + name "google_dlp_dts" + desc "DT plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class DLPDTs < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('dTs') + @table = fetch_wrapped_resource("dTs") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,21 +67,21 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'config' => ->(obj) { [:config, GoogleInSpec::DLP::Property::DTConfig.new(obj['config'], to_s)] }, - 'parent' => ->(obj) { [:parent, obj['parent']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "config" => ->(obj) { [:config, GoogleInSpec::DLP::Property::DTConfig.new(obj["config"], to_s)] }, + "parent" => ->(obj) { [:parent, obj["parent"]] }, } end private def product_url(_ = nil) - 'https://dlp.googleapis.com/v2/' + "https://dlp.googleapis.com/v2/" end def resource_base_url - '{{parent}}/deidentifyTemplates' + "{{parent}}/deidentifyTemplates" end end diff --git a/libraries/google_dlp_inspect_template.rb b/libraries/google_dlp_inspect_template.rb index 81943b88a..b09bacc8c 100644 --- a/libraries/google_dlp_inspect_template.rb +++ b/libraries/google_dlp_inspect_template.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,19 +13,19 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/dlp/property/inspecttemplate_inspect_config' -require 'google/dlp/property/inspecttemplate_inspect_config_custom_info_types' -require 'google/dlp/property/inspecttemplate_inspect_config_info_types' -require 'google/dlp/property/inspecttemplate_inspect_config_limits' -require 'google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type' -require 'google/dlp/property/inspecttemplate_inspect_config_rule_set' +require "gcp_backend" +require "google/dlp/property/inspecttemplate_inspect_config" +require "google/dlp/property/inspecttemplate_inspect_config_custom_info_types" +require "google/dlp/property/inspecttemplate_inspect_config_info_types" +require "google/dlp/property/inspecttemplate_inspect_config_limits" +require "google/dlp/property/inspecttemplate_inspect_config_limits_max_findings_per_info_type" +require "google/dlp/property/inspecttemplate_inspect_config_rule_set" # A provider to manage Dlp resources. class DLPInspectTemplate < GcpResourceBase - name 'google_dlp_inspect_template' - desc 'InspectTemplate' - supports platform: 'gcp' + name "google_dlp_inspect_template" + desc "InspectTemplate" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -37,16 +37,16 @@ class DLPInspectTemplate < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @description = @fetched['description'] - @display_name = @fetched['displayName'] - @inspect_config = GoogleInSpec::DLP::Property::InspectTemplateInspectConfig.new(@fetched['inspectConfig'], to_s) - @parent = @fetched['parent'] + @name = @fetched["name"] + @description = @fetched["description"] + @display_name = @fetched["displayName"] + @inspect_config = GoogleInSpec::DLP::Property::InspectTemplateInspectConfig.new(@fetched["inspectConfig"], to_s) + @parent = @fetched["parent"] end def exists? @@ -60,10 +60,10 @@ def to_s private def product_url(_ = nil) - 'https://dlp.googleapis.com/v2/' + "https://dlp.googleapis.com/v2/" end def resource_base_url - '{{parent}}/inspectTemplates/{{name}}' + "{{parent}}/inspectTemplates/{{name}}" end end diff --git a/libraries/google_dlp_inspect_templates.rb b/libraries/google_dlp_inspect_templates.rb index 15afb2ded..ed75f1a5f 100644 --- a/libraries/google_dlp_inspect_templates.rb +++ b/libraries/google_dlp_inspect_templates.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class DLPInspectTemplates < GcpResourceBase - name 'google_dlp_inspect_templates' - desc 'InspectTemplate plural resource' - supports platform: 'gcp' + name "google_dlp_inspect_templates" + desc "InspectTemplate plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class DLPInspectTemplates < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('inspectTemplates') + @table = fetch_wrapped_resource("inspectTemplates") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,21 +67,21 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'inspectConfig' => ->(obj) { [:inspect_config, GoogleInSpec::DLP::Property::InspectTemplateInspectConfig.new(obj['inspectConfig'], to_s)] }, - 'parent' => ->(obj) { [:parent, obj['parent']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "inspectConfig" => ->(obj) { [:inspect_config, GoogleInSpec::DLP::Property::InspectTemplateInspectConfig.new(obj["inspectConfig"], to_s)] }, + "parent" => ->(obj) { [:parent, obj["parent"]] }, } end private def product_url(_ = nil) - 'https://dlp.googleapis.com/v2/' + "https://dlp.googleapis.com/v2/" end def resource_base_url - '{{parent}}/inspectTemplates' + "{{parent}}/inspectTemplates" end end diff --git a/libraries/google_dlp_job.rb b/libraries/google_dlp_job.rb index 1ae570444..ab94d9d25 100644 --- a/libraries/google_dlp_job.rb +++ b/libraries/google_dlp_job.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/dlp/property/job_act_det' -require 'google/dlp/property/job_errors' +require "gcp_backend" +require "google/dlp/property/job_act_det" +require "google/dlp/property/job_errors" # A provider to manage Dlp resources. class DLPJob < GcpResourceBase - name 'google_dlp_job' - desc 'Job' - supports platform: 'gcp' + name "google_dlp_job" + desc "Job" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -40,23 +40,23 @@ class DLPJob < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @type = @fetched['type'] - @state = @fetched['state'] - @create_time = @fetched['createTime'] - @start_time = @fetched['startTime'] - @end_time = @fetched['endTime'] - @job_trigger_name = @fetched['jobTriggerName'] - @errors = GoogleInSpec::DLP::Property::JobErrorsArray.parse(@fetched['errors'], to_s) - @act_det = GoogleInSpec::DLP::Property::JobActDetArray.parse(@fetched['actDet'], to_s) - @risk_details = @fetched['riskDetails'] - @inspect_details = @fetched['inspectDetails'] - @parent = @fetched['parent'] + @name = @fetched["name"] + @type = @fetched["type"] + @state = @fetched["state"] + @create_time = @fetched["createTime"] + @start_time = @fetched["startTime"] + @end_time = @fetched["endTime"] + @job_trigger_name = @fetched["jobTriggerName"] + @errors = GoogleInSpec::DLP::Property::JobErrorsArray.parse(@fetched["errors"], to_s) + @act_det = GoogleInSpec::DLP::Property::JobActDetArray.parse(@fetched["actDet"], to_s) + @risk_details = @fetched["riskDetails"] + @inspect_details = @fetched["inspectDetails"] + @parent = @fetched["parent"] end def exists? @@ -70,10 +70,10 @@ def to_s private def product_url(_ = nil) - 'https://dlp.googleapis.com/v2/' + "https://dlp.googleapis.com/v2/" end def resource_base_url - '{{parent}}/dlpJobs/{{name}}' + "{{parent}}/dlpJobs/{{name}}" end end diff --git a/libraries/google_dlp_job_trigger.rb b/libraries/google_dlp_job_trigger.rb index b754daa7e..9a89a7674 100644 --- a/libraries/google_dlp_job_trigger.rb +++ b/libraries/google_dlp_job_trigger.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,27 +13,27 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/dlp/property/jobtrigger_inspect_job' -require 'google/dlp/property/jobtrigger_inspect_job_actions' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options_table_reference' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_kind' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_partition_id' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config' -require 'google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config_timestamp_field' -require 'google/dlp/property/jobtrigger_triggers' +require "gcp_backend" +require "google/dlp/property/jobtrigger_inspect_job" +require "google/dlp/property/jobtrigger_inspect_job_actions" +require "google/dlp/property/jobtrigger_inspect_job_storage_config" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_big_query_options_table_reference" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_cloud_storage_options_file_set_regex_file_set" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_kind" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_datastore_options_partition_id" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config" +require "google/dlp/property/jobtrigger_inspect_job_storage_config_timespan_config_timestamp_field" +require "google/dlp/property/jobtrigger_triggers" # A provider to manage Dlp resources. class DLPJobTrigger < GcpResourceBase - name 'google_dlp_job_trigger' - desc 'JobTrigger' - supports platform: 'gcp' + name "google_dlp_job_trigger" + desc "JobTrigger" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -48,19 +48,19 @@ class DLPJobTrigger < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @description = @fetched['description'] - @display_name = @fetched['displayName'] - @last_run_time = parse_time_string(@fetched['lastRunTime']) - @status = @fetched['status'] - @triggers = GoogleInSpec::DLP::Property::JobTriggerTriggersArray.parse(@fetched['triggers'], to_s) - @inspect_job = GoogleInSpec::DLP::Property::JobTriggerInspectJob.new(@fetched['inspectJob'], to_s) - @parent = @fetched['parent'] + @name = @fetched["name"] + @description = @fetched["description"] + @display_name = @fetched["displayName"] + @last_run_time = parse_time_string(@fetched["lastRunTime"]) + @status = @fetched["status"] + @triggers = GoogleInSpec::DLP::Property::JobTriggerTriggersArray.parse(@fetched["triggers"], to_s) + @inspect_job = GoogleInSpec::DLP::Property::JobTriggerInspectJob.new(@fetched["inspectJob"], to_s) + @parent = @fetched["parent"] end # Handles parsing RFC3339 time string @@ -79,10 +79,10 @@ def to_s private def product_url(_ = nil) - 'https://dlp.googleapis.com/v2/' + "https://dlp.googleapis.com/v2/" end def resource_base_url - '{{parent}}/jobTriggers/{{name}}' + "{{parent}}/jobTriggers/{{name}}" end end diff --git a/libraries/google_dlp_job_triggers.rb b/libraries/google_dlp_job_triggers.rb index 7e343a1ea..b81357152 100644 --- a/libraries/google_dlp_job_triggers.rb +++ b/libraries/google_dlp_job_triggers.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class DLPJobTriggers < GcpResourceBase - name 'google_dlp_job_triggers' - desc 'JobTrigger plural resource' - supports platform: 'gcp' + name "google_dlp_job_triggers" + desc "JobTrigger plural resource" + supports platform: "gcp" attr_reader :table @@ -37,12 +37,12 @@ class DLPJobTriggers < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('jobTriggers') + @table = fetch_wrapped_resource("jobTriggers") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'lastRunTime' => ->(obj) { [:last_run_time, parse_time_string(obj['lastRunTime'])] }, - 'status' => ->(obj) { [:status, obj['status']] }, - 'triggers' => ->(obj) { [:triggers, GoogleInSpec::DLP::Property::JobTriggerTriggersArray.parse(obj['triggers'], to_s)] }, - 'inspectJob' => ->(obj) { [:inspect_job, GoogleInSpec::DLP::Property::JobTriggerInspectJob.new(obj['inspectJob'], to_s)] }, - 'parent' => ->(obj) { [:parent, obj['parent']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "lastRunTime" => ->(obj) { [:last_run_time, parse_time_string(obj["lastRunTime"])] }, + "status" => ->(obj) { [:status, obj["status"]] }, + "triggers" => ->(obj) { [:triggers, GoogleInSpec::DLP::Property::JobTriggerTriggersArray.parse(obj["triggers"], to_s)] }, + "inspectJob" => ->(obj) { [:inspect_job, GoogleInSpec::DLP::Property::JobTriggerInspectJob.new(obj["inspectJob"], to_s)] }, + "parent" => ->(obj) { [:parent, obj["parent"]] }, } end @@ -89,10 +89,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://dlp.googleapis.com/v2/' + "https://dlp.googleapis.com/v2/" end def resource_base_url - '{{parent}}/jobTriggers' + "{{parent}}/jobTriggers" end end diff --git a/libraries/google_dlp_jobs.rb b/libraries/google_dlp_jobs.rb index 1b6ed3b44..ef97da2f3 100644 --- a/libraries/google_dlp_jobs.rb +++ b/libraries/google_dlp_jobs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class DLPJobs < GcpResourceBase - name 'google_dlp_jobs' - desc 'Job plural resource' - supports platform: 'gcp' + name "google_dlp_jobs" + desc "Job plural resource" + supports platform: "gcp" attr_reader :table @@ -41,12 +41,12 @@ class DLPJobs < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('jobs') + @table = fetch_wrapped_resource("jobs") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -74,28 +74,28 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'type' => ->(obj) { [:type, obj['type']] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, - 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, - 'jobTriggerName' => ->(obj) { [:job_trigger_name, obj['jobTriggerName']] }, - 'errors' => ->(obj) { [:errors, GoogleInSpec::DLP::Property::JobErrorsArray.parse(obj['errors'], to_s)] }, - 'actDet' => ->(obj) { [:act_det, GoogleInSpec::DLP::Property::JobActDetArray.parse(obj['actDet'], to_s)] }, - 'riskDetails' => ->(obj) { [:risk_details, obj['riskDetails']] }, - 'inspectDetails' => ->(obj) { [:inspect_details, obj['inspectDetails']] }, - 'parent' => ->(obj) { [:parent, obj['parent']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "type" => ->(obj) { [:type, obj["type"]] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "startTime" => ->(obj) { [:start_time, obj["startTime"]] }, + "endTime" => ->(obj) { [:end_time, obj["endTime"]] }, + "jobTriggerName" => ->(obj) { [:job_trigger_name, obj["jobTriggerName"]] }, + "errors" => ->(obj) { [:errors, GoogleInSpec::DLP::Property::JobErrorsArray.parse(obj["errors"], to_s)] }, + "actDet" => ->(obj) { [:act_det, GoogleInSpec::DLP::Property::JobActDetArray.parse(obj["actDet"], to_s)] }, + "riskDetails" => ->(obj) { [:risk_details, obj["riskDetails"]] }, + "inspectDetails" => ->(obj) { [:inspect_details, obj["inspectDetails"]] }, + "parent" => ->(obj) { [:parent, obj["parent"]] }, } end private def product_url(_ = nil) - 'https://dlp.googleapis.com/v2/' + "https://dlp.googleapis.com/v2/" end def resource_base_url - '{{parent}}/dlpJobs' + "{{parent}}/dlpJobs" end end diff --git a/libraries/google_dlp_stored_info_type.rb b/libraries/google_dlp_stored_info_type.rb index c7684a9d2..67a19eb4f 100644 --- a/libraries/google_dlp_stored_info_type.rb +++ b/libraries/google_dlp_stored_info_type.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,23 +13,23 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/dlp/property/storedinfotype_dictionary' -require 'google/dlp/property/storedinfotype_dictionary_cloud_storage_path' -require 'google/dlp/property/storedinfotype_dictionary_word_list' -require 'google/dlp/property/storedinfotype_large_custom_dictionary' -require 'google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field' -require 'google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_field' -require 'google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_table' -require 'google/dlp/property/storedinfotype_large_custom_dictionary_cloud_storage_file_set' -require 'google/dlp/property/storedinfotype_large_custom_dictionary_output_path' -require 'google/dlp/property/storedinfotype_regex' +require "gcp_backend" +require "google/dlp/property/storedinfotype_dictionary" +require "google/dlp/property/storedinfotype_dictionary_cloud_storage_path" +require "google/dlp/property/storedinfotype_dictionary_word_list" +require "google/dlp/property/storedinfotype_large_custom_dictionary" +require "google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field" +require "google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_field" +require "google/dlp/property/storedinfotype_large_custom_dictionary_big_query_field_table" +require "google/dlp/property/storedinfotype_large_custom_dictionary_cloud_storage_file_set" +require "google/dlp/property/storedinfotype_large_custom_dictionary_output_path" +require "google/dlp/property/storedinfotype_regex" # A provider to manage Dlp resources. class DLPStoredInfoType < GcpResourceBase - name 'google_dlp_stored_info_type' - desc 'StoredInfoType' - supports platform: 'gcp' + name "google_dlp_stored_info_type" + desc "StoredInfoType" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -43,18 +43,18 @@ class DLPStoredInfoType < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @description = @fetched['description'] - @display_name = @fetched['displayName'] - @regex = GoogleInSpec::DLP::Property::StoredInfoTypeRegex.new(@fetched['regex'], to_s) - @dictionary = GoogleInSpec::DLP::Property::StoredInfoTypeDictionary.new(@fetched['dictionary'], to_s) - @large_custom_dictionary = GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionary.new(@fetched['largeCustomDictionary'], to_s) - @parent = @fetched['parent'] + @name = @fetched["name"] + @description = @fetched["description"] + @display_name = @fetched["displayName"] + @regex = GoogleInSpec::DLP::Property::StoredInfoTypeRegex.new(@fetched["regex"], to_s) + @dictionary = GoogleInSpec::DLP::Property::StoredInfoTypeDictionary.new(@fetched["dictionary"], to_s) + @large_custom_dictionary = GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionary.new(@fetched["largeCustomDictionary"], to_s) + @parent = @fetched["parent"] end def exists? @@ -68,10 +68,10 @@ def to_s private def product_url(_ = nil) - 'https://dlp.googleapis.com/v2/' + "https://dlp.googleapis.com/v2/" end def resource_base_url - '{{parent}}/storedInfoTypes/{{name}}' + "{{parent}}/storedInfoTypes/{{name}}" end end diff --git a/libraries/google_dlp_stored_info_types.rb b/libraries/google_dlp_stored_info_types.rb index d6f6d3008..0bf5c8c2c 100644 --- a/libraries/google_dlp_stored_info_types.rb +++ b/libraries/google_dlp_stored_info_types.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class DLPStoredInfoTypes < GcpResourceBase - name 'google_dlp_stored_info_types' - desc 'StoredInfoType plural resource' - supports platform: 'gcp' + name "google_dlp_stored_info_types" + desc "StoredInfoType plural resource" + supports platform: "gcp" attr_reader :table @@ -36,12 +36,12 @@ class DLPStoredInfoTypes < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('storedInfoTypes') + @table = fetch_wrapped_resource("storedInfoTypes") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -69,23 +69,23 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'regex' => ->(obj) { [:regex, GoogleInSpec::DLP::Property::StoredInfoTypeRegex.new(obj['regex'], to_s)] }, - 'dictionary' => ->(obj) { [:dictionary, GoogleInSpec::DLP::Property::StoredInfoTypeDictionary.new(obj['dictionary'], to_s)] }, - 'largeCustomDictionary' => ->(obj) { [:large_custom_dictionary, GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionary.new(obj['largeCustomDictionary'], to_s)] }, - 'parent' => ->(obj) { [:parent, obj['parent']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "regex" => ->(obj) { [:regex, GoogleInSpec::DLP::Property::StoredInfoTypeRegex.new(obj["regex"], to_s)] }, + "dictionary" => ->(obj) { [:dictionary, GoogleInSpec::DLP::Property::StoredInfoTypeDictionary.new(obj["dictionary"], to_s)] }, + "largeCustomDictionary" => ->(obj) { [:large_custom_dictionary, GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionary.new(obj["largeCustomDictionary"], to_s)] }, + "parent" => ->(obj) { [:parent, obj["parent"]] }, } end private def product_url(_ = nil) - 'https://dlp.googleapis.com/v2/' + "https://dlp.googleapis.com/v2/" end def resource_base_url - '{{parent}}/storedInfoTypes' + "{{parent}}/storedInfoTypes" end end diff --git a/libraries/google_dns_managed_zone.rb b/libraries/google_dns_managed_zone.rb index b85653ee9..504d8f184 100644 --- a/libraries/google_dns_managed_zone.rb +++ b/libraries/google_dns_managed_zone.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,23 +13,23 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/dns/property/managedzone_dnssec_config' -require 'google/dns/property/managedzone_dnssec_config_default_key_specs' -require 'google/dns/property/managedzone_forwarding_config' -require 'google/dns/property/managedzone_forwarding_config_target_name_servers' -require 'google/dns/property/managedzone_peering_config' -require 'google/dns/property/managedzone_peering_config_target_network' -require 'google/dns/property/managedzone_private_visibility_config' -require 'google/dns/property/managedzone_private_visibility_config_networks' -require 'google/dns/property/managedzone_service_directory_config' -require 'google/dns/property/managedzone_service_directory_config_namespace' +require "gcp_backend" +require "google/dns/property/managedzone_dnssec_config" +require "google/dns/property/managedzone_dnssec_config_default_key_specs" +require "google/dns/property/managedzone_forwarding_config" +require "google/dns/property/managedzone_forwarding_config_target_name_servers" +require "google/dns/property/managedzone_peering_config" +require "google/dns/property/managedzone_peering_config_target_network" +require "google/dns/property/managedzone_private_visibility_config" +require "google/dns/property/managedzone_private_visibility_config_networks" +require "google/dns/property/managedzone_service_directory_config" +require "google/dns/property/managedzone_service_directory_config_namespace" # A provider to manage Cloud DNS resources. class DNSManagedZone < GcpResourceBase - name 'google_dns_managed_zone' - desc 'ManagedZone' - supports platform: 'gcp' + name "google_dns_managed_zone" + desc "ManagedZone" + supports platform: "gcp" attr_reader :params attr_reader :description @@ -51,26 +51,26 @@ class DNSManagedZone < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @description = @fetched['description'] - @dns_name = @fetched['dnsName'] - @dnssec_config = GoogleInSpec::DNS::Property::ManagedZoneDnssecConfig.new(@fetched['dnssecConfig'], to_s) - @id = @fetched['id'] - @name = @fetched['name'] - @name_servers = @fetched['nameServers'] - @name_server_set = @fetched['nameServerSet'] - @creation_time = parse_time_string(@fetched['creationTime']) - @labels = @fetched['labels'] - @visibility = @fetched['visibility'] - @private_visibility_config = GoogleInSpec::DNS::Property::ManagedZonePrivateVisibilityConfig.new(@fetched['privateVisibilityConfig'], to_s) - @forwarding_config = GoogleInSpec::DNS::Property::ManagedZoneForwardingConfig.new(@fetched['forwardingConfig'], to_s) - @peering_config = GoogleInSpec::DNS::Property::ManagedZonePeeringConfig.new(@fetched['peeringConfig'], to_s) - @reverse_lookup = @fetched['reverseLookupConfig'] - @service_directory_config = GoogleInSpec::DNS::Property::ManagedZoneServiceDirectoryConfig.new(@fetched['serviceDirectoryConfig'], to_s) + @description = @fetched["description"] + @dns_name = @fetched["dnsName"] + @dnssec_config = GoogleInSpec::DNS::Property::ManagedZoneDnssecConfig.new(@fetched["dnssecConfig"], to_s) + @id = @fetched["id"] + @name = @fetched["name"] + @name_servers = @fetched["nameServers"] + @name_server_set = @fetched["nameServerSet"] + @creation_time = parse_time_string(@fetched["creationTime"]) + @labels = @fetched["labels"] + @visibility = @fetched["visibility"] + @private_visibility_config = GoogleInSpec::DNS::Property::ManagedZonePrivateVisibilityConfig.new(@fetched["privateVisibilityConfig"], to_s) + @forwarding_config = GoogleInSpec::DNS::Property::ManagedZoneForwardingConfig.new(@fetched["forwardingConfig"], to_s) + @peering_config = GoogleInSpec::DNS::Property::ManagedZonePeeringConfig.new(@fetched["peeringConfig"], to_s) + @reverse_lookup = @fetched["reverseLookupConfig"] + @service_directory_config = GoogleInSpec::DNS::Property::ManagedZoneServiceDirectoryConfig.new(@fetched["serviceDirectoryConfig"], to_s) end # Handles parsing RFC3339 time string @@ -89,14 +89,14 @@ def to_s def key_signing_key_algorithm specs = @dnssec_config&.default_key_specs specs.each do |spec| - return spec.algorithm if spec.key_type == 'keySigning' + return spec.algorithm if spec.key_type == "keySigning" end end def zone_signing_key_algorithm specs = @dnssec_config&.default_key_specs specs.each do |spec| - return spec.algorithm if spec.key_type == 'zoneSigning' + return spec.algorithm if spec.key_type == "zoneSigning" end end @@ -104,13 +104,13 @@ def zone_signing_key_algorithm def product_url(beta = false) if beta - 'https://dns.googleapis.com/dns/v1beta2/' + "https://dns.googleapis.com/dns/v1beta2/" else - 'https://dns.googleapis.com/dns/v1/' + "https://dns.googleapis.com/dns/v1/" end end def resource_base_url - 'projects/{{project}}/managedZones/{{zone}}' + "projects/{{project}}/managedZones/{{zone}}" end end diff --git a/libraries/google_dns_managed_zones.rb b/libraries/google_dns_managed_zones.rb index cab456ed3..0b0059bb8 100644 --- a/libraries/google_dns_managed_zones.rb +++ b/libraries/google_dns_managed_zones.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class DNSManagedZones < GcpResourceBase - name 'google_dns_managed_zones' - desc 'ManagedZone plural resource' - supports platform: 'gcp' + name "google_dns_managed_zones" + desc "ManagedZone plural resource" + supports platform: "gcp" attr_reader :table @@ -45,12 +45,12 @@ class DNSManagedZones < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('managedZones') + @table = fetch_wrapped_resource("managedZones") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -63,7 +63,7 @@ def fetch_wrapped_resource(wrap_path) name, value = transform(key, hash) hash_with_symbols[name] = value end - hash_with_symbols[:dnssec_config_state] = hash.dig('dnssecConfig', 'state')&.downcase == 'on' + hash_with_symbols[:dnssec_config_state] = hash.dig("dnssecConfig", "state")&.downcase == "on" converted.push(hash_with_symbols) end end @@ -79,21 +79,21 @@ def transform(key, value) def transformers { - 'description' => ->(obj) { [:description, obj['description']] }, - 'dnsName' => ->(obj) { [:zone_dns_name, obj['dnsName']] }, - 'dnssecConfig' => ->(obj) { [:dnssec_config, GoogleInSpec::DNS::Property::ManagedZoneDnssecConfig.new(obj['dnssecConfig'], to_s)] }, - 'id' => ->(obj) { [:zone_id, obj['id']] }, - 'name' => ->(obj) { [:zone_name, obj['name']] }, - 'nameServers' => ->(obj) { [:name_servers, obj['nameServers']] }, - 'nameServerSet' => ->(obj) { [:name_server_set, obj['nameServerSet']] }, - 'creationTime' => ->(obj) { [:creation_time, parse_time_string(obj['creationTime'])] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'visibility' => ->(obj) { [:visibility, obj['visibility']] }, - 'privateVisibilityConfig' => ->(obj) { [:private_visibility_config, GoogleInSpec::DNS::Property::ManagedZonePrivateVisibilityConfig.new(obj['privateVisibilityConfig'], to_s)] }, - 'forwardingConfig' => ->(obj) { [:forwarding_config, GoogleInSpec::DNS::Property::ManagedZoneForwardingConfig.new(obj['forwardingConfig'], to_s)] }, - 'peeringConfig' => ->(obj) { [:peering_config, GoogleInSpec::DNS::Property::ManagedZonePeeringConfig.new(obj['peeringConfig'], to_s)] }, - 'reverseLookupConfig' => ->(obj) { [:reverse_lookup, obj['reverseLookupConfig']] }, - 'serviceDirectoryConfig' => ->(obj) { [:service_directory_config, GoogleInSpec::DNS::Property::ManagedZoneServiceDirectoryConfig.new(obj['serviceDirectoryConfig'], to_s)] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "dnsName" => ->(obj) { [:zone_dns_name, obj["dnsName"]] }, + "dnssecConfig" => ->(obj) { [:dnssec_config, GoogleInSpec::DNS::Property::ManagedZoneDnssecConfig.new(obj["dnssecConfig"], to_s)] }, + "id" => ->(obj) { [:zone_id, obj["id"]] }, + "name" => ->(obj) { [:zone_name, obj["name"]] }, + "nameServers" => ->(obj) { [:name_servers, obj["nameServers"]] }, + "nameServerSet" => ->(obj) { [:name_server_set, obj["nameServerSet"]] }, + "creationTime" => ->(obj) { [:creation_time, parse_time_string(obj["creationTime"])] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "visibility" => ->(obj) { [:visibility, obj["visibility"]] }, + "privateVisibilityConfig" => ->(obj) { [:private_visibility_config, GoogleInSpec::DNS::Property::ManagedZonePrivateVisibilityConfig.new(obj["privateVisibilityConfig"], to_s)] }, + "forwardingConfig" => ->(obj) { [:forwarding_config, GoogleInSpec::DNS::Property::ManagedZoneForwardingConfig.new(obj["forwardingConfig"], to_s)] }, + "peeringConfig" => ->(obj) { [:peering_config, GoogleInSpec::DNS::Property::ManagedZonePeeringConfig.new(obj["peeringConfig"], to_s)] }, + "reverseLookupConfig" => ->(obj) { [:reverse_lookup, obj["reverseLookupConfig"]] }, + "serviceDirectoryConfig" => ->(obj) { [:service_directory_config, GoogleInSpec::DNS::Property::ManagedZoneServiceDirectoryConfig.new(obj["serviceDirectoryConfig"], to_s)] }, } end @@ -106,13 +106,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://dns.googleapis.com/dns/v1beta2/' + "https://dns.googleapis.com/dns/v1beta2/" else - 'https://dns.googleapis.com/dns/v1/' + "https://dns.googleapis.com/dns/v1/" end end def resource_base_url - 'projects/{{project}}/managedZones' + "projects/{{project}}/managedZones" end end diff --git a/libraries/google_dns_resource_record_set.rb b/libraries/google_dns_resource_record_set.rb index 35ae2ce6b..65f87bd3b 100644 --- a/libraries/google_dns_resource_record_set.rb +++ b/libraries/google_dns_resource_record_set.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud DNS resources. class DNSResourceRecordSet < GcpResourceBase - name 'google_dns_resource_record_set' - desc 'ResourceRecordSet' - supports platform: 'gcp' + name "google_dns_resource_record_set" + desc "ResourceRecordSet" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -31,7 +31,7 @@ class DNSResourceRecordSet < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") @fetched = unwrap(fetched, params) parse unless @fetched.nil? end @@ -41,7 +41,7 @@ def identity end def collection_item - 'rrsets' + "rrsets" end def unwrap(fetched, params) @@ -49,11 +49,11 @@ def unwrap(fetched, params) end def parse - @name = @fetched['name'] - @type = @fetched['type'] - @ttl = @fetched['ttl'] - @target = @fetched['rrdatas'] - @managed_zone = @fetched['managed_zone'] + @name = @fetched["name"] + @type = @fetched["type"] + @ttl = @fetched["ttl"] + @target = @fetched["rrdatas"] + @managed_zone = @fetched["managed_zone"] end def exists? @@ -68,13 +68,13 @@ def to_s def product_url(beta = false) if beta - 'https://dns.googleapis.com/dns/v1beta2/' + "https://dns.googleapis.com/dns/v1beta2/" else - 'https://dns.googleapis.com/dns/v1/' + "https://dns.googleapis.com/dns/v1/" end end def resource_base_url - 'projects/{{project}}/managedZones/{{managed_zone}}/rrsets?name={{name}}&type={{type}}' + "projects/{{project}}/managedZones/{{managed_zone}}/rrsets?name={{name}}&type={{type}}" end end diff --git a/libraries/google_dns_resource_record_sets.rb b/libraries/google_dns_resource_record_sets.rb index a046571f3..9357ca352 100644 --- a/libraries/google_dns_resource_record_sets.rb +++ b/libraries/google_dns_resource_record_sets.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class DNSResourceRecordSets < GcpResourceBase - name 'google_dns_resource_record_sets' - desc 'ResourceRecordSet plural resource' - supports platform: 'gcp' + name "google_dns_resource_record_sets" + desc "ResourceRecordSet plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class DNSResourceRecordSets < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('rrsets') + @table = fetch_wrapped_resource("rrsets") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'type' => ->(obj) { [:type, obj['type']] }, - 'ttl' => ->(obj) { [:ttl, obj['ttl']] }, - 'rrdatas' => ->(obj) { [:target, obj['rrdatas']] }, - 'managed_zone' => ->(obj) { [:managed_zone, obj['managed_zone']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "type" => ->(obj) { [:type, obj["type"]] }, + "ttl" => ->(obj) { [:ttl, obj["ttl"]] }, + "rrdatas" => ->(obj) { [:target, obj["rrdatas"]] }, + "managed_zone" => ->(obj) { [:managed_zone, obj["managed_zone"]] }, } end @@ -79,13 +79,13 @@ def transformers def product_url(beta = false) if beta - 'https://dns.googleapis.com/dns/v1beta2/' + "https://dns.googleapis.com/dns/v1beta2/" else - 'https://dns.googleapis.com/dns/v1/' + "https://dns.googleapis.com/dns/v1/" end end def resource_base_url - 'projects/{{project}}/managedZones/{{managed_zone}}/rrsets' + "projects/{{project}}/managedZones/{{managed_zone}}/rrsets" end end diff --git a/libraries/google_filestore_instance.rb b/libraries/google_filestore_instance.rb index ab1cc923f..7ee84a5b2 100644 --- a/libraries/google_filestore_instance.rb +++ b/libraries/google_filestore_instance.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/filestore/property/instance_file_shares' -require 'google/filestore/property/instance_networks' +require "gcp_backend" +require "google/filestore/property/instance_file_shares" +require "google/filestore/property/instance_networks" # A provider to manage Filestore resources. class FilestoreInstance < GcpResourceBase - name 'google_filestore_instance' - desc 'Instance' - supports platform: 'gcp' + name "google_filestore_instance" + desc "Instance" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -37,20 +37,20 @@ class FilestoreInstance < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @description = @fetched['description'] - @create_time = parse_time_string(@fetched['createTime']) - @tier = @fetched['tier'] - @labels = @fetched['labels'] - @file_shares = GoogleInSpec::Filestore::Property::InstanceFileSharesArray.parse(@fetched['fileShares'], to_s) - @networks = GoogleInSpec::Filestore::Property::InstanceNetworksArray.parse(@fetched['networks'], to_s) - @etag = @fetched['etag'] - @zone = @fetched['zone'] + @name = @fetched["name"] + @description = @fetched["description"] + @create_time = parse_time_string(@fetched["createTime"]) + @tier = @fetched["tier"] + @labels = @fetched["labels"] + @file_shares = GoogleInSpec::Filestore::Property::InstanceFileSharesArray.parse(@fetched["fileShares"], to_s) + @networks = GoogleInSpec::Filestore::Property::InstanceNetworksArray.parse(@fetched["networks"], to_s) + @etag = @fetched["etag"] + @zone = @fetched["zone"] end # Handles parsing RFC3339 time string @@ -70,13 +70,13 @@ def to_s def product_url(beta = false) if beta - 'https://file.googleapis.com/v1beta1/' + "https://file.googleapis.com/v1beta1/" else - 'https://file.googleapis.com/v1/' + "https://file.googleapis.com/v1/" end end def resource_base_url - 'projects/{{project}}/locations/{{zone}}/instances/{{name}}' + "projects/{{project}}/locations/{{zone}}/instances/{{name}}" end end diff --git a/libraries/google_filestore_instances.rb b/libraries/google_filestore_instances.rb index 79f14ff7a..b650b574e 100644 --- a/libraries/google_filestore_instances.rb +++ b/libraries/google_filestore_instances.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class FilestoreInstances < GcpResourceBase - name 'google_filestore_instances' - desc 'Instance plural resource' - supports platform: 'gcp' + name "google_filestore_instances" + desc "Instance plural resource" + supports platform: "gcp" attr_reader :table @@ -38,12 +38,12 @@ class FilestoreInstances < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('instances') + @table = fetch_wrapped_resource("instances") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'tier' => ->(obj) { [:tier, obj['tier']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'fileShares' => ->(obj) { [:file_shares, GoogleInSpec::Filestore::Property::InstanceFileSharesArray.parse(obj['fileShares'], to_s)] }, - 'networks' => ->(obj) { [:networks, GoogleInSpec::Filestore::Property::InstanceNetworksArray.parse(obj['networks'], to_s)] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'zone' => ->(obj) { [:zone, obj['zone']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "tier" => ->(obj) { [:tier, obj["tier"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "fileShares" => ->(obj) { [:file_shares, GoogleInSpec::Filestore::Property::InstanceFileSharesArray.parse(obj["fileShares"], to_s)] }, + "networks" => ->(obj) { [:networks, GoogleInSpec::Filestore::Property::InstanceNetworksArray.parse(obj["networks"], to_s)] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "zone" => ->(obj) { [:zone, obj["zone"]] }, } end @@ -92,13 +92,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://file.googleapis.com/v1beta1/' + "https://file.googleapis.com/v1beta1/" else - 'https://file.googleapis.com/v1/' + "https://file.googleapis.com/v1/" end end def resource_base_url - 'projects/{{project}}/locations/{{zone}}/instances' + "projects/{{project}}/locations/{{zone}}/instances" end end diff --git a/libraries/google_iam_organization_custom_role.rb b/libraries/google_iam_organization_custom_role.rb index bcfaa0f59..45b8234c5 100644 --- a/libraries/google_iam_organization_custom_role.rb +++ b/libraries/google_iam_organization_custom_role.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud IAM resources. class IAMOrganizationCustomRole < GcpResourceBase - name 'google_iam_organization_custom_role' - desc 'OrganizationCustomRole' - supports platform: 'gcp' + name "google_iam_organization_custom_role" + desc "OrganizationCustomRole" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -32,17 +32,17 @@ class IAMOrganizationCustomRole < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @title = @fetched['title'] - @description = @fetched['description'] - @included_permissions = @fetched['includedPermissions'] - @stage = @fetched['stage'] - @deleted = @fetched['deleted'] + @name = @fetched["name"] + @title = @fetched["title"] + @description = @fetched["description"] + @included_permissions = @fetched["includedPermissions"] + @stage = @fetched["stage"] + @deleted = @fetched["deleted"] end def exists? @@ -56,10 +56,10 @@ def to_s private def product_url(_ = nil) - 'https://iam.googleapis.com/v1/' + "https://iam.googleapis.com/v1/" end def resource_base_url - 'organizations/{{org_id}}/roles/{{name}}' + "organizations/{{org_id}}/roles/{{name}}" end end diff --git a/libraries/google_iam_organization_custom_roles.rb b/libraries/google_iam_organization_custom_roles.rb index 3fbcf3365..9d833d9e1 100644 --- a/libraries/google_iam_organization_custom_roles.rb +++ b/libraries/google_iam_organization_custom_roles.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class IAMOrganizationCustomRoles < GcpResourceBase - name 'google_iam_organization_custom_roles' - desc 'OrganizationCustomRole plural resource' - supports platform: 'gcp' + name "google_iam_organization_custom_roles" + desc "OrganizationCustomRole plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class IAMOrganizationCustomRoles < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('roles') + @table = fetch_wrapped_resource("roles") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,22 +68,22 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'title' => ->(obj) { [:title, obj['title']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'includedPermissions' => ->(obj) { [:included_permissions, obj['includedPermissions']] }, - 'stage' => ->(obj) { [:stage, obj['stage']] }, - 'deleted' => ->(obj) { [:deleted, obj['deleted']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "title" => ->(obj) { [:title, obj["title"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "includedPermissions" => ->(obj) { [:included_permissions, obj["includedPermissions"]] }, + "stage" => ->(obj) { [:stage, obj["stage"]] }, + "deleted" => ->(obj) { [:deleted, obj["deleted"]] }, } end private def product_url(_ = nil) - 'https://iam.googleapis.com/v1/' + "https://iam.googleapis.com/v1/" end def resource_base_url - 'organizations/{{org_id}}/roles?view=FULL' + "organizations/{{org_id}}/roles?view=FULL" end end diff --git a/libraries/google_kms_crypto_key.rb b/libraries/google_kms_crypto_key.rb index e836ec8e7..7d5b65b1b 100644 --- a/libraries/google_kms_crypto_key.rb +++ b/libraries/google_kms_crypto_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/kms/property/cryptokey_version_template' +require "gcp_backend" +require "google/kms/property/cryptokey_version_template" # A provider to manage Cloud Key Management Service resources. class KMSCryptoKey < GcpResourceBase - name 'google_kms_crypto_key' - desc 'CryptoKey' - supports platform: 'gcp' + name "google_kms_crypto_key" + desc "CryptoKey" + supports platform: "gcp" attr_reader :params attr_reader :crypto_key_name @@ -36,20 +36,20 @@ class KMSCryptoKey < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @crypto_key_name = name_from_self_link(@fetched['name']) - @create_time = parse_time_string(@fetched['createTime']) - @labels = @fetched['labels'] - @purpose = @fetched['purpose'] - @rotation_period = @fetched['rotationPeriod'] - @version_template = GoogleInSpec::KMS::Property::CryptoKeyVersionTemplate.new(@fetched['versionTemplate'], to_s) - @next_rotation_time = parse_time_string(@fetched['nextRotationTime']) - @key_ring = @fetched['keyRing'] - @skip_initial_version_creation = @fetched['skipInitialVersionCreation'] + @crypto_key_name = name_from_self_link(@fetched["name"]) + @create_time = parse_time_string(@fetched["createTime"]) + @labels = @fetched["labels"] + @purpose = @fetched["purpose"] + @rotation_period = @fetched["rotationPeriod"] + @version_template = GoogleInSpec::KMS::Property::CryptoKeyVersionTemplate.new(@fetched["versionTemplate"], to_s) + @next_rotation_time = parse_time_string(@fetched["nextRotationTime"]) + @key_ring = @fetched["keyRing"] + @skip_initial_version_creation = @fetched["skipInitialVersionCreation"] end # Handles parsing RFC3339 time string @@ -67,16 +67,16 @@ def to_s def primary_state return if @fetched.nil? || @fetched.empty? - @fetched.dig('primary', 'state') + @fetched.dig("primary", "state") end private def product_url(_ = nil) - 'https://cloudkms.googleapis.com/v1/' + "https://cloudkms.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/keyRings/{{key_ring_name}}/cryptoKeys/{{name}}' + "projects/{{project}}/locations/{{location}}/keyRings/{{key_ring_name}}/cryptoKeys/{{name}}" end end diff --git a/libraries/google_kms_crypto_key_iam_binding.rb b/libraries/google_kms_crypto_key_iam_binding.rb index 876b28c0e..e2619cfe3 100644 --- a/libraries/google_kms_crypto_key_iam_binding.rb +++ b/libraries/google_kms_crypto_key_iam_binding.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_bindings" # A provider to manage Cloud Key Management Service IAM Binding resources. class CryptoKeyIamBinding < GcpResourceBase - name 'google_kms_crypto_key_iam_binding' - desc 'CryptoKey Iam Binding' - supports platform: 'gcp' + name "google_kms_crypto_key_iam_binding" + desc "CryptoKey Iam Binding" + supports platform: "gcp" attr_reader :params @@ -30,12 +30,12 @@ def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] @@ -75,10 +75,10 @@ def to_s private def product_url - 'https://cloudkms.googleapis.com/v1/' + "https://cloudkms.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/keyRings/{{key_ring_name}}/cryptoKeys/{{crypto_key_name}}:getIamPolicy' + "projects/{{project}}/locations/{{location}}/keyRings/{{key_ring_name}}/cryptoKeys/{{crypto_key_name}}:getIamPolicy" end end diff --git a/libraries/google_kms_crypto_key_iam_bindings.rb b/libraries/google_kms_crypto_key_iam_bindings.rb index d7abb480e..0819fefd0 100644 --- a/libraries/google_kms_crypto_key_iam_bindings.rb +++ b/libraries/google_kms_crypto_key_iam_bindings.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleKMSCryptoKeyIAMBindings < GcpResourceBase - name 'google_kms_crypto_key_iam_bindings' - desc 'Verifies settings for GCP KMS Crypto Key IAM Bindings in bulk' + name "google_kms_crypto_key_iam_bindings" + desc "Verifies settings for GCP KMS Crypto Key IAM Bindings in bulk" example " describe google_kms_key_ring_iam_bindings(crypto_key_url: 'projects/project/locations/europe-west2/keyRings/key-ring/cryptoKeys/key-name') do diff --git a/libraries/google_kms_crypto_key_iam_policy.rb b/libraries/google_kms_crypto_key_iam_policy.rb index 15ca2984e..4b0f437b3 100644 --- a/libraries/google_kms_crypto_key_iam_policy.rb +++ b/libraries/google_kms_crypto_key_iam_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_audit_configs' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_audit_configs" +require "google/iam/property/iam_policy_bindings" # A provider to manage Cloud Key Management Service IAM Policy resources. class CryptoKeyIamPolicy < GcpResourceBase - name 'google_kms_crypto_key_iam_policy' - desc 'CryptoKey Iam Policy' - supports platform: 'gcp' + name "google_kms_crypto_key_iam_policy" + desc "CryptoKey Iam Policy" + supports platform: "gcp" attr_reader :params attr_reader :bindings @@ -30,13 +30,13 @@ class CryptoKeyIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) - @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) + @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched["auditConfigs"], to_s) end def exists? @@ -58,10 +58,10 @@ def count private def product_url - 'https://cloudkms.googleapis.com/v1/' + "https://cloudkms.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/keyRings/{{key_ring_name}}/cryptoKeys/{{crypto_key_name}}:getIamPolicy' + "projects/{{project}}/locations/{{location}}/keyRings/{{key_ring_name}}/cryptoKeys/{{crypto_key_name}}:getIamPolicy" end end diff --git a/libraries/google_kms_crypto_keys.rb b/libraries/google_kms_crypto_keys.rb index 913dccd43..33f529dae 100644 --- a/libraries/google_kms_crypto_keys.rb +++ b/libraries/google_kms_crypto_keys.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class KMSCryptoKeys < GcpResourceBase - name 'google_kms_crypto_keys' - desc 'CryptoKey plural resource' - supports platform: 'gcp' + name "google_kms_crypto_keys" + desc "CryptoKey plural resource" + supports platform: "gcp" attr_reader :table @@ -38,12 +38,12 @@ class KMSCryptoKeys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('cryptoKeys') + @table = fetch_wrapped_resource("cryptoKeys") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:crypto_key_name, name_from_self_link(obj['name'])] }, - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'purpose' => ->(obj) { [:purpose, obj['purpose']] }, - 'rotationPeriod' => ->(obj) { [:rotation_period, obj['rotationPeriod']] }, - 'versionTemplate' => ->(obj) { [:version_template, GoogleInSpec::KMS::Property::CryptoKeyVersionTemplate.new(obj['versionTemplate'], to_s)] }, - 'nextRotationTime' => ->(obj) { [:next_rotation_time, parse_time_string(obj['nextRotationTime'])] }, - 'keyRing' => ->(obj) { [:key_ring, obj['keyRing']] }, - 'skipInitialVersionCreation' => ->(obj) { [:skip_initial_version_creation, obj['skipInitialVersionCreation']] }, + "name" => ->(obj) { [:crypto_key_name, name_from_self_link(obj["name"])] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "purpose" => ->(obj) { [:purpose, obj["purpose"]] }, + "rotationPeriod" => ->(obj) { [:rotation_period, obj["rotationPeriod"]] }, + "versionTemplate" => ->(obj) { [:version_template, GoogleInSpec::KMS::Property::CryptoKeyVersionTemplate.new(obj["versionTemplate"], to_s)] }, + "nextRotationTime" => ->(obj) { [:next_rotation_time, parse_time_string(obj["nextRotationTime"])] }, + "keyRing" => ->(obj) { [:key_ring, obj["keyRing"]] }, + "skipInitialVersionCreation" => ->(obj) { [:skip_initial_version_creation, obj["skipInitialVersionCreation"]] }, } end @@ -91,10 +91,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://cloudkms.googleapis.com/v1/' + "https://cloudkms.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/keyRings/{{key_ring_name}}/cryptoKeys' + "projects/{{project}}/locations/{{location}}/keyRings/{{key_ring_name}}/cryptoKeys" end end diff --git a/libraries/google_kms_ekm_connection.rb b/libraries/google_kms_ekm_connection.rb index f1ce577a8..fe64c7a1f 100644 --- a/libraries/google_kms_ekm_connection.rb +++ b/libraries/google_kms_ekm_connection.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/kms/property/ekmconnection_service_resolvers' -require 'google/kms/property/ekmconnection_service_resolvers_server_certificates' +require "gcp_backend" +require "google/kms/property/ekmconnection_service_resolvers" +require "google/kms/property/ekmconnection_service_resolvers_server_certificates" # A provider to manage Cloud Key Management Service resources. class KMSEkmConnection < GcpResourceBase - name 'google_kms_ekm_connection' - desc 'EkmConnection' - supports platform: 'gcp' + name "google_kms_ekm_connection" + desc "EkmConnection" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -32,15 +32,15 @@ class KMSEkmConnection < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @create_time = parse_time_string(@fetched['createTime']) - @service_resolvers = GoogleInSpec::KMS::Property::EkmConnectionServiceResolvers.new(@fetched['serviceResolvers'], to_s) - @location = @fetched['location'] + @name = @fetched["name"] + @create_time = parse_time_string(@fetched["createTime"]) + @service_resolvers = GoogleInSpec::KMS::Property::EkmConnectionServiceResolvers.new(@fetched["serviceResolvers"], to_s) + @location = @fetched["location"] end # Handles parsing RFC3339 time string @@ -59,10 +59,10 @@ def to_s private def product_url(_ = nil) - 'https://cloudkms.googleapis.com/v1/' + "https://cloudkms.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/ekmConnections/{{name}}' + "projects/{{project}}/locations/{{location}}/ekmConnections/{{name}}" end end diff --git a/libraries/google_kms_ekm_connections.rb b/libraries/google_kms_ekm_connections.rb index fb8fae9bd..28b658851 100644 --- a/libraries/google_kms_ekm_connections.rb +++ b/libraries/google_kms_ekm_connections.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class KMSEkmConnections < GcpResourceBase - name 'google_kms_ekm_connections' - desc 'EkmConnection plural resource' - supports platform: 'gcp' + name "google_kms_ekm_connections" + desc "EkmConnection plural resource" + supports platform: "gcp" attr_reader :table @@ -33,12 +33,12 @@ class KMSEkmConnections < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('ekmConnections') + @table = fetch_wrapped_resource("ekmConnections") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -66,10 +66,10 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'serviceResolvers' => ->(obj) { [:service_resolvers, GoogleInSpec::KMS::Property::EkmConnectionServiceResolvers.new(obj['serviceResolvers'], to_s)] }, - 'location' => ->(obj) { [:location, obj['location']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "serviceResolvers" => ->(obj) { [:service_resolvers, GoogleInSpec::KMS::Property::EkmConnectionServiceResolvers.new(obj["serviceResolvers"], to_s)] }, + "location" => ->(obj) { [:location, obj["location"]] }, } end @@ -81,10 +81,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://cloudkms.googleapis.com/v1/' + "https://cloudkms.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/ekmConnections' + "projects/{{project}}/locations/{{location}}/ekmConnections" end end diff --git a/libraries/google_kms_key_ring.rb b/libraries/google_kms_key_ring.rb index da67552e3..2b4bd2a1d 100644 --- a/libraries/google_kms_key_ring.rb +++ b/libraries/google_kms_key_ring.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud Key Management Service resources. class KMSKeyRing < GcpResourceBase - name 'google_kms_key_ring' - desc 'KeyRing' - supports platform: 'gcp' + name "google_kms_key_ring" + desc "KeyRing" + supports platform: "gcp" attr_reader :params attr_reader :create_time @@ -29,14 +29,14 @@ class KMSKeyRing < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @create_time = parse_time_string(@fetched['createTime']) - @key_ring_url = @fetched['name'] - @location = @fetched['location'] + @create_time = parse_time_string(@fetched["createTime"]) + @key_ring_url = @fetched["name"] + @location = @fetched["location"] end # Handles parsing RFC3339 time string @@ -59,10 +59,10 @@ def key_ring_name private def product_url(_ = nil) - 'https://cloudkms.googleapis.com/v1/' + "https://cloudkms.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/keyRings/{{name}}' + "projects/{{project}}/locations/{{location}}/keyRings/{{name}}" end end diff --git a/libraries/google_kms_key_ring_iam_binding.rb b/libraries/google_kms_key_ring_iam_binding.rb index 5adc4e979..5c6a6f01f 100644 --- a/libraries/google_kms_key_ring_iam_binding.rb +++ b/libraries/google_kms_key_ring_iam_binding.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_bindings" # A provider to manage Cloud Key Management Service IAM Binding resources. class KeyRingIamBinding < GcpResourceBase - name 'google_kms_key_ring_iam_binding' - desc 'KeyRing Iam Binding' - supports platform: 'gcp' + name "google_kms_key_ring_iam_binding" + desc "KeyRing Iam Binding" + supports platform: "gcp" attr_reader :params @@ -30,12 +30,12 @@ def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] @@ -75,10 +75,10 @@ def to_s private def product_url - 'https://cloudkms.googleapis.com/v1/' + "https://cloudkms.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/keyRings/{{key_ring_name}}:getIamPolicy' + "projects/{{project}}/locations/{{location}}/keyRings/{{key_ring_name}}:getIamPolicy" end end diff --git a/libraries/google_kms_key_ring_iam_bindings.rb b/libraries/google_kms_key_ring_iam_bindings.rb index 6cd33244f..fcaa55655 100644 --- a/libraries/google_kms_key_ring_iam_bindings.rb +++ b/libraries/google_kms_key_ring_iam_bindings.rb @@ -1,13 +1,13 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'time' -require 'google/apis/cloudkms_v1' + +require "gcp_backend" +require "time" +require "google/apis/cloudkms_v1" module Inspec::Resources class GoogleKMSKeyRingIAMBindings < GcpResourceBase - name 'google_kms_key_ring_iam_bindings' - desc 'Verifies settings for GCP KMS key ring IAM bindings in bulk' + name "google_kms_key_ring_iam_bindings" + desc "Verifies settings for GCP KMS key ring IAM bindings in bulk" example " describe google_kms_key_ring_iam_bindings(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring') do diff --git a/libraries/google_kms_key_ring_iam_policy.rb b/libraries/google_kms_key_ring_iam_policy.rb index 58d9b2440..f41fa79db 100644 --- a/libraries/google_kms_key_ring_iam_policy.rb +++ b/libraries/google_kms_key_ring_iam_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_audit_configs' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_audit_configs" +require "google/iam/property/iam_policy_bindings" # A provider to manage Cloud Key Management Service IAM Policy resources. class KeyRingIamPolicy < GcpResourceBase - name 'google_kms_key_ring_iam_policy' - desc 'KeyRing Iam Policy' - supports platform: 'gcp' + name "google_kms_key_ring_iam_policy" + desc "KeyRing Iam Policy" + supports platform: "gcp" attr_reader :params attr_reader :bindings @@ -30,13 +30,13 @@ class KeyRingIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) - @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) + @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched["auditConfigs"], to_s) end def exists? @@ -58,10 +58,10 @@ def count private def product_url - 'https://cloudkms.googleapis.com/v1/' + "https://cloudkms.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/keyRings/{{key_ring_name}}:getIamPolicy' + "projects/{{project}}/locations/{{location}}/keyRings/{{key_ring_name}}:getIamPolicy" end end diff --git a/libraries/google_kms_key_ring_import_job.rb b/libraries/google_kms_key_ring_import_job.rb index 45147c497..28bcc6c41 100644 --- a/libraries/google_kms_key_ring_import_job.rb +++ b/libraries/google_kms_key_ring_import_job.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/kms/property/keyringimportjob_attestation' -require 'google/kms/property/keyringimportjob_public_key' +require "gcp_backend" +require "google/kms/property/keyringimportjob_attestation" +require "google/kms/property/keyringimportjob_public_key" # A provider to manage Cloud Key Management Service resources. class KMSKeyRingImportJob < GcpResourceBase - name 'google_kms_key_ring_import_job' - desc 'KeyRingImportJob' - supports platform: 'gcp' + name "google_kms_key_ring_import_job" + desc "KeyRingImportJob" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -40,23 +40,23 @@ class KMSKeyRingImportJob < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @import_method = @fetched['importMethod'] - @protection_level = @fetched['protectionLevel'] - @create_time = parse_time_string(@fetched['createTime']) - @generate_time = parse_time_string(@fetched['generateTime']) - @expire_time = parse_time_string(@fetched['expireTime']) - @expire_event_time = parse_time_string(@fetched['expireEventTime']) - @state = @fetched['state'] - @public_key = GoogleInSpec::KMS::Property::KeyRingImportJobPublicKey.new(@fetched['publicKey'], to_s) - @attestation = GoogleInSpec::KMS::Property::KeyRingImportJobAttestation.new(@fetched['attestation'], to_s) - @key_ring = @fetched['keyRing'] - @import_job_id = @fetched['importJobId'] + @name = @fetched["name"] + @import_method = @fetched["importMethod"] + @protection_level = @fetched["protectionLevel"] + @create_time = parse_time_string(@fetched["createTime"]) + @generate_time = parse_time_string(@fetched["generateTime"]) + @expire_time = parse_time_string(@fetched["expireTime"]) + @expire_event_time = parse_time_string(@fetched["expireEventTime"]) + @state = @fetched["state"] + @public_key = GoogleInSpec::KMS::Property::KeyRingImportJobPublicKey.new(@fetched["publicKey"], to_s) + @attestation = GoogleInSpec::KMS::Property::KeyRingImportJobAttestation.new(@fetched["attestation"], to_s) + @key_ring = @fetched["keyRing"] + @import_job_id = @fetched["importJobId"] end # Handles parsing RFC3339 time string @@ -75,10 +75,10 @@ def to_s private def product_url(_ = nil) - 'https://cloudkms.googleapis.com/v1/' + "https://cloudkms.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_kms_key_ring_import_jobs.rb b/libraries/google_kms_key_ring_import_jobs.rb index e5bb23c4e..5b9fdea75 100644 --- a/libraries/google_kms_key_ring_import_jobs.rb +++ b/libraries/google_kms_key_ring_import_jobs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class KMSKeyRingImportJobs < GcpResourceBase - name 'google_kms_key_ring_import_jobs' - desc 'KeyRingImportJob plural resource' - supports platform: 'gcp' + name "google_kms_key_ring_import_jobs" + desc "KeyRingImportJob plural resource" + supports platform: "gcp" attr_reader :table @@ -41,12 +41,12 @@ class KMSKeyRingImportJobs < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('keyRingImportJobs') + @table = fetch_wrapped_resource("keyRingImportJobs") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -74,18 +74,18 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'importMethod' => ->(obj) { [:import_method, obj['importMethod']] }, - 'protectionLevel' => ->(obj) { [:protection_level, obj['protectionLevel']] }, - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'generateTime' => ->(obj) { [:generate_time, parse_time_string(obj['generateTime'])] }, - 'expireTime' => ->(obj) { [:expire_time, parse_time_string(obj['expireTime'])] }, - 'expireEventTime' => ->(obj) { [:expire_event_time, parse_time_string(obj['expireEventTime'])] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'publicKey' => ->(obj) { [:public_key, GoogleInSpec::KMS::Property::KeyRingImportJobPublicKey.new(obj['publicKey'], to_s)] }, - 'attestation' => ->(obj) { [:attestation, GoogleInSpec::KMS::Property::KeyRingImportJobAttestation.new(obj['attestation'], to_s)] }, - 'keyRing' => ->(obj) { [:key_ring, obj['keyRing']] }, - 'importJobId' => ->(obj) { [:import_job_id, obj['importJobId']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "importMethod" => ->(obj) { [:import_method, obj["importMethod"]] }, + "protectionLevel" => ->(obj) { [:protection_level, obj["protectionLevel"]] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "generateTime" => ->(obj) { [:generate_time, parse_time_string(obj["generateTime"])] }, + "expireTime" => ->(obj) { [:expire_time, parse_time_string(obj["expireTime"])] }, + "expireEventTime" => ->(obj) { [:expire_event_time, parse_time_string(obj["expireEventTime"])] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "publicKey" => ->(obj) { [:public_key, GoogleInSpec::KMS::Property::KeyRingImportJobPublicKey.new(obj["publicKey"], to_s)] }, + "attestation" => ->(obj) { [:attestation, GoogleInSpec::KMS::Property::KeyRingImportJobAttestation.new(obj["attestation"], to_s)] }, + "keyRing" => ->(obj) { [:key_ring, obj["keyRing"]] }, + "importJobId" => ->(obj) { [:import_job_id, obj["importJobId"]] }, } end @@ -97,10 +97,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://cloudkms.googleapis.com/v1/' + "https://cloudkms.googleapis.com/v1/" end def resource_base_url - '{{key_ring}}/importJobs' + "{{key_ring}}/importJobs" end end diff --git a/libraries/google_kms_key_rings.rb b/libraries/google_kms_key_rings.rb index 2d06dbc15..2f78073ce 100644 --- a/libraries/google_kms_key_rings.rb +++ b/libraries/google_kms_key_rings.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class KMSKeyRings < GcpResourceBase - name 'google_kms_key_rings' - desc 'KeyRing plural resource' - supports platform: 'gcp' + name "google_kms_key_rings" + desc "KeyRing plural resource" + supports platform: "gcp" attr_reader :table @@ -33,12 +33,12 @@ class KMSKeyRings < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('keyRings') + @table = fetch_wrapped_resource("keyRings") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -51,7 +51,7 @@ def fetch_wrapped_resource(wrap_path) name, value = transform(key, hash) hash_with_symbols[name] = value end - hash_with_symbols[:key_ring_name] = name_from_self_link(hash['name']) + hash_with_symbols[:key_ring_name] = name_from_self_link(hash["name"]) converted.push(hash_with_symbols) end end @@ -67,9 +67,9 @@ def transform(key, value) def transformers { - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'name' => ->(obj) { [:key_ring_url, obj['name']] }, - 'location' => ->(obj) { [:location, obj['location']] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "name" => ->(obj) { [:key_ring_url, obj["name"]] }, + "location" => ->(obj) { [:location, obj["location"]] }, } end @@ -81,10 +81,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://cloudkms.googleapis.com/v1/' + "https://cloudkms.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{location}}/keyRings' + "projects/{{project}}/locations/{{location}}/keyRings" end end diff --git a/libraries/google_kms_location.rb b/libraries/google_kms_location.rb index 6e1450b5e..747fcd2f8 100644 --- a/libraries/google_kms_location.rb +++ b/libraries/google_kms_location.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud Key Management Service resources. class KMSLocation < GcpResourceBase - name 'google_kms_location' - desc 'Location' - supports platform: 'gcp' + name "google_kms_location" + desc "Location" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -30,15 +30,15 @@ class KMSLocation < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @location_id = @fetched['locationId'] - @display_name = @fetched['displayName'] - @location = @fetched['location'] + @name = @fetched["name"] + @location_id = @fetched["locationId"] + @display_name = @fetched["displayName"] + @location = @fetched["location"] end def exists? @@ -52,10 +52,10 @@ def to_s private def product_url(_ = nil) - 'https://cloudkms.googleapis.com/v1/' + "https://cloudkms.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations/{{name}}' + "projects/{{project}}/locations/{{name}}" end end diff --git a/libraries/google_kms_locations.rb b/libraries/google_kms_locations.rb index eb3424ccc..e0f2a932e 100644 --- a/libraries/google_kms_locations.rb +++ b/libraries/google_kms_locations.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class KMSLocations < GcpResourceBase - name 'google_kms_locations' - desc 'Location plural resource' - supports platform: 'gcp' + name "google_kms_locations" + desc "Location plural resource" + supports platform: "gcp" attr_reader :table @@ -33,12 +33,12 @@ class KMSLocations < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('locations') + @table = fetch_wrapped_resource("locations") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -66,20 +66,20 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'locationId' => ->(obj) { [:location_id, obj['locationId']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'location' => ->(obj) { [:location, obj['location']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "locationId" => ->(obj) { [:location_id, obj["locationId"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "location" => ->(obj) { [:location, obj["location"]] }, } end private def product_url(_ = nil) - 'https://cloudkms.googleapis.com/v1/' + "https://cloudkms.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/locations' + "projects/{{project}}/locations" end end diff --git a/libraries/google_logging_folder_exclusion.rb b/libraries/google_logging_folder_exclusion.rb index cf8992832..885590fba 100644 --- a/libraries/google_logging_folder_exclusion.rb +++ b/libraries/google_logging_folder_exclusion.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud (Stackdriver) Logging resources. class LoggingFolderExclusion < GcpResourceBase - name 'google_logging_folder_exclusion' - desc 'FolderExclusion' - supports platform: 'gcp' + name "google_logging_folder_exclusion" + desc "FolderExclusion" + supports platform: "gcp" attr_reader :params attr_reader :folder @@ -31,16 +31,16 @@ class LoggingFolderExclusion < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @folder = @fetched['folder'] - @name = @fetched['name'] - @description = @fetched['description'] - @filter = @fetched['filter'] - @disabled = @fetched['disabled'] + @folder = @fetched["folder"] + @name = @fetched["name"] + @description = @fetched["description"] + @filter = @fetched["filter"] + @disabled = @fetched["disabled"] end def exists? @@ -54,10 +54,10 @@ def to_s private def product_url(_ = nil) - 'https://logging.googleapis.com/v2/' + "https://logging.googleapis.com/v2/" end def resource_base_url - 'folders/{{folder}}/exclusions/{{name}}' + "folders/{{folder}}/exclusions/{{name}}" end end diff --git a/libraries/google_logging_folder_exclusions.rb b/libraries/google_logging_folder_exclusions.rb index 5383b4b40..9f5f00bc8 100644 --- a/libraries/google_logging_folder_exclusions.rb +++ b/libraries/google_logging_folder_exclusions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class LoggingFolderExclusions < GcpResourceBase - name 'google_logging_folder_exclusions' - desc 'FolderExclusion plural resource' - supports platform: 'gcp' + name "google_logging_folder_exclusions" + desc "FolderExclusion plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class LoggingFolderExclusions < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('exclusions') + @table = fetch_wrapped_resource("exclusions") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,21 +67,21 @@ def transform(key, value) def transformers { - 'folder' => ->(obj) { [:folder, obj['folder']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'filter' => ->(obj) { [:filter, obj['filter']] }, - 'disabled' => ->(obj) { [:disabled, obj['disabled']] }, + "folder" => ->(obj) { [:folder, obj["folder"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "filter" => ->(obj) { [:filter, obj["filter"]] }, + "disabled" => ->(obj) { [:disabled, obj["disabled"]] }, } end private def product_url(_ = nil) - 'https://logging.googleapis.com/v2/' + "https://logging.googleapis.com/v2/" end def resource_base_url - 'folders/{{folder}}/exclusions' + "folders/{{folder}}/exclusions" end end diff --git a/libraries/google_logging_folder_log_sink.rb b/libraries/google_logging_folder_log_sink.rb index c4378b8a9..43b028d0a 100644 --- a/libraries/google_logging_folder_log_sink.rb +++ b/libraries/google_logging_folder_log_sink.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud (Stackdriver) Logging resources. class LoggingFolderLogSink < GcpResourceBase - name 'google_logging_folder_log_sink' - desc 'FolderLogSink' - supports platform: 'gcp' + name "google_logging_folder_log_sink" + desc "FolderLogSink" + supports platform: "gcp" attr_reader :params attr_reader :folder @@ -32,17 +32,17 @@ class LoggingFolderLogSink < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @folder = @fetched['folder'] - @name = @fetched['name'] - @filter = @fetched['filter'] - @destination = @fetched['destination'] - @writer_identity = @fetched['writerIdentity'] - @include_children = @fetched['includeChildren'] + @folder = @fetched["folder"] + @name = @fetched["name"] + @filter = @fetched["filter"] + @destination = @fetched["destination"] + @writer_identity = @fetched["writerIdentity"] + @include_children = @fetched["includeChildren"] end def exists? @@ -56,10 +56,10 @@ def to_s private def product_url(_ = nil) - 'https://logging.googleapis.com/v2/' + "https://logging.googleapis.com/v2/" end def resource_base_url - 'folders/{{folder}}/sinks/{{name}}' + "folders/{{folder}}/sinks/{{name}}" end end diff --git a/libraries/google_logging_folder_log_sinks.rb b/libraries/google_logging_folder_log_sinks.rb index e8bc5cfee..1e2011baa 100644 --- a/libraries/google_logging_folder_log_sinks.rb +++ b/libraries/google_logging_folder_log_sinks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class LoggingFolderLogSinks < GcpResourceBase - name 'google_logging_folder_log_sinks' - desc 'FolderLogSink plural resource' - supports platform: 'gcp' + name "google_logging_folder_log_sinks" + desc "FolderLogSink plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class LoggingFolderLogSinks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('sinks') + @table = fetch_wrapped_resource("sinks") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,22 +68,22 @@ def transform(key, value) def transformers { - 'folder' => ->(obj) { [:folder, obj['folder']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'filter' => ->(obj) { [:filter, obj['filter']] }, - 'destination' => ->(obj) { [:destination, obj['destination']] }, - 'writerIdentity' => ->(obj) { [:writer_identity, obj['writerIdentity']] }, - 'includeChildren' => ->(obj) { [:include_children, obj['includeChildren']] }, + "folder" => ->(obj) { [:folder, obj["folder"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "filter" => ->(obj) { [:filter, obj["filter"]] }, + "destination" => ->(obj) { [:destination, obj["destination"]] }, + "writerIdentity" => ->(obj) { [:writer_identity, obj["writerIdentity"]] }, + "includeChildren" => ->(obj) { [:include_children, obj["includeChildren"]] }, } end private def product_url(_ = nil) - 'https://logging.googleapis.com/v2/' + "https://logging.googleapis.com/v2/" end def resource_base_url - 'folders/{{folder}}/sinks' + "folders/{{folder}}/sinks" end end diff --git a/libraries/google_logging_organization_log_sink.rb b/libraries/google_logging_organization_log_sink.rb index 72d901f3f..27acc9cf4 100644 --- a/libraries/google_logging_organization_log_sink.rb +++ b/libraries/google_logging_organization_log_sink.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud (Stackdriver) Logging resources. class LoggingOrganizationLogSink < GcpResourceBase - name 'google_logging_organization_log_sink' - desc 'OrganizationLogSink' - supports platform: 'gcp' + name "google_logging_organization_log_sink" + desc "OrganizationLogSink" + supports platform: "gcp" attr_reader :params attr_reader :organization @@ -32,17 +32,17 @@ class LoggingOrganizationLogSink < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @organization = @fetched['organization'] - @name = @fetched['name'] - @filter = @fetched['filter'] - @destination = @fetched['destination'] - @writer_identity = @fetched['writerIdentity'] - @include_children = @fetched['includeChildren'] + @organization = @fetched["organization"] + @name = @fetched["name"] + @filter = @fetched["filter"] + @destination = @fetched["destination"] + @writer_identity = @fetched["writerIdentity"] + @include_children = @fetched["includeChildren"] end def exists? @@ -56,10 +56,10 @@ def to_s private def product_url(_ = nil) - 'https://logging.googleapis.com/v2/' + "https://logging.googleapis.com/v2/" end def resource_base_url - 'organizations/{{organization}}/sinks/{{name}}' + "organizations/{{organization}}/sinks/{{name}}" end end diff --git a/libraries/google_logging_organization_log_sinks.rb b/libraries/google_logging_organization_log_sinks.rb index a40a78873..6bc44b403 100644 --- a/libraries/google_logging_organization_log_sinks.rb +++ b/libraries/google_logging_organization_log_sinks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class LoggingOrganizationLogSinks < GcpResourceBase - name 'google_logging_organization_log_sinks' - desc 'OrganizationLogSink plural resource' - supports platform: 'gcp' + name "google_logging_organization_log_sinks" + desc "OrganizationLogSink plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class LoggingOrganizationLogSinks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('sinks') + @table = fetch_wrapped_resource("sinks") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,22 +68,22 @@ def transform(key, value) def transformers { - 'organization' => ->(obj) { [:organization, obj['organization']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'filter' => ->(obj) { [:filter, obj['filter']] }, - 'destination' => ->(obj) { [:destination, obj['destination']] }, - 'writerIdentity' => ->(obj) { [:writer_identity, obj['writerIdentity']] }, - 'includeChildren' => ->(obj) { [:include_children, obj['includeChildren']] }, + "organization" => ->(obj) { [:organization, obj["organization"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "filter" => ->(obj) { [:filter, obj["filter"]] }, + "destination" => ->(obj) { [:destination, obj["destination"]] }, + "writerIdentity" => ->(obj) { [:writer_identity, obj["writerIdentity"]] }, + "includeChildren" => ->(obj) { [:include_children, obj["includeChildren"]] }, } end private def product_url(_ = nil) - 'https://logging.googleapis.com/v2/' + "https://logging.googleapis.com/v2/" end def resource_base_url - 'organizations/{{organization}}/sinks' + "organizations/{{organization}}/sinks" end end diff --git a/libraries/google_logging_project_exclusion.rb b/libraries/google_logging_project_exclusion.rb index f46f48d88..23f15594b 100644 --- a/libraries/google_logging_project_exclusion.rb +++ b/libraries/google_logging_project_exclusion.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud (Stackdriver) Logging resources. class LoggingProjectExclusion < GcpResourceBase - name 'google_logging_project_exclusion' - desc 'ProjectExclusion' - supports platform: 'gcp' + name "google_logging_project_exclusion" + desc "ProjectExclusion" + supports platform: "gcp" attr_reader :params attr_reader :project @@ -31,16 +31,16 @@ class LoggingProjectExclusion < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @project = @fetched['project'] - @name = @fetched['name'] - @description = @fetched['description'] - @filter = @fetched['filter'] - @disabled = @fetched['disabled'] + @project = @fetched["project"] + @name = @fetched["name"] + @description = @fetched["description"] + @filter = @fetched["filter"] + @disabled = @fetched["disabled"] end def exists? @@ -54,10 +54,10 @@ def to_s private def product_url(_ = nil) - 'https://logging.googleapis.com/v2/' + "https://logging.googleapis.com/v2/" end def resource_base_url - 'projects/{{project}}/exclusions/{{name}}' + "projects/{{project}}/exclusions/{{name}}" end end diff --git a/libraries/google_logging_project_exclusions.rb b/libraries/google_logging_project_exclusions.rb index e42c90229..54f739bb1 100644 --- a/libraries/google_logging_project_exclusions.rb +++ b/libraries/google_logging_project_exclusions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class LoggingProjectExclusions < GcpResourceBase - name 'google_logging_project_exclusions' - desc 'ProjectExclusion plural resource' - supports platform: 'gcp' + name "google_logging_project_exclusions" + desc "ProjectExclusion plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class LoggingProjectExclusions < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('exclusions') + @table = fetch_wrapped_resource("exclusions") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,21 +67,21 @@ def transform(key, value) def transformers { - 'project' => ->(obj) { [:project, obj['project']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'filter' => ->(obj) { [:filter, obj['filter']] }, - 'disabled' => ->(obj) { [:disabled, obj['disabled']] }, + "project" => ->(obj) { [:project, obj["project"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "filter" => ->(obj) { [:filter, obj["filter"]] }, + "disabled" => ->(obj) { [:disabled, obj["disabled"]] }, } end private def product_url(_ = nil) - 'https://logging.googleapis.com/v2/' + "https://logging.googleapis.com/v2/" end def resource_base_url - 'projects/{{project}}/exclusions' + "projects/{{project}}/exclusions" end end diff --git a/libraries/google_logging_project_sink.rb b/libraries/google_logging_project_sink.rb index 117356cb9..c4da14f5c 100644 --- a/libraries/google_logging_project_sink.rb +++ b/libraries/google_logging_project_sink.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud (Stackdriver) Logging resources. class LoggingProjectSink < GcpResourceBase - name 'google_logging_project_sink' - desc 'ProjectSink' - supports platform: 'gcp' + name "google_logging_project_sink" + desc "ProjectSink" + supports platform: "gcp" attr_reader :params attr_reader :project @@ -32,17 +32,17 @@ class LoggingProjectSink < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @project = @fetched['project'] - @name = @fetched['name'] - @filter = @fetched['filter'] - @destination = @fetched['destination'] - @writer_identity = @fetched['writerIdentity'] - @include_children = @fetched['includeChildren'] + @project = @fetched["project"] + @name = @fetched["name"] + @filter = @fetched["filter"] + @destination = @fetched["destination"] + @writer_identity = @fetched["writerIdentity"] + @include_children = @fetched["includeChildren"] end def exists? @@ -56,10 +56,10 @@ def to_s private def product_url(_ = nil) - 'https://logging.googleapis.com/v2/' + "https://logging.googleapis.com/v2/" end def resource_base_url - 'projects/{{project}}/sinks/{{name}}' + "projects/{{project}}/sinks/{{name}}" end end diff --git a/libraries/google_logging_project_sinks.rb b/libraries/google_logging_project_sinks.rb index d128962d6..b7e1e35e9 100644 --- a/libraries/google_logging_project_sinks.rb +++ b/libraries/google_logging_project_sinks.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class LoggingProjectSinks < GcpResourceBase - name 'google_logging_project_sinks' - desc 'ProjectSink plural resource' - supports platform: 'gcp' + name "google_logging_project_sinks" + desc "ProjectSink plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class LoggingProjectSinks < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('sinks') + @table = fetch_wrapped_resource("sinks") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,22 +68,22 @@ def transform(key, value) def transformers { - 'project' => ->(obj) { [:project, obj['project']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'filter' => ->(obj) { [:filter, obj['filter']] }, - 'destination' => ->(obj) { [:destination, obj['destination']] }, - 'writerIdentity' => ->(obj) { [:writer_identity, obj['writerIdentity']] }, - 'includeChildren' => ->(obj) { [:include_children, obj['includeChildren']] }, + "project" => ->(obj) { [:project, obj["project"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "filter" => ->(obj) { [:filter, obj["filter"]] }, + "destination" => ->(obj) { [:destination, obj["destination"]] }, + "writerIdentity" => ->(obj) { [:writer_identity, obj["writerIdentity"]] }, + "includeChildren" => ->(obj) { [:include_children, obj["includeChildren"]] }, } end private def product_url(_ = nil) - 'https://logging.googleapis.com/v2/' + "https://logging.googleapis.com/v2/" end def resource_base_url - 'projects/{{project}}/sinks' + "projects/{{project}}/sinks" end end diff --git a/libraries/google_memcache_instance.rb b/libraries/google_memcache_instance.rb index 5e3fe58b0..a349a965e 100644 --- a/libraries/google_memcache_instance.rb +++ b/libraries/google_memcache_instance.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/memcache/property/instance_memcache_nodes' -require 'google/memcache/property/instance_node_config' -require 'google/memcache/property/instance_parameters' +require "gcp_backend" +require "google/memcache/property/instance_memcache_nodes" +require "google/memcache/property/instance_node_config" +require "google/memcache/property/instance_parameters" # A provider to manage Memcache resources. class MemcacheInstance < GcpResourceBase - name 'google_memcache_instance' - desc 'Instance' - supports platform: 'gcp' + name "google_memcache_instance" + desc "Instance" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -43,25 +43,25 @@ class MemcacheInstance < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @display_name = @fetched['displayName'] - @memcache_nodes = GoogleInSpec::Memcache::Property::InstanceMemcacheNodesArray.parse(@fetched['memcacheNodes'], to_s) - @create_time = parse_time_string(@fetched['createTime']) - @discovery_endpoint = @fetched['discoveryEndpoint'] - @labels = @fetched['labels'] - @memcache_full_version = @fetched['memcacheFullVersion'] - @zones = @fetched['zones'] - @authorized_network = @fetched['authorizedNetwork'] - @node_count = @fetched['nodeCount'] - @memcache_version = @fetched['memcacheVersion'] - @node_config = GoogleInSpec::Memcache::Property::InstanceNodeConfig.new(@fetched['nodeConfig'], to_s) - @parameters = GoogleInSpec::Memcache::Property::InstanceParameters.new(@fetched['parameters'], to_s) - @region = @fetched['region'] + @name = @fetched["name"] + @display_name = @fetched["displayName"] + @memcache_nodes = GoogleInSpec::Memcache::Property::InstanceMemcacheNodesArray.parse(@fetched["memcacheNodes"], to_s) + @create_time = parse_time_string(@fetched["createTime"]) + @discovery_endpoint = @fetched["discoveryEndpoint"] + @labels = @fetched["labels"] + @memcache_full_version = @fetched["memcacheFullVersion"] + @zones = @fetched["zones"] + @authorized_network = @fetched["authorizedNetwork"] + @node_count = @fetched["nodeCount"] + @memcache_version = @fetched["memcacheVersion"] + @node_config = GoogleInSpec::Memcache::Property::InstanceNodeConfig.new(@fetched["nodeConfig"], to_s) + @parameters = GoogleInSpec::Memcache::Property::InstanceParameters.new(@fetched["parameters"], to_s) + @region = @fetched["region"] end # Handles parsing RFC3339 time string @@ -80,10 +80,10 @@ def to_s private def product_url(_ = nil) - 'https://memcache.googleapis.com/v1beta2/' + "https://memcache.googleapis.com/v1beta2/" end def resource_base_url - 'projects/{{project}}/locations/{{region}}/instances/{{name}}' + "projects/{{project}}/locations/{{region}}/instances/{{name}}" end end diff --git a/libraries/google_memcache_instances.rb b/libraries/google_memcache_instances.rb index 6d3cf948c..cb2f2e5ed 100644 --- a/libraries/google_memcache_instances.rb +++ b/libraries/google_memcache_instances.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class MemcacheInstances < GcpResourceBase - name 'google_memcache_instances' - desc 'Instance plural resource' - supports platform: 'gcp' + name "google_memcache_instances" + desc "Instance plural resource" + supports platform: "gcp" attr_reader :table @@ -43,12 +43,12 @@ class MemcacheInstances < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('resources') + @table = fetch_wrapped_resource("resources") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -76,20 +76,20 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'memcacheNodes' => ->(obj) { [:memcache_nodes, GoogleInSpec::Memcache::Property::InstanceMemcacheNodesArray.parse(obj['memcacheNodes'], to_s)] }, - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'discoveryEndpoint' => ->(obj) { [:discovery_endpoint, obj['discoveryEndpoint']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'memcacheFullVersion' => ->(obj) { [:memcache_full_version, obj['memcacheFullVersion']] }, - 'zones' => ->(obj) { [:zones, obj['zones']] }, - 'authorizedNetwork' => ->(obj) { [:authorized_network, obj['authorizedNetwork']] }, - 'nodeCount' => ->(obj) { [:node_count, obj['nodeCount']] }, - 'memcacheVersion' => ->(obj) { [:memcache_version, obj['memcacheVersion']] }, - 'nodeConfig' => ->(obj) { [:node_config, GoogleInSpec::Memcache::Property::InstanceNodeConfig.new(obj['nodeConfig'], to_s)] }, - 'parameters' => ->(obj) { [:parameters, GoogleInSpec::Memcache::Property::InstanceParameters.new(obj['parameters'], to_s)] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "memcacheNodes" => ->(obj) { [:memcache_nodes, GoogleInSpec::Memcache::Property::InstanceMemcacheNodesArray.parse(obj["memcacheNodes"], to_s)] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "discoveryEndpoint" => ->(obj) { [:discovery_endpoint, obj["discoveryEndpoint"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "memcacheFullVersion" => ->(obj) { [:memcache_full_version, obj["memcacheFullVersion"]] }, + "zones" => ->(obj) { [:zones, obj["zones"]] }, + "authorizedNetwork" => ->(obj) { [:authorized_network, obj["authorizedNetwork"]] }, + "nodeCount" => ->(obj) { [:node_count, obj["nodeCount"]] }, + "memcacheVersion" => ->(obj) { [:memcache_version, obj["memcacheVersion"]] }, + "nodeConfig" => ->(obj) { [:node_config, GoogleInSpec::Memcache::Property::InstanceNodeConfig.new(obj["nodeConfig"], to_s)] }, + "parameters" => ->(obj) { [:parameters, GoogleInSpec::Memcache::Property::InstanceParameters.new(obj["parameters"], to_s)] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end @@ -101,10 +101,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://memcache.googleapis.com/v1beta2/' + "https://memcache.googleapis.com/v1beta2/" end def resource_base_url - 'projects/{{project}}/locations/{{region}}/instances' + "projects/{{project}}/locations/{{region}}/instances" end end diff --git a/libraries/google_ml_engine_model.rb b/libraries/google_ml_engine_model.rb index dad5e5882..357172ead 100644 --- a/libraries/google_ml_engine_model.rb +++ b/libraries/google_ml_engine_model.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/mlengine/property/model_default_version' +require "gcp_backend" +require "google/mlengine/property/model_default_version" # A provider to manage ML Engine resources. class MLEngineModel < GcpResourceBase - name 'google_ml_engine_model' - desc 'Model' - supports platform: 'gcp' + name "google_ml_engine_model" + desc "Model" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -34,18 +34,18 @@ class MLEngineModel < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @description = @fetched['description'] - @default_version = GoogleInSpec::MLEngine::Property::ModelDefaultVersion.new(@fetched['defaultVersion'], to_s) - @regions = @fetched['regions'] - @online_prediction_logging = @fetched['onlinePredictionLogging'] - @online_prediction_console_logging = @fetched['onlinePredictionConsoleLogging'] - @labels = @fetched['labels'] + @name = @fetched["name"] + @description = @fetched["description"] + @default_version = GoogleInSpec::MLEngine::Property::ModelDefaultVersion.new(@fetched["defaultVersion"], to_s) + @regions = @fetched["regions"] + @online_prediction_logging = @fetched["onlinePredictionLogging"] + @online_prediction_console_logging = @fetched["onlinePredictionConsoleLogging"] + @labels = @fetched["labels"] end def exists? @@ -59,10 +59,10 @@ def to_s private def product_url(_ = nil) - 'https://ml.googleapis.com/v1/' + "https://ml.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/models/{{name}}' + "projects/{{project}}/models/{{name}}" end end diff --git a/libraries/google_ml_engine_models.rb b/libraries/google_ml_engine_models.rb index 450b80210..ab86a4bb5 100644 --- a/libraries/google_ml_engine_models.rb +++ b/libraries/google_ml_engine_models.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class MLEngineModels < GcpResourceBase - name 'google_ml_engine_models' - desc 'Model plural resource' - supports platform: 'gcp' + name "google_ml_engine_models" + desc "Model plural resource" + supports platform: "gcp" attr_reader :table @@ -36,12 +36,12 @@ class MLEngineModels < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('models') + @table = fetch_wrapped_resource("models") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -69,23 +69,23 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'defaultVersion' => ->(obj) { [:default_version, GoogleInSpec::MLEngine::Property::ModelDefaultVersion.new(obj['defaultVersion'], to_s)] }, - 'regions' => ->(obj) { [:regions, obj['regions']] }, - 'onlinePredictionLogging' => ->(obj) { [:online_prediction_logging, obj['onlinePredictionLogging']] }, - 'onlinePredictionConsoleLogging' => ->(obj) { [:online_prediction_console_logging, obj['onlinePredictionConsoleLogging']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "defaultVersion" => ->(obj) { [:default_version, GoogleInSpec::MLEngine::Property::ModelDefaultVersion.new(obj["defaultVersion"], to_s)] }, + "regions" => ->(obj) { [:regions, obj["regions"]] }, + "onlinePredictionLogging" => ->(obj) { [:online_prediction_logging, obj["onlinePredictionLogging"]] }, + "onlinePredictionConsoleLogging" => ->(obj) { [:online_prediction_console_logging, obj["onlinePredictionConsoleLogging"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, } end private def product_url(_ = nil) - 'https://ml.googleapis.com/v1/' + "https://ml.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/models' + "projects/{{project}}/models" end end diff --git a/libraries/google_organization.rb b/libraries/google_organization.rb index 98ecc760c..0989759a9 100644 --- a/libraries/google_organization.rb +++ b/libraries/google_organization.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/resourcemanager/property/organization_owner' +require "gcp_backend" +require "google/resourcemanager/property/organization_owner" # A provider to manage Resource Manager resources. class ResourceManagerOrganization < GcpResourceBase - name 'google_organization' - desc 'Organization' - supports platform: 'gcp' + name "google_organization" + desc "Organization" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -32,16 +32,16 @@ class ResourceManagerOrganization < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @display_name = @fetched['displayName'] - @lifecycle_state = @fetched['lifecycleState'] - @creation_time = parse_time_string(@fetched['creationTime']) - @owner = GoogleInSpec::ResourceManager::Property::OrganizationOwner.new(@fetched['owner'], to_s) + @name = @fetched["name"] + @display_name = @fetched["displayName"] + @lifecycle_state = @fetched["lifecycleState"] + @creation_time = parse_time_string(@fetched["creationTime"]) + @owner = GoogleInSpec::ResourceManager::Property::OrganizationOwner.new(@fetched["owner"], to_s) end # Handles parsing RFC3339 time string @@ -60,10 +60,10 @@ def to_s private def product_url(_ = nil) - 'https://cloudresourcemanager.googleapis.com/v1/' + "https://cloudresourcemanager.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_organization_iam_binding.rb b/libraries/google_organization_iam_binding.rb index 81a20170e..318b77885 100644 --- a/libraries/google_organization_iam_binding.rb +++ b/libraries/google_organization_iam_binding.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_bindings" # A provider to manage Resource Manager IAM Binding resources. class OrganizationIamBinding < GcpResourceBase - name 'google_organization_iam_binding' - desc 'Organization Iam Binding' - supports platform: 'gcp' + name "google_organization_iam_binding" + desc "Organization Iam Binding" + supports platform: "gcp" attr_reader :params @@ -30,12 +30,12 @@ def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Post') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Post") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] @@ -75,10 +75,10 @@ def to_s private def product_url - 'https://cloudresourcemanager.googleapis.com/v1/' + "https://cloudresourcemanager.googleapis.com/v1/" end def resource_base_url - '{{name}}:getIamPolicy' + "{{name}}:getIamPolicy" end end diff --git a/libraries/google_organization_iam_policy.rb b/libraries/google_organization_iam_policy.rb index 8310bb4a0..7d1f5d3b8 100644 --- a/libraries/google_organization_iam_policy.rb +++ b/libraries/google_organization_iam_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_audit_configs' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_audit_configs" +require "google/iam/property/iam_policy_bindings" # A provider to manage Resource Manager IAM Policy resources. class OrganizationIamPolicy < GcpResourceBase - name 'google_organization_iam_policy' - desc 'Organization Iam Policy' - supports platform: 'gcp' + name "google_organization_iam_policy" + desc "Organization Iam Policy" + supports platform: "gcp" attr_reader :params attr_reader :bindings @@ -30,13 +30,13 @@ class OrganizationIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Post') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Post") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) - @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) + @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched["auditConfigs"], to_s) end def exists? @@ -58,10 +58,10 @@ def count private def product_url - 'https://cloudresourcemanager.googleapis.com/v1/' + "https://cloudresourcemanager.googleapis.com/v1/" end def resource_base_url - '{{name}}:getIamPolicy' + "{{name}}:getIamPolicy" end end diff --git a/libraries/google_organization_policy.rb b/libraries/google_organization_policy.rb index c9173fa25..f765b9c9a 100644 --- a/libraries/google_organization_policy.rb +++ b/libraries/google_organization_policy.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleOrganizationPolicy < GcpResourceBase - name 'google_organization_policy' - desc 'Verifies configuration of an organization policy' + name "google_organization_policy" + desc "Verifies configuration of an organization policy" example " describe google_organization_policy(name: 'organizations/123456', constraint: 'constraints/compute.disableGuestAttributesAccess') do diff --git a/libraries/google_organizations.rb b/libraries/google_organizations.rb index b7bd81481..f98b79478 100644 --- a/libraries/google_organizations.rb +++ b/libraries/google_organizations.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ResourceManagerOrganizations < GcpResourceBase - name 'google_organizations' - desc 'Organization plural resource' - supports platform: 'gcp' + name "google_organizations" + desc "Organization plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class ResourceManagerOrganizations < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('organizations') + @table = fetch_wrapped_resource("organizations") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Post') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Post") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'lifecycleState' => ->(obj) { [:lifecycle_state, obj['lifecycleState']] }, - 'creationTime' => ->(obj) { [:creation_time, parse_time_string(obj['creationTime'])] }, - 'owner' => ->(obj) { [:owner, GoogleInSpec::ResourceManager::Property::OrganizationOwner.new(obj['owner'], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "lifecycleState" => ->(obj) { [:lifecycle_state, obj["lifecycleState"]] }, + "creationTime" => ->(obj) { [:creation_time, parse_time_string(obj["creationTime"])] }, + "owner" => ->(obj) { [:owner, GoogleInSpec::ResourceManager::Property::OrganizationOwner.new(obj["owner"], to_s)] }, } end @@ -83,10 +83,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://cloudresourcemanager.googleapis.com/v1/' + "https://cloudresourcemanager.googleapis.com/v1/" end def resource_base_url - 'organizations:search' + "organizations:search" end end diff --git a/libraries/google_project.rb b/libraries/google_project.rb index 8d7bac113..eb880b797 100644 --- a/libraries/google_project.rb +++ b/libraries/google_project.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/resourcemanager/property/project_parent' +require "gcp_backend" +require "google/resourcemanager/property/project_parent" # A provider to manage Resource Manager resources. class ResourceManagerProject < GcpResourceBase - name 'google_project' - desc 'Project' - supports platform: 'gcp' + name "google_project" + desc "Project" + supports platform: "gcp" attr_reader :params attr_reader :number @@ -34,18 +34,18 @@ class ResourceManagerProject < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @number = @fetched['projectNumber'] - @lifecycle_state = @fetched['lifecycleState'] - @name = @fetched['name'] - @create_time = parse_time_string(@fetched['createTime']) - @labels = @fetched['labels'] - @parent = GoogleInSpec::ResourceManager::Property::ProjectParent.new(@fetched['parent'], to_s) - @project_id = @fetched['projectId'] + @number = @fetched["projectNumber"] + @lifecycle_state = @fetched["lifecycleState"] + @name = @fetched["name"] + @create_time = parse_time_string(@fetched["createTime"]) + @labels = @fetched["labels"] + @parent = GoogleInSpec::ResourceManager::Property::ProjectParent.new(@fetched["parent"], to_s) + @project_id = @fetched["projectId"] end # Handles parsing RFC3339 time string @@ -77,10 +77,10 @@ def label_value_by_key(label_key) private def product_url(_ = nil) - 'https://cloudresourcemanager.googleapis.com/v1/' + "https://cloudresourcemanager.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}' + "projects/{{project}}" end end diff --git a/libraries/google_project_alert_policies.rb b/libraries/google_project_alert_policies.rb index 1b4f10994..7809f853f 100644 --- a/libraries/google_project_alert_policies.rb +++ b/libraries/google_project_alert_policies.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class MonitoringAlertPolicys < GcpResourceBase - name 'google_project_alert_policies' - desc 'AlertPolicy plural resource' - supports platform: 'gcp' + name "google_project_alert_policies" + desc "AlertPolicy plural resource" + supports platform: "gcp" attr_reader :table @@ -38,12 +38,12 @@ class MonitoringAlertPolicys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('alertPolicies') + @table = fetch_wrapped_resource("alertPolicies") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -71,25 +71,25 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:policy_names, obj['name']] }, - 'displayName' => ->(obj) { [:policy_display_names, obj['displayName']] }, - 'combiner' => ->(obj) { [:combiner, obj['combiner']] }, - 'creationRecord' => ->(obj) { [:creation_record, GoogleInSpec::Monitoring::Property::AlertPolicyCreationRecord.new(obj['creationRecord'], to_s)] }, - 'enabled' => ->(obj) { [:policy_enabled_state, obj['enabled']] }, - 'conditions' => ->(obj) { [:conditions, GoogleInSpec::Monitoring::Property::AlertPolicyConditionsArray.parse(obj['conditions'], to_s)] }, - 'notificationChannels' => ->(obj) { [:notification_channels, obj['notificationChannels']] }, - 'userLabels' => ->(obj) { [:user_labels, obj['userLabels']] }, - 'documentation' => ->(obj) { [:documentation, GoogleInSpec::Monitoring::Property::AlertPolicyDocumentation.new(obj['documentation'], to_s)] }, + "name" => ->(obj) { [:policy_names, obj["name"]] }, + "displayName" => ->(obj) { [:policy_display_names, obj["displayName"]] }, + "combiner" => ->(obj) { [:combiner, obj["combiner"]] }, + "creationRecord" => ->(obj) { [:creation_record, GoogleInSpec::Monitoring::Property::AlertPolicyCreationRecord.new(obj["creationRecord"], to_s)] }, + "enabled" => ->(obj) { [:policy_enabled_state, obj["enabled"]] }, + "conditions" => ->(obj) { [:conditions, GoogleInSpec::Monitoring::Property::AlertPolicyConditionsArray.parse(obj["conditions"], to_s)] }, + "notificationChannels" => ->(obj) { [:notification_channels, obj["notificationChannels"]] }, + "userLabels" => ->(obj) { [:user_labels, obj["userLabels"]] }, + "documentation" => ->(obj) { [:documentation, GoogleInSpec::Monitoring::Property::AlertPolicyDocumentation.new(obj["documentation"], to_s)] }, } end private def product_url(_ = nil) - 'https://monitoring.googleapis.com/' + "https://monitoring.googleapis.com/" end def resource_base_url - 'v3/projects/{{project}}/alertPolicies' + "v3/projects/{{project}}/alertPolicies" end end diff --git a/libraries/google_project_alert_policy.rb b/libraries/google_project_alert_policy.rb index 96bace859..8c100bfb9 100644 --- a/libraries/google_project_alert_policy.rb +++ b/libraries/google_project_alert_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/monitoring/property/alertpolicy_conditions' -require 'google/monitoring/property/alertpolicy_creation_record' -require 'google/monitoring/property/alertpolicy_documentation' +require "gcp_backend" +require "google/monitoring/property/alertpolicy_conditions" +require "google/monitoring/property/alertpolicy_creation_record" +require "google/monitoring/property/alertpolicy_documentation" # A provider to manage Cloud (Stackdriver) Monitoring resources. class MonitoringAlertPolicy < GcpResourceBase - name 'google_project_alert_policy' - desc 'AlertPolicy' - supports platform: 'gcp' + name "google_project_alert_policy" + desc "AlertPolicy" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -38,20 +38,20 @@ class MonitoringAlertPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @display_name = @fetched['displayName'] - @combiner = @fetched['combiner'] - @creation_record = GoogleInSpec::Monitoring::Property::AlertPolicyCreationRecord.new(@fetched['creationRecord'], to_s) - @enabled = @fetched['enabled'] - @conditions = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsArray.parse(@fetched['conditions'], to_s) - @notification_channels = @fetched['notificationChannels'] - @user_labels = @fetched['userLabels'] - @documentation = GoogleInSpec::Monitoring::Property::AlertPolicyDocumentation.new(@fetched['documentation'], to_s) + @name = @fetched["name"] + @display_name = @fetched["displayName"] + @combiner = @fetched["combiner"] + @creation_record = GoogleInSpec::Monitoring::Property::AlertPolicyCreationRecord.new(@fetched["creationRecord"], to_s) + @enabled = @fetched["enabled"] + @conditions = GoogleInSpec::Monitoring::Property::AlertPolicyConditionsArray.parse(@fetched["conditions"], to_s) + @notification_channels = @fetched["notificationChannels"] + @user_labels = @fetched["userLabels"] + @documentation = GoogleInSpec::Monitoring::Property::AlertPolicyDocumentation.new(@fetched["documentation"], to_s) end def exists? @@ -69,10 +69,10 @@ def enabled? private def product_url(_ = nil) - 'https://monitoring.googleapis.com/' + "https://monitoring.googleapis.com/" end def resource_base_url - 'v3/projects/{{project}}/alertPolicies/{{name}}' + "v3/projects/{{project}}/alertPolicies/{{name}}" end end diff --git a/libraries/google_project_alert_policy_condition.rb b/libraries/google_project_alert_policy_condition.rb index c2059066a..d960491c8 100644 --- a/libraries/google_project_alert_policy_condition.rb +++ b/libraries/google_project_alert_policy_condition.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'google/apis/monitoring_v3' + +require "gcp_backend" +require "google/apis/monitoring_v3" module Inspec::Resources class GoogleProjectAlertPolicyCondition < GcpResourceBase - name 'google_project_alert_policy_condition' - desc 'Verifies settings for a single GCP project alert policy condition by policy name and filter name' + name "google_project_alert_policy_condition" + desc "Verifies settings for a single GCP project alert policy condition by policy name and filter name" example " describe google_project_alert_policy_condition(policy: 'projects/my-project/alertPolicies/9271751234503117449', filter 'project=\"my-project\"') do diff --git a/libraries/google_project_iam_binding.rb b/libraries/google_project_iam_binding.rb index dec488e84..1d87d26be 100644 --- a/libraries/google_project_iam_binding.rb +++ b/libraries/google_project_iam_binding.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleProjectIAMBinding < GcpResourceBase - name 'google_project_iam_binding' - desc 'Verifies settings for a single GCP KMS key ring IAM bindings' + name "google_project_iam_binding" + desc "Verifies settings for a single GCP KMS key ring IAM bindings" example " describe google_kms_key_ring_iam_binding(key_ring_url: 'projects/project/locations/europe-west2/keyRings/key-ring', role: 'roles/compute.admin') do diff --git a/libraries/google_project_iam_bindings.rb b/libraries/google_project_iam_bindings.rb index 8a5f29929..1fe0a4d84 100644 --- a/libraries/google_project_iam_bindings.rb +++ b/libraries/google_project_iam_bindings.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleProjectIAMBindings < GcpResourceBase - name 'google_project_iam_bindings' - desc 'Verifies settings for GCP project iam_bindings in bulk' + name "google_project_iam_bindings" + desc "Verifies settings for GCP project iam_bindings in bulk" example " describe google_project_iam_bindings(project: 'chef-inspec-gcp') do diff --git a/libraries/google_project_iam_custom_role.rb b/libraries/google_project_iam_custom_role.rb index 5bfc1ab9d..ee5dd0edc 100644 --- a/libraries/google_project_iam_custom_role.rb +++ b/libraries/google_project_iam_custom_role.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud IAM resources. class IAMCustomRole < GcpResourceBase - name 'google_project_iam_custom_role' - desc 'CustomRole' - supports platform: 'gcp' + name "google_project_iam_custom_role" + desc "CustomRole" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -32,17 +32,17 @@ class IAMCustomRole < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @title = @fetched['title'] - @description = @fetched['description'] - @included_permissions = @fetched['includedPermissions'] - @stage = @fetched['stage'] - @deleted = @fetched['deleted'] + @name = @fetched["name"] + @title = @fetched["title"] + @description = @fetched["description"] + @included_permissions = @fetched["includedPermissions"] + @stage = @fetched["stage"] + @deleted = @fetched["deleted"] end def exists? @@ -56,10 +56,10 @@ def to_s private def product_url(_ = nil) - 'https://iam.googleapis.com/v1/' + "https://iam.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/roles/{{name}}' + "projects/{{project}}/roles/{{name}}" end end diff --git a/libraries/google_project_iam_custom_roles.rb b/libraries/google_project_iam_custom_roles.rb index 797d3e45e..f4f2b6546 100644 --- a/libraries/google_project_iam_custom_roles.rb +++ b/libraries/google_project_iam_custom_roles.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class IAMCustomRoles < GcpResourceBase - name 'google_project_iam_custom_roles' - desc 'CustomRole plural resource' - supports platform: 'gcp' + name "google_project_iam_custom_roles" + desc "CustomRole plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class IAMCustomRoles < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('roles') + @table = fetch_wrapped_resource("roles") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,22 +68,22 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'title' => ->(obj) { [:title, obj['title']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'includedPermissions' => ->(obj) { [:included_permissions, obj['includedPermissions']] }, - 'stage' => ->(obj) { [:stage, obj['stage']] }, - 'deleted' => ->(obj) { [:deleted, obj['deleted']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "title" => ->(obj) { [:title, obj["title"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "includedPermissions" => ->(obj) { [:included_permissions, obj["includedPermissions"]] }, + "stage" => ->(obj) { [:stage, obj["stage"]] }, + "deleted" => ->(obj) { [:deleted, obj["deleted"]] }, } end private def product_url(_ = nil) - 'https://iam.googleapis.com/v1/' + "https://iam.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/roles?view=FULL' + "projects/{{project}}/roles?view=FULL" end end diff --git a/libraries/google_project_iam_policy.rb b/libraries/google_project_iam_policy.rb index 090e92c45..c01cff1c2 100644 --- a/libraries/google_project_iam_policy.rb +++ b/libraries/google_project_iam_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_audit_configs' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_audit_configs" +require "google/iam/property/iam_policy_bindings" # A provider to manage Resource Manager IAM Policy resources. class ProjectIamPolicy < GcpResourceBase - name 'google_project_iam_policy' - desc 'Project Iam Policy' - supports platform: 'gcp' + name "google_project_iam_policy" + desc "Project Iam Policy" + supports platform: "gcp" attr_reader :params attr_reader :bindings @@ -30,13 +30,13 @@ class ProjectIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Post', { 'options' => { 'requestedPolicyVersion' => 3 } }.to_json) + @fetched = @connection.fetch(product_url, resource_base_url, params, "Post", { "options" => { "requestedPolicyVersion" => 3 } }.to_json) parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) - @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) + @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched["auditConfigs"], to_s) end def exists? @@ -58,10 +58,10 @@ def count private def product_url - 'https://cloudresourcemanager.googleapis.com/v1/' + "https://cloudresourcemanager.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}:getIamPolicy' + "projects/{{project}}:getIamPolicy" end end diff --git a/libraries/google_project_logging_audit_config.rb b/libraries/google_project_logging_audit_config.rb index 2b604dd13..4df6829b1 100644 --- a/libraries/google_project_logging_audit_config.rb +++ b/libraries/google_project_logging_audit_config.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleProjectLoggingAuditConfig < GcpResourceBase - name 'google_project_logging_audit_config' - desc 'Verifies settings for a GCP project logging audit configuration' + name "google_project_logging_audit_config" + desc "Verifies settings for a GCP project logging audit configuration" example " describe google_project_logging_audit_config(project: 'chef-inspec-gcp') do @@ -23,7 +23,7 @@ def initialize(opts = {}) @default_exempted_members = {} if defined?(@audit_logging_configs.audit_configs) && @audit_logging_configs.audit_configs.instance_of?(::Array) @audit_logging_configs.audit_configs.each do |service_config| - next if service_config.service != 'allServices' + next if service_config.service != "allServices" service_config.audit_log_configs.each do |config| @default_types+=[config.log_type] @default_exempted_members[config.log_type]=config.exempted_members if defined?(config.exempted_members) && !config.exempted_members.nil? diff --git a/libraries/google_project_metric.rb b/libraries/google_project_metric.rb index 3367147bc..e3dc2f964 100644 --- a/libraries/google_project_metric.rb +++ b/libraries/google_project_metric.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,19 +13,19 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/logging/property/metric_bucket_options' -require 'google/logging/property/metric_bucket_options_explicit_buckets' -require 'google/logging/property/metric_bucket_options_exponential_buckets' -require 'google/logging/property/metric_bucket_options_linear_buckets' -require 'google/logging/property/metric_metric_descriptor' -require 'google/logging/property/metric_metric_descriptor_labels' +require "gcp_backend" +require "google/logging/property/metric_bucket_options" +require "google/logging/property/metric_bucket_options_explicit_buckets" +require "google/logging/property/metric_bucket_options_exponential_buckets" +require "google/logging/property/metric_bucket_options_linear_buckets" +require "google/logging/property/metric_metric_descriptor" +require "google/logging/property/metric_metric_descriptor_labels" # A provider to manage Cloud (Stackdriver) Logging resources. class LoggingMetric < GcpResourceBase - name 'google_project_metric' - desc 'Metric' - supports platform: 'gcp' + name "google_project_metric" + desc "Metric" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -39,18 +39,18 @@ class LoggingMetric < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @description = @fetched['description'] - @filter = @fetched['filter'] - @metric_descriptor = GoogleInSpec::Logging::Property::MetricMetricDescriptor.new(@fetched['metricDescriptor'], to_s) - @label_extractors = @fetched['labelExtractors'] - @value_extractor = @fetched['valueExtractor'] - @bucket_options = GoogleInSpec::Logging::Property::MetricBucketOptions.new(@fetched['bucketOptions'], to_s) + @name = @fetched["name"] + @description = @fetched["description"] + @filter = @fetched["filter"] + @metric_descriptor = GoogleInSpec::Logging::Property::MetricMetricDescriptor.new(@fetched["metricDescriptor"], to_s) + @label_extractors = @fetched["labelExtractors"] + @value_extractor = @fetched["valueExtractor"] + @bucket_options = GoogleInSpec::Logging::Property::MetricBucketOptions.new(@fetched["bucketOptions"], to_s) end def exists? @@ -64,10 +64,10 @@ def to_s private def product_url(_ = nil) - 'https://logging.googleapis.com/v2/' + "https://logging.googleapis.com/v2/" end def resource_base_url - 'projects/{{project}}/metrics/{{%name}}' + "projects/{{project}}/metrics/{{%name}}" end end diff --git a/libraries/google_project_metrics.rb b/libraries/google_project_metrics.rb index 4e6233e4f..9583a9094 100644 --- a/libraries/google_project_metrics.rb +++ b/libraries/google_project_metrics.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class LoggingMetrics < GcpResourceBase - name 'google_project_metrics' - desc 'Metric plural resource' - supports platform: 'gcp' + name "google_project_metrics" + desc "Metric plural resource" + supports platform: "gcp" attr_reader :table @@ -37,12 +37,12 @@ class LoggingMetrics < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('metrics') + @table = fetch_wrapped_resource("metrics") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -55,7 +55,7 @@ def fetch_wrapped_resource(wrap_path) name, value = transform(key, hash) hash_with_symbols[name] = value end - hash_with_symbols[:metric_type] = hash.dig('metricDescriptor', 'type') + hash_with_symbols[:metric_type] = hash.dig("metricDescriptor", "type") converted.push(hash_with_symbols) end end @@ -71,23 +71,23 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:metric_name, obj['name']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'filter' => ->(obj) { [:metric_filter, obj['filter']] }, - 'metricDescriptor' => ->(obj) { [:metric_descriptor, GoogleInSpec::Logging::Property::MetricMetricDescriptor.new(obj['metricDescriptor'], to_s)] }, - 'labelExtractors' => ->(obj) { [:label_extractors, obj['labelExtractors']] }, - 'valueExtractor' => ->(obj) { [:value_extractor, obj['valueExtractor']] }, - 'bucketOptions' => ->(obj) { [:bucket_options, GoogleInSpec::Logging::Property::MetricBucketOptions.new(obj['bucketOptions'], to_s)] }, + "name" => ->(obj) { [:metric_name, obj["name"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "filter" => ->(obj) { [:metric_filter, obj["filter"]] }, + "metricDescriptor" => ->(obj) { [:metric_descriptor, GoogleInSpec::Logging::Property::MetricMetricDescriptor.new(obj["metricDescriptor"], to_s)] }, + "labelExtractors" => ->(obj) { [:label_extractors, obj["labelExtractors"]] }, + "valueExtractor" => ->(obj) { [:value_extractor, obj["valueExtractor"]] }, + "bucketOptions" => ->(obj) { [:bucket_options, GoogleInSpec::Logging::Property::MetricBucketOptions.new(obj["bucketOptions"], to_s)] }, } end private def product_url(_ = nil) - 'https://logging.googleapis.com/v2/' + "https://logging.googleapis.com/v2/" end def resource_base_url - 'projects/{{project}}/metrics' + "projects/{{project}}/metrics" end end diff --git a/libraries/google_project_service.rb b/libraries/google_project_service.rb index 2c819b8bc..63c4335b8 100644 --- a/libraries/google_project_service.rb +++ b/libraries/google_project_service.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/serviceusage/property/service_config' -require 'google/serviceusage/property/service_config_apis' +require "gcp_backend" +require "google/serviceusage/property/service_config" +require "google/serviceusage/property/service_config_apis" # A provider to manage Service Usage resources. class ServiceUsageService < GcpResourceBase - name 'google_project_service' - desc 'Service' - supports platform: 'gcp' + name "google_project_service" + desc "Service" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -33,16 +33,16 @@ class ServiceUsageService < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @parent = @fetched['parent'] - @state = @fetched['state'] - @disable_dependent_services = @fetched['disableDependentServices'] - @config = GoogleInSpec::ServiceUsage::Property::ServiceConfig.new(@fetched['config'], to_s) + @name = @fetched["name"] + @parent = @fetched["parent"] + @state = @fetched["state"] + @disable_dependent_services = @fetched["disableDependentServices"] + @config = GoogleInSpec::ServiceUsage::Property::ServiceConfig.new(@fetched["config"], to_s) end def exists? @@ -57,13 +57,13 @@ def to_s def product_url(beta = false) if beta - 'https://serviceusage.googleapis.com/v1beta1/' + "https://serviceusage.googleapis.com/v1beta1/" else - 'https://serviceusage.googleapis.com/v1/' + "https://serviceusage.googleapis.com/v1/" end end def resource_base_url - 'projects/{{project}}/services/{{name}}' + "projects/{{project}}/services/{{name}}" end end diff --git a/libraries/google_project_services.rb b/libraries/google_project_services.rb index 5e0d70983..2dfa25e1b 100644 --- a/libraries/google_project_services.rb +++ b/libraries/google_project_services.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ServiceUsageServices < GcpResourceBase - name 'google_project_services' - desc 'Service plural resource' - supports platform: 'gcp' + name "google_project_services" + desc "Service plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class ServiceUsageServices < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('services') + @table = fetch_wrapped_resource("services") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'parent' => ->(obj) { [:parent, obj['parent']] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'disableDependentServices' => ->(obj) { [:disable_dependent_services, obj['disableDependentServices']] }, - 'config' => ->(obj) { [:config, GoogleInSpec::ServiceUsage::Property::ServiceConfig.new(obj['config'], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "parent" => ->(obj) { [:parent, obj["parent"]] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "disableDependentServices" => ->(obj) { [:disable_dependent_services, obj["disableDependentServices"]] }, + "config" => ->(obj) { [:config, GoogleInSpec::ServiceUsage::Property::ServiceConfig.new(obj["config"], to_s)] }, } end @@ -79,13 +79,13 @@ def transformers def product_url(beta = false) if beta - 'https://serviceusage.googleapis.com/v1beta1/' + "https://serviceusage.googleapis.com/v1beta1/" else - 'https://serviceusage.googleapis.com/v1/' + "https://serviceusage.googleapis.com/v1/" end end def resource_base_url - 'projects/{{project}}/services' + "projects/{{project}}/services" end end diff --git a/libraries/google_projects.rb b/libraries/google_projects.rb index 686477a49..34ac06022 100644 --- a/libraries/google_projects.rb +++ b/libraries/google_projects.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ResourceManagerProjects < GcpResourceBase - name 'google_projects' - desc 'Project plural resource' - supports platform: 'gcp' + name "google_projects" + desc "Project plural resource" + supports platform: "gcp" attr_reader :table @@ -36,12 +36,12 @@ class ResourceManagerProjects < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('projects') + @table = fetch_wrapped_resource("projects") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'projectNumber' => ->(obj) { [:project_number, obj['projectNumber']] }, - 'lifecycleState' => ->(obj) { [:lifecycle_state, obj['lifecycleState']] }, - 'name' => ->(obj) { [:project_name, obj['name']] }, - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'parent' => ->(obj) { [:parent, GoogleInSpec::ResourceManager::Property::ProjectParent.new(obj['parent'], to_s)] }, - 'projectId' => ->(obj) { [:project_id, obj['projectId']] }, + "projectNumber" => ->(obj) { [:project_number, obj["projectNumber"]] }, + "lifecycleState" => ->(obj) { [:lifecycle_state, obj["lifecycleState"]] }, + "name" => ->(obj) { [:project_name, obj["name"]] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "parent" => ->(obj) { [:parent, GoogleInSpec::ResourceManager::Property::ProjectParent.new(obj["parent"], to_s)] }, + "projectId" => ->(obj) { [:project_id, obj["projectId"]] }, } end @@ -87,10 +87,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://cloudresourcemanager.googleapis.com/v1/' + "https://cloudresourcemanager.googleapis.com/v1/" end def resource_base_url - 'projects' + "projects" end end diff --git a/libraries/google_pubsub_subscription.rb b/libraries/google_pubsub_subscription.rb index e9bc2a783..1345eecf9 100644 --- a/libraries/google_pubsub_subscription.rb +++ b/libraries/google_pubsub_subscription.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,18 +13,18 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/pubsub/property/subscription_dead_letter_policy' -require 'google/pubsub/property/subscription_expiration_policy' -require 'google/pubsub/property/subscription_push_config' -require 'google/pubsub/property/subscription_push_config_oidc_token' -require 'google/pubsub/property/subscription_retry_policy' +require "gcp_backend" +require "google/pubsub/property/subscription_dead_letter_policy" +require "google/pubsub/property/subscription_expiration_policy" +require "google/pubsub/property/subscription_push_config" +require "google/pubsub/property/subscription_push_config_oidc_token" +require "google/pubsub/property/subscription_retry_policy" # A provider to manage Cloud Pub/Sub resources. class PubsubSubscription < GcpResourceBase - name 'google_pubsub_subscription' - desc 'Subscription' - supports platform: 'gcp' + name "google_pubsub_subscription" + desc "Subscription" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -43,23 +43,23 @@ class PubsubSubscription < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = name_from_self_link(@fetched['name']) - @topic = @fetched['topic'] - @labels = @fetched['labels'] - @push_config = GoogleInSpec::Pubsub::Property::SubscriptionPushConfig.new(@fetched['pushConfig'], to_s) - @ack_deadline_seconds = @fetched['ackDeadlineSeconds'] - @message_retention_duration = @fetched['messageRetentionDuration'] - @retain_acked_messages = @fetched['retainAckedMessages'] - @expiration_policy = GoogleInSpec::Pubsub::Property::SubscriptionExpirationPolicy.new(@fetched['expirationPolicy'], to_s) - @filter = @fetched['filter'] - @dead_letter_policy = GoogleInSpec::Pubsub::Property::SubscriptionDeadLetterPolicy.new(@fetched['deadLetterPolicy'], to_s) - @retry_policy = GoogleInSpec::Pubsub::Property::SubscriptionRetryPolicy.new(@fetched['retryPolicy'], to_s) - @enable_message_ordering = @fetched['enableMessageOrdering'] + @name = name_from_self_link(@fetched["name"]) + @topic = @fetched["topic"] + @labels = @fetched["labels"] + @push_config = GoogleInSpec::Pubsub::Property::SubscriptionPushConfig.new(@fetched["pushConfig"], to_s) + @ack_deadline_seconds = @fetched["ackDeadlineSeconds"] + @message_retention_duration = @fetched["messageRetentionDuration"] + @retain_acked_messages = @fetched["retainAckedMessages"] + @expiration_policy = GoogleInSpec::Pubsub::Property::SubscriptionExpirationPolicy.new(@fetched["expirationPolicy"], to_s) + @filter = @fetched["filter"] + @dead_letter_policy = GoogleInSpec::Pubsub::Property::SubscriptionDeadLetterPolicy.new(@fetched["deadLetterPolicy"], to_s) + @retry_policy = GoogleInSpec::Pubsub::Property::SubscriptionRetryPolicy.new(@fetched["retryPolicy"], to_s) + @enable_message_ordering = @fetched["enableMessageOrdering"] end def exists? @@ -73,10 +73,10 @@ def to_s private def product_url(_ = nil) - 'https://pubsub.googleapis.com/v1/' + "https://pubsub.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/subscriptions/{{name}}' + "projects/{{project}}/subscriptions/{{name}}" end end diff --git a/libraries/google_pubsub_subscription_iam_binding.rb b/libraries/google_pubsub_subscription_iam_binding.rb index 5d4d799e1..e64ee93f7 100644 --- a/libraries/google_pubsub_subscription_iam_binding.rb +++ b/libraries/google_pubsub_subscription_iam_binding.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_bindings" # A provider to manage Cloud Pub/Sub IAM Binding resources. class SubscriptionIamBinding < GcpResourceBase - name 'google_pubsub_subscription_iam_binding' - desc 'Subscription Iam Binding' - supports platform: 'gcp' + name "google_pubsub_subscription_iam_binding" + desc "Subscription Iam Binding" + supports platform: "gcp" attr_reader :params @@ -30,12 +30,12 @@ def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] @@ -75,10 +75,10 @@ def to_s private def product_url - 'https://pubsub.googleapis.com/v1/' + "https://pubsub.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/subscriptions/{{name}}:getIamPolicy' + "projects/{{project}}/subscriptions/{{name}}:getIamPolicy" end end diff --git a/libraries/google_pubsub_subscription_iam_policy.rb b/libraries/google_pubsub_subscription_iam_policy.rb index 745ca59a9..0328b29b9 100644 --- a/libraries/google_pubsub_subscription_iam_policy.rb +++ b/libraries/google_pubsub_subscription_iam_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_audit_configs' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_audit_configs" +require "google/iam/property/iam_policy_bindings" # A provider to manage Cloud Pub/Sub IAM Policy resources. class SubscriptionIamPolicy < GcpResourceBase - name 'google_pubsub_subscription_iam_policy' - desc 'Subscription Iam Policy' - supports platform: 'gcp' + name "google_pubsub_subscription_iam_policy" + desc "Subscription Iam Policy" + supports platform: "gcp" attr_reader :params attr_reader :bindings @@ -30,13 +30,13 @@ class SubscriptionIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) - @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) + @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched["auditConfigs"], to_s) end def exists? @@ -58,10 +58,10 @@ def count private def product_url - 'https://pubsub.googleapis.com/v1/' + "https://pubsub.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/subscriptions/{{name}}:getIamPolicy' + "projects/{{project}}/subscriptions/{{name}}:getIamPolicy" end end diff --git a/libraries/google_pubsub_subscriptions.rb b/libraries/google_pubsub_subscriptions.rb index aacdd896b..d4c350a5e 100644 --- a/libraries/google_pubsub_subscriptions.rb +++ b/libraries/google_pubsub_subscriptions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class PubsubSubscriptions < GcpResourceBase - name 'google_pubsub_subscriptions' - desc 'Subscription plural resource' - supports platform: 'gcp' + name "google_pubsub_subscriptions" + desc "Subscription plural resource" + supports platform: "gcp" attr_reader :table @@ -41,12 +41,12 @@ class PubsubSubscriptions < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('subscriptions') + @table = fetch_wrapped_resource("subscriptions") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -74,28 +74,28 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, name_from_self_link(obj['name'])] }, - 'topic' => ->(obj) { [:topic, obj['topic']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'pushConfig' => ->(obj) { [:push_config, GoogleInSpec::Pubsub::Property::SubscriptionPushConfig.new(obj['pushConfig'], to_s)] }, - 'ackDeadlineSeconds' => ->(obj) { [:ack_deadline_seconds, obj['ackDeadlineSeconds']] }, - 'messageRetentionDuration' => ->(obj) { [:message_retention_duration, obj['messageRetentionDuration']] }, - 'retainAckedMessages' => ->(obj) { [:retain_acked_messages, obj['retainAckedMessages']] }, - 'expirationPolicy' => ->(obj) { [:expiration_policy, GoogleInSpec::Pubsub::Property::SubscriptionExpirationPolicy.new(obj['expirationPolicy'], to_s)] }, - 'filter' => ->(obj) { [:filter, obj['filter']] }, - 'deadLetterPolicy' => ->(obj) { [:dead_letter_policy, GoogleInSpec::Pubsub::Property::SubscriptionDeadLetterPolicy.new(obj['deadLetterPolicy'], to_s)] }, - 'retryPolicy' => ->(obj) { [:retry_policy, GoogleInSpec::Pubsub::Property::SubscriptionRetryPolicy.new(obj['retryPolicy'], to_s)] }, - 'enableMessageOrdering' => ->(obj) { [:enable_message_ordering, obj['enableMessageOrdering']] }, + "name" => ->(obj) { [:name, name_from_self_link(obj["name"])] }, + "topic" => ->(obj) { [:topic, obj["topic"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "pushConfig" => ->(obj) { [:push_config, GoogleInSpec::Pubsub::Property::SubscriptionPushConfig.new(obj["pushConfig"], to_s)] }, + "ackDeadlineSeconds" => ->(obj) { [:ack_deadline_seconds, obj["ackDeadlineSeconds"]] }, + "messageRetentionDuration" => ->(obj) { [:message_retention_duration, obj["messageRetentionDuration"]] }, + "retainAckedMessages" => ->(obj) { [:retain_acked_messages, obj["retainAckedMessages"]] }, + "expirationPolicy" => ->(obj) { [:expiration_policy, GoogleInSpec::Pubsub::Property::SubscriptionExpirationPolicy.new(obj["expirationPolicy"], to_s)] }, + "filter" => ->(obj) { [:filter, obj["filter"]] }, + "deadLetterPolicy" => ->(obj) { [:dead_letter_policy, GoogleInSpec::Pubsub::Property::SubscriptionDeadLetterPolicy.new(obj["deadLetterPolicy"], to_s)] }, + "retryPolicy" => ->(obj) { [:retry_policy, GoogleInSpec::Pubsub::Property::SubscriptionRetryPolicy.new(obj["retryPolicy"], to_s)] }, + "enableMessageOrdering" => ->(obj) { [:enable_message_ordering, obj["enableMessageOrdering"]] }, } end private def product_url(_ = nil) - 'https://pubsub.googleapis.com/v1/' + "https://pubsub.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/subscriptions' + "projects/{{project}}/subscriptions" end end diff --git a/libraries/google_pubsub_topic.rb b/libraries/google_pubsub_topic.rb index b73553f9d..5043f0d88 100644 --- a/libraries/google_pubsub_topic.rb +++ b/libraries/google_pubsub_topic.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/pubsub/property/topic_message_storage_policy' +require "gcp_backend" +require "google/pubsub/property/topic_message_storage_policy" # A provider to manage Cloud Pub/Sub resources. class PubsubTopic < GcpResourceBase - name 'google_pubsub_topic' - desc 'Topic' - supports platform: 'gcp' + name "google_pubsub_topic" + desc "Topic" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -31,15 +31,15 @@ class PubsubTopic < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = name_from_self_link(@fetched['name']) - @kms_key_name = @fetched['kmsKeyName'] - @labels = @fetched['labels'] - @message_storage_policy = GoogleInSpec::Pubsub::Property::TopicMessageStoragePolicy.new(@fetched['messageStoragePolicy'], to_s) + @name = name_from_self_link(@fetched["name"]) + @kms_key_name = @fetched["kmsKeyName"] + @labels = @fetched["labels"] + @message_storage_policy = GoogleInSpec::Pubsub::Property::TopicMessageStoragePolicy.new(@fetched["messageStoragePolicy"], to_s) end def exists? @@ -53,10 +53,10 @@ def to_s private def product_url(_ = nil) - 'https://pubsub.googleapis.com/v1/' + "https://pubsub.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/topics/{{name}}' + "projects/{{project}}/topics/{{name}}" end end diff --git a/libraries/google_pubsub_topic_iam_binding.rb b/libraries/google_pubsub_topic_iam_binding.rb index bfcdf3705..4be3a88ee 100644 --- a/libraries/google_pubsub_topic_iam_binding.rb +++ b/libraries/google_pubsub_topic_iam_binding.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_bindings" # A provider to manage Cloud Pub/Sub IAM Binding resources. class TopicIamBinding < GcpResourceBase - name 'google_pubsub_topic_iam_binding' - desc 'Topic Iam Binding' - supports platform: 'gcp' + name "google_pubsub_topic_iam_binding" + desc "Topic Iam Binding" + supports platform: "gcp" attr_reader :params @@ -30,12 +30,12 @@ def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] @@ -75,10 +75,10 @@ def to_s private def product_url - 'https://pubsub.googleapis.com/v1/' + "https://pubsub.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/topics/{{name}}:getIamPolicy' + "projects/{{project}}/topics/{{name}}:getIamPolicy" end end diff --git a/libraries/google_pubsub_topic_iam_policy.rb b/libraries/google_pubsub_topic_iam_policy.rb index 692aaef96..cb4db27a8 100644 --- a/libraries/google_pubsub_topic_iam_policy.rb +++ b/libraries/google_pubsub_topic_iam_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_audit_configs' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_audit_configs" +require "google/iam/property/iam_policy_bindings" # A provider to manage Cloud Pub/Sub IAM Policy resources. class TopicIamPolicy < GcpResourceBase - name 'google_pubsub_topic_iam_policy' - desc 'Topic Iam Policy' - supports platform: 'gcp' + name "google_pubsub_topic_iam_policy" + desc "Topic Iam Policy" + supports platform: "gcp" attr_reader :params attr_reader :bindings @@ -30,13 +30,13 @@ class TopicIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) - @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) + @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched["auditConfigs"], to_s) end def exists? @@ -58,10 +58,10 @@ def count private def product_url - 'https://pubsub.googleapis.com/v1/' + "https://pubsub.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/topics/{{name}}:getIamPolicy' + "projects/{{project}}/topics/{{name}}:getIamPolicy" end end diff --git a/libraries/google_pubsub_topics.rb b/libraries/google_pubsub_topics.rb index eb6c5a079..0a52c4a2d 100644 --- a/libraries/google_pubsub_topics.rb +++ b/libraries/google_pubsub_topics.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class PubsubTopics < GcpResourceBase - name 'google_pubsub_topics' - desc 'Topic plural resource' - supports platform: 'gcp' + name "google_pubsub_topics" + desc "Topic plural resource" + supports platform: "gcp" attr_reader :table @@ -33,12 +33,12 @@ class PubsubTopics < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('topics') + @table = fetch_wrapped_resource("topics") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -66,20 +66,20 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, name_from_self_link(obj['name'])] }, - 'kmsKeyName' => ->(obj) { [:kms_key_name, obj['kmsKeyName']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'messageStoragePolicy' => ->(obj) { [:message_storage_policy, GoogleInSpec::Pubsub::Property::TopicMessageStoragePolicy.new(obj['messageStoragePolicy'], to_s)] }, + "name" => ->(obj) { [:name, name_from_self_link(obj["name"])] }, + "kmsKeyName" => ->(obj) { [:kms_key_name, obj["kmsKeyName"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "messageStoragePolicy" => ->(obj) { [:message_storage_policy, GoogleInSpec::Pubsub::Property::TopicMessageStoragePolicy.new(obj["messageStoragePolicy"], to_s)] }, } end private def product_url(_ = nil) - 'https://pubsub.googleapis.com/v1/' + "https://pubsub.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/topics' + "projects/{{project}}/topics" end end diff --git a/libraries/google_redis_instance.rb b/libraries/google_redis_instance.rb index df9e82fb6..15ed5b9ab 100644 --- a/libraries/google_redis_instance.rb +++ b/libraries/google_redis_instance.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/redis/property/instance_server_ca_certs' +require "gcp_backend" +require "google/redis/property/instance_server_ca_certs" # A provider to manage Memorystore (Redis) resources. class RedisInstance < GcpResourceBase - name 'google_redis_instance' - desc 'Instance' - supports platform: 'gcp' + name "google_redis_instance" + desc "Instance" + supports platform: "gcp" attr_reader :params attr_reader :alternative_location_id @@ -48,32 +48,32 @@ class RedisInstance < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @alternative_location_id = @fetched['alternativeLocationId'] - @auth_enabled = @fetched['authEnabled'] - @authorized_network = @fetched['authorizedNetwork'] - @connect_mode = @fetched['connectMode'] - @create_time = parse_time_string(@fetched['createTime']) - @current_location_id = @fetched['currentLocationId'] - @display_name = @fetched['displayName'] - @host = @fetched['host'] - @labels = @fetched['labels'] - @redis_configs = @fetched['redisConfigs'] - @location_id = @fetched['locationId'] - @name = @fetched['name'] - @memory_size_gb = @fetched['memorySizeGb'] - @port = @fetched['port'] - @persistence_iam_identity = @fetched['persistenceIamIdentity'] - @redis_version = @fetched['redisVersion'] - @reserved_ip_range = @fetched['reservedIpRange'] - @tier = @fetched['tier'] - @transit_encryption_mode = @fetched['transitEncryptionMode'] - @server_ca_certs = GoogleInSpec::Redis::Property::InstanceServerCaCertsArray.parse(@fetched['serverCaCerts'], to_s) - @region = @fetched['region'] + @alternative_location_id = @fetched["alternativeLocationId"] + @auth_enabled = @fetched["authEnabled"] + @authorized_network = @fetched["authorizedNetwork"] + @connect_mode = @fetched["connectMode"] + @create_time = parse_time_string(@fetched["createTime"]) + @current_location_id = @fetched["currentLocationId"] + @display_name = @fetched["displayName"] + @host = @fetched["host"] + @labels = @fetched["labels"] + @redis_configs = @fetched["redisConfigs"] + @location_id = @fetched["locationId"] + @name = @fetched["name"] + @memory_size_gb = @fetched["memorySizeGb"] + @port = @fetched["port"] + @persistence_iam_identity = @fetched["persistenceIamIdentity"] + @redis_version = @fetched["redisVersion"] + @reserved_ip_range = @fetched["reservedIpRange"] + @tier = @fetched["tier"] + @transit_encryption_mode = @fetched["transitEncryptionMode"] + @server_ca_certs = GoogleInSpec::Redis::Property::InstanceServerCaCertsArray.parse(@fetched["serverCaCerts"], to_s) + @region = @fetched["region"] end # Handles parsing RFC3339 time string @@ -93,13 +93,13 @@ def to_s def product_url(beta = false) if beta - 'https://redis.googleapis.com/v1beta1/' + "https://redis.googleapis.com/v1beta1/" else - 'https://redis.googleapis.com/v1/' + "https://redis.googleapis.com/v1/" end end def resource_base_url - 'projects/{{project}}/locations/{{region}}/instances/{{name}}' + "projects/{{project}}/locations/{{region}}/instances/{{name}}" end end diff --git a/libraries/google_redis_instances.rb b/libraries/google_redis_instances.rb index 4ab18c3a0..ebfb391e5 100644 --- a/libraries/google_redis_instances.rb +++ b/libraries/google_redis_instances.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class RedisInstances < GcpResourceBase - name 'google_redis_instances' - desc 'Instance plural resource' - supports platform: 'gcp' + name "google_redis_instances" + desc "Instance plural resource" + supports platform: "gcp" attr_reader :table @@ -50,12 +50,12 @@ class RedisInstances < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('instances') + @table = fetch_wrapped_resource("instances") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -83,27 +83,27 @@ def transform(key, value) def transformers { - 'alternativeLocationId' => ->(obj) { [:alternative_location_id, obj['alternativeLocationId']] }, - 'authEnabled' => ->(obj) { [:auth_enabled, obj['authEnabled']] }, - 'authorizedNetwork' => ->(obj) { [:authorized_network, obj['authorizedNetwork']] }, - 'connectMode' => ->(obj) { [:connect_mode, obj['connectMode']] }, - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'currentLocationId' => ->(obj) { [:current_location_id, obj['currentLocationId']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'host' => ->(obj) { [:host, obj['host']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'redisConfigs' => ->(obj) { [:redis_configs, obj['redisConfigs']] }, - 'locationId' => ->(obj) { [:location_id, obj['locationId']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'memorySizeGb' => ->(obj) { [:memory_size_gb, obj['memorySizeGb']] }, - 'port' => ->(obj) { [:port, obj['port']] }, - 'persistenceIamIdentity' => ->(obj) { [:persistence_iam_identity, obj['persistenceIamIdentity']] }, - 'redisVersion' => ->(obj) { [:redis_version, obj['redisVersion']] }, - 'reservedIpRange' => ->(obj) { [:reserved_ip_range, obj['reservedIpRange']] }, - 'tier' => ->(obj) { [:tier, obj['tier']] }, - 'transitEncryptionMode' => ->(obj) { [:transit_encryption_mode, obj['transitEncryptionMode']] }, - 'serverCaCerts' => ->(obj) { [:server_ca_certs, GoogleInSpec::Redis::Property::InstanceServerCaCertsArray.parse(obj['serverCaCerts'], to_s)] }, - 'region' => ->(obj) { [:region, obj['region']] }, + "alternativeLocationId" => ->(obj) { [:alternative_location_id, obj["alternativeLocationId"]] }, + "authEnabled" => ->(obj) { [:auth_enabled, obj["authEnabled"]] }, + "authorizedNetwork" => ->(obj) { [:authorized_network, obj["authorizedNetwork"]] }, + "connectMode" => ->(obj) { [:connect_mode, obj["connectMode"]] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "currentLocationId" => ->(obj) { [:current_location_id, obj["currentLocationId"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "host" => ->(obj) { [:host, obj["host"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "redisConfigs" => ->(obj) { [:redis_configs, obj["redisConfigs"]] }, + "locationId" => ->(obj) { [:location_id, obj["locationId"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "memorySizeGb" => ->(obj) { [:memory_size_gb, obj["memorySizeGb"]] }, + "port" => ->(obj) { [:port, obj["port"]] }, + "persistenceIamIdentity" => ->(obj) { [:persistence_iam_identity, obj["persistenceIamIdentity"]] }, + "redisVersion" => ->(obj) { [:redis_version, obj["redisVersion"]] }, + "reservedIpRange" => ->(obj) { [:reserved_ip_range, obj["reservedIpRange"]] }, + "tier" => ->(obj) { [:tier, obj["tier"]] }, + "transitEncryptionMode" => ->(obj) { [:transit_encryption_mode, obj["transitEncryptionMode"]] }, + "serverCaCerts" => ->(obj) { [:server_ca_certs, GoogleInSpec::Redis::Property::InstanceServerCaCertsArray.parse(obj["serverCaCerts"], to_s)] }, + "region" => ->(obj) { [:region, obj["region"]] }, } end @@ -116,13 +116,13 @@ def parse_time_string(time_string) def product_url(beta = false) if beta - 'https://redis.googleapis.com/v1beta1/' + "https://redis.googleapis.com/v1beta1/" else - 'https://redis.googleapis.com/v1/' + "https://redis.googleapis.com/v1/" end end def resource_base_url - 'projects/{{project}}/locations/{{region}}/instances' + "projects/{{project}}/locations/{{region}}/instances" end end diff --git a/libraries/google_resourcemanager_folder.rb b/libraries/google_resourcemanager_folder.rb index 3aa8ec35f..50e9c1823 100644 --- a/libraries/google_resourcemanager_folder.rb +++ b/libraries/google_resourcemanager_folder.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Resource Manager resources. class ResourceManagerFolder < GcpResourceBase - name 'google_resourcemanager_folder' - desc 'Folder' - supports platform: 'gcp' + name "google_resourcemanager_folder" + desc "Folder" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -31,16 +31,16 @@ class ResourceManagerFolder < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @lifecycle_state = @fetched['lifecycleState'] - @create_time = parse_time_string(@fetched['createTime']) - @parent = @fetched['parent'] - @display_name = @fetched['displayName'] + @name = @fetched["name"] + @lifecycle_state = @fetched["lifecycleState"] + @create_time = parse_time_string(@fetched["createTime"]) + @parent = @fetched["parent"] + @display_name = @fetched["displayName"] end # Handles parsing RFC3339 time string @@ -59,10 +59,10 @@ def to_s private def product_url(_ = nil) - 'https://cloudresourcemanager.googleapis.com/v2/' + "https://cloudresourcemanager.googleapis.com/v2/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_resourcemanager_folder_iam_binding.rb b/libraries/google_resourcemanager_folder_iam_binding.rb index ac1b07fa3..c5297735d 100644 --- a/libraries/google_resourcemanager_folder_iam_binding.rb +++ b/libraries/google_resourcemanager_folder_iam_binding.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_bindings" # A provider to manage Resource Manager IAM Binding resources. class FolderIamBinding < GcpResourceBase - name 'google_resourcemanager_folder_iam_binding' - desc 'Folder Iam Binding' - supports platform: 'gcp' + name "google_resourcemanager_folder_iam_binding" + desc "Folder Iam Binding" + supports platform: "gcp" attr_reader :params @@ -30,12 +30,12 @@ def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Post') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Post") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] @@ -75,10 +75,10 @@ def to_s private def product_url - 'https://cloudresourcemanager.googleapis.com/v2/' + "https://cloudresourcemanager.googleapis.com/v2/" end def resource_base_url - '{{name}}:getIamPolicy' + "{{name}}:getIamPolicy" end end diff --git a/libraries/google_resourcemanager_folder_iam_policy.rb b/libraries/google_resourcemanager_folder_iam_policy.rb index a6fad00f9..fcb0dcd9e 100644 --- a/libraries/google_resourcemanager_folder_iam_policy.rb +++ b/libraries/google_resourcemanager_folder_iam_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_audit_configs' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_audit_configs" +require "google/iam/property/iam_policy_bindings" # A provider to manage Resource Manager IAM Policy resources. class FolderIamPolicy < GcpResourceBase - name 'google_resourcemanager_folder_iam_policy' - desc 'Folder Iam Policy' - supports platform: 'gcp' + name "google_resourcemanager_folder_iam_policy" + desc "Folder Iam Policy" + supports platform: "gcp" attr_reader :params attr_reader :bindings @@ -30,13 +30,13 @@ class FolderIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Post') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Post") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) - @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) + @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched["auditConfigs"], to_s) end def exists? @@ -58,10 +58,10 @@ def count private def product_url - 'https://cloudresourcemanager.googleapis.com/v2/' + "https://cloudresourcemanager.googleapis.com/v2/" end def resource_base_url - '{{name}}:getIamPolicy' + "{{name}}:getIamPolicy" end end diff --git a/libraries/google_resourcemanager_folders.rb b/libraries/google_resourcemanager_folders.rb index 5f7666550..0d15d1091 100644 --- a/libraries/google_resourcemanager_folders.rb +++ b/libraries/google_resourcemanager_folders.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class ResourceManagerFolders < GcpResourceBase - name 'google_resourcemanager_folders' - desc 'Folder plural resource' - supports platform: 'gcp' + name "google_resourcemanager_folders" + desc "Folder plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class ResourceManagerFolders < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('folders') + @table = fetch_wrapped_resource("folders") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'lifecycleState' => ->(obj) { [:lifecycle_state, obj['lifecycleState']] }, - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'parent' => ->(obj) { [:parent, obj['parent']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "lifecycleState" => ->(obj) { [:lifecycle_state, obj["lifecycleState"]] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "parent" => ->(obj) { [:parent, obj["parent"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, } end @@ -83,10 +83,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://cloudresourcemanager.googleapis.com/v2/' + "https://cloudresourcemanager.googleapis.com/v2/" end def resource_base_url - 'folders?parent={{parent}}' + "folders?parent={{parent}}" end end diff --git a/libraries/google_runtime_config_config.rb b/libraries/google_runtime_config_config.rb index 57085c749..adc2a3ccf 100644 --- a/libraries/google_runtime_config_config.rb +++ b/libraries/google_runtime_config_config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Runtime Configurator resources. class RuntimeConfigConfig < GcpResourceBase - name 'google_runtime_config_config' - desc 'Config' - supports platform: 'gcp' + name "google_runtime_config_config" + desc "Config" + supports platform: "gcp" attr_reader :params attr_reader :description @@ -28,13 +28,13 @@ class RuntimeConfigConfig < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @description = @fetched['description'] - @name = @fetched['name'] + @description = @fetched["description"] + @name = @fetched["name"] end def exists? @@ -48,10 +48,10 @@ def to_s private def product_url(_ = nil) - 'https://runtimeconfig.googleapis.com/v1beta1/' + "https://runtimeconfig.googleapis.com/v1beta1/" end def resource_base_url - 'projects/{{project}}/configs/{{name}}' + "projects/{{project}}/configs/{{name}}" end end diff --git a/libraries/google_runtime_config_config_iam_binding.rb b/libraries/google_runtime_config_config_iam_binding.rb index f1822cd38..40f3cf5a1 100644 --- a/libraries/google_runtime_config_config_iam_binding.rb +++ b/libraries/google_runtime_config_config_iam_binding.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_bindings" # A provider to manage Runtime Configurator IAM Binding resources. class ConfigIamBinding < GcpResourceBase - name 'google_runtime_config_config_iam_binding' - desc 'Config Iam Binding' - supports platform: 'gcp' + name "google_runtime_config_config_iam_binding" + desc "Config Iam Binding" + supports platform: "gcp" attr_reader :params @@ -30,12 +30,12 @@ def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] @@ -75,10 +75,10 @@ def to_s private def product_url - 'https://runtimeconfig.googleapis.com/v1beta1/' + "https://runtimeconfig.googleapis.com/v1beta1/" end def resource_base_url - 'projects/{{project}}/configs/{{name}}:getIamPolicy' + "projects/{{project}}/configs/{{name}}:getIamPolicy" end end diff --git a/libraries/google_runtime_config_config_iam_policy.rb b/libraries/google_runtime_config_config_iam_policy.rb index 248699819..5cab16a95 100644 --- a/libraries/google_runtime_config_config_iam_policy.rb +++ b/libraries/google_runtime_config_config_iam_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_audit_configs' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_audit_configs" +require "google/iam/property/iam_policy_bindings" # A provider to manage Runtime Configurator IAM Policy resources. class ConfigIamPolicy < GcpResourceBase - name 'google_runtime_config_config_iam_policy' - desc 'Config Iam Policy' - supports platform: 'gcp' + name "google_runtime_config_config_iam_policy" + desc "Config Iam Policy" + supports platform: "gcp" attr_reader :params attr_reader :bindings @@ -30,13 +30,13 @@ class ConfigIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) - @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) + @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched["auditConfigs"], to_s) end def exists? @@ -58,10 +58,10 @@ def count private def product_url - 'https://runtimeconfig.googleapis.com/v1beta1/' + "https://runtimeconfig.googleapis.com/v1beta1/" end def resource_base_url - 'projects/{{project}}/configs/{{name}}:getIamPolicy' + "projects/{{project}}/configs/{{name}}:getIamPolicy" end end diff --git a/libraries/google_runtime_config_configs.rb b/libraries/google_runtime_config_configs.rb index ab252842d..cbcad0a59 100644 --- a/libraries/google_runtime_config_configs.rb +++ b/libraries/google_runtime_config_configs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class RuntimeConfigConfigs < GcpResourceBase - name 'google_runtime_config_configs' - desc 'Config plural resource' - supports platform: 'gcp' + name "google_runtime_config_configs" + desc "Config plural resource" + supports platform: "gcp" attr_reader :table @@ -31,12 +31,12 @@ class RuntimeConfigConfigs < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('configs') + @table = fetch_wrapped_resource("configs") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -64,18 +64,18 @@ def transform(key, value) def transformers { - 'description' => ->(obj) { [:description, obj['description']] }, - 'name' => ->(obj) { [:name, obj['name']] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, } end private def product_url(_ = nil) - 'https://runtimeconfig.googleapis.com/v1beta1/' + "https://runtimeconfig.googleapis.com/v1beta1/" end def resource_base_url - 'projects/{{project}}/configs' + "projects/{{project}}/configs" end end diff --git a/libraries/google_runtime_config_variable.rb b/libraries/google_runtime_config_variable.rb index 48b638b7c..918d7d381 100644 --- a/libraries/google_runtime_config_variable.rb +++ b/libraries/google_runtime_config_variable.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Runtime Configurator resources. class RuntimeConfigVariable < GcpResourceBase - name 'google_runtime_config_variable' - desc 'Variable' - supports platform: 'gcp' + name "google_runtime_config_variable" + desc "Variable" + supports platform: "gcp" attr_reader :params attr_reader :value @@ -30,15 +30,15 @@ class RuntimeConfigVariable < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @value = @fetched['value'] - @text = @fetched['text'] - @name = @fetched['name'] - @config = @fetched['config'] + @value = @fetched["value"] + @text = @fetched["text"] + @name = @fetched["name"] + @config = @fetched["config"] end def exists? @@ -52,10 +52,10 @@ def to_s private def product_url(_ = nil) - 'https://runtimeconfig.googleapis.com/v1beta1/' + "https://runtimeconfig.googleapis.com/v1beta1/" end def resource_base_url - 'projects/{{project}}/configs/{{config}}/variables/{{name}}' + "projects/{{project}}/configs/{{config}}/variables/{{name}}" end end diff --git a/libraries/google_runtime_config_variables.rb b/libraries/google_runtime_config_variables.rb index 9967aaa14..a5c004d98 100644 --- a/libraries/google_runtime_config_variables.rb +++ b/libraries/google_runtime_config_variables.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class RuntimeConfigVariables < GcpResourceBase - name 'google_runtime_config_variables' - desc 'Variable plural resource' - supports platform: 'gcp' + name "google_runtime_config_variables" + desc "Variable plural resource" + supports platform: "gcp" attr_reader :table @@ -33,12 +33,12 @@ class RuntimeConfigVariables < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('variables') + @table = fetch_wrapped_resource("variables") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -66,20 +66,20 @@ def transform(key, value) def transformers { - 'value' => ->(obj) { [:value, obj['value']] }, - 'text' => ->(obj) { [:text, obj['text']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'config' => ->(obj) { [:config, obj['config']] }, + "value" => ->(obj) { [:value, obj["value"]] }, + "text" => ->(obj) { [:text, obj["text"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "config" => ->(obj) { [:config, obj["config"]] }, } end private def product_url(_ = nil) - 'https://runtimeconfig.googleapis.com/v1beta1/' + "https://runtimeconfig.googleapis.com/v1beta1/" end def resource_base_url - 'projects/{{project}}/configs/{{config}}/variables?returnValues=true' + "projects/{{project}}/configs/{{config}}/variables?returnValues=true" end end diff --git a/libraries/google_service_account.rb b/libraries/google_service_account.rb index 92dbb6f2e..109941932 100644 --- a/libraries/google_service_account.rb +++ b/libraries/google_service_account.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud IAM resources. class IAMServiceAccount < GcpResourceBase - name 'google_service_account' - desc 'ServiceAccount' - supports platform: 'gcp' + name "google_service_account" + desc "ServiceAccount" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -32,17 +32,17 @@ class IAMServiceAccount < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @project_id = @fetched['projectId'] - @unique_id = @fetched['uniqueId'] - @email = @fetched['email'] - @display_name = @fetched['displayName'] - @oauth2_client_id = @fetched['oauth2ClientId'] + @name = @fetched["name"] + @project_id = @fetched["projectId"] + @unique_id = @fetched["uniqueId"] + @email = @fetched["email"] + @display_name = @fetched["displayName"] + @oauth2_client_id = @fetched["oauth2ClientId"] end def exists? @@ -56,10 +56,10 @@ def to_s private def product_url(_ = nil) - 'https://iam.googleapis.com/v1/' + "https://iam.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/serviceAccounts/{{name}}' + "projects/{{project}}/serviceAccounts/{{name}}" end end diff --git a/libraries/google_service_account_key.rb b/libraries/google_service_account_key.rb index 31d4b3bc6..8efea7472 100644 --- a/libraries/google_service_account_key.rb +++ b/libraries/google_service_account_key.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud IAM resources. class IAMServiceAccountKey < GcpResourceBase - name 'google_service_account_key' - desc 'ServiceAccountKey' - supports platform: 'gcp' + name "google_service_account_key" + desc "ServiceAccountKey" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -36,21 +36,21 @@ class IAMServiceAccountKey < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @private_key_type = @fetched['privateKeyType'] - @key_algorithm = @fetched['keyAlgorithm'] - @private_key_data = @fetched['privateKeyData'] - @public_key_data = @fetched['publicKeyData'] - @valid_after_time = parse_time_string(@fetched['validAfterTime']) - @valid_before_time = parse_time_string(@fetched['validBeforeTime']) - @key_type = @fetched['keyType'] - @service_account = @fetched['serviceAccount'] - @path = @fetched['path'] + @name = @fetched["name"] + @private_key_type = @fetched["privateKeyType"] + @key_algorithm = @fetched["keyAlgorithm"] + @private_key_data = @fetched["privateKeyData"] + @public_key_data = @fetched["publicKeyData"] + @valid_after_time = parse_time_string(@fetched["validAfterTime"]) + @valid_before_time = parse_time_string(@fetched["validBeforeTime"]) + @key_type = @fetched["keyType"] + @service_account = @fetched["serviceAccount"] + @path = @fetched["path"] end # Handles parsing RFC3339 time string @@ -69,10 +69,10 @@ def to_s private def product_url(_ = nil) - 'https://iam.googleapis.com/v1/' + "https://iam.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/serviceAccounts/{{service_account}}/keys/{{name}}' + "projects/{{project}}/serviceAccounts/{{service_account}}/keys/{{name}}" end end diff --git a/libraries/google_service_account_keys.rb b/libraries/google_service_account_keys.rb index facedd7f0..fc25b7529 100644 --- a/libraries/google_service_account_keys.rb +++ b/libraries/google_service_account_keys.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class IAMServiceAccountKeys < GcpResourceBase - name 'google_service_account_keys' - desc 'ServiceAccountKey plural resource' - supports platform: 'gcp' + name "google_service_account_keys" + desc "ServiceAccountKey plural resource" + supports platform: "gcp" attr_reader :table @@ -39,12 +39,12 @@ class IAMServiceAccountKeys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('keys') + @table = fetch_wrapped_resource("keys") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:key_name, obj['name']] }, - 'privateKeyType' => ->(obj) { [:private_key_type, obj['privateKeyType']] }, - 'keyAlgorithm' => ->(obj) { [:key_algorithm, obj['keyAlgorithm']] }, - 'privateKeyData' => ->(obj) { [:private_key_data, obj['privateKeyData']] }, - 'publicKeyData' => ->(obj) { [:public_key_data, obj['publicKeyData']] }, - 'validAfterTime' => ->(obj) { [:valid_after_time, parse_time_string(obj['validAfterTime'])] }, - 'validBeforeTime' => ->(obj) { [:valid_before_time, parse_time_string(obj['validBeforeTime'])] }, - 'keyType' => ->(obj) { [:key_type, obj['keyType']] }, - 'serviceAccount' => ->(obj) { [:service_account, obj['serviceAccount']] }, - 'path' => ->(obj) { [:path, obj['path']] }, + "name" => ->(obj) { [:key_name, obj["name"]] }, + "privateKeyType" => ->(obj) { [:private_key_type, obj["privateKeyType"]] }, + "keyAlgorithm" => ->(obj) { [:key_algorithm, obj["keyAlgorithm"]] }, + "privateKeyData" => ->(obj) { [:private_key_data, obj["privateKeyData"]] }, + "publicKeyData" => ->(obj) { [:public_key_data, obj["publicKeyData"]] }, + "validAfterTime" => ->(obj) { [:valid_after_time, parse_time_string(obj["validAfterTime"])] }, + "validBeforeTime" => ->(obj) { [:valid_before_time, parse_time_string(obj["validBeforeTime"])] }, + "keyType" => ->(obj) { [:key_type, obj["keyType"]] }, + "serviceAccount" => ->(obj) { [:service_account, obj["serviceAccount"]] }, + "path" => ->(obj) { [:path, obj["path"]] }, } end @@ -93,10 +93,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://iam.googleapis.com/v1/' + "https://iam.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/serviceAccounts/{{service_account}}/keys' + "projects/{{project}}/serviceAccounts/{{service_account}}/keys" end end diff --git a/libraries/google_service_accounts.rb b/libraries/google_service_accounts.rb index b793a4e15..7ddd419a0 100644 --- a/libraries/google_service_accounts.rb +++ b/libraries/google_service_accounts.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class IAMServiceAccounts < GcpResourceBase - name 'google_service_accounts' - desc 'ServiceAccount plural resource' - supports platform: 'gcp' + name "google_service_accounts" + desc "ServiceAccount plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class IAMServiceAccounts < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('accounts') + @table = fetch_wrapped_resource("accounts") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,22 +68,22 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:service_account_name, obj['name']] }, - 'projectId' => ->(obj) { [:project_id, obj['projectId']] }, - 'uniqueId' => ->(obj) { [:service_account_id, obj['uniqueId']] }, - 'email' => ->(obj) { [:service_account_email, obj['email']] }, - 'displayName' => ->(obj) { [:service_account_display_name, obj['displayName']] }, - 'oauth2ClientId' => ->(obj) { [:oauth2_client_id, obj['oauth2ClientId']] }, + "name" => ->(obj) { [:service_account_name, obj["name"]] }, + "projectId" => ->(obj) { [:project_id, obj["projectId"]] }, + "uniqueId" => ->(obj) { [:service_account_id, obj["uniqueId"]] }, + "email" => ->(obj) { [:service_account_email, obj["email"]] }, + "displayName" => ->(obj) { [:service_account_display_name, obj["displayName"]] }, + "oauth2ClientId" => ->(obj) { [:oauth2_client_id, obj["oauth2ClientId"]] }, } end private def product_url(_ = nil) - 'https://iam.googleapis.com/v1/' + "https://iam.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/serviceAccounts' + "projects/{{project}}/serviceAccounts" end end diff --git a/libraries/google_sourcerepo_repositories.rb b/libraries/google_sourcerepo_repositories.rb index 40c3b4166..9331a2416 100644 --- a/libraries/google_sourcerepo_repositories.rb +++ b/libraries/google_sourcerepo_repositories.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class SourceRepoRepositorys < GcpResourceBase - name 'google_sourcerepo_repositories' - desc 'Repository plural resource' - supports platform: 'gcp' + name "google_sourcerepo_repositories" + desc "Repository plural resource" + supports platform: "gcp" attr_reader :table @@ -33,12 +33,12 @@ class SourceRepoRepositorys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('repos') + @table = fetch_wrapped_resource("repos") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -66,20 +66,20 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'url' => ->(obj) { [:url, obj['url']] }, - 'size' => ->(obj) { [:size, obj['size']] }, - 'pubsubConfigs' => ->(obj) { [:pubsub_configs, obj['pubsubConfigs']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "url" => ->(obj) { [:url, obj["url"]] }, + "size" => ->(obj) { [:size, obj["size"]] }, + "pubsubConfigs" => ->(obj) { [:pubsub_configs, obj["pubsubConfigs"]] }, } end private def product_url(_ = nil) - 'https://sourcerepo.googleapis.com/v1/' + "https://sourcerepo.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/repos' + "projects/{{project}}/repos" end end diff --git a/libraries/google_sourcerepo_repository.rb b/libraries/google_sourcerepo_repository.rb index 20312eafc..1f5d474a9 100644 --- a/libraries/google_sourcerepo_repository.rb +++ b/libraries/google_sourcerepo_repository.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/sourcerepo/property/repository_pubsub_configs' +require "gcp_backend" +require "google/sourcerepo/property/repository_pubsub_configs" # A provider to manage Cloud Source Repositories resources. class SourceRepoRepository < GcpResourceBase - name 'google_sourcerepo_repository' - desc 'Repository' - supports platform: 'gcp' + name "google_sourcerepo_repository" + desc "Repository" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -31,15 +31,15 @@ class SourceRepoRepository < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @url = @fetched['url'] - @size = @fetched['size'] - @pubsub_configs = @fetched['pubsubConfigs'] + @name = @fetched["name"] + @url = @fetched["url"] + @size = @fetched["size"] + @pubsub_configs = @fetched["pubsubConfigs"] end def exists? @@ -53,10 +53,10 @@ def to_s private def product_url(_ = nil) - 'https://sourcerepo.googleapis.com/v1/' + "https://sourcerepo.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/repos/{{name}}' + "projects/{{project}}/repos/{{name}}" end end diff --git a/libraries/google_spanner_database.rb b/libraries/google_spanner_database.rb index bf893bbdf..68f4f7204 100644 --- a/libraries/google_spanner_database.rb +++ b/libraries/google_spanner_database.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud Spanner resources. class SpannerDatabase < GcpResourceBase - name 'google_spanner_database' - desc 'Database' - supports platform: 'gcp' + name "google_spanner_database" + desc "Database" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -28,13 +28,13 @@ class SpannerDatabase < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @instance = @fetched['instance'] + @name = @fetched["name"] + @instance = @fetched["instance"] end def exists? @@ -48,10 +48,10 @@ def to_s private def product_url(_ = nil) - 'https://spanner.googleapis.com/v1/' + "https://spanner.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/instances/{{instance}}/databases/{{name}}' + "projects/{{project}}/instances/{{instance}}/databases/{{name}}" end end diff --git a/libraries/google_spanner_databases.rb b/libraries/google_spanner_databases.rb index d00ebe64d..316bf9fd0 100644 --- a/libraries/google_spanner_databases.rb +++ b/libraries/google_spanner_databases.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class SpannerDatabases < GcpResourceBase - name 'google_spanner_databases' - desc 'Database plural resource' - supports platform: 'gcp' + name "google_spanner_databases" + desc "Database plural resource" + supports platform: "gcp" attr_reader :table @@ -31,12 +31,12 @@ class SpannerDatabases < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('databases') + @table = fetch_wrapped_resource("databases") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -64,18 +64,18 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'instance' => ->(obj) { [:instance, obj['instance']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "instance" => ->(obj) { [:instance, obj["instance"]] }, } end private def product_url(_ = nil) - 'https://spanner.googleapis.com/v1/' + "https://spanner.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/instances/{{instance}}/databases' + "projects/{{project}}/instances/{{instance}}/databases" end end diff --git a/libraries/google_spanner_instance.rb b/libraries/google_spanner_instance.rb index e55e886de..a67807bfe 100644 --- a/libraries/google_spanner_instance.rb +++ b/libraries/google_spanner_instance.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud Spanner resources. class SpannerInstance < GcpResourceBase - name 'google_spanner_instance' - desc 'Instance' - supports platform: 'gcp' + name "google_spanner_instance" + desc "Instance" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -31,16 +31,16 @@ class SpannerInstance < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @config = @fetched['config'] - @display_name = @fetched['displayName'] - @node_count = @fetched['nodeCount'] - @labels = @fetched['labels'] + @name = @fetched["name"] + @config = @fetched["config"] + @display_name = @fetched["displayName"] + @node_count = @fetched["nodeCount"] + @labels = @fetched["labels"] end def exists? @@ -54,10 +54,10 @@ def to_s private def product_url(_ = nil) - 'https://spanner.googleapis.com/v1/' + "https://spanner.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/instances/{{name}}' + "projects/{{project}}/instances/{{name}}" end end diff --git a/libraries/google_spanner_instance_iam_binding.rb b/libraries/google_spanner_instance_iam_binding.rb index 8450a5edc..2247b1ba5 100644 --- a/libraries/google_spanner_instance_iam_binding.rb +++ b/libraries/google_spanner_instance_iam_binding.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_bindings" # A provider to manage Cloud Spanner IAM Binding resources. class InstanceIamBinding < GcpResourceBase - name 'google_spanner_instance_iam_binding' - desc 'Instance Iam Binding' - supports platform: 'gcp' + name "google_spanner_instance_iam_binding" + desc "Instance Iam Binding" + supports platform: "gcp" attr_reader :params @@ -30,12 +30,12 @@ def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Post') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Post") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] @@ -75,10 +75,10 @@ def to_s private def product_url - 'https://spanner.googleapis.com/v1/' + "https://spanner.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/instances/{{name}}:getIamPolicy' + "projects/{{project}}/instances/{{name}}:getIamPolicy" end end diff --git a/libraries/google_spanner_instance_iam_policy.rb b/libraries/google_spanner_instance_iam_policy.rb index a70177897..6c9b7d683 100644 --- a/libraries/google_spanner_instance_iam_policy.rb +++ b/libraries/google_spanner_instance_iam_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_audit_configs' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_audit_configs" +require "google/iam/property/iam_policy_bindings" # A provider to manage Cloud Spanner IAM Policy resources. class InstanceIamPolicy < GcpResourceBase - name 'google_spanner_instance_iam_policy' - desc 'Instance Iam Policy' - supports platform: 'gcp' + name "google_spanner_instance_iam_policy" + desc "Instance Iam Policy" + supports platform: "gcp" attr_reader :params attr_reader :bindings @@ -30,13 +30,13 @@ class InstanceIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Post') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Post") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) - @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) + @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched["auditConfigs"], to_s) end def exists? @@ -58,10 +58,10 @@ def count private def product_url - 'https://spanner.googleapis.com/v1/' + "https://spanner.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/instances/{{name}}:getIamPolicy' + "projects/{{project}}/instances/{{name}}:getIamPolicy" end end diff --git a/libraries/google_spanner_instances.rb b/libraries/google_spanner_instances.rb index dfb0e67b7..82998f252 100644 --- a/libraries/google_spanner_instances.rb +++ b/libraries/google_spanner_instances.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class SpannerInstances < GcpResourceBase - name 'google_spanner_instances' - desc 'Instance plural resource' - supports platform: 'gcp' + name "google_spanner_instances" + desc "Instance plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class SpannerInstances < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('instances') + @table = fetch_wrapped_resource("instances") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,21 +67,21 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'config' => ->(obj) { [:config, obj['config']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'nodeCount' => ->(obj) { [:node_count, obj['nodeCount']] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "config" => ->(obj) { [:config, obj["config"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "nodeCount" => ->(obj) { [:node_count, obj["nodeCount"]] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, } end private def product_url(_ = nil) - 'https://spanner.googleapis.com/v1/' + "https://spanner.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/instances' + "projects/{{project}}/instances" end end diff --git a/libraries/google_sql_connect.rb b/libraries/google_sql_connect.rb index bfd4f76c2..148ca9887 100644 --- a/libraries/google_sql_connect.rb +++ b/libraries/google_sql_connect.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/sql/property/connect_ip_addresses' -require 'google/sql/property/connect_server_ca_cert' +require "gcp_backend" +require "google/sql/property/connect_ip_addresses" +require "google/sql/property/connect_server_ca_cert" # A provider to manage Cloud SQL resources. class SQLConnect < GcpResourceBase - name 'google_sql_connect' - desc 'Connect' - supports platform: 'gcp' + name "google_sql_connect" + desc "Connect" + supports platform: "gcp" attr_reader :params attr_reader :region @@ -34,17 +34,17 @@ class SQLConnect < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @region = @fetched['region'] - @ip_addresses = GoogleInSpec::SQL::Property::ConnectIpAddressesArray.parse(@fetched['ipAddresses'], to_s) - @database_version = @fetched['databaseVersion'] - @backend_type = @fetched['backendType'] - @server_ca_cert = GoogleInSpec::SQL::Property::ConnectServerCaCert.new(@fetched['serverCaCert'], to_s) - @instance = @fetched['instance'] + @region = @fetched["region"] + @ip_addresses = GoogleInSpec::SQL::Property::ConnectIpAddressesArray.parse(@fetched["ipAddresses"], to_s) + @database_version = @fetched["databaseVersion"] + @backend_type = @fetched["backendType"] + @server_ca_cert = GoogleInSpec::SQL::Property::ConnectServerCaCert.new(@fetched["serverCaCert"], to_s) + @instance = @fetched["instance"] end def exists? @@ -58,10 +58,10 @@ def to_s private def product_url(_ = nil) - 'https://sqladmin.googleapis.com/sql/v1beta4/' + "https://sqladmin.googleapis.com/sql/v1beta4/" end def resource_base_url - 'projects/{{project}}/instances/{{instance}}/connectSettings' + "projects/{{project}}/instances/{{instance}}/connectSettings" end end diff --git a/libraries/google_sql_database.rb b/libraries/google_sql_database.rb index 37f90cd2b..e97e519f9 100644 --- a/libraries/google_sql_database.rb +++ b/libraries/google_sql_database.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud SQL resources. class SQLDatabase < GcpResourceBase - name 'google_sql_database' - desc 'Database' - supports platform: 'gcp' + name "google_sql_database" + desc "Database" + supports platform: "gcp" attr_reader :params attr_reader :charset @@ -30,15 +30,15 @@ class SQLDatabase < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @charset = @fetched['charset'] - @collation = @fetched['collation'] - @name = @fetched['name'] - @instance = @fetched['instance'] + @charset = @fetched["charset"] + @collation = @fetched["collation"] + @name = @fetched["name"] + @instance = @fetched["instance"] end def exists? @@ -52,10 +52,10 @@ def to_s private def product_url(_ = nil) - 'https://sqladmin.googleapis.com/sql/v1beta4/' + "https://sqladmin.googleapis.com/sql/v1beta4/" end def resource_base_url - 'projects/{{project}}/instances/{{instance}}/databases/{{name}}' + "projects/{{project}}/instances/{{instance}}/databases/{{name}}" end end diff --git a/libraries/google_sql_database_instance.rb b/libraries/google_sql_database_instance.rb index 2e3f818c7..67dbb3f31 100644 --- a/libraries/google_sql_database_instance.rb +++ b/libraries/google_sql_database_instance.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,25 +13,25 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/sql/property/databaseinstance_disk_encryption_configuration' -require 'google/sql/property/databaseinstance_disk_encryption_status' -require 'google/sql/property/databaseinstance_failover_replica' -require 'google/sql/property/databaseinstance_ip_addresses' -require 'google/sql/property/databaseinstance_replica_configuration' -require 'google/sql/property/databaseinstance_replica_configuration_mysql_replica_configuration' -require 'google/sql/property/databaseinstance_server_ca_cert' -require 'google/sql/property/databaseinstance_settings' -require 'google/sql/property/databaseinstance_settings_backup_configuration' -require 'google/sql/property/databaseinstance_settings_database_flags' -require 'google/sql/property/databaseinstance_settings_ip_configuration' -require 'google/sql/property/databaseinstance_settings_ip_configuration_authorized_networks' +require "gcp_backend" +require "google/sql/property/databaseinstance_disk_encryption_configuration" +require "google/sql/property/databaseinstance_disk_encryption_status" +require "google/sql/property/databaseinstance_failover_replica" +require "google/sql/property/databaseinstance_ip_addresses" +require "google/sql/property/databaseinstance_replica_configuration" +require "google/sql/property/databaseinstance_replica_configuration_mysql_replica_configuration" +require "google/sql/property/databaseinstance_server_ca_cert" +require "google/sql/property/databaseinstance_settings" +require "google/sql/property/databaseinstance_settings_backup_configuration" +require "google/sql/property/databaseinstance_settings_database_flags" +require "google/sql/property/databaseinstance_settings_ip_configuration" +require "google/sql/property/databaseinstance_settings_ip_configuration_authorized_networks" # A provider to manage Cloud SQL resources. class SQLDatabaseInstance < GcpResourceBase - name 'google_sql_database_instance' - desc 'DatabaseInstance' - supports platform: 'gcp' + name "google_sql_database_instance" + desc "DatabaseInstance" + supports platform: "gcp" attr_reader :params attr_reader :backend_type @@ -57,30 +57,30 @@ class SQLDatabaseInstance < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @backend_type = @fetched['backendType'] - @kind = @fetched['kind'] - @connection_name = @fetched['connectionName'] - @database_version = @fetched['databaseVersion'] - @failover_replica = GoogleInSpec::SQL::Property::DatabaseInstanceFailoverReplica.new(@fetched['failoverReplica'], to_s) - @instance_type = @fetched['instanceType'] - @ip_addresses = GoogleInSpec::SQL::Property::DatabaseInstanceIpAddressesArray.parse(@fetched['ipAddresses'], to_s) - @ipv6_address = @fetched['ipv6Address'] - @master_instance_name = @fetched['masterInstanceName'] - @max_disk_size = @fetched['maxDiskSize'] - @name = @fetched['name'] - @region = @fetched['region'] - @replica_configuration = GoogleInSpec::SQL::Property::DatabaseInstanceReplicaConfiguration.new(@fetched['replicaConfiguration'], to_s) - @settings = GoogleInSpec::SQL::Property::DatabaseInstanceSettings.new(@fetched['settings'], to_s) - @gce_zone = @fetched['gceZone'] - @state = @fetched['state'] - @disk_encryption_configuration = GoogleInSpec::SQL::Property::DatabaseInstanceDiskEncryptionConfiguration.new(@fetched['diskEncryptionConfiguration'], to_s) - @disk_encryption_status = GoogleInSpec::SQL::Property::DatabaseInstanceDiskEncryptionStatus.new(@fetched['diskEncryptionStatus'], to_s) - @server_ca_cert = GoogleInSpec::SQL::Property::DatabaseInstanceServerCaCert.new(@fetched['serverCaCert'], to_s) + @backend_type = @fetched["backendType"] + @kind = @fetched["kind"] + @connection_name = @fetched["connectionName"] + @database_version = @fetched["databaseVersion"] + @failover_replica = GoogleInSpec::SQL::Property::DatabaseInstanceFailoverReplica.new(@fetched["failoverReplica"], to_s) + @instance_type = @fetched["instanceType"] + @ip_addresses = GoogleInSpec::SQL::Property::DatabaseInstanceIpAddressesArray.parse(@fetched["ipAddresses"], to_s) + @ipv6_address = @fetched["ipv6Address"] + @master_instance_name = @fetched["masterInstanceName"] + @max_disk_size = @fetched["maxDiskSize"] + @name = @fetched["name"] + @region = @fetched["region"] + @replica_configuration = GoogleInSpec::SQL::Property::DatabaseInstanceReplicaConfiguration.new(@fetched["replicaConfiguration"], to_s) + @settings = GoogleInSpec::SQL::Property::DatabaseInstanceSettings.new(@fetched["settings"], to_s) + @gce_zone = @fetched["gceZone"] + @state = @fetched["state"] + @disk_encryption_configuration = GoogleInSpec::SQL::Property::DatabaseInstanceDiskEncryptionConfiguration.new(@fetched["diskEncryptionConfiguration"], to_s) + @disk_encryption_status = GoogleInSpec::SQL::Property::DatabaseInstanceDiskEncryptionStatus.new(@fetched["diskEncryptionStatus"], to_s) + @server_ca_cert = GoogleInSpec::SQL::Property::DatabaseInstanceServerCaCert.new(@fetched["serverCaCert"], to_s) end def exists? @@ -93,7 +93,7 @@ def to_s def has_ip_configuration_require_ssl? return false if @settings&.ip_configuration&.require_ssl.nil? - return true if @settings.ip_configuration.require_ssl.to_s.casecmp('true').zero? + return true if @settings.ip_configuration.require_ssl.to_s.casecmp("true") == 0 false end @@ -103,17 +103,17 @@ def authorized_networks end def primary_ip_address - return '' if !@ip_addresses.empty? || @ip_addresses[0].ip_address.nil? + return "" if !@ip_addresses.empty? || @ip_addresses[0].ip_address.nil? @ip_addresses[0].ip_address end private def product_url(_ = nil) - 'https://sqladmin.googleapis.com/v1/' + "https://sqladmin.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/instances/{{instance}}' + "projects/{{project}}/instances/{{instance}}" end end diff --git a/libraries/google_sql_database_instances.rb b/libraries/google_sql_database_instances.rb index 59f9c49be..42379e7e5 100644 --- a/libraries/google_sql_database_instances.rb +++ b/libraries/google_sql_database_instances.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class SQLDatabaseInstances < GcpResourceBase - name 'google_sql_database_instances' - desc 'DatabaseInstance plural resource' - supports platform: 'gcp' + name "google_sql_database_instances" + desc "DatabaseInstance plural resource" + supports platform: "gcp" attr_reader :table @@ -48,12 +48,12 @@ class SQLDatabaseInstances < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -81,35 +81,35 @@ def transform(key, value) def transformers { - 'backendType' => ->(obj) { [:backend_type, obj['backendType']] }, - 'kind' => ->(obj) { [:kind, obj['kind']] }, - 'connectionName' => ->(obj) { [:connection_name, obj['connectionName']] }, - 'databaseVersion' => ->(obj) { [:instance_version, obj['databaseVersion']] }, - 'failoverReplica' => ->(obj) { [:failover_replica, GoogleInSpec::SQL::Property::DatabaseInstanceFailoverReplica.new(obj['failoverReplica'], to_s)] }, - 'instanceType' => ->(obj) { [:instance_type, obj['instanceType']] }, - 'ipAddresses' => ->(obj) { [:ip_addresses, GoogleInSpec::SQL::Property::DatabaseInstanceIpAddressesArray.parse(obj['ipAddresses'], to_s)] }, - 'ipv6Address' => ->(obj) { [:ipv6_address, obj['ipv6Address']] }, - 'masterInstanceName' => ->(obj) { [:master_instance_name, obj['masterInstanceName']] }, - 'maxDiskSize' => ->(obj) { [:max_disk_size, obj['maxDiskSize']] }, - 'name' => ->(obj) { [:instance_name, obj['name']] }, - 'region' => ->(obj) { [:instance_region, obj['region']] }, - 'replicaConfiguration' => ->(obj) { [:replica_configuration, GoogleInSpec::SQL::Property::DatabaseInstanceReplicaConfiguration.new(obj['replicaConfiguration'], to_s)] }, - 'settings' => ->(obj) { [:settings, GoogleInSpec::SQL::Property::DatabaseInstanceSettings.new(obj['settings'], to_s)] }, - 'gceZone' => ->(obj) { [:instance_zone, obj['gceZone']] }, - 'state' => ->(obj) { [:instance_state, obj['state']] }, - 'diskEncryptionConfiguration' => ->(obj) { [:disk_encryption_configuration, GoogleInSpec::SQL::Property::DatabaseInstanceDiskEncryptionConfiguration.new(obj['diskEncryptionConfiguration'], to_s)] }, - 'diskEncryptionStatus' => ->(obj) { [:disk_encryption_status, GoogleInSpec::SQL::Property::DatabaseInstanceDiskEncryptionStatus.new(obj['diskEncryptionStatus'], to_s)] }, - 'serverCaCert' => ->(obj) { [:server_ca_cert, GoogleInSpec::SQL::Property::DatabaseInstanceServerCaCert.new(obj['serverCaCert'], to_s)] }, + "backendType" => ->(obj) { [:backend_type, obj["backendType"]] }, + "kind" => ->(obj) { [:kind, obj["kind"]] }, + "connectionName" => ->(obj) { [:connection_name, obj["connectionName"]] }, + "databaseVersion" => ->(obj) { [:instance_version, obj["databaseVersion"]] }, + "failoverReplica" => ->(obj) { [:failover_replica, GoogleInSpec::SQL::Property::DatabaseInstanceFailoverReplica.new(obj["failoverReplica"], to_s)] }, + "instanceType" => ->(obj) { [:instance_type, obj["instanceType"]] }, + "ipAddresses" => ->(obj) { [:ip_addresses, GoogleInSpec::SQL::Property::DatabaseInstanceIpAddressesArray.parse(obj["ipAddresses"], to_s)] }, + "ipv6Address" => ->(obj) { [:ipv6_address, obj["ipv6Address"]] }, + "masterInstanceName" => ->(obj) { [:master_instance_name, obj["masterInstanceName"]] }, + "maxDiskSize" => ->(obj) { [:max_disk_size, obj["maxDiskSize"]] }, + "name" => ->(obj) { [:instance_name, obj["name"]] }, + "region" => ->(obj) { [:instance_region, obj["region"]] }, + "replicaConfiguration" => ->(obj) { [:replica_configuration, GoogleInSpec::SQL::Property::DatabaseInstanceReplicaConfiguration.new(obj["replicaConfiguration"], to_s)] }, + "settings" => ->(obj) { [:settings, GoogleInSpec::SQL::Property::DatabaseInstanceSettings.new(obj["settings"], to_s)] }, + "gceZone" => ->(obj) { [:instance_zone, obj["gceZone"]] }, + "state" => ->(obj) { [:instance_state, obj["state"]] }, + "diskEncryptionConfiguration" => ->(obj) { [:disk_encryption_configuration, GoogleInSpec::SQL::Property::DatabaseInstanceDiskEncryptionConfiguration.new(obj["diskEncryptionConfiguration"], to_s)] }, + "diskEncryptionStatus" => ->(obj) { [:disk_encryption_status, GoogleInSpec::SQL::Property::DatabaseInstanceDiskEncryptionStatus.new(obj["diskEncryptionStatus"], to_s)] }, + "serverCaCert" => ->(obj) { [:server_ca_cert, GoogleInSpec::SQL::Property::DatabaseInstanceServerCaCert.new(obj["serverCaCert"], to_s)] }, } end private def product_url(_ = nil) - 'https://sqladmin.googleapis.com/v1/' + "https://sqladmin.googleapis.com/v1/" end def resource_base_url - 'projects/{{project}}/instances' + "projects/{{project}}/instances" end end diff --git a/libraries/google_sql_databases.rb b/libraries/google_sql_databases.rb index 35f758179..13cb78af6 100644 --- a/libraries/google_sql_databases.rb +++ b/libraries/google_sql_databases.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class SQLDatabases < GcpResourceBase - name 'google_sql_databases' - desc 'Database plural resource' - supports platform: 'gcp' + name "google_sql_databases" + desc "Database plural resource" + supports platform: "gcp" attr_reader :table @@ -33,12 +33,12 @@ class SQLDatabases < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -66,20 +66,20 @@ def transform(key, value) def transformers { - 'charset' => ->(obj) { [:charset, obj['charset']] }, - 'collation' => ->(obj) { [:collation, obj['collation']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'instance' => ->(obj) { [:instance, obj['instance']] }, + "charset" => ->(obj) { [:charset, obj["charset"]] }, + "collation" => ->(obj) { [:collation, obj["collation"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "instance" => ->(obj) { [:instance, obj["instance"]] }, } end private def product_url(_ = nil) - 'https://sqladmin.googleapis.com/sql/v1beta4/' + "https://sqladmin.googleapis.com/sql/v1beta4/" end def resource_base_url - 'projects/{{project}}/instances/{{instance}}/databases' + "projects/{{project}}/instances/{{instance}}/databases" end end diff --git a/libraries/google_sql_flags.rb b/libraries/google_sql_flags.rb index e831bc765..42a9ae3f8 100644 --- a/libraries/google_sql_flags.rb +++ b/libraries/google_sql_flags.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class SQLFlags < GcpResourceBase - name 'google_sql_flags' - desc 'Flag plural resource' - supports platform: 'gcp' + name "google_sql_flags" + desc "Flag plural resource" + supports platform: "gcp" attr_reader :table @@ -36,12 +36,12 @@ class SQLFlags < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -69,23 +69,23 @@ def transform(key, value) def transformers { - 'allowedStringValues' => ->(obj) { [:allowed_string_values, obj['allowedStringValues']] }, - 'appliesTo' => ->(obj) { [:applies_to, obj['appliesTo']] }, - 'maxValue' => ->(obj) { [:max_value, obj['maxValue']] }, - 'minValue' => ->(obj) { [:min_value, obj['minValue']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'requiresRestart' => ->(obj) { [:requires_restart, obj['requiresRestart']] }, - 'type' => ->(obj) { [:type, obj['type']] }, + "allowedStringValues" => ->(obj) { [:allowed_string_values, obj["allowedStringValues"]] }, + "appliesTo" => ->(obj) { [:applies_to, obj["appliesTo"]] }, + "maxValue" => ->(obj) { [:max_value, obj["maxValue"]] }, + "minValue" => ->(obj) { [:min_value, obj["minValue"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "requiresRestart" => ->(obj) { [:requires_restart, obj["requiresRestart"]] }, + "type" => ->(obj) { [:type, obj["type"]] }, } end private def product_url(_ = nil) - 'https://sqladmin.googleapis.com/sql/v1beta4/' + "https://sqladmin.googleapis.com/sql/v1beta4/" end def resource_base_url - 'flags' + "flags" end end diff --git a/libraries/google_sql_operation.rb b/libraries/google_sql_operation.rb index c4b18e62b..2f48e68e8 100644 --- a/libraries/google_sql_operation.rb +++ b/libraries/google_sql_operation.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud SQL resources. class SQLOperation < GcpResourceBase - name 'google_sql_operation' - desc 'Operation' - supports platform: 'gcp' + name "google_sql_operation" + desc "Operation" + supports platform: "gcp" attr_reader :params attr_reader :user @@ -31,16 +31,16 @@ class SQLOperation < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @user = @fetched['user'] - @name = @fetched['name'] - @status = @fetched['status'] - @operation_type = @fetched['operationType'] - @instance = @fetched['instance'] + @user = @fetched["user"] + @name = @fetched["name"] + @status = @fetched["status"] + @operation_type = @fetched["operationType"] + @instance = @fetched["instance"] end def exists? @@ -54,10 +54,10 @@ def to_s private def product_url(_ = nil) - 'https://sqladmin.googleapis.com/sql/v1beta4/' + "https://sqladmin.googleapis.com/sql/v1beta4/" end def resource_base_url - 'projects/{{project}}/operations/{{operation}}' + "projects/{{project}}/operations/{{operation}}" end end diff --git a/libraries/google_sql_operations.rb b/libraries/google_sql_operations.rb index bdc954076..64a8f1bb1 100644 --- a/libraries/google_sql_operations.rb +++ b/libraries/google_sql_operations.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class SQLOperations < GcpResourceBase - name 'google_sql_operations' - desc 'Operation plural resource' - supports platform: 'gcp' + name "google_sql_operations" + desc "Operation plural resource" + supports platform: "gcp" attr_reader :table @@ -34,12 +34,12 @@ class SQLOperations < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -67,21 +67,21 @@ def transform(key, value) def transformers { - 'user' => ->(obj) { [:user, obj['user']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'status' => ->(obj) { [:status, obj['status']] }, - 'operationType' => ->(obj) { [:operation_type, obj['operationType']] }, - 'instance' => ->(obj) { [:instance, obj['instance']] }, + "user" => ->(obj) { [:user, obj["user"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "status" => ->(obj) { [:status, obj["status"]] }, + "operationType" => ->(obj) { [:operation_type, obj["operationType"]] }, + "instance" => ->(obj) { [:instance, obj["instance"]] }, } end private def product_url(_ = nil) - 'https://sqladmin.googleapis.com/sql/v1beta4/' + "https://sqladmin.googleapis.com/sql/v1beta4/" end def resource_base_url - 'projects/{{project}}/operations?instance={{instance}}' + "projects/{{project}}/operations?instance={{instance}}" end end diff --git a/libraries/google_sql_ssl_cert.rb b/libraries/google_sql_ssl_cert.rb index 92262b101..276365bf1 100644 --- a/libraries/google_sql_ssl_cert.rb +++ b/libraries/google_sql_ssl_cert.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud SQL resources. class SQLSslCert < GcpResourceBase - name 'google_sql_ssl_cert' - desc 'SslCert' - supports platform: 'gcp' + name "google_sql_ssl_cert" + desc "SslCert" + supports platform: "gcp" attr_reader :params attr_reader :cert @@ -33,18 +33,18 @@ class SQLSslCert < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @cert = @fetched['cert'] - @cert_serial_number = @fetched['certSerialNumber'] - @common_name = @fetched['commonName'] - @create_time = parse_time_string(@fetched['createTime']) - @expiration_time = parse_time_string(@fetched['expirationTime']) - @instance = @fetched['instance'] - @sha1_fingerprint = @fetched['sha1Fingerprint'] + @cert = @fetched["cert"] + @cert_serial_number = @fetched["certSerialNumber"] + @common_name = @fetched["commonName"] + @create_time = parse_time_string(@fetched["createTime"]) + @expiration_time = parse_time_string(@fetched["expirationTime"]) + @instance = @fetched["instance"] + @sha1_fingerprint = @fetched["sha1Fingerprint"] end # Handles parsing RFC3339 time string @@ -63,10 +63,10 @@ def to_s private def product_url(_ = nil) - 'https://sqladmin.googleapis.com/sql/v1beta4/' + "https://sqladmin.googleapis.com/sql/v1beta4/" end def resource_base_url - 'projects/{{project}}/instances/{{instance}}/sslCerts/{{sha1_fingerprint}}' + "projects/{{project}}/instances/{{instance}}/sslCerts/{{sha1_fingerprint}}" end end diff --git a/libraries/google_sql_ssl_certs.rb b/libraries/google_sql_ssl_certs.rb index 9c247dc0b..8476b0084 100644 --- a/libraries/google_sql_ssl_certs.rb +++ b/libraries/google_sql_ssl_certs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class SQLSslCerts < GcpResourceBase - name 'google_sql_ssl_certs' - desc 'SslCert plural resource' - supports platform: 'gcp' + name "google_sql_ssl_certs" + desc "SslCert plural resource" + supports platform: "gcp" attr_reader :table @@ -36,12 +36,12 @@ class SQLSslCerts < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'cert' => ->(obj) { [:cert, obj['cert']] }, - 'certSerialNumber' => ->(obj) { [:cert_serial_number, obj['certSerialNumber']] }, - 'commonName' => ->(obj) { [:common_name, obj['commonName']] }, - 'createTime' => ->(obj) { [:create_time, parse_time_string(obj['createTime'])] }, - 'expirationTime' => ->(obj) { [:expiration_time, parse_time_string(obj['expirationTime'])] }, - 'instance' => ->(obj) { [:instance, obj['instance']] }, - 'sha1Fingerprint' => ->(obj) { [:sha1_fingerprint, obj['sha1Fingerprint']] }, + "cert" => ->(obj) { [:cert, obj["cert"]] }, + "certSerialNumber" => ->(obj) { [:cert_serial_number, obj["certSerialNumber"]] }, + "commonName" => ->(obj) { [:common_name, obj["commonName"]] }, + "createTime" => ->(obj) { [:create_time, parse_time_string(obj["createTime"])] }, + "expirationTime" => ->(obj) { [:expiration_time, parse_time_string(obj["expirationTime"])] }, + "instance" => ->(obj) { [:instance, obj["instance"]] }, + "sha1Fingerprint" => ->(obj) { [:sha1_fingerprint, obj["sha1Fingerprint"]] }, } end @@ -87,10 +87,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://sqladmin.googleapis.com/sql/v1beta4/' + "https://sqladmin.googleapis.com/sql/v1beta4/" end def resource_base_url - 'projects/{{project}}/instances/{{instance}}/sslCerts' + "projects/{{project}}/instances/{{instance}}/sslCerts" end end diff --git a/libraries/google_sql_user.rb b/libraries/google_sql_user.rb index ce2b57daf..a6a7ff61b 100644 --- a/libraries/google_sql_user.rb +++ b/libraries/google_sql_user.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud SQL resources. class SQLUser < GcpResourceBase - name 'google_sql_user' - desc 'User' - supports platform: 'gcp' + name "google_sql_user" + desc "User" + supports platform: "gcp" attr_reader :params attr_reader :host @@ -30,7 +30,7 @@ class SQLUser < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") @fetched = unwrap(fetched, params) parse unless @fetched.nil? end @@ -40,7 +40,7 @@ def identity end def collection_item - 'items' + "items" end def unwrap(fetched, params) @@ -48,10 +48,10 @@ def unwrap(fetched, params) end def parse - @host = @fetched['host'] - @name = @fetched['name'] - @instance = @fetched['instance'] - @password = @fetched['password'] + @host = @fetched["host"] + @name = @fetched["name"] + @instance = @fetched["instance"] + @password = @fetched["password"] end def exists? @@ -65,10 +65,10 @@ def to_s private def product_url(_ = nil) - 'https://www.googleapis.com/sql/v1beta4/' + "https://www.googleapis.com/sql/v1beta4/" end def resource_base_url - 'projects/{{project}}/instances/{{database}}/users' + "projects/{{project}}/instances/{{database}}/users" end end diff --git a/libraries/google_sql_users.rb b/libraries/google_sql_users.rb index 6d7af9a23..dc0e3eb9f 100644 --- a/libraries/google_sql_users.rb +++ b/libraries/google_sql_users.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class SQLUsers < GcpResourceBase - name 'google_sql_users' - desc 'User plural resource' - supports platform: 'gcp' + name "google_sql_users" + desc "User plural resource" + supports platform: "gcp" attr_reader :table @@ -33,12 +33,12 @@ class SQLUsers < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -66,20 +66,20 @@ def transform(key, value) def transformers { - 'host' => ->(obj) { [:user_host, obj['host']] }, - 'name' => ->(obj) { [:user_name, obj['name']] }, - 'instance' => ->(obj) { [:user_instance, obj['instance']] }, - 'password' => ->(obj) { [:password, obj['password']] }, + "host" => ->(obj) { [:user_host, obj["host"]] }, + "name" => ->(obj) { [:user_name, obj["name"]] }, + "instance" => ->(obj) { [:user_instance, obj["instance"]] }, + "password" => ->(obj) { [:password, obj["password"]] }, } end private def product_url(_ = nil) - 'https://www.googleapis.com/sql/v1beta4/' + "https://www.googleapis.com/sql/v1beta4/" end def resource_base_url - 'projects/{{project}}/instances/{{database}}/users' + "projects/{{project}}/instances/{{database}}/users" end end diff --git a/libraries/google_storage_bucket.rb b/libraries/google_storage_bucket.rb index bbfc94be1..bf1eb5fd9 100644 --- a/libraries/google_storage_bucket.rb +++ b/libraries/google_storage_bucket.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,24 +13,24 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/storage/property/bucket_acl' -require 'google/storage/property/bucket_cors' -require 'google/storage/property/bucket_default_object_acl' -require 'google/storage/property/bucket_encryption' -require 'google/storage/property/bucket_lifecycle' -require 'google/storage/property/bucket_lifecycle_rule' -require 'google/storage/property/bucket_logging' -require 'google/storage/property/bucket_owner' -require 'google/storage/property/bucket_retention_policy' -require 'google/storage/property/bucket_versioning' -require 'google/storage/property/bucket_website' +require "gcp_backend" +require "google/storage/property/bucket_acl" +require "google/storage/property/bucket_cors" +require "google/storage/property/bucket_default_object_acl" +require "google/storage/property/bucket_encryption" +require "google/storage/property/bucket_lifecycle" +require "google/storage/property/bucket_lifecycle_rule" +require "google/storage/property/bucket_logging" +require "google/storage/property/bucket_owner" +require "google/storage/property/bucket_retention_policy" +require "google/storage/property/bucket_versioning" +require "google/storage/property/bucket_website" # A provider to manage Cloud Storage resources. class StorageBucket < GcpResourceBase - name 'google_storage_bucket' - desc 'Bucket' - supports platform: 'gcp' + name "google_storage_bucket" + desc "Bucket" + supports platform: "gcp" attr_reader :params attr_reader :acl @@ -59,33 +59,33 @@ class StorageBucket < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @acl = GoogleInSpec::Storage::Property::BucketAclArray.parse(@fetched['acl'], to_s) - @cors = GoogleInSpec::Storage::Property::BucketCorsArray.parse(@fetched['cors'], to_s) - @default_event_based_hold = @fetched['defaultEventBasedHold'] - @default_object_acl = GoogleInSpec::Storage::Property::BucketDefaultObjectAclArray.parse(@fetched['defaultObjectAcl'], to_s) - @id = @fetched['id'] - @lifecycle = GoogleInSpec::Storage::Property::BucketLifecycle.new(@fetched['lifecycle'], to_s) - @location = @fetched['location'] - @logging = GoogleInSpec::Storage::Property::BucketLogging.new(@fetched['logging'], to_s) - @metageneration = @fetched['metageneration'] - @name = @fetched['name'] - @owner = GoogleInSpec::Storage::Property::BucketOwner.new(@fetched['owner'], to_s) - @project_number = @fetched['projectNumber'] - @storage_class = @fetched['storageClass'] - @time_created = parse_time_string(@fetched['timeCreated']) - @updated = parse_time_string(@fetched['updated']) - @versioning = GoogleInSpec::Storage::Property::BucketVersioning.new(@fetched['versioning'], to_s) - @website = GoogleInSpec::Storage::Property::BucketWebsite.new(@fetched['website'], to_s) - @labels = @fetched['labels'] - @encryption = GoogleInSpec::Storage::Property::BucketEncryption.new(@fetched['encryption'], to_s) - @retention_policy = GoogleInSpec::Storage::Property::BucketRetentionPolicy.new(@fetched['retentionPolicy'], to_s) - @project = @fetched['project'] - @predefined_default_object_acl = @fetched['predefinedDefaultObjectAcl'] + @acl = GoogleInSpec::Storage::Property::BucketAclArray.parse(@fetched["acl"], to_s) + @cors = GoogleInSpec::Storage::Property::BucketCorsArray.parse(@fetched["cors"], to_s) + @default_event_based_hold = @fetched["defaultEventBasedHold"] + @default_object_acl = GoogleInSpec::Storage::Property::BucketDefaultObjectAclArray.parse(@fetched["defaultObjectAcl"], to_s) + @id = @fetched["id"] + @lifecycle = GoogleInSpec::Storage::Property::BucketLifecycle.new(@fetched["lifecycle"], to_s) + @location = @fetched["location"] + @logging = GoogleInSpec::Storage::Property::BucketLogging.new(@fetched["logging"], to_s) + @metageneration = @fetched["metageneration"] + @name = @fetched["name"] + @owner = GoogleInSpec::Storage::Property::BucketOwner.new(@fetched["owner"], to_s) + @project_number = @fetched["projectNumber"] + @storage_class = @fetched["storageClass"] + @time_created = parse_time_string(@fetched["timeCreated"]) + @updated = parse_time_string(@fetched["updated"]) + @versioning = GoogleInSpec::Storage::Property::BucketVersioning.new(@fetched["versioning"], to_s) + @website = GoogleInSpec::Storage::Property::BucketWebsite.new(@fetched["website"], to_s) + @labels = @fetched["labels"] + @encryption = GoogleInSpec::Storage::Property::BucketEncryption.new(@fetched["encryption"], to_s) + @retention_policy = GoogleInSpec::Storage::Property::BucketRetentionPolicy.new(@fetched["retentionPolicy"], to_s) + @project = @fetched["project"] + @predefined_default_object_acl = @fetched["predefinedDefaultObjectAcl"] end # Handles parsing RFC3339 time string @@ -104,10 +104,10 @@ def to_s private def product_url(_ = nil) - 'https://storage.googleapis.com/storage/v1/' + "https://storage.googleapis.com/storage/v1/" end def resource_base_url - 'b/{{name}}?projection=full' + "b/{{name}}?projection=full" end end diff --git a/libraries/google_storage_bucket_acl.rb b/libraries/google_storage_bucket_acl.rb index a1830df55..ee102ab49 100644 --- a/libraries/google_storage_bucket_acl.rb +++ b/libraries/google_storage_bucket_acl.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/storage/property/bucketacl_project_team' +require "gcp_backend" +require "google/storage/property/bucketacl_project_team" # A provider to manage Cloud Storage resources. class StorageBucketACL < GcpResourceBase - name 'google_storage_bucket_acl' - desc 'BucketACL' - supports platform: 'gcp' + name "google_storage_bucket_acl" + desc "BucketACL" + supports platform: "gcp" attr_reader :params attr_reader :domain @@ -34,18 +34,18 @@ class StorageBucketACL < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @domain = @fetched['domain'] - @email = @fetched['email'] - @entity = @fetched['entity'] - @entity_id = @fetched['entityId'] - @id = @fetched['id'] - @project_team = GoogleInSpec::Storage::Property::BucketACLProjectTeam.new(@fetched['projectTeam'], to_s) - @role = @fetched['role'] + @domain = @fetched["domain"] + @email = @fetched["email"] + @entity = @fetched["entity"] + @entity_id = @fetched["entityId"] + @id = @fetched["id"] + @project_team = GoogleInSpec::Storage::Property::BucketACLProjectTeam.new(@fetched["projectTeam"], to_s) + @role = @fetched["role"] end def exists? @@ -63,10 +63,10 @@ def bucket private def product_url(_ = nil) - 'https://storage.googleapis.com/storage/v1/' + "https://storage.googleapis.com/storage/v1/" end def resource_base_url - 'b/{{bucket}}/acl/{{entity}}' + "b/{{bucket}}/acl/{{entity}}" end end diff --git a/libraries/google_storage_bucket_iam_binding.rb b/libraries/google_storage_bucket_iam_binding.rb index 48c5f564c..b404bb916 100644 --- a/libraries/google_storage_bucket_iam_binding.rb +++ b/libraries/google_storage_bucket_iam_binding.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_bindings" # A provider to manage Cloud Storage IAM Binding resources. class BucketIamBinding < GcpResourceBase - name 'google_storage_bucket_iam_binding' - desc 'Bucket Iam Binding' - supports platform: 'gcp' + name "google_storage_bucket_iam_binding" + desc "Bucket Iam Binding" + supports platform: "gcp" attr_reader :params @@ -30,12 +30,12 @@ def initialize(params) super(params.merge({ use_http_transport: true })) raise "Expected 'role' to be defined for iam_binding resource" unless params.key?(:role) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) @bindings.each do |binding| next if binding.role != params[:role] if params[:condition] @@ -75,10 +75,10 @@ def to_s private def product_url - 'https://storage.googleapis.com/storage/v1/' + "https://storage.googleapis.com/storage/v1/" end def resource_base_url - 'b/{{bucket}}/iam' + "b/{{bucket}}/iam" end end diff --git a/libraries/google_storage_bucket_iam_bindings.rb b/libraries/google_storage_bucket_iam_bindings.rb index 6ecb0f341..20a41a6cd 100644 --- a/libraries/google_storage_bucket_iam_bindings.rb +++ b/libraries/google_storage_bucket_iam_bindings.rb @@ -1,11 +1,11 @@ -# frozen_string_literal: true -require 'gcp_backend' + +require "gcp_backend" module Inspec::Resources class GoogleStorageBucketIamBindings < GcpResourceBase - name 'google_storage_bucket_iam_bindings' - desc 'Verifies settings for GCP storage bucket IAM bindings in bulk' + name "google_storage_bucket_iam_bindings" + desc "Verifies settings for GCP storage bucket IAM bindings in bulk" example " describe google_storage_bucket_iam_bindings(bucket: 'bucket-buvsjjcndqz') do diff --git a/libraries/google_storage_bucket_iam_policy.rb b/libraries/google_storage_bucket_iam_policy.rb index 3116f40e3..2c5b710eb 100644 --- a/libraries/google_storage_bucket_iam_policy.rb +++ b/libraries/google_storage_bucket_iam_policy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/iam/property/iam_policy_audit_configs' -require 'google/iam/property/iam_policy_bindings' +require "gcp_backend" +require "google/iam/property/iam_policy_audit_configs" +require "google/iam/property/iam_policy_bindings" # A provider to manage Cloud Storage IAM Policy resources. class BucketIamPolicy < GcpResourceBase - name 'google_storage_bucket_iam_policy' - desc 'Bucket Iam Policy' - supports platform: 'gcp' + name "google_storage_bucket_iam_policy" + desc "Bucket Iam Policy" + supports platform: "gcp" attr_reader :params attr_reader :bindings @@ -30,13 +30,13 @@ class BucketIamPolicy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url, resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url, resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) - @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched["bindings"], to_s) + @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched["auditConfigs"], to_s) end def exists? @@ -58,10 +58,10 @@ def count private def product_url - 'https://storage.googleapis.com/storage/v1/' + "https://storage.googleapis.com/storage/v1/" end def resource_base_url - 'b/{{bucket}}/iam' + "b/{{bucket}}/iam" end end diff --git a/libraries/google_storage_bucket_object.rb b/libraries/google_storage_bucket_object.rb index 798d9eae1..1f9314d6d 100644 --- a/libraries/google_storage_bucket_object.rb +++ b/libraries/google_storage_bucket_object.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Cloud Storage resources. class StorageBucketObject < GcpResourceBase - name 'google_storage_bucket_object' - desc 'BucketObject' - supports platform: 'gcp' + name "google_storage_bucket_object" + desc "BucketObject" + supports platform: "gcp" attr_reader :params attr_reader :bucket @@ -43,28 +43,28 @@ class StorageBucketObject < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @bucket = @fetched['bucket'] - @object = @fetched['object'] - @content_type = @fetched['contentType'] - @crc32c = @fetched['crc32c'] - @etag = @fetched['etag'] - @generation = @fetched['generation'] - @id = @fetched['id'] - @md5_hash = @fetched['md5Hash'] - @media_link = @fetched['mediaLink'] - @metageneration = @fetched['metageneration'] - @name = @fetched['name'] - @size = @fetched['size'] - @storage_class = @fetched['storageClass'] - @time_created = parse_time_string(@fetched['timeCreated']) - @time_deleted = parse_time_string(@fetched['timeDeleted']) - @time_storage_class_updated = parse_time_string(@fetched['timeStorageClassUpdated']) - @time_updated = parse_time_string(@fetched['updated']) + @bucket = @fetched["bucket"] + @object = @fetched["object"] + @content_type = @fetched["contentType"] + @crc32c = @fetched["crc32c"] + @etag = @fetched["etag"] + @generation = @fetched["generation"] + @id = @fetched["id"] + @md5_hash = @fetched["md5Hash"] + @media_link = @fetched["mediaLink"] + @metageneration = @fetched["metageneration"] + @name = @fetched["name"] + @size = @fetched["size"] + @storage_class = @fetched["storageClass"] + @time_created = parse_time_string(@fetched["timeCreated"]) + @time_deleted = parse_time_string(@fetched["timeDeleted"]) + @time_storage_class_updated = parse_time_string(@fetched["timeStorageClassUpdated"]) + @time_updated = parse_time_string(@fetched["updated"]) end # Handles parsing RFC3339 time string @@ -89,10 +89,10 @@ def size private def product_url(_ = nil) - 'https://storage.googleapis.com/storage/v1/' + "https://storage.googleapis.com/storage/v1/" end def resource_base_url - 'b/{{bucket}}/o/{{object}}' + "b/{{bucket}}/o/{{object}}" end end diff --git a/libraries/google_storage_bucket_objects.rb b/libraries/google_storage_bucket_objects.rb index b652cf1a5..29c112050 100644 --- a/libraries/google_storage_bucket_objects.rb +++ b/libraries/google_storage_bucket_objects.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class StorageBucketObjects < GcpResourceBase - name 'google_storage_bucket_objects' - desc 'BucketObject plural resource' - supports platform: 'gcp' + name "google_storage_bucket_objects" + desc "BucketObject plural resource" + supports platform: "gcp" attr_reader :table @@ -46,12 +46,12 @@ class StorageBucketObjects < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -79,23 +79,23 @@ def transform(key, value) def transformers { - 'bucket' => ->(obj) { [:object_bucket, obj['bucket']] }, - 'object' => ->(obj) { [:object, obj['object']] }, - 'contentType' => ->(obj) { [:content_type, obj['contentType']] }, - 'crc32c' => ->(obj) { [:crc32c, obj['crc32c']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'generation' => ->(obj) { [:generation, obj['generation']] }, - 'id' => ->(obj) { [:id, obj['id']] }, - 'md5Hash' => ->(obj) { [:md5_hash, obj['md5Hash']] }, - 'mediaLink' => ->(obj) { [:media_link, obj['mediaLink']] }, - 'metageneration' => ->(obj) { [:metageneration, obj['metageneration']] }, - 'name' => ->(obj) { [:object_name, obj['name']] }, - 'size' => ->(obj) { [:size, obj['size']] }, - 'storageClass' => ->(obj) { [:storage_class, obj['storageClass']] }, - 'timeCreated' => ->(obj) { [:object_created_times, parse_time_string(obj['timeCreated'])] }, - 'timeDeleted' => ->(obj) { [:time_deleted, parse_time_string(obj['timeDeleted'])] }, - 'timeStorageClassUpdated' => ->(obj) { [:time_storage_class_updated, parse_time_string(obj['timeStorageClassUpdated'])] }, - 'updated' => ->(obj) { [:time_updated, parse_time_string(obj['updated'])] }, + "bucket" => ->(obj) { [:object_bucket, obj["bucket"]] }, + "object" => ->(obj) { [:object, obj["object"]] }, + "contentType" => ->(obj) { [:content_type, obj["contentType"]] }, + "crc32c" => ->(obj) { [:crc32c, obj["crc32c"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "generation" => ->(obj) { [:generation, obj["generation"]] }, + "id" => ->(obj) { [:id, obj["id"]] }, + "md5Hash" => ->(obj) { [:md5_hash, obj["md5Hash"]] }, + "mediaLink" => ->(obj) { [:media_link, obj["mediaLink"]] }, + "metageneration" => ->(obj) { [:metageneration, obj["metageneration"]] }, + "name" => ->(obj) { [:object_name, obj["name"]] }, + "size" => ->(obj) { [:size, obj["size"]] }, + "storageClass" => ->(obj) { [:storage_class, obj["storageClass"]] }, + "timeCreated" => ->(obj) { [:object_created_times, parse_time_string(obj["timeCreated"])] }, + "timeDeleted" => ->(obj) { [:time_deleted, parse_time_string(obj["timeDeleted"])] }, + "timeStorageClassUpdated" => ->(obj) { [:time_storage_class_updated, parse_time_string(obj["timeStorageClassUpdated"])] }, + "updated" => ->(obj) { [:time_updated, parse_time_string(obj["updated"])] }, } end @@ -107,10 +107,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://storage.googleapis.com/storage/v1/' + "https://storage.googleapis.com/storage/v1/" end def resource_base_url - 'b/{{bucket}}/o' + "b/{{bucket}}/o" end end diff --git a/libraries/google_storage_buckets.rb b/libraries/google_storage_buckets.rb index f03f4e8e2..58b3b8dd5 100644 --- a/libraries/google_storage_buckets.rb +++ b/libraries/google_storage_buckets.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class StorageBuckets < GcpResourceBase - name 'google_storage_buckets' - desc 'Bucket plural resource' - supports platform: 'gcp' + name "google_storage_buckets" + desc "Bucket plural resource" + supports platform: "gcp" attr_reader :table @@ -51,12 +51,12 @@ class StorageBuckets < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('items') + @table = fetch_wrapped_resource("items") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -84,28 +84,28 @@ def transform(key, value) def transformers { - 'acl' => ->(obj) { [:acl, GoogleInSpec::Storage::Property::BucketAclArray.parse(obj['acl'], to_s)] }, - 'cors' => ->(obj) { [:cors, GoogleInSpec::Storage::Property::BucketCorsArray.parse(obj['cors'], to_s)] }, - 'defaultEventBasedHold' => ->(obj) { [:default_event_based_hold, obj['defaultEventBasedHold']] }, - 'defaultObjectAcl' => ->(obj) { [:default_object_acl, GoogleInSpec::Storage::Property::BucketDefaultObjectAclArray.parse(obj['defaultObjectAcl'], to_s)] }, - 'id' => ->(obj) { [:bucket_id, obj['id']] }, - 'lifecycle' => ->(obj) { [:lifecycle, GoogleInSpec::Storage::Property::BucketLifecycle.new(obj['lifecycle'], to_s)] }, - 'location' => ->(obj) { [:bucket_location, obj['location']] }, - 'logging' => ->(obj) { [:logging, GoogleInSpec::Storage::Property::BucketLogging.new(obj['logging'], to_s)] }, - 'metageneration' => ->(obj) { [:metageneration, obj['metageneration']] }, - 'name' => ->(obj) { [:bucket_name, obj['name']] }, - 'owner' => ->(obj) { [:owner, GoogleInSpec::Storage::Property::BucketOwner.new(obj['owner'], to_s)] }, - 'projectNumber' => ->(obj) { [:bucket_project_number, obj['projectNumber']] }, - 'storageClass' => ->(obj) { [:storage_class, obj['storageClass']] }, - 'timeCreated' => ->(obj) { [:time_created, parse_time_string(obj['timeCreated'])] }, - 'updated' => ->(obj) { [:updated, parse_time_string(obj['updated'])] }, - 'versioning' => ->(obj) { [:versioning, GoogleInSpec::Storage::Property::BucketVersioning.new(obj['versioning'], to_s)] }, - 'website' => ->(obj) { [:website, GoogleInSpec::Storage::Property::BucketWebsite.new(obj['website'], to_s)] }, - 'labels' => ->(obj) { [:labels, obj['labels']] }, - 'encryption' => ->(obj) { [:encryption, GoogleInSpec::Storage::Property::BucketEncryption.new(obj['encryption'], to_s)] }, - 'retentionPolicy' => ->(obj) { [:retention_policy, GoogleInSpec::Storage::Property::BucketRetentionPolicy.new(obj['retentionPolicy'], to_s)] }, - 'project' => ->(obj) { [:project, obj['project']] }, - 'predefinedDefaultObjectAcl' => ->(obj) { [:predefined_default_object_acl, obj['predefinedDefaultObjectAcl']] }, + "acl" => ->(obj) { [:acl, GoogleInSpec::Storage::Property::BucketAclArray.parse(obj["acl"], to_s)] }, + "cors" => ->(obj) { [:cors, GoogleInSpec::Storage::Property::BucketCorsArray.parse(obj["cors"], to_s)] }, + "defaultEventBasedHold" => ->(obj) { [:default_event_based_hold, obj["defaultEventBasedHold"]] }, + "defaultObjectAcl" => ->(obj) { [:default_object_acl, GoogleInSpec::Storage::Property::BucketDefaultObjectAclArray.parse(obj["defaultObjectAcl"], to_s)] }, + "id" => ->(obj) { [:bucket_id, obj["id"]] }, + "lifecycle" => ->(obj) { [:lifecycle, GoogleInSpec::Storage::Property::BucketLifecycle.new(obj["lifecycle"], to_s)] }, + "location" => ->(obj) { [:bucket_location, obj["location"]] }, + "logging" => ->(obj) { [:logging, GoogleInSpec::Storage::Property::BucketLogging.new(obj["logging"], to_s)] }, + "metageneration" => ->(obj) { [:metageneration, obj["metageneration"]] }, + "name" => ->(obj) { [:bucket_name, obj["name"]] }, + "owner" => ->(obj) { [:owner, GoogleInSpec::Storage::Property::BucketOwner.new(obj["owner"], to_s)] }, + "projectNumber" => ->(obj) { [:bucket_project_number, obj["projectNumber"]] }, + "storageClass" => ->(obj) { [:storage_class, obj["storageClass"]] }, + "timeCreated" => ->(obj) { [:time_created, parse_time_string(obj["timeCreated"])] }, + "updated" => ->(obj) { [:updated, parse_time_string(obj["updated"])] }, + "versioning" => ->(obj) { [:versioning, GoogleInSpec::Storage::Property::BucketVersioning.new(obj["versioning"], to_s)] }, + "website" => ->(obj) { [:website, GoogleInSpec::Storage::Property::BucketWebsite.new(obj["website"], to_s)] }, + "labels" => ->(obj) { [:labels, obj["labels"]] }, + "encryption" => ->(obj) { [:encryption, GoogleInSpec::Storage::Property::BucketEncryption.new(obj["encryption"], to_s)] }, + "retentionPolicy" => ->(obj) { [:retention_policy, GoogleInSpec::Storage::Property::BucketRetentionPolicy.new(obj["retentionPolicy"], to_s)] }, + "project" => ->(obj) { [:project, obj["project"]] }, + "predefinedDefaultObjectAcl" => ->(obj) { [:predefined_default_object_acl, obj["predefinedDefaultObjectAcl"]] }, } end @@ -117,10 +117,10 @@ def parse_time_string(time_string) private def product_url(_ = nil) - 'https://storage.googleapis.com/storage/v1/' + "https://storage.googleapis.com/storage/v1/" end def resource_base_url - 'b?project={{project}}&projection=full' + "b?project={{project}}&projection=full" end end diff --git a/libraries/google_storage_default_object_acl.rb b/libraries/google_storage_default_object_acl.rb index f36adf0b5..34d13b95f 100644 --- a/libraries/google_storage_default_object_acl.rb +++ b/libraries/google_storage_default_object_acl.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/storage/property/defaultobjectacl_project_team' +require "gcp_backend" +require "google/storage/property/defaultobjectacl_project_team" # A provider to manage Cloud Storage resources. class StorageDefaultObjectACL < GcpResourceBase - name 'google_storage_default_object_acl' - desc 'DefaultObjectACL' - supports platform: 'gcp' + name "google_storage_default_object_acl" + desc "DefaultObjectACL" + supports platform: "gcp" attr_reader :params attr_reader :domain @@ -36,20 +36,20 @@ class StorageDefaultObjectACL < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @domain = @fetched['domain'] - @email = @fetched['email'] - @entity = @fetched['entity'] - @entity_id = @fetched['entityId'] - @generation = @fetched['generation'] - @id = @fetched['id'] - @object = @fetched['object'] - @project_team = GoogleInSpec::Storage::Property::DefaultObjectACLProjectTeam.new(@fetched['projectTeam'], to_s) - @role = @fetched['role'] + @domain = @fetched["domain"] + @email = @fetched["email"] + @entity = @fetched["entity"] + @entity_id = @fetched["entityId"] + @generation = @fetched["generation"] + @id = @fetched["id"] + @object = @fetched["object"] + @project_team = GoogleInSpec::Storage::Property::DefaultObjectACLProjectTeam.new(@fetched["projectTeam"], to_s) + @role = @fetched["role"] end def exists? @@ -67,10 +67,10 @@ def bucket private def product_url(_ = nil) - 'https://storage.googleapis.com/storage/v1/' + "https://storage.googleapis.com/storage/v1/" end def resource_base_url - 'b/{{bucket}}/defaultObjectAcl/{{entity}}' + "b/{{bucket}}/defaultObjectAcl/{{entity}}" end end diff --git a/libraries/google_storage_object_acl.rb b/libraries/google_storage_object_acl.rb index 86414fdf1..47729122f 100644 --- a/libraries/google_storage_object_acl.rb +++ b/libraries/google_storage_object_acl.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/storage/property/objectacl_project_team' +require "gcp_backend" +require "google/storage/property/objectacl_project_team" # A provider to manage Cloud Storage resources. class StorageObjectACL < GcpResourceBase - name 'google_storage_object_acl' - desc 'ObjectACL' - supports platform: 'gcp' + name "google_storage_object_acl" + desc "ObjectACL" + supports platform: "gcp" attr_reader :params attr_reader :domain @@ -36,20 +36,20 @@ class StorageObjectACL < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @domain = @fetched['domain'] - @email = @fetched['email'] - @entity = @fetched['entity'] - @entity_id = @fetched['entityId'] - @generation = @fetched['generation'] - @id = @fetched['id'] - @object = @fetched['object'] - @project_team = GoogleInSpec::Storage::Property::ObjectACLProjectTeam.new(@fetched['projectTeam'], to_s) - @role = @fetched['role'] + @domain = @fetched["domain"] + @email = @fetched["email"] + @entity = @fetched["entity"] + @entity_id = @fetched["entityId"] + @generation = @fetched["generation"] + @id = @fetched["id"] + @object = @fetched["object"] + @project_team = GoogleInSpec::Storage::Property::ObjectACLProjectTeam.new(@fetched["projectTeam"], to_s) + @role = @fetched["role"] end def exists? @@ -67,10 +67,10 @@ def bucket private def product_url(_ = nil) - 'https://storage.googleapis.com/storage/v1/' + "https://storage.googleapis.com/storage/v1/" end def resource_base_url - 'b/{{bucket}}/o/{{object}}/acl/{{entity}}' + "b/{{bucket}}/o/{{object}}/acl/{{entity}}" end end diff --git a/libraries/google_user.rb b/libraries/google_user.rb index 81be96b6e..d012bc575 100644 --- a/libraries/google_user.rb +++ b/libraries/google_user.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'google/apis/admin_directory_v1' + +require "gcp_backend" +require "google/apis/admin_directory_v1" module Inspec::Resources class GoogleUser < GcpResourceBase - name 'google_user' - desc 'Verifies settings for a GCP user' + name "google_user" + desc "Verifies settings for a GCP user" example " describe google_user(user_key: '110491234567894702010') do diff --git a/libraries/google_users.rb b/libraries/google_users.rb index af3332101..773996ed5 100644 --- a/libraries/google_users.rb +++ b/libraries/google_users.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true -require 'gcp_backend' -require 'google/apis/admin_directory_v1' + +require "gcp_backend" +require "google/apis/admin_directory_v1" module Inspec::Resources class GoogleUsers < GcpResourceBase - name 'google_users' - desc 'Verifies settings for GCP users in bulk' + name "google_users" + desc "Verifies settings for GCP users in bulk" example " describe google_users(customer: 'my_customer') do @@ -17,8 +17,8 @@ class GoogleUsers < GcpResourceBase def initialize(opts = {}) # Call the parent class constructor super(opts) - @customer = opts[:customer] || 'my_customer' - @domain = opts[:domain] || '' + @customer = opts[:customer] || "my_customer" + @domain = opts[:domain] || "" end # FilterTable setup diff --git a/libraries/google_vertex_ai_batch_prediction_job.rb b/libraries/google_vertex_ai_batch_prediction_job.rb index 53719dcf9..404348f57 100644 --- a/libraries/google_vertex_ai_batch_prediction_job.rb +++ b/libraries/google_vertex_ai_batch_prediction_job.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,55 +13,55 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/batchpredictionjob_completion_stats' -require 'google/vertexai/property/batchpredictionjob_dedicated_resources' -require 'google/vertexai/property/batchpredictionjob_dedicated_resources_machine_spec' -require 'google/vertexai/property/batchpredictionjob_encryption_spec' -require 'google/vertexai/property/batchpredictionjob_error' -require 'google/vertexai/property/batchpredictionjob_explanation_spec' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_metadata' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_metadata_inputs' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_metadata_outputs' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_presets' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_sampled_shapley_attribution' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/batchpredictionjob_input_config' -require 'google/vertexai/property/batchpredictionjob_input_config_bigquery_source' -require 'google/vertexai/property/batchpredictionjob_input_config_gcs_source' -require 'google/vertexai/property/batchpredictionjob_instance_config' -require 'google/vertexai/property/batchpredictionjob_labels' -require 'google/vertexai/property/batchpredictionjob_manual_batch_tuning_parameters' -require 'google/vertexai/property/batchpredictionjob_output_config' -require 'google/vertexai/property/batchpredictionjob_output_config_bigquery_destination' -require 'google/vertexai/property/batchpredictionjob_output_config_gcs_destination' -require 'google/vertexai/property/batchpredictionjob_output_info' -require 'google/vertexai/property/batchpredictionjob_partial_failures' -require 'google/vertexai/property/batchpredictionjob_resources_consumed' -require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model' -require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec' -require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_env' -require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_ports' -require 'google/vertexai/property/batchpredictionjob_unmanaged_container_model_predict_schemata' +require "gcp_backend" +require "google/vertexai/property/batchpredictionjob_completion_stats" +require "google/vertexai/property/batchpredictionjob_dedicated_resources" +require "google/vertexai/property/batchpredictionjob_dedicated_resources_machine_spec" +require "google/vertexai/property/batchpredictionjob_encryption_spec" +require "google/vertexai/property/batchpredictionjob_error" +require "google/vertexai/property/batchpredictionjob_explanation_spec" +require "google/vertexai/property/batchpredictionjob_explanation_spec_metadata" +require "google/vertexai/property/batchpredictionjob_explanation_spec_metadata_inputs" +require "google/vertexai/property/batchpredictionjob_explanation_spec_metadata_outputs" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_examples_presets" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_sampled_shapley_attribution" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/batchpredictionjob_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/batchpredictionjob_input_config" +require "google/vertexai/property/batchpredictionjob_input_config_bigquery_source" +require "google/vertexai/property/batchpredictionjob_input_config_gcs_source" +require "google/vertexai/property/batchpredictionjob_instance_config" +require "google/vertexai/property/batchpredictionjob_labels" +require "google/vertexai/property/batchpredictionjob_manual_batch_tuning_parameters" +require "google/vertexai/property/batchpredictionjob_output_config" +require "google/vertexai/property/batchpredictionjob_output_config_bigquery_destination" +require "google/vertexai/property/batchpredictionjob_output_config_gcs_destination" +require "google/vertexai/property/batchpredictionjob_output_info" +require "google/vertexai/property/batchpredictionjob_partial_failures" +require "google/vertexai/property/batchpredictionjob_resources_consumed" +require "google/vertexai/property/batchpredictionjob_unmanaged_container_model" +require "google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec" +require "google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_env" +require "google/vertexai/property/batchpredictionjob_unmanaged_container_model_container_spec_ports" +require "google/vertexai/property/batchpredictionjob_unmanaged_container_model_predict_schemata" # A provider to manage Vertex AI resources. class VertexAIBatchPredictionJob < GcpResourceBase - name 'google_vertex_ai_batch_prediction_job' - desc 'BatchPredictionJob' - supports platform: 'gcp' + name "google_vertex_ai_batch_prediction_job" + desc "BatchPredictionJob" + supports platform: "gcp" attr_reader :params attr_reader :create_time @@ -95,38 +95,38 @@ class VertexAIBatchPredictionJob < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @create_time = @fetched['createTime'] - @model_parameters = @fetched['modelParameters'] - @instance_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobInstanceConfig.new(@fetched['instanceConfig'], to_s) - @model_version_id = @fetched['modelVersionId'] - @dedicated_resources = GoogleInSpec::VertexAI::Property::BatchPredictionJobDedicatedResources.new(@fetched['dedicatedResources'], to_s) - @output_info = GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputInfo.new(@fetched['outputInfo'], to_s) - @disable_container_logging = @fetched['disableContainerLogging'] - @explanation_spec = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpec.new(@fetched['explanationSpec'], to_s) - @end_time = @fetched['endTime'] - @generate_explanation = @fetched['generateExplanation'] - @resources_consumed = GoogleInSpec::VertexAI::Property::BatchPredictionJobResourcesConsumed.new(@fetched['resourcesConsumed'], to_s) - @error = GoogleInSpec::VertexAI::Property::BatchPredictionJobError.new(@fetched['error'], to_s) - @input_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobInputConfig.new(@fetched['inputConfig'], to_s) - @unmanaged_container_model = GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModel.new(@fetched['unmanagedContainerModel'], to_s) - @completion_stats = GoogleInSpec::VertexAI::Property::BatchPredictionJobCompletionStats.new(@fetched['completionStats'], to_s) - @start_time = @fetched['startTime'] - @manual_batch_tuning_parameters = GoogleInSpec::VertexAI::Property::BatchPredictionJobManualBatchTuningParameters.new(@fetched['manualBatchTuningParameters'], to_s) - @update_time = @fetched['updateTime'] - @name = @fetched['name'] - @labels = GoogleInSpec::VertexAI::Property::BatchPredictionJobLabels.new(@fetched['labels'], to_s) - @state = @fetched['state'] - @encryption_spec = GoogleInSpec::VertexAI::Property::BatchPredictionJobEncryptionSpec.new(@fetched['encryptionSpec'], to_s) - @partial_failures = GoogleInSpec::VertexAI::Property::BatchPredictionJobPartialFailuresArray.parse(@fetched['partialFailures'], to_s) - @model = @fetched['model'] - @output_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputConfig.new(@fetched['outputConfig'], to_s) - @display_name = @fetched['displayName'] - @service_account = @fetched['serviceAccount'] + @create_time = @fetched["createTime"] + @model_parameters = @fetched["modelParameters"] + @instance_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobInstanceConfig.new(@fetched["instanceConfig"], to_s) + @model_version_id = @fetched["modelVersionId"] + @dedicated_resources = GoogleInSpec::VertexAI::Property::BatchPredictionJobDedicatedResources.new(@fetched["dedicatedResources"], to_s) + @output_info = GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputInfo.new(@fetched["outputInfo"], to_s) + @disable_container_logging = @fetched["disableContainerLogging"] + @explanation_spec = GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpec.new(@fetched["explanationSpec"], to_s) + @end_time = @fetched["endTime"] + @generate_explanation = @fetched["generateExplanation"] + @resources_consumed = GoogleInSpec::VertexAI::Property::BatchPredictionJobResourcesConsumed.new(@fetched["resourcesConsumed"], to_s) + @error = GoogleInSpec::VertexAI::Property::BatchPredictionJobError.new(@fetched["error"], to_s) + @input_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobInputConfig.new(@fetched["inputConfig"], to_s) + @unmanaged_container_model = GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModel.new(@fetched["unmanagedContainerModel"], to_s) + @completion_stats = GoogleInSpec::VertexAI::Property::BatchPredictionJobCompletionStats.new(@fetched["completionStats"], to_s) + @start_time = @fetched["startTime"] + @manual_batch_tuning_parameters = GoogleInSpec::VertexAI::Property::BatchPredictionJobManualBatchTuningParameters.new(@fetched["manualBatchTuningParameters"], to_s) + @update_time = @fetched["updateTime"] + @name = @fetched["name"] + @labels = GoogleInSpec::VertexAI::Property::BatchPredictionJobLabels.new(@fetched["labels"], to_s) + @state = @fetched["state"] + @encryption_spec = GoogleInSpec::VertexAI::Property::BatchPredictionJobEncryptionSpec.new(@fetched["encryptionSpec"], to_s) + @partial_failures = GoogleInSpec::VertexAI::Property::BatchPredictionJobPartialFailuresArray.parse(@fetched["partialFailures"], to_s) + @model = @fetched["model"] + @output_config = GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputConfig.new(@fetched["outputConfig"], to_s) + @display_name = @fetched["displayName"] + @service_account = @fetched["serviceAccount"] end def exists? @@ -140,10 +140,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_batch_prediction_jobs.rb b/libraries/google_vertex_ai_batch_prediction_jobs.rb index 25e16cb1b..2b887d754 100644 --- a/libraries/google_vertex_ai_batch_prediction_jobs.rb +++ b/libraries/google_vertex_ai_batch_prediction_jobs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIBatchPredictionJobs < GcpResourceBase - name 'google_vertex_ai_batch_prediction_jobs' - desc 'BatchPredictionJob plural resource' - supports platform: 'gcp' + name "google_vertex_ai_batch_prediction_jobs" + desc "BatchPredictionJob plural resource" + supports platform: "gcp" attr_reader :table @@ -56,12 +56,12 @@ class VertexAIBatchPredictionJobs < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('batchPredictionJobs') + @table = fetch_wrapped_resource("batchPredictionJobs") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -89,43 +89,43 @@ def transform(key, value) def transformers { - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'modelParameters' => ->(obj) { [:model_parameters, obj['modelParameters']] }, - 'instanceConfig' => ->(obj) { [:instance_config, GoogleInSpec::VertexAI::Property::BatchPredictionJobInstanceConfig.new(obj['instanceConfig'], to_s)] }, - 'modelVersionId' => ->(obj) { [:model_version_id, obj['modelVersionId']] }, - 'dedicatedResources' => ->(obj) { [:dedicated_resources, GoogleInSpec::VertexAI::Property::BatchPredictionJobDedicatedResources.new(obj['dedicatedResources'], to_s)] }, - 'outputInfo' => ->(obj) { [:output_info, GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputInfo.new(obj['outputInfo'], to_s)] }, - 'disableContainerLogging' => ->(obj) { [:disable_container_logging, obj['disableContainerLogging']] }, - 'explanationSpec' => ->(obj) { [:explanation_spec, GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpec.new(obj['explanationSpec'], to_s)] }, - 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, - 'generateExplanation' => ->(obj) { [:generate_explanation, obj['generateExplanation']] }, - 'resourcesConsumed' => ->(obj) { [:resources_consumed, GoogleInSpec::VertexAI::Property::BatchPredictionJobResourcesConsumed.new(obj['resourcesConsumed'], to_s)] }, - 'error' => ->(obj) { [:error, GoogleInSpec::VertexAI::Property::BatchPredictionJobError.new(obj['error'], to_s)] }, - 'inputConfig' => ->(obj) { [:input_config, GoogleInSpec::VertexAI::Property::BatchPredictionJobInputConfig.new(obj['inputConfig'], to_s)] }, - 'unmanagedContainerModel' => ->(obj) { [:unmanaged_container_model, GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModel.new(obj['unmanagedContainerModel'], to_s)] }, - 'completionStats' => ->(obj) { [:completion_stats, GoogleInSpec::VertexAI::Property::BatchPredictionJobCompletionStats.new(obj['completionStats'], to_s)] }, - 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, - 'manualBatchTuningParameters' => ->(obj) { [:manual_batch_tuning_parameters, GoogleInSpec::VertexAI::Property::BatchPredictionJobManualBatchTuningParameters.new(obj['manualBatchTuningParameters'], to_s)] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::BatchPredictionJobLabels.new(obj['labels'], to_s)] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::BatchPredictionJobEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, - 'partialFailures' => ->(obj) { [:partial_failures, GoogleInSpec::VertexAI::Property::BatchPredictionJobPartialFailuresArray.parse(obj['partialFailures'], to_s)] }, - 'model' => ->(obj) { [:model, obj['model']] }, - 'outputConfig' => ->(obj) { [:output_config, GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputConfig.new(obj['outputConfig'], to_s)] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'serviceAccount' => ->(obj) { [:service_account, obj['serviceAccount']] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "modelParameters" => ->(obj) { [:model_parameters, obj["modelParameters"]] }, + "instanceConfig" => ->(obj) { [:instance_config, GoogleInSpec::VertexAI::Property::BatchPredictionJobInstanceConfig.new(obj["instanceConfig"], to_s)] }, + "modelVersionId" => ->(obj) { [:model_version_id, obj["modelVersionId"]] }, + "dedicatedResources" => ->(obj) { [:dedicated_resources, GoogleInSpec::VertexAI::Property::BatchPredictionJobDedicatedResources.new(obj["dedicatedResources"], to_s)] }, + "outputInfo" => ->(obj) { [:output_info, GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputInfo.new(obj["outputInfo"], to_s)] }, + "disableContainerLogging" => ->(obj) { [:disable_container_logging, obj["disableContainerLogging"]] }, + "explanationSpec" => ->(obj) { [:explanation_spec, GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpec.new(obj["explanationSpec"], to_s)] }, + "endTime" => ->(obj) { [:end_time, obj["endTime"]] }, + "generateExplanation" => ->(obj) { [:generate_explanation, obj["generateExplanation"]] }, + "resourcesConsumed" => ->(obj) { [:resources_consumed, GoogleInSpec::VertexAI::Property::BatchPredictionJobResourcesConsumed.new(obj["resourcesConsumed"], to_s)] }, + "error" => ->(obj) { [:error, GoogleInSpec::VertexAI::Property::BatchPredictionJobError.new(obj["error"], to_s)] }, + "inputConfig" => ->(obj) { [:input_config, GoogleInSpec::VertexAI::Property::BatchPredictionJobInputConfig.new(obj["inputConfig"], to_s)] }, + "unmanagedContainerModel" => ->(obj) { [:unmanaged_container_model, GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModel.new(obj["unmanagedContainerModel"], to_s)] }, + "completionStats" => ->(obj) { [:completion_stats, GoogleInSpec::VertexAI::Property::BatchPredictionJobCompletionStats.new(obj["completionStats"], to_s)] }, + "startTime" => ->(obj) { [:start_time, obj["startTime"]] }, + "manualBatchTuningParameters" => ->(obj) { [:manual_batch_tuning_parameters, GoogleInSpec::VertexAI::Property::BatchPredictionJobManualBatchTuningParameters.new(obj["manualBatchTuningParameters"], to_s)] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::BatchPredictionJobLabels.new(obj["labels"], to_s)] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "encryptionSpec" => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::BatchPredictionJobEncryptionSpec.new(obj["encryptionSpec"], to_s)] }, + "partialFailures" => ->(obj) { [:partial_failures, GoogleInSpec::VertexAI::Property::BatchPredictionJobPartialFailuresArray.parse(obj["partialFailures"], to_s)] }, + "model" => ->(obj) { [:model, obj["model"]] }, + "outputConfig" => ->(obj) { [:output_config, GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputConfig.new(obj["outputConfig"], to_s)] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "serviceAccount" => ->(obj) { [:service_account, obj["serviceAccount"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/batchPredictionJobs' + "{{parent}}/batchPredictionJobs" end end diff --git a/libraries/google_vertex_ai_custom_job.rb b/libraries/google_vertex_ai_custom_job.rb index ca283a814..a676567e5 100644 --- a/libraries/google_vertex_ai_custom_job.rb +++ b/libraries/google_vertex_ai_custom_job.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,21 +13,21 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/customjob_encryption_spec' -require 'google/vertexai/property/customjob_error' -require 'google/vertexai/property/customjob_job_spec' -require 'google/vertexai/property/customjob_job_spec_base_output_directory' -require 'google/vertexai/property/customjob_job_spec_scheduling' -require 'google/vertexai/property/customjob_job_spec_worker_pool_specs' -require 'google/vertexai/property/customjob_labels' -require 'google/vertexai/property/customjob_web_access_uris' +require "gcp_backend" +require "google/vertexai/property/customjob_encryption_spec" +require "google/vertexai/property/customjob_error" +require "google/vertexai/property/customjob_job_spec" +require "google/vertexai/property/customjob_job_spec_base_output_directory" +require "google/vertexai/property/customjob_job_spec_scheduling" +require "google/vertexai/property/customjob_job_spec_worker_pool_specs" +require "google/vertexai/property/customjob_labels" +require "google/vertexai/property/customjob_web_access_uris" # A provider to manage Vertex AI resources. class VertexAICustomJob < GcpResourceBase - name 'google_vertex_ai_custom_job' - desc 'CustomJob' - supports platform: 'gcp' + name "google_vertex_ai_custom_job" + desc "CustomJob" + supports platform: "gcp" attr_reader :params attr_reader :error @@ -46,23 +46,23 @@ class VertexAICustomJob < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @error = GoogleInSpec::VertexAI::Property::CustomJobError.new(@fetched['error'], to_s) - @web_access_uris = GoogleInSpec::VertexAI::Property::CustomJobWebAccessUris.new(@fetched['webAccessUris'], to_s) - @job_spec = GoogleInSpec::VertexAI::Property::CustomJobJobSpec.new(@fetched['jobSpec'], to_s) - @start_time = @fetched['startTime'] - @labels = GoogleInSpec::VertexAI::Property::CustomJobLabels.new(@fetched['labels'], to_s) - @encryption_spec = GoogleInSpec::VertexAI::Property::CustomJobEncryptionSpec.new(@fetched['encryptionSpec'], to_s) - @create_time = @fetched['createTime'] - @update_time = @fetched['updateTime'] - @end_time = @fetched['endTime'] - @state = @fetched['state'] - @display_name = @fetched['displayName'] - @name = @fetched['name'] + @error = GoogleInSpec::VertexAI::Property::CustomJobError.new(@fetched["error"], to_s) + @web_access_uris = GoogleInSpec::VertexAI::Property::CustomJobWebAccessUris.new(@fetched["webAccessUris"], to_s) + @job_spec = GoogleInSpec::VertexAI::Property::CustomJobJobSpec.new(@fetched["jobSpec"], to_s) + @start_time = @fetched["startTime"] + @labels = GoogleInSpec::VertexAI::Property::CustomJobLabels.new(@fetched["labels"], to_s) + @encryption_spec = GoogleInSpec::VertexAI::Property::CustomJobEncryptionSpec.new(@fetched["encryptionSpec"], to_s) + @create_time = @fetched["createTime"] + @update_time = @fetched["updateTime"] + @end_time = @fetched["endTime"] + @state = @fetched["state"] + @display_name = @fetched["displayName"] + @name = @fetched["name"] end def exists? @@ -76,10 +76,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_custom_jobs.rb b/libraries/google_vertex_ai_custom_jobs.rb index 09ead2252..f7f99323b 100644 --- a/libraries/google_vertex_ai_custom_jobs.rb +++ b/libraries/google_vertex_ai_custom_jobs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAICustomJobs < GcpResourceBase - name 'google_vertex_ai_custom_jobs' - desc 'CustomJob plural resource' - supports platform: 'gcp' + name "google_vertex_ai_custom_jobs" + desc "CustomJob plural resource" + supports platform: "gcp" attr_reader :table @@ -41,12 +41,12 @@ class VertexAICustomJobs < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('customJobs') + @table = fetch_wrapped_resource("customJobs") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -74,28 +74,28 @@ def transform(key, value) def transformers { - 'error' => ->(obj) { [:error, GoogleInSpec::VertexAI::Property::CustomJobError.new(obj['error'], to_s)] }, - 'webAccessUris' => ->(obj) { [:web_access_uris, GoogleInSpec::VertexAI::Property::CustomJobWebAccessUris.new(obj['webAccessUris'], to_s)] }, - 'jobSpec' => ->(obj) { [:job_spec, GoogleInSpec::VertexAI::Property::CustomJobJobSpec.new(obj['jobSpec'], to_s)] }, - 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::CustomJobLabels.new(obj['labels'], to_s)] }, - 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::CustomJobEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'name' => ->(obj) { [:name, obj['name']] }, + "error" => ->(obj) { [:error, GoogleInSpec::VertexAI::Property::CustomJobError.new(obj["error"], to_s)] }, + "webAccessUris" => ->(obj) { [:web_access_uris, GoogleInSpec::VertexAI::Property::CustomJobWebAccessUris.new(obj["webAccessUris"], to_s)] }, + "jobSpec" => ->(obj) { [:job_spec, GoogleInSpec::VertexAI::Property::CustomJobJobSpec.new(obj["jobSpec"], to_s)] }, + "startTime" => ->(obj) { [:start_time, obj["startTime"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::CustomJobLabels.new(obj["labels"], to_s)] }, + "encryptionSpec" => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::CustomJobEncryptionSpec.new(obj["encryptionSpec"], to_s)] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "endTime" => ->(obj) { [:end_time, obj["endTime"]] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/customJobs' + "{{parent}}/customJobs" end end diff --git a/libraries/google_vertex_ai_dataset.rb b/libraries/google_vertex_ai_dataset.rb index dffe00b0c..1acfe6a40 100644 --- a/libraries/google_vertex_ai_dataset.rb +++ b/libraries/google_vertex_ai_dataset.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/dataset_encryption_spec' -require 'google/vertexai/property/dataset_labels' -require 'google/vertexai/property/dataset_saved_queries' +require "gcp_backend" +require "google/vertexai/property/dataset_encryption_spec" +require "google/vertexai/property/dataset_labels" +require "google/vertexai/property/dataset_saved_queries" # A provider to manage Vertex AI resources. class VertexAIDataset < GcpResourceBase - name 'google_vertex_ai_dataset' - desc 'Dataset' - supports platform: 'gcp' + name "google_vertex_ai_dataset" + desc "Dataset" + supports platform: "gcp" attr_reader :params attr_reader :saved_queries @@ -42,24 +42,24 @@ class VertexAIDataset < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @saved_queries = GoogleInSpec::VertexAI::Property::DatasetSavedQueriesArray.parse(@fetched['savedQueries'], to_s) - @create_time = @fetched['createTime'] - @encryption_spec = GoogleInSpec::VertexAI::Property::DatasetEncryptionSpec.new(@fetched['encryptionSpec'], to_s) - @name = @fetched['name'] - @metadata = @fetched['metadata'] - @etag = @fetched['etag'] - @description = @fetched['description'] - @labels = GoogleInSpec::VertexAI::Property::DatasetLabels.new(@fetched['labels'], to_s) - @metadata_schema_uri = @fetched['metadataSchemaUri'] - @metadata_artifact = @fetched['metadataArtifact'] - @update_time = @fetched['updateTime'] - @data_item_count = @fetched['dataItemCount'] - @display_name = @fetched['displayName'] + @saved_queries = GoogleInSpec::VertexAI::Property::DatasetSavedQueriesArray.parse(@fetched["savedQueries"], to_s) + @create_time = @fetched["createTime"] + @encryption_spec = GoogleInSpec::VertexAI::Property::DatasetEncryptionSpec.new(@fetched["encryptionSpec"], to_s) + @name = @fetched["name"] + @metadata = @fetched["metadata"] + @etag = @fetched["etag"] + @description = @fetched["description"] + @labels = GoogleInSpec::VertexAI::Property::DatasetLabels.new(@fetched["labels"], to_s) + @metadata_schema_uri = @fetched["metadataSchemaUri"] + @metadata_artifact = @fetched["metadataArtifact"] + @update_time = @fetched["updateTime"] + @data_item_count = @fetched["dataItemCount"] + @display_name = @fetched["displayName"] end def exists? @@ -73,10 +73,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_dataset_data_item_annotations.rb b/libraries/google_vertex_ai_dataset_data_item_annotations.rb index 1312a0843..d4a5373b3 100644 --- a/libraries/google_vertex_ai_dataset_data_item_annotations.rb +++ b/libraries/google_vertex_ai_dataset_data_item_annotations.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIDatasetDataItemAnnotations < GcpResourceBase - name 'google_vertex_ai_dataset_data_item_annotations' - desc 'DatasetDataItemAnnotation plural resource' - supports platform: 'gcp' + name "google_vertex_ai_dataset_data_item_annotations" + desc "DatasetDataItemAnnotation plural resource" + supports platform: "gcp" attr_reader :table @@ -37,12 +37,12 @@ class VertexAIDatasetDataItemAnnotations < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('annotations') + @table = fetch_wrapped_resource("annotations") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] @@ -69,24 +69,24 @@ def transform(key, value) def transformers { - 'payloadSchemaUri' => ->(obj) { [:payload_schema_uri, obj['payloadSchemaUri']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::DatasetDataItemAnnotationLabels.new(obj['labels'], to_s)] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'payload' => ->(obj) { [:payload, obj['payload']] }, - 'annotationSource' => ->(obj) { [:annotation_source, obj['annotationSource']] }, - 'name' => ->(obj) { [:name, obj['name']] }, + "payloadSchemaUri" => ->(obj) { [:payload_schema_uri, obj["payloadSchemaUri"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::DatasetDataItemAnnotationLabels.new(obj["labels"], to_s)] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "payload" => ->(obj) { [:payload, obj["payload"]] }, + "annotationSource" => ->(obj) { [:annotation_source, obj["annotationSource"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/annotations' + "{{parent}}/annotations" end end diff --git a/libraries/google_vertex_ai_datasets.rb b/libraries/google_vertex_ai_datasets.rb index 6fa0a9235..718594750 100644 --- a/libraries/google_vertex_ai_datasets.rb +++ b/libraries/google_vertex_ai_datasets.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIDatasets < GcpResourceBase - name 'google_vertex_ai_datasets' - desc 'Dataset plural resource' - supports platform: 'gcp' + name "google_vertex_ai_datasets" + desc "Dataset plural resource" + supports platform: "gcp" attr_reader :table @@ -42,12 +42,12 @@ class VertexAIDatasets < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('datasets') + @table = fetch_wrapped_resource("datasets") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -75,29 +75,29 @@ def transform(key, value) def transformers { - 'savedQueries' => ->(obj) { [:saved_queries, GoogleInSpec::VertexAI::Property::DatasetSavedQueriesArray.parse(obj['savedQueries'], to_s)] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::DatasetEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'metadata' => ->(obj) { [:metadata, obj['metadata']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::DatasetLabels.new(obj['labels'], to_s)] }, - 'metadataSchemaUri' => ->(obj) { [:metadata_schema_uri, obj['metadataSchemaUri']] }, - 'metadataArtifact' => ->(obj) { [:metadata_artifact, obj['metadataArtifact']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'dataItemCount' => ->(obj) { [:data_item_count, obj['dataItemCount']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, + "savedQueries" => ->(obj) { [:saved_queries, GoogleInSpec::VertexAI::Property::DatasetSavedQueriesArray.parse(obj["savedQueries"], to_s)] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "encryptionSpec" => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::DatasetEncryptionSpec.new(obj["encryptionSpec"], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "metadata" => ->(obj) { [:metadata, obj["metadata"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::DatasetLabels.new(obj["labels"], to_s)] }, + "metadataSchemaUri" => ->(obj) { [:metadata_schema_uri, obj["metadataSchemaUri"]] }, + "metadataArtifact" => ->(obj) { [:metadata_artifact, obj["metadataArtifact"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "dataItemCount" => ->(obj) { [:data_item_count, obj["dataItemCount"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/datasets' + "{{parent}}/datasets" end end diff --git a/libraries/google_vertex_ai_datasets_annotation_spec.rb b/libraries/google_vertex_ai_datasets_annotation_spec.rb index b98386a32..129d88c3d 100644 --- a/libraries/google_vertex_ai_datasets_annotation_spec.rb +++ b/libraries/google_vertex_ai_datasets_annotation_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Vertex AI resources. class VertexAIDatasetsAnnotationSpec < GcpResourceBase - name 'google_vertex_ai_datasets_annotation_spec' - desc 'DatasetsAnnotationSpec' - supports platform: 'gcp' + name "google_vertex_ai_datasets_annotation_spec" + desc "DatasetsAnnotationSpec" + supports platform: "gcp" attr_reader :params attr_reader :display_name @@ -31,16 +31,16 @@ class VertexAIDatasetsAnnotationSpec < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @display_name = @fetched['displayName'] - @name = @fetched['name'] - @etag = @fetched['etag'] - @create_time = @fetched['createTime'] - @update_time = @fetched['updateTime'] + @display_name = @fetched["displayName"] + @name = @fetched["name"] + @etag = @fetched["etag"] + @create_time = @fetched["createTime"] + @update_time = @fetched["updateTime"] end def exists? @@ -54,10 +54,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_datasets_data_items.rb b/libraries/google_vertex_ai_datasets_data_items.rb index ad294ac4f..35754805e 100644 --- a/libraries/google_vertex_ai_datasets_data_items.rb +++ b/libraries/google_vertex_ai_datasets_data_items.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIDatasetsDataItems < GcpResourceBase - name 'google_vertex_ai_datasets_data_items' - desc 'DatasetsDataItem plural resource' - supports platform: 'gcp' + name "google_vertex_ai_datasets_data_items" + desc "DatasetsDataItem plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class VertexAIDatasetsDataItems < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('dataItems') + @table = fetch_wrapped_resource("dataItems") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,22 +68,22 @@ def transform(key, value) def transformers { - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'payload' => ->(obj) { [:payload, obj['payload']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::DatasetsDataItemLabels.new(obj['labels'], to_s)] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "payload" => ->(obj) { [:payload, obj["payload"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::DatasetsDataItemLabels.new(obj["labels"], to_s)] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/dataItems' + "{{parent}}/dataItems" end end diff --git a/libraries/google_vertex_ai_datasets_saved_queries.rb b/libraries/google_vertex_ai_datasets_saved_queries.rb index f22b3fd2e..7d728ad89 100644 --- a/libraries/google_vertex_ai_datasets_saved_queries.rb +++ b/libraries/google_vertex_ai_datasets_saved_queries.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIDatasetsSavedQuerys < GcpResourceBase - name 'google_vertex_ai_datasets_saved_queries' - desc 'DatasetsSavedQuery plural resource' - supports platform: 'gcp' + name "google_vertex_ai_datasets_saved_queries" + desc "DatasetsSavedQuery plural resource" + supports platform: "gcp" attr_reader :table @@ -39,12 +39,12 @@ class VertexAIDatasetsSavedQuerys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('savedQueries') + @table = fetch_wrapped_resource("savedQueries") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -72,26 +72,26 @@ def transform(key, value) def transformers { - 'annotationSpecCount' => ->(obj) { [:annotation_spec_count, obj['annotationSpecCount']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'supportAutomlTraining' => ->(obj) { [:support_automl_training, obj['supportAutomlTraining']] }, - 'metadata' => ->(obj) { [:metadata, obj['metadata']] }, - 'problemType' => ->(obj) { [:problem_type, obj['problemType']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'annotationFilter' => ->(obj) { [:annotation_filter, obj['annotationFilter']] }, + "annotationSpecCount" => ->(obj) { [:annotation_spec_count, obj["annotationSpecCount"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "supportAutomlTraining" => ->(obj) { [:support_automl_training, obj["supportAutomlTraining"]] }, + "metadata" => ->(obj) { [:metadata, obj["metadata"]] }, + "problemType" => ->(obj) { [:problem_type, obj["problemType"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "annotationFilter" => ->(obj) { [:annotation_filter, obj["annotationFilter"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/savedQueries' + "{{parent}}/savedQueries" end end diff --git a/libraries/google_vertex_ai_endpoint.rb b/libraries/google_vertex_ai_endpoint.rb index d180bb17e..fa6e7c64d 100644 --- a/libraries/google_vertex_ai_endpoint.rb +++ b/libraries/google_vertex_ai_endpoint.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,19 +13,19 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/endpoint_deployed_models' -require 'google/vertexai/property/endpoint_encryption_spec' -require 'google/vertexai/property/endpoint_labels' -require 'google/vertexai/property/endpoint_predict_request_response_logging_config' -require 'google/vertexai/property/endpoint_predict_request_response_logging_config_bigquery_destination' -require 'google/vertexai/property/endpoint_traffic_split' +require "gcp_backend" +require "google/vertexai/property/endpoint_deployed_models" +require "google/vertexai/property/endpoint_encryption_spec" +require "google/vertexai/property/endpoint_labels" +require "google/vertexai/property/endpoint_predict_request_response_logging_config" +require "google/vertexai/property/endpoint_predict_request_response_logging_config_bigquery_destination" +require "google/vertexai/property/endpoint_traffic_split" # A provider to manage Vertex AI resources. class VertexAIEndpoint < GcpResourceBase - name 'google_vertex_ai_endpoint' - desc 'Endpoint' - supports platform: 'gcp' + name "google_vertex_ai_endpoint" + desc "Endpoint" + supports platform: "gcp" attr_reader :params attr_reader :encryption_spec @@ -46,25 +46,25 @@ class VertexAIEndpoint < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @encryption_spec = GoogleInSpec::VertexAI::Property::EndpointEncryptionSpec.new(@fetched['encryptionSpec'], to_s) - @enable_private_service_connect = @fetched['enablePrivateServiceConnect'] - @update_time = @fetched['updateTime'] - @model_deployment_monitoring_job = @fetched['modelDeploymentMonitoringJob'] - @description = @fetched['description'] - @deployed_models = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsArray.parse(@fetched['deployedModels'], to_s) - @network = @fetched['network'] - @traffic_split = GoogleInSpec::VertexAI::Property::EndpointTrafficSplit.new(@fetched['trafficSplit'], to_s) - @labels = GoogleInSpec::VertexAI::Property::EndpointLabels.new(@fetched['labels'], to_s) - @display_name = @fetched['displayName'] - @predict_request_response_logging_config = GoogleInSpec::VertexAI::Property::EndpointPredictRequestResponseLoggingConfig.new(@fetched['predictRequestResponseLoggingConfig'], to_s) - @etag = @fetched['etag'] - @create_time = @fetched['createTime'] - @name = @fetched['name'] + @encryption_spec = GoogleInSpec::VertexAI::Property::EndpointEncryptionSpec.new(@fetched["encryptionSpec"], to_s) + @enable_private_service_connect = @fetched["enablePrivateServiceConnect"] + @update_time = @fetched["updateTime"] + @model_deployment_monitoring_job = @fetched["modelDeploymentMonitoringJob"] + @description = @fetched["description"] + @deployed_models = GoogleInSpec::VertexAI::Property::EndpointDeployedModelsArray.parse(@fetched["deployedModels"], to_s) + @network = @fetched["network"] + @traffic_split = GoogleInSpec::VertexAI::Property::EndpointTrafficSplit.new(@fetched["trafficSplit"], to_s) + @labels = GoogleInSpec::VertexAI::Property::EndpointLabels.new(@fetched["labels"], to_s) + @display_name = @fetched["displayName"] + @predict_request_response_logging_config = GoogleInSpec::VertexAI::Property::EndpointPredictRequestResponseLoggingConfig.new(@fetched["predictRequestResponseLoggingConfig"], to_s) + @etag = @fetched["etag"] + @create_time = @fetched["createTime"] + @name = @fetched["name"] end def exists? @@ -78,10 +78,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_endpoints.rb b/libraries/google_vertex_ai_endpoints.rb index 189af0409..18544fe00 100644 --- a/libraries/google_vertex_ai_endpoints.rb +++ b/libraries/google_vertex_ai_endpoints.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIEndpoints < GcpResourceBase - name 'google_vertex_ai_endpoints' - desc 'Endpoint plural resource' - supports platform: 'gcp' + name "google_vertex_ai_endpoints" + desc "Endpoint plural resource" + supports platform: "gcp" attr_reader :table @@ -43,12 +43,12 @@ class VertexAIEndpoints < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('endpoints') + @table = fetch_wrapped_resource("endpoints") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -76,30 +76,30 @@ def transform(key, value) def transformers { - 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::EndpointEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, - 'enablePrivateServiceConnect' => ->(obj) { [:enable_private_service_connect, obj['enablePrivateServiceConnect']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'modelDeploymentMonitoringJob' => ->(obj) { [:model_deployment_monitoring_job, obj['modelDeploymentMonitoringJob']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'deployedModels' => ->(obj) { [:deployed_models, GoogleInSpec::VertexAI::Property::EndpointDeployedModelsArray.parse(obj['deployedModels'], to_s)] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'trafficSplit' => ->(obj) { [:traffic_split, GoogleInSpec::VertexAI::Property::EndpointTrafficSplit.new(obj['trafficSplit'], to_s)] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::EndpointLabels.new(obj['labels'], to_s)] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'predictRequestResponseLoggingConfig' => ->(obj) { [:predict_request_response_logging_config, GoogleInSpec::VertexAI::Property::EndpointPredictRequestResponseLoggingConfig.new(obj['predictRequestResponseLoggingConfig'], to_s)] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'name' => ->(obj) { [:name, obj['name']] }, + "encryptionSpec" => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::EndpointEncryptionSpec.new(obj["encryptionSpec"], to_s)] }, + "enablePrivateServiceConnect" => ->(obj) { [:enable_private_service_connect, obj["enablePrivateServiceConnect"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "modelDeploymentMonitoringJob" => ->(obj) { [:model_deployment_monitoring_job, obj["modelDeploymentMonitoringJob"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "deployedModels" => ->(obj) { [:deployed_models, GoogleInSpec::VertexAI::Property::EndpointDeployedModelsArray.parse(obj["deployedModels"], to_s)] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "trafficSplit" => ->(obj) { [:traffic_split, GoogleInSpec::VertexAI::Property::EndpointTrafficSplit.new(obj["trafficSplit"], to_s)] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::EndpointLabels.new(obj["labels"], to_s)] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "predictRequestResponseLoggingConfig" => ->(obj) { [:predict_request_response_logging_config, GoogleInSpec::VertexAI::Property::EndpointPredictRequestResponseLoggingConfig.new(obj["predictRequestResponseLoggingConfig"], to_s)] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/endpoints' + "{{parent}}/endpoints" end end diff --git a/libraries/google_vertex_ai_featurestore.rb b/libraries/google_vertex_ai_featurestore.rb index 53a42865e..ffc45793f 100644 --- a/libraries/google_vertex_ai_featurestore.rb +++ b/libraries/google_vertex_ai_featurestore.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,17 +13,17 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/featurestore_encryption_spec' -require 'google/vertexai/property/featurestore_labels' -require 'google/vertexai/property/featurestore_online_serving_config' -require 'google/vertexai/property/featurestore_online_serving_config_scaling' +require "gcp_backend" +require "google/vertexai/property/featurestore_encryption_spec" +require "google/vertexai/property/featurestore_labels" +require "google/vertexai/property/featurestore_online_serving_config" +require "google/vertexai/property/featurestore_online_serving_config_scaling" # A provider to manage Vertex AI resources. class VertexAIFeaturestore < GcpResourceBase - name 'google_vertex_ai_featurestore' - desc 'Featurestore' - supports platform: 'gcp' + name "google_vertex_ai_featurestore" + desc "Featurestore" + supports platform: "gcp" attr_reader :params attr_reader :state @@ -39,20 +39,20 @@ class VertexAIFeaturestore < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @state = @fetched['state'] - @create_time = @fetched['createTime'] - @etag = @fetched['etag'] - @online_storage_ttl_days = @fetched['onlineStorageTtlDays'] - @encryption_spec = GoogleInSpec::VertexAI::Property::FeaturestoreEncryptionSpec.new(@fetched['encryptionSpec'], to_s) - @labels = GoogleInSpec::VertexAI::Property::FeaturestoreLabels.new(@fetched['labels'], to_s) - @update_time = @fetched['updateTime'] - @name = @fetched['name'] - @online_serving_config = GoogleInSpec::VertexAI::Property::FeaturestoreOnlineServingConfig.new(@fetched['onlineServingConfig'], to_s) + @state = @fetched["state"] + @create_time = @fetched["createTime"] + @etag = @fetched["etag"] + @online_storage_ttl_days = @fetched["onlineStorageTtlDays"] + @encryption_spec = GoogleInSpec::VertexAI::Property::FeaturestoreEncryptionSpec.new(@fetched["encryptionSpec"], to_s) + @labels = GoogleInSpec::VertexAI::Property::FeaturestoreLabels.new(@fetched["labels"], to_s) + @update_time = @fetched["updateTime"] + @name = @fetched["name"] + @online_serving_config = GoogleInSpec::VertexAI::Property::FeaturestoreOnlineServingConfig.new(@fetched["onlineServingConfig"], to_s) end def exists? @@ -66,10 +66,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_featurestore_entity_type_feature.rb b/libraries/google_vertex_ai_featurestore_entity_type_feature.rb index 7b9c2b6f3..f2bc5596e 100644 --- a/libraries/google_vertex_ai_featurestore_entity_type_feature.rb +++ b/libraries/google_vertex_ai_featurestore_entity_type_feature.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/featurestoreentitytypefeature_labels' +require "gcp_backend" +require "google/vertexai/property/featurestoreentitytypefeature_labels" # A provider to manage Vertex AI resources. class VertexAIFeaturestoreEntityTypeFeature < GcpResourceBase - name 'google_vertex_ai_featurestore_entity_type_feature' - desc 'FeaturestoreEntityTypeFeature' - supports platform: 'gcp' + name "google_vertex_ai_featurestore_entity_type_feature" + desc "FeaturestoreEntityTypeFeature" + supports platform: "gcp" attr_reader :params attr_reader :description @@ -36,20 +36,20 @@ class VertexAIFeaturestoreEntityTypeFeature < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @description = @fetched['description'] - @create_time = @fetched['createTime'] - @monitoring_stats_anomalies = @fetched['monitoringStatsAnomalies'] - @etag = @fetched['etag'] - @labels = GoogleInSpec::VertexAI::Property::FeaturestoreEntityTypeFeatureLabels.new(@fetched['labels'], to_s) - @name = @fetched['name'] - @update_time = @fetched['updateTime'] - @disable_monitoring = @fetched['disableMonitoring'] - @value_type = @fetched['valueType'] + @description = @fetched["description"] + @create_time = @fetched["createTime"] + @monitoring_stats_anomalies = @fetched["monitoringStatsAnomalies"] + @etag = @fetched["etag"] + @labels = GoogleInSpec::VertexAI::Property::FeaturestoreEntityTypeFeatureLabels.new(@fetched["labels"], to_s) + @name = @fetched["name"] + @update_time = @fetched["updateTime"] + @disable_monitoring = @fetched["disableMonitoring"] + @value_type = @fetched["valueType"] end def exists? @@ -63,10 +63,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_featurestore_entity_type_features.rb b/libraries/google_vertex_ai_featurestore_entity_type_features.rb index 42869d217..b0b299817 100644 --- a/libraries/google_vertex_ai_featurestore_entity_type_features.rb +++ b/libraries/google_vertex_ai_featurestore_entity_type_features.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIFeaturestoreEntityTypeFeatures < GcpResourceBase - name 'google_vertex_ai_featurestore_entity_type_features' - desc 'FeaturestoreEntityTypeFeature plural resource' - supports platform: 'gcp' + name "google_vertex_ai_featurestore_entity_type_features" + desc "FeaturestoreEntityTypeFeature plural resource" + supports platform: "gcp" attr_reader :table @@ -38,12 +38,12 @@ class VertexAIFeaturestoreEntityTypeFeatures < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('features') + @table = fetch_wrapped_resource("features") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -71,25 +71,25 @@ def transform(key, value) def transformers { - 'description' => ->(obj) { [:description, obj['description']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'monitoringStatsAnomalies' => ->(obj) { [:monitoring_stats_anomalies, obj['monitoringStatsAnomalies']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::FeaturestoreEntityTypeFeatureLabels.new(obj['labels'], to_s)] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'disableMonitoring' => ->(obj) { [:disable_monitoring, obj['disableMonitoring']] }, - 'valueType' => ->(obj) { [:value_type, obj['valueType']] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "monitoringStatsAnomalies" => ->(obj) { [:monitoring_stats_anomalies, obj["monitoringStatsAnomalies"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::FeaturestoreEntityTypeFeatureLabels.new(obj["labels"], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "disableMonitoring" => ->(obj) { [:disable_monitoring, obj["disableMonitoring"]] }, + "valueType" => ->(obj) { [:value_type, obj["valueType"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/features' + "{{parent}}/features" end end diff --git a/libraries/google_vertex_ai_featurestores.rb b/libraries/google_vertex_ai_featurestores.rb index fea7df564..467901af6 100644 --- a/libraries/google_vertex_ai_featurestores.rb +++ b/libraries/google_vertex_ai_featurestores.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIFeaturestores < GcpResourceBase - name 'google_vertex_ai_featurestores' - desc 'Featurestore plural resource' - supports platform: 'gcp' + name "google_vertex_ai_featurestores" + desc "Featurestore plural resource" + supports platform: "gcp" attr_reader :table @@ -38,12 +38,12 @@ class VertexAIFeaturestores < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('featurestores') + @table = fetch_wrapped_resource("featurestores") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -71,25 +71,25 @@ def transform(key, value) def transformers { - 'state' => ->(obj) { [:state, obj['state']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'onlineStorageTtlDays' => ->(obj) { [:online_storage_ttl_days, obj['onlineStorageTtlDays']] }, - 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::FeaturestoreEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::FeaturestoreLabels.new(obj['labels'], to_s)] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'onlineServingConfig' => ->(obj) { [:online_serving_config, GoogleInSpec::VertexAI::Property::FeaturestoreOnlineServingConfig.new(obj['onlineServingConfig'], to_s)] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "onlineStorageTtlDays" => ->(obj) { [:online_storage_ttl_days, obj["onlineStorageTtlDays"]] }, + "encryptionSpec" => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::FeaturestoreEncryptionSpec.new(obj["encryptionSpec"], to_s)] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::FeaturestoreLabels.new(obj["labels"], to_s)] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "onlineServingConfig" => ->(obj) { [:online_serving_config, GoogleInSpec::VertexAI::Property::FeaturestoreOnlineServingConfig.new(obj["onlineServingConfig"], to_s)] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/featurestores' + "{{parent}}/featurestores" end end diff --git a/libraries/google_vertex_ai_featurestores_entity_type.rb b/libraries/google_vertex_ai_featurestores_entity_type.rb index 882536ddb..f2f05582c 100644 --- a/libraries/google_vertex_ai_featurestores_entity_type.rb +++ b/libraries/google_vertex_ai_featurestores_entity_type.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,19 +13,19 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/featurestoresentitytype_labels' -require 'google/vertexai/property/featurestoresentitytype_monitoring_config' -require 'google/vertexai/property/featurestoresentitytype_monitoring_config_categorical_threshold_config' -require 'google/vertexai/property/featurestoresentitytype_monitoring_config_import_features_analysis' -require 'google/vertexai/property/featurestoresentitytype_monitoring_config_numerical_threshold_config' -require 'google/vertexai/property/featurestoresentitytype_monitoring_config_snapshot_analysis' +require "gcp_backend" +require "google/vertexai/property/featurestoresentitytype_labels" +require "google/vertexai/property/featurestoresentitytype_monitoring_config" +require "google/vertexai/property/featurestoresentitytype_monitoring_config_categorical_threshold_config" +require "google/vertexai/property/featurestoresentitytype_monitoring_config_import_features_analysis" +require "google/vertexai/property/featurestoresentitytype_monitoring_config_numerical_threshold_config" +require "google/vertexai/property/featurestoresentitytype_monitoring_config_snapshot_analysis" # A provider to manage Vertex AI resources. class VertexAIFeaturestoresEntityType < GcpResourceBase - name 'google_vertex_ai_featurestores_entity_type' - desc 'FeaturestoresEntityType' - supports platform: 'gcp' + name "google_vertex_ai_featurestores_entity_type" + desc "FeaturestoresEntityType" + supports platform: "gcp" attr_reader :params attr_reader :labels @@ -40,19 +40,19 @@ class VertexAIFeaturestoresEntityType < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @labels = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeLabels.new(@fetched['labels'], to_s) - @description = @fetched['description'] - @name = @fetched['name'] - @create_time = @fetched['createTime'] - @monitoring_config = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfig.new(@fetched['monitoringConfig'], to_s) - @etag = @fetched['etag'] - @update_time = @fetched['updateTime'] - @offline_storage_ttl_days = @fetched['offlineStorageTtlDays'] + @labels = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeLabels.new(@fetched["labels"], to_s) + @description = @fetched["description"] + @name = @fetched["name"] + @create_time = @fetched["createTime"] + @monitoring_config = GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfig.new(@fetched["monitoringConfig"], to_s) + @etag = @fetched["etag"] + @update_time = @fetched["updateTime"] + @offline_storage_ttl_days = @fetched["offlineStorageTtlDays"] end def exists? @@ -66,10 +66,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_featurestores_entity_types.rb b/libraries/google_vertex_ai_featurestores_entity_types.rb index e8cdade42..21590efd4 100644 --- a/libraries/google_vertex_ai_featurestores_entity_types.rb +++ b/libraries/google_vertex_ai_featurestores_entity_types.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIFeaturestoresEntityTypes < GcpResourceBase - name 'google_vertex_ai_featurestores_entity_types' - desc 'FeaturestoresEntityType plural resource' - supports platform: 'gcp' + name "google_vertex_ai_featurestores_entity_types" + desc "FeaturestoresEntityType plural resource" + supports platform: "gcp" attr_reader :table @@ -37,12 +37,12 @@ class VertexAIFeaturestoresEntityTypes < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('entityTypes') + @table = fetch_wrapped_resource("entityTypes") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -70,24 +70,24 @@ def transform(key, value) def transformers { - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeLabels.new(obj['labels'], to_s)] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'monitoringConfig' => ->(obj) { [:monitoring_config, GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfig.new(obj['monitoringConfig'], to_s)] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'offlineStorageTtlDays' => ->(obj) { [:offline_storage_ttl_days, obj['offlineStorageTtlDays']] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeLabels.new(obj["labels"], to_s)] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "monitoringConfig" => ->(obj) { [:monitoring_config, GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfig.new(obj["monitoringConfig"], to_s)] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "offlineStorageTtlDays" => ->(obj) { [:offline_storage_ttl_days, obj["offlineStorageTtlDays"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/entityTypes' + "{{parent}}/entityTypes" end end diff --git a/libraries/google_vertex_ai_hyperparameter_tuning_job.rb b/libraries/google_vertex_ai_hyperparameter_tuning_job.rb index 149ede380..61c54ff9d 100644 --- a/libraries/google_vertex_ai_hyperparameter_tuning_job.rb +++ b/libraries/google_vertex_ai_hyperparameter_tuning_job.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/hyperparametertuningjob_labels' +require "gcp_backend" +require "google/vertexai/property/hyperparametertuningjob_labels" # A provider to manage Vertex AI resources. class VertexAIHyperparameterTuningJob < GcpResourceBase - name 'google_vertex_ai_hyperparameter_tuning_job' - desc 'HyperparameterTuningJob' - supports platform: 'gcp' + name "google_vertex_ai_hyperparameter_tuning_job" + desc "HyperparameterTuningJob" + supports platform: "gcp" attr_reader :params attr_reader :study_spec @@ -43,27 +43,27 @@ class VertexAIHyperparameterTuningJob < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @study_spec = @fetched['studySpec'] - @trials = @fetched['trials'] - @state = @fetched['state'] - @max_failed_trial_count = @fetched['maxFailedTrialCount'] - @encryption_spec = @fetched['encryptionSpec'] - @error = @fetched['error'] - @end_time = @fetched['endTime'] - @update_time = @fetched['updateTime'] - @start_time = @fetched['startTime'] - @labels = GoogleInSpec::VertexAI::Property::HyperparameterTuningJobLabels.new(@fetched['labels'], to_s) - @create_time = @fetched['createTime'] - @parallel_trial_count = @fetched['parallelTrialCount'] - @trial_job_spec = @fetched['trialJobSpec'] - @max_trial_count = @fetched['maxTrialCount'] - @display_name = @fetched['displayName'] - @name = @fetched['name'] + @study_spec = @fetched["studySpec"] + @trials = @fetched["trials"] + @state = @fetched["state"] + @max_failed_trial_count = @fetched["maxFailedTrialCount"] + @encryption_spec = @fetched["encryptionSpec"] + @error = @fetched["error"] + @end_time = @fetched["endTime"] + @update_time = @fetched["updateTime"] + @start_time = @fetched["startTime"] + @labels = GoogleInSpec::VertexAI::Property::HyperparameterTuningJobLabels.new(@fetched["labels"], to_s) + @create_time = @fetched["createTime"] + @parallel_trial_count = @fetched["parallelTrialCount"] + @trial_job_spec = @fetched["trialJobSpec"] + @max_trial_count = @fetched["maxTrialCount"] + @display_name = @fetched["displayName"] + @name = @fetched["name"] end def exists? @@ -77,10 +77,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_hyperparameter_tuning_jobs.rb b/libraries/google_vertex_ai_hyperparameter_tuning_jobs.rb index 63531262c..09d4c3784 100644 --- a/libraries/google_vertex_ai_hyperparameter_tuning_jobs.rb +++ b/libraries/google_vertex_ai_hyperparameter_tuning_jobs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIHyperparameterTuningJobs < GcpResourceBase - name 'google_vertex_ai_hyperparameter_tuning_jobs' - desc 'HyperparameterTuningJob plural resource' - supports platform: 'gcp' + name "google_vertex_ai_hyperparameter_tuning_jobs" + desc "HyperparameterTuningJob plural resource" + supports platform: "gcp" attr_reader :table @@ -45,12 +45,12 @@ class VertexAIHyperparameterTuningJobs < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('hyperparameterTuningJobs') + @table = fetch_wrapped_resource("hyperparameterTuningJobs") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -78,32 +78,32 @@ def transform(key, value) def transformers { - 'studySpec' => ->(obj) { [:study_spec, obj['studySpec']] }, - 'trials' => ->(obj) { [:trials, obj['trials']] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'maxFailedTrialCount' => ->(obj) { [:max_failed_trial_count, obj['maxFailedTrialCount']] }, - 'encryptionSpec' => ->(obj) { [:encryption_spec, obj['encryptionSpec']] }, - 'error' => ->(obj) { [:error, obj['error']] }, - 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::HyperparameterTuningJobLabels.new(obj['labels'], to_s)] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'parallelTrialCount' => ->(obj) { [:parallel_trial_count, obj['parallelTrialCount']] }, - 'trialJobSpec' => ->(obj) { [:trial_job_spec, obj['trialJobSpec']] }, - 'maxTrialCount' => ->(obj) { [:max_trial_count, obj['maxTrialCount']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'name' => ->(obj) { [:name, obj['name']] }, + "studySpec" => ->(obj) { [:study_spec, obj["studySpec"]] }, + "trials" => ->(obj) { [:trials, obj["trials"]] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "maxFailedTrialCount" => ->(obj) { [:max_failed_trial_count, obj["maxFailedTrialCount"]] }, + "encryptionSpec" => ->(obj) { [:encryption_spec, obj["encryptionSpec"]] }, + "error" => ->(obj) { [:error, obj["error"]] }, + "endTime" => ->(obj) { [:end_time, obj["endTime"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "startTime" => ->(obj) { [:start_time, obj["startTime"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::HyperparameterTuningJobLabels.new(obj["labels"], to_s)] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "parallelTrialCount" => ->(obj) { [:parallel_trial_count, obj["parallelTrialCount"]] }, + "trialJobSpec" => ->(obj) { [:trial_job_spec, obj["trialJobSpec"]] }, + "maxTrialCount" => ->(obj) { [:max_trial_count, obj["maxTrialCount"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/hyperparameterTuningJobs' + "{{parent}}/hyperparameterTuningJobs" end end diff --git a/libraries/google_vertex_ai_index.rb b/libraries/google_vertex_ai_index.rb index 4a82d57b8..31cff2683 100644 --- a/libraries/google_vertex_ai_index.rb +++ b/libraries/google_vertex_ai_index.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/index_labels' +require "gcp_backend" +require "google/vertexai/property/index_labels" # A provider to manage Vertex AI resources. class VertexAIIndex < GcpResourceBase - name 'google_vertex_ai_index' - desc 'Index' - supports platform: 'gcp' + name "google_vertex_ai_index" + desc "Index" + supports platform: "gcp" attr_reader :params attr_reader :description @@ -39,23 +39,23 @@ class VertexAIIndex < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @description = @fetched['description'] - @metadata = @fetched['metadata'] - @index_stats = @fetched['indexStats'] - @name = @fetched['name'] - @deployed_indexes = @fetched['deployedIndexes'] - @display_name = @fetched['displayName'] - @metadata_schema_uri = @fetched['metadataSchemaUri'] - @index_update_method = @fetched['indexUpdateMethod'] - @update_time = @fetched['updateTime'] - @create_time = @fetched['createTime'] - @etag = @fetched['etag'] - @labels = GoogleInSpec::VertexAI::Property::IndexLabels.new(@fetched['labels'], to_s) + @description = @fetched["description"] + @metadata = @fetched["metadata"] + @index_stats = @fetched["indexStats"] + @name = @fetched["name"] + @deployed_indexes = @fetched["deployedIndexes"] + @display_name = @fetched["displayName"] + @metadata_schema_uri = @fetched["metadataSchemaUri"] + @index_update_method = @fetched["indexUpdateMethod"] + @update_time = @fetched["updateTime"] + @create_time = @fetched["createTime"] + @etag = @fetched["etag"] + @labels = GoogleInSpec::VertexAI::Property::IndexLabels.new(@fetched["labels"], to_s) end def exists? @@ -69,10 +69,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_index_endpoint.rb b/libraries/google_vertex_ai_index_endpoint.rb index c0543ba6d..51f5f04aa 100644 --- a/libraries/google_vertex_ai_index_endpoint.rb +++ b/libraries/google_vertex_ai_index_endpoint.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/indexendpoint_deployed_indexes' -require 'google/vertexai/property/indexendpoint_labels' -require 'google/vertexai/property/indexendpoint_private_service_connect_config' +require "gcp_backend" +require "google/vertexai/property/indexendpoint_deployed_indexes" +require "google/vertexai/property/indexendpoint_labels" +require "google/vertexai/property/indexendpoint_private_service_connect_config" # A provider to manage Vertex AI resources. class VertexAIIndexEndpoint < GcpResourceBase - name 'google_vertex_ai_index_endpoint' - desc 'IndexEndpoint' - supports platform: 'gcp' + name "google_vertex_ai_index_endpoint" + desc "IndexEndpoint" + supports platform: "gcp" attr_reader :params attr_reader :deployed_indexes @@ -42,24 +42,24 @@ class VertexAIIndexEndpoint < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @deployed_indexes = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesArray.parse(@fetched['deployedIndexes'], to_s) - @private_service_connect_config = GoogleInSpec::VertexAI::Property::IndexEndpointPrivateServiceConnectConfig.new(@fetched['privateServiceConnectConfig'], to_s) - @display_name = @fetched['displayName'] - @public_endpoint_enabled = @fetched['publicEndpointEnabled'] - @labels = GoogleInSpec::VertexAI::Property::IndexEndpointLabels.new(@fetched['labels'], to_s) - @create_time = @fetched['createTime'] - @name = @fetched['name'] - @network = @fetched['network'] - @update_time = @fetched['updateTime'] - @public_endpoint_domain_name = @fetched['publicEndpointDomainName'] - @enable_private_service_connect = @fetched['enablePrivateServiceConnect'] - @etag = @fetched['etag'] - @description = @fetched['description'] + @deployed_indexes = GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesArray.parse(@fetched["deployedIndexes"], to_s) + @private_service_connect_config = GoogleInSpec::VertexAI::Property::IndexEndpointPrivateServiceConnectConfig.new(@fetched["privateServiceConnectConfig"], to_s) + @display_name = @fetched["displayName"] + @public_endpoint_enabled = @fetched["publicEndpointEnabled"] + @labels = GoogleInSpec::VertexAI::Property::IndexEndpointLabels.new(@fetched["labels"], to_s) + @create_time = @fetched["createTime"] + @name = @fetched["name"] + @network = @fetched["network"] + @update_time = @fetched["updateTime"] + @public_endpoint_domain_name = @fetched["publicEndpointDomainName"] + @enable_private_service_connect = @fetched["enablePrivateServiceConnect"] + @etag = @fetched["etag"] + @description = @fetched["description"] end def exists? @@ -73,10 +73,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_index_endpoints.rb b/libraries/google_vertex_ai_index_endpoints.rb index cb13ae6e6..172f38d1b 100644 --- a/libraries/google_vertex_ai_index_endpoints.rb +++ b/libraries/google_vertex_ai_index_endpoints.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIIndexEndpoints < GcpResourceBase - name 'google_vertex_ai_index_endpoints' - desc 'IndexEndpoint plural resource' - supports platform: 'gcp' + name "google_vertex_ai_index_endpoints" + desc "IndexEndpoint plural resource" + supports platform: "gcp" attr_reader :table @@ -42,12 +42,12 @@ class VertexAIIndexEndpoints < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('indexEndpoints') + @table = fetch_wrapped_resource("indexEndpoints") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -75,29 +75,29 @@ def transform(key, value) def transformers { - 'deployedIndexes' => ->(obj) { [:deployed_indexes, GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesArray.parse(obj['deployedIndexes'], to_s)] }, - 'privateServiceConnectConfig' => ->(obj) { [:private_service_connect_config, GoogleInSpec::VertexAI::Property::IndexEndpointPrivateServiceConnectConfig.new(obj['privateServiceConnectConfig'], to_s)] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'publicEndpointEnabled' => ->(obj) { [:public_endpoint_enabled, obj['publicEndpointEnabled']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::IndexEndpointLabels.new(obj['labels'], to_s)] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'publicEndpointDomainName' => ->(obj) { [:public_endpoint_domain_name, obj['publicEndpointDomainName']] }, - 'enablePrivateServiceConnect' => ->(obj) { [:enable_private_service_connect, obj['enablePrivateServiceConnect']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'description' => ->(obj) { [:description, obj['description']] }, + "deployedIndexes" => ->(obj) { [:deployed_indexes, GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesArray.parse(obj["deployedIndexes"], to_s)] }, + "privateServiceConnectConfig" => ->(obj) { [:private_service_connect_config, GoogleInSpec::VertexAI::Property::IndexEndpointPrivateServiceConnectConfig.new(obj["privateServiceConnectConfig"], to_s)] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "publicEndpointEnabled" => ->(obj) { [:public_endpoint_enabled, obj["publicEndpointEnabled"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::IndexEndpointLabels.new(obj["labels"], to_s)] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "publicEndpointDomainName" => ->(obj) { [:public_endpoint_domain_name, obj["publicEndpointDomainName"]] }, + "enablePrivateServiceConnect" => ->(obj) { [:enable_private_service_connect, obj["enablePrivateServiceConnect"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/indexEndpoints' + "{{parent}}/indexEndpoints" end end diff --git a/libraries/google_vertex_ai_indices.rb b/libraries/google_vertex_ai_indices.rb index 279844818..4b1d6cd09 100644 --- a/libraries/google_vertex_ai_indices.rb +++ b/libraries/google_vertex_ai_indices.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIIndexs < GcpResourceBase - name 'google_vertex_ai_indices' - desc 'Index plural resource' - supports platform: 'gcp' + name "google_vertex_ai_indices" + desc "Index plural resource" + supports platform: "gcp" attr_reader :table @@ -41,12 +41,12 @@ class VertexAIIndexs < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('indexes') + @table = fetch_wrapped_resource("indexes") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] @@ -73,28 +73,28 @@ def transform(key, value) def transformers { - 'description' => ->(obj) { [:description, obj['description']] }, - 'metadata' => ->(obj) { [:metadata, obj['metadata']] }, - 'indexStats' => ->(obj) { [:index_stats, obj['indexStats']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'deployedIndexes' => ->(obj) { [:deployed_indexes, obj['deployedIndexes']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'metadataSchemaUri' => ->(obj) { [:metadata_schema_uri, obj['metadataSchemaUri']] }, - 'indexUpdateMethod' => ->(obj) { [:index_update_method, obj['indexUpdateMethod']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::IndexLabels.new(obj['labels'], to_s)] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "metadata" => ->(obj) { [:metadata, obj["metadata"]] }, + "indexStats" => ->(obj) { [:index_stats, obj["indexStats"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "deployedIndexes" => ->(obj) { [:deployed_indexes, obj["deployedIndexes"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "metadataSchemaUri" => ->(obj) { [:metadata_schema_uri, obj["metadataSchemaUri"]] }, + "indexUpdateMethod" => ->(obj) { [:index_update_method, obj["indexUpdateMethod"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::IndexLabels.new(obj["labels"], to_s)] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/indexes' + "{{parent}}/indexes" end end diff --git a/libraries/google_vertex_ai_metadata_store.rb b/libraries/google_vertex_ai_metadata_store.rb index 0a13c49fc..3a5113095 100644 --- a/libraries/google_vertex_ai_metadata_store.rb +++ b/libraries/google_vertex_ai_metadata_store.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/metadatastore_encryption_spec' -require 'google/vertexai/property/metadatastore_state' +require "gcp_backend" +require "google/vertexai/property/metadatastore_encryption_spec" +require "google/vertexai/property/metadatastore_state" # A provider to manage Vertex AI resources. class VertexAIMetadataStore < GcpResourceBase - name 'google_vertex_ai_metadata_store' - desc 'MetadataStore' - supports platform: 'gcp' + name "google_vertex_ai_metadata_store" + desc "MetadataStore" + supports platform: "gcp" attr_reader :params attr_reader :description @@ -34,17 +34,17 @@ class VertexAIMetadataStore < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @description = @fetched['description'] - @create_time = @fetched['createTime'] - @update_time = @fetched['updateTime'] - @encryption_spec = GoogleInSpec::VertexAI::Property::MetadataStoreEncryptionSpec.new(@fetched['encryptionSpec'], to_s) - @state = GoogleInSpec::VertexAI::Property::MetadataStoreState.new(@fetched['state'], to_s) - @name = @fetched['name'] + @description = @fetched["description"] + @create_time = @fetched["createTime"] + @update_time = @fetched["updateTime"] + @encryption_spec = GoogleInSpec::VertexAI::Property::MetadataStoreEncryptionSpec.new(@fetched["encryptionSpec"], to_s) + @state = GoogleInSpec::VertexAI::Property::MetadataStoreState.new(@fetched["state"], to_s) + @name = @fetched["name"] end def exists? @@ -58,10 +58,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_metadata_stores.rb b/libraries/google_vertex_ai_metadata_stores.rb index 201ffc1ff..ec2e0fd00 100644 --- a/libraries/google_vertex_ai_metadata_stores.rb +++ b/libraries/google_vertex_ai_metadata_stores.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIMetadataStores < GcpResourceBase - name 'google_vertex_ai_metadata_stores' - desc 'MetadataStore plural resource' - supports platform: 'gcp' + name "google_vertex_ai_metadata_stores" + desc "MetadataStore plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class VertexAIMetadataStores < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('metadataStores') + @table = fetch_wrapped_resource("metadataStores") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,22 +68,22 @@ def transform(key, value) def transformers { - 'description' => ->(obj) { [:description, obj['description']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::MetadataStoreEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, - 'state' => ->(obj) { [:state, GoogleInSpec::VertexAI::Property::MetadataStoreState.new(obj['state'], to_s)] }, - 'name' => ->(obj) { [:name, obj['name']] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "encryptionSpec" => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::MetadataStoreEncryptionSpec.new(obj["encryptionSpec"], to_s)] }, + "state" => ->(obj) { [:state, GoogleInSpec::VertexAI::Property::MetadataStoreState.new(obj["state"], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/metadataStores' + "{{parent}}/metadataStores" end end diff --git a/libraries/google_vertex_ai_metadata_stores_artifact.rb b/libraries/google_vertex_ai_metadata_stores_artifact.rb index d91cc29a8..c3fc9df61 100644 --- a/libraries/google_vertex_ai_metadata_stores_artifact.rb +++ b/libraries/google_vertex_ai_metadata_stores_artifact.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/metadatastoresartifact_labels' -require 'google/vertexai/property/metadatastoresartifact_metadata' +require "gcp_backend" +require "google/vertexai/property/metadatastoresartifact_labels" +require "google/vertexai/property/metadatastoresartifact_metadata" # A provider to manage Vertex AI resources. class VertexAIMetadataStoresArtifact < GcpResourceBase - name 'google_vertex_ai_metadata_stores_artifact' - desc 'MetadataStoresArtifact' - supports platform: 'gcp' + name "google_vertex_ai_metadata_stores_artifact" + desc "MetadataStoresArtifact" + supports platform: "gcp" attr_reader :params attr_reader :schema_version @@ -40,23 +40,23 @@ class VertexAIMetadataStoresArtifact < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @schema_version = @fetched['schemaVersion'] - @display_name = @fetched['displayName'] - @etag = @fetched['etag'] - @name = @fetched['name'] - @update_time = @fetched['updateTime'] - @state = @fetched['state'] - @metadata = GoogleInSpec::VertexAI::Property::MetadataStoresArtifactMetadata.new(@fetched['metadata'], to_s) - @uri = @fetched['uri'] - @create_time = @fetched['createTime'] - @schema_title = @fetched['schemaTitle'] - @description = @fetched['description'] - @labels = GoogleInSpec::VertexAI::Property::MetadataStoresArtifactLabels.new(@fetched['labels'], to_s) + @schema_version = @fetched["schemaVersion"] + @display_name = @fetched["displayName"] + @etag = @fetched["etag"] + @name = @fetched["name"] + @update_time = @fetched["updateTime"] + @state = @fetched["state"] + @metadata = GoogleInSpec::VertexAI::Property::MetadataStoresArtifactMetadata.new(@fetched["metadata"], to_s) + @uri = @fetched["uri"] + @create_time = @fetched["createTime"] + @schema_title = @fetched["schemaTitle"] + @description = @fetched["description"] + @labels = GoogleInSpec::VertexAI::Property::MetadataStoresArtifactLabels.new(@fetched["labels"], to_s) end def exists? @@ -70,10 +70,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_metadata_stores_artifacts.rb b/libraries/google_vertex_ai_metadata_stores_artifacts.rb index 20426c146..1d85321ec 100644 --- a/libraries/google_vertex_ai_metadata_stores_artifacts.rb +++ b/libraries/google_vertex_ai_metadata_stores_artifacts.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIMetadataStoresArtifacts < GcpResourceBase - name 'google_vertex_ai_metadata_stores_artifacts' - desc 'MetadataStoresArtifact plural resource' - supports platform: 'gcp' + name "google_vertex_ai_metadata_stores_artifacts" + desc "MetadataStoresArtifact plural resource" + supports platform: "gcp" attr_reader :table @@ -41,12 +41,12 @@ class VertexAIMetadataStoresArtifacts < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('artifacts') + @table = fetch_wrapped_resource("artifacts") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] @@ -73,28 +73,28 @@ def transform(key, value) def transformers { - 'schemaVersion' => ->(obj) { [:schema_version, obj['schemaVersion']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'metadata' => ->(obj) { [:metadata, GoogleInSpec::VertexAI::Property::MetadataStoresArtifactMetadata.new(obj['metadata'], to_s)] }, - 'uri' => ->(obj) { [:uri, obj['uri']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'schemaTitle' => ->(obj) { [:schema_title, obj['schemaTitle']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::MetadataStoresArtifactLabels.new(obj['labels'], to_s)] }, + "schemaVersion" => ->(obj) { [:schema_version, obj["schemaVersion"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "metadata" => ->(obj) { [:metadata, GoogleInSpec::VertexAI::Property::MetadataStoresArtifactMetadata.new(obj["metadata"], to_s)] }, + "uri" => ->(obj) { [:uri, obj["uri"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "schemaTitle" => ->(obj) { [:schema_title, obj["schemaTitle"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::MetadataStoresArtifactLabels.new(obj["labels"], to_s)] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/artifacts' + "{{parent}}/artifacts" end end diff --git a/libraries/google_vertex_ai_metadata_stores_context.rb b/libraries/google_vertex_ai_metadata_stores_context.rb index 2140a3ecc..5a892d242 100644 --- a/libraries/google_vertex_ai_metadata_stores_context.rb +++ b/libraries/google_vertex_ai_metadata_stores_context.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/metadatastorescontext_labels' -require 'google/vertexai/property/metadatastorescontext_metadata' +require "gcp_backend" +require "google/vertexai/property/metadatastorescontext_labels" +require "google/vertexai/property/metadatastorescontext_metadata" # A provider to manage Vertex AI resources. class VertexAIMetadataStoresContext < GcpResourceBase - name 'google_vertex_ai_metadata_stores_context' - desc 'MetadataStoresContext' - supports platform: 'gcp' + name "google_vertex_ai_metadata_stores_context" + desc "MetadataStoresContext" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -39,22 +39,22 @@ class VertexAIMetadataStoresContext < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @schema_title = @fetched['schemaTitle'] - @etag = @fetched['etag'] - @description = @fetched['description'] - @display_name = @fetched['displayName'] - @schema_version = @fetched['schemaVersion'] - @create_time = @fetched['createTime'] - @labels = GoogleInSpec::VertexAI::Property::MetadataStoresContextLabels.new(@fetched['labels'], to_s) - @metadata = GoogleInSpec::VertexAI::Property::MetadataStoresContextMetadata.new(@fetched['metadata'], to_s) - @update_time = @fetched['updateTime'] - @parent_contexts = @fetched['parentContexts'] + @name = @fetched["name"] + @schema_title = @fetched["schemaTitle"] + @etag = @fetched["etag"] + @description = @fetched["description"] + @display_name = @fetched["displayName"] + @schema_version = @fetched["schemaVersion"] + @create_time = @fetched["createTime"] + @labels = GoogleInSpec::VertexAI::Property::MetadataStoresContextLabels.new(@fetched["labels"], to_s) + @metadata = GoogleInSpec::VertexAI::Property::MetadataStoresContextMetadata.new(@fetched["metadata"], to_s) + @update_time = @fetched["updateTime"] + @parent_contexts = @fetched["parentContexts"] end def exists? @@ -68,10 +68,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_metadata_stores_contexts.rb b/libraries/google_vertex_ai_metadata_stores_contexts.rb index a842335c6..16f790fe9 100644 --- a/libraries/google_vertex_ai_metadata_stores_contexts.rb +++ b/libraries/google_vertex_ai_metadata_stores_contexts.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIMetadataStoresContexts < GcpResourceBase - name 'google_vertex_ai_metadata_stores_contexts' - desc 'MetadataStoresContext plural resource' - supports platform: 'gcp' + name "google_vertex_ai_metadata_stores_contexts" + desc "MetadataStoresContext plural resource" + supports platform: "gcp" attr_reader :table @@ -40,12 +40,12 @@ class VertexAIMetadataStoresContexts < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('contexts') + @table = fetch_wrapped_resource("contexts") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] @@ -72,27 +72,27 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'schemaTitle' => ->(obj) { [:schema_title, obj['schemaTitle']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'schemaVersion' => ->(obj) { [:schema_version, obj['schemaVersion']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::MetadataStoresContextLabels.new(obj['labels'], to_s)] }, - 'metadata' => ->(obj) { [:metadata, GoogleInSpec::VertexAI::Property::MetadataStoresContextMetadata.new(obj['metadata'], to_s)] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'parentContexts' => ->(obj) { [:parent_contexts, obj['parentContexts']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "schemaTitle" => ->(obj) { [:schema_title, obj["schemaTitle"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "schemaVersion" => ->(obj) { [:schema_version, obj["schemaVersion"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::MetadataStoresContextLabels.new(obj["labels"], to_s)] }, + "metadata" => ->(obj) { [:metadata, GoogleInSpec::VertexAI::Property::MetadataStoresContextMetadata.new(obj["metadata"], to_s)] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "parentContexts" => ->(obj) { [:parent_contexts, obj["parentContexts"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/contexts' + "{{parent}}/contexts" end end diff --git a/libraries/google_vertex_ai_metadata_stores_execution.rb b/libraries/google_vertex_ai_metadata_stores_execution.rb index f2cd6b3a0..4b3cc4b4f 100644 --- a/libraries/google_vertex_ai_metadata_stores_execution.rb +++ b/libraries/google_vertex_ai_metadata_stores_execution.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/metadatastoresexecution_labels' -require 'google/vertexai/property/metadatastoresexecution_metadata' +require "gcp_backend" +require "google/vertexai/property/metadatastoresexecution_labels" +require "google/vertexai/property/metadatastoresexecution_metadata" # A provider to manage Vertex AI resources. class VertexAIMetadataStoresExecution < GcpResourceBase - name 'google_vertex_ai_metadata_stores_execution' - desc 'MetadataStoresExecution' - supports platform: 'gcp' + name "google_vertex_ai_metadata_stores_execution" + desc "MetadataStoresExecution" + supports platform: "gcp" attr_reader :params attr_reader :labels @@ -39,22 +39,22 @@ class VertexAIMetadataStoresExecution < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @labels = GoogleInSpec::VertexAI::Property::MetadataStoresExecutionLabels.new(@fetched['labels'], to_s) - @create_time = @fetched['createTime'] - @schema_version = @fetched['schemaVersion'] - @state = @fetched['state'] - @name = @fetched['name'] - @etag = @fetched['etag'] - @display_name = @fetched['displayName'] - @metadata = GoogleInSpec::VertexAI::Property::MetadataStoresExecutionMetadata.new(@fetched['metadata'], to_s) - @schema_title = @fetched['schemaTitle'] - @description = @fetched['description'] - @update_time = @fetched['updateTime'] + @labels = GoogleInSpec::VertexAI::Property::MetadataStoresExecutionLabels.new(@fetched["labels"], to_s) + @create_time = @fetched["createTime"] + @schema_version = @fetched["schemaVersion"] + @state = @fetched["state"] + @name = @fetched["name"] + @etag = @fetched["etag"] + @display_name = @fetched["displayName"] + @metadata = GoogleInSpec::VertexAI::Property::MetadataStoresExecutionMetadata.new(@fetched["metadata"], to_s) + @schema_title = @fetched["schemaTitle"] + @description = @fetched["description"] + @update_time = @fetched["updateTime"] end def exists? @@ -68,10 +68,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_metadata_stores_executions.rb b/libraries/google_vertex_ai_metadata_stores_executions.rb index f2ca8fbbc..dd2631f3a 100644 --- a/libraries/google_vertex_ai_metadata_stores_executions.rb +++ b/libraries/google_vertex_ai_metadata_stores_executions.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIMetadataStoresExecutions < GcpResourceBase - name 'google_vertex_ai_metadata_stores_executions' - desc 'MetadataStoresExecution plural resource' - supports platform: 'gcp' + name "google_vertex_ai_metadata_stores_executions" + desc "MetadataStoresExecution plural resource" + supports platform: "gcp" attr_reader :table @@ -40,12 +40,12 @@ class VertexAIMetadataStoresExecutions < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('executions') + @table = fetch_wrapped_resource("executions") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] @@ -72,27 +72,27 @@ def transform(key, value) def transformers { - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::MetadataStoresExecutionLabels.new(obj['labels'], to_s)] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'schemaVersion' => ->(obj) { [:schema_version, obj['schemaVersion']] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'metadata' => ->(obj) { [:metadata, GoogleInSpec::VertexAI::Property::MetadataStoresExecutionMetadata.new(obj['metadata'], to_s)] }, - 'schemaTitle' => ->(obj) { [:schema_title, obj['schemaTitle']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::MetadataStoresExecutionLabels.new(obj["labels"], to_s)] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "schemaVersion" => ->(obj) { [:schema_version, obj["schemaVersion"]] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "metadata" => ->(obj) { [:metadata, GoogleInSpec::VertexAI::Property::MetadataStoresExecutionMetadata.new(obj["metadata"], to_s)] }, + "schemaTitle" => ->(obj) { [:schema_title, obj["schemaTitle"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/executions' + "{{parent}}/executions" end end diff --git a/libraries/google_vertex_ai_metadata_stores_metadata_schema.rb b/libraries/google_vertex_ai_metadata_stores_metadata_schema.rb index b1edecd2a..8d006d05a 100644 --- a/libraries/google_vertex_ai_metadata_stores_metadata_schema.rb +++ b/libraries/google_vertex_ai_metadata_stores_metadata_schema.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Vertex AI resources. class VertexAIMetadataStoresMetadataSchema < GcpResourceBase - name 'google_vertex_ai_metadata_stores_metadata_schema' - desc 'MetadataStoresMetadataSchema' - supports platform: 'gcp' + name "google_vertex_ai_metadata_stores_metadata_schema" + desc "MetadataStoresMetadataSchema" + supports platform: "gcp" attr_reader :params attr_reader :schema_type @@ -32,17 +32,17 @@ class VertexAIMetadataStoresMetadataSchema < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @schema_type = @fetched['schemaType'] - @description = @fetched['description'] - @schema_version = @fetched['schemaVersion'] - @name = @fetched['name'] - @create_time = @fetched['createTime'] - @schema = @fetched['schema'] + @schema_type = @fetched["schemaType"] + @description = @fetched["description"] + @schema_version = @fetched["schemaVersion"] + @name = @fetched["name"] + @create_time = @fetched["createTime"] + @schema = @fetched["schema"] end def exists? @@ -56,10 +56,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_metadata_stores_metadata_schemas.rb b/libraries/google_vertex_ai_metadata_stores_metadata_schemas.rb index b68204daa..6f2e1f83f 100644 --- a/libraries/google_vertex_ai_metadata_stores_metadata_schemas.rb +++ b/libraries/google_vertex_ai_metadata_stores_metadata_schemas.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIMetadataStoresMetadataSchemas < GcpResourceBase - name 'google_vertex_ai_metadata_stores_metadata_schemas' - desc 'MetadataStoresMetadataSchema plural resource' - supports platform: 'gcp' + name "google_vertex_ai_metadata_stores_metadata_schemas" + desc "MetadataStoresMetadataSchema plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class VertexAIMetadataStoresMetadataSchemas < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('metadataSchemas') + @table = fetch_wrapped_resource("metadataSchemas") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] @@ -67,22 +67,22 @@ def transform(key, value) def transformers { - 'schemaType' => ->(obj) { [:schema_type, obj['schemaType']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'schemaVersion' => ->(obj) { [:schema_version, obj['schemaVersion']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'schema' => ->(obj) { [:schema, obj['schema']] }, + "schemaType" => ->(obj) { [:schema_type, obj["schemaType"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "schemaVersion" => ->(obj) { [:schema_version, obj["schemaVersion"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "schema" => ->(obj) { [:schema, obj["schema"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/metadataSchemas' + "{{parent}}/metadataSchemas" end end diff --git a/libraries/google_vertex_ai_model.rb b/libraries/google_vertex_ai_model.rb index c802821d2..a76048c60 100644 --- a/libraries/google_vertex_ai_model.rb +++ b/libraries/google_vertex_ai_model.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,43 +13,43 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/model_container_spec' -require 'google/vertexai/property/model_container_spec_env' -require 'google/vertexai/property/model_container_spec_ports' -require 'google/vertexai/property/model_deployed_models' -require 'google/vertexai/property/model_encryption_spec' -require 'google/vertexai/property/model_explanation_spec' -require 'google/vertexai/property/model_explanation_spec_metadata' -require 'google/vertexai/property/model_explanation_spec_metadata_inputs' -require 'google/vertexai/property/model_explanation_spec_metadata_outputs' -require 'google/vertexai/property/model_explanation_spec_parameters' -require 'google/vertexai/property/model_explanation_spec_parameters_examples' -require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/model_explanation_spec_parameters_examples_presets' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/model_explanation_spec_parameters_sampled_shapley_attribution' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/model_labels' -require 'google/vertexai/property/model_model_source_info' -require 'google/vertexai/property/model_original_model_info' -require 'google/vertexai/property/model_predict_schemata' -require 'google/vertexai/property/model_supported_export_formats' +require "gcp_backend" +require "google/vertexai/property/model_container_spec" +require "google/vertexai/property/model_container_spec_env" +require "google/vertexai/property/model_container_spec_ports" +require "google/vertexai/property/model_deployed_models" +require "google/vertexai/property/model_encryption_spec" +require "google/vertexai/property/model_explanation_spec" +require "google/vertexai/property/model_explanation_spec_metadata" +require "google/vertexai/property/model_explanation_spec_metadata_inputs" +require "google/vertexai/property/model_explanation_spec_metadata_outputs" +require "google/vertexai/property/model_explanation_spec_parameters" +require "google/vertexai/property/model_explanation_spec_parameters_examples" +require "google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/model_explanation_spec_parameters_examples_presets" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/model_explanation_spec_parameters_sampled_shapley_attribution" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/model_labels" +require "google/vertexai/property/model_model_source_info" +require "google/vertexai/property/model_original_model_info" +require "google/vertexai/property/model_predict_schemata" +require "google/vertexai/property/model_supported_export_formats" # A provider to manage Vertex AI resources. class VertexAIModel < GcpResourceBase - name 'google_vertex_ai_model' - desc 'Model' - supports platform: 'gcp' + name "google_vertex_ai_model" + desc "Model" + supports platform: "gcp" attr_reader :params attr_reader :model_source_info @@ -85,40 +85,40 @@ class VertexAIModel < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @model_source_info = GoogleInSpec::VertexAI::Property::ModelModelSourceInfo.new(@fetched['modelSourceInfo'], to_s) - @name = @fetched['name'] - @metadata = @fetched['metadata'] - @update_time = @fetched['updateTime'] - @etag = @fetched['etag'] - @description = @fetched['description'] - @deployed_models = GoogleInSpec::VertexAI::Property::ModelDeployedModelsArray.parse(@fetched['deployedModels'], to_s) - @create_time = @fetched['createTime'] - @explanation_spec = GoogleInSpec::VertexAI::Property::ModelExplanationSpec.new(@fetched['explanationSpec'], to_s) - @encryption_spec = GoogleInSpec::VertexAI::Property::ModelEncryptionSpec.new(@fetched['encryptionSpec'], to_s) - @pipeline_job = @fetched['pipelineJob'] - @predict_schemata = GoogleInSpec::VertexAI::Property::ModelPredictSchemata.new(@fetched['predictSchemata'], to_s) - @version_update_time = @fetched['versionUpdateTime'] - @supported_export_formats = GoogleInSpec::VertexAI::Property::ModelSupportedExportFormatsArray.parse(@fetched['supportedExportFormats'], to_s) - @original_model_info = GoogleInSpec::VertexAI::Property::ModelOriginalModelInfo.new(@fetched['originalModelInfo'], to_s) - @metadata_artifact = @fetched['metadataArtifact'] - @supported_input_storage_formats = @fetched['supportedInputStorageFormats'] - @metadata_schema_uri = @fetched['metadataSchemaUri'] - @container_spec = GoogleInSpec::VertexAI::Property::ModelContainerSpec.new(@fetched['containerSpec'], to_s) - @version_id = @fetched['versionId'] - @artifact_uri = @fetched['artifactUri'] - @training_pipeline = @fetched['trainingPipeline'] - @display_name = @fetched['displayName'] - @supported_deployment_resources_types = @fetched['supportedDeploymentResourcesTypes'] - @supported_output_storage_formats = @fetched['supportedOutputStorageFormats'] - @version_aliases = @fetched['versionAliases'] - @version_create_time = @fetched['versionCreateTime'] - @version_description = @fetched['versionDescription'] - @labels = GoogleInSpec::VertexAI::Property::ModelLabels.new(@fetched['labels'], to_s) + @model_source_info = GoogleInSpec::VertexAI::Property::ModelModelSourceInfo.new(@fetched["modelSourceInfo"], to_s) + @name = @fetched["name"] + @metadata = @fetched["metadata"] + @update_time = @fetched["updateTime"] + @etag = @fetched["etag"] + @description = @fetched["description"] + @deployed_models = GoogleInSpec::VertexAI::Property::ModelDeployedModelsArray.parse(@fetched["deployedModels"], to_s) + @create_time = @fetched["createTime"] + @explanation_spec = GoogleInSpec::VertexAI::Property::ModelExplanationSpec.new(@fetched["explanationSpec"], to_s) + @encryption_spec = GoogleInSpec::VertexAI::Property::ModelEncryptionSpec.new(@fetched["encryptionSpec"], to_s) + @pipeline_job = @fetched["pipelineJob"] + @predict_schemata = GoogleInSpec::VertexAI::Property::ModelPredictSchemata.new(@fetched["predictSchemata"], to_s) + @version_update_time = @fetched["versionUpdateTime"] + @supported_export_formats = GoogleInSpec::VertexAI::Property::ModelSupportedExportFormatsArray.parse(@fetched["supportedExportFormats"], to_s) + @original_model_info = GoogleInSpec::VertexAI::Property::ModelOriginalModelInfo.new(@fetched["originalModelInfo"], to_s) + @metadata_artifact = @fetched["metadataArtifact"] + @supported_input_storage_formats = @fetched["supportedInputStorageFormats"] + @metadata_schema_uri = @fetched["metadataSchemaUri"] + @container_spec = GoogleInSpec::VertexAI::Property::ModelContainerSpec.new(@fetched["containerSpec"], to_s) + @version_id = @fetched["versionId"] + @artifact_uri = @fetched["artifactUri"] + @training_pipeline = @fetched["trainingPipeline"] + @display_name = @fetched["displayName"] + @supported_deployment_resources_types = @fetched["supportedDeploymentResourcesTypes"] + @supported_output_storage_formats = @fetched["supportedOutputStorageFormats"] + @version_aliases = @fetched["versionAliases"] + @version_create_time = @fetched["versionCreateTime"] + @version_description = @fetched["versionDescription"] + @labels = GoogleInSpec::VertexAI::Property::ModelLabels.new(@fetched["labels"], to_s) end def exists? @@ -132,10 +132,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_model_deployment_monitoring_job.rb b/libraries/google_vertex_ai_model_deployment_monitoring_job.rb index 6a2ea97c8..0c0d97dd5 100644 --- a/libraries/google_vertex_ai_model_deployment_monitoring_job.rb +++ b/libraries/google_vertex_ai_model_deployment_monitoring_job.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,26 +13,26 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/modeldeploymentmonitoringjob_bigquery_tables' -require 'google/vertexai/property/modeldeploymentmonitoringjob_encryption_spec' -require 'google/vertexai/property/modeldeploymentmonitoringjob_error' -require 'google/vertexai/property/modeldeploymentmonitoringjob_labels' -require 'google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata' -require 'google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata_status' -require 'google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy' -require 'google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy_random_sample_config' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_schedule_config' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config' -require 'google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config_email_alert_config' -require 'google/vertexai/property/modeldeploymentmonitoringjob_stats_anomalies_base_directory' +require "gcp_backend" +require "google/vertexai/property/modeldeploymentmonitoringjob_bigquery_tables" +require "google/vertexai/property/modeldeploymentmonitoringjob_encryption_spec" +require "google/vertexai/property/modeldeploymentmonitoringjob_error" +require "google/vertexai/property/modeldeploymentmonitoringjob_labels" +require "google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata" +require "google/vertexai/property/modeldeploymentmonitoringjob_latest_monitoring_pipeline_metadata_status" +require "google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy" +require "google/vertexai/property/modeldeploymentmonitoringjob_logging_sampling_strategy_random_sample_config" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_objective_configs" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_deployment_monitoring_schedule_config" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config" +require "google/vertexai/property/modeldeploymentmonitoringjob_model_monitoring_alert_config_email_alert_config" +require "google/vertexai/property/modeldeploymentmonitoringjob_stats_anomalies_base_directory" # A provider to manage Vertex AI resources. class VertexAIModelDeploymentMonitoringJob < GcpResourceBase - name 'google_vertex_ai_model_deployment_monitoring_job' - desc 'ModelDeploymentMonitoringJob' - supports platform: 'gcp' + name "google_vertex_ai_model_deployment_monitoring_job" + desc "ModelDeploymentMonitoringJob" + supports platform: "gcp" attr_reader :params attr_reader :model_deployment_monitoring_objective_configs @@ -62,34 +62,34 @@ class VertexAIModelDeploymentMonitoringJob < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @model_deployment_monitoring_objective_configs = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsArray.parse(@fetched['modelDeploymentMonitoringObjectiveConfigs'], to_s) - @labels = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLabels.new(@fetched['labels'], to_s) - @state = @fetched['state'] - @analysis_instance_schema_uri = @fetched['analysisInstanceSchemaUri'] - @enable_monitoring_pipeline_logs = @fetched['enableMonitoringPipelineLogs'] - @endpoint = @fetched['endpoint'] - @logging_sampling_strategy = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLoggingSamplingStrategy.new(@fetched['loggingSamplingStrategy'], to_s) - @bigquery_tables = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobBigqueryTablesArray.parse(@fetched['bigqueryTables'], to_s) - @display_name = @fetched['displayName'] - @schedule_state = @fetched['scheduleState'] - @error = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobError.new(@fetched['error'], to_s) - @model_monitoring_alert_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelMonitoringAlertConfig.new(@fetched['modelMonitoringAlertConfig'], to_s) - @latest_monitoring_pipeline_metadata = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLatestMonitoringPipelineMetadata.new(@fetched['latestMonitoringPipelineMetadata'], to_s) - @sample_predict_instance = @fetched['samplePredictInstance'] - @predict_instance_schema_uri = @fetched['predictInstanceSchemaUri'] - @next_schedule_time = @fetched['nextScheduleTime'] - @create_time = @fetched['createTime'] - @log_ttl = @fetched['logTtl'] - @stats_anomalies_base_directory = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobStatsAnomaliesBaseDirectory.new(@fetched['statsAnomaliesBaseDirectory'], to_s) - @update_time = @fetched['updateTime'] - @model_deployment_monitoring_schedule_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringScheduleConfig.new(@fetched['modelDeploymentMonitoringScheduleConfig'], to_s) - @encryption_spec = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobEncryptionSpec.new(@fetched['encryptionSpec'], to_s) - @name = @fetched['name'] + @model_deployment_monitoring_objective_configs = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsArray.parse(@fetched["modelDeploymentMonitoringObjectiveConfigs"], to_s) + @labels = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLabels.new(@fetched["labels"], to_s) + @state = @fetched["state"] + @analysis_instance_schema_uri = @fetched["analysisInstanceSchemaUri"] + @enable_monitoring_pipeline_logs = @fetched["enableMonitoringPipelineLogs"] + @endpoint = @fetched["endpoint"] + @logging_sampling_strategy = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLoggingSamplingStrategy.new(@fetched["loggingSamplingStrategy"], to_s) + @bigquery_tables = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobBigqueryTablesArray.parse(@fetched["bigqueryTables"], to_s) + @display_name = @fetched["displayName"] + @schedule_state = @fetched["scheduleState"] + @error = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobError.new(@fetched["error"], to_s) + @model_monitoring_alert_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelMonitoringAlertConfig.new(@fetched["modelMonitoringAlertConfig"], to_s) + @latest_monitoring_pipeline_metadata = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLatestMonitoringPipelineMetadata.new(@fetched["latestMonitoringPipelineMetadata"], to_s) + @sample_predict_instance = @fetched["samplePredictInstance"] + @predict_instance_schema_uri = @fetched["predictInstanceSchemaUri"] + @next_schedule_time = @fetched["nextScheduleTime"] + @create_time = @fetched["createTime"] + @log_ttl = @fetched["logTtl"] + @stats_anomalies_base_directory = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobStatsAnomaliesBaseDirectory.new(@fetched["statsAnomaliesBaseDirectory"], to_s) + @update_time = @fetched["updateTime"] + @model_deployment_monitoring_schedule_config = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringScheduleConfig.new(@fetched["modelDeploymentMonitoringScheduleConfig"], to_s) + @encryption_spec = GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobEncryptionSpec.new(@fetched["encryptionSpec"], to_s) + @name = @fetched["name"] end def exists? @@ -103,10 +103,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_model_deployment_monitoring_jobs.rb b/libraries/google_vertex_ai_model_deployment_monitoring_jobs.rb index 55055686c..93a545ce6 100644 --- a/libraries/google_vertex_ai_model_deployment_monitoring_jobs.rb +++ b/libraries/google_vertex_ai_model_deployment_monitoring_jobs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIModelDeploymentMonitoringJobs < GcpResourceBase - name 'google_vertex_ai_model_deployment_monitoring_jobs' - desc 'ModelDeploymentMonitoringJob plural resource' - supports platform: 'gcp' + name "google_vertex_ai_model_deployment_monitoring_jobs" + desc "ModelDeploymentMonitoringJob plural resource" + supports platform: "gcp" attr_reader :table @@ -52,12 +52,12 @@ class VertexAIModelDeploymentMonitoringJobs < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('modelDeploymentMonitoringJobs') + @table = fetch_wrapped_resource("modelDeploymentMonitoringJobs") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -85,39 +85,39 @@ def transform(key, value) def transformers { - 'modelDeploymentMonitoringObjectiveConfigs' => ->(obj) { [:model_deployment_monitoring_objective_configs, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsArray.parse(obj['modelDeploymentMonitoringObjectiveConfigs'], to_s)] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLabels.new(obj['labels'], to_s)] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'analysisInstanceSchemaUri' => ->(obj) { [:analysis_instance_schema_uri, obj['analysisInstanceSchemaUri']] }, - 'enableMonitoringPipelineLogs' => ->(obj) { [:enable_monitoring_pipeline_logs, obj['enableMonitoringPipelineLogs']] }, - 'endpoint' => ->(obj) { [:endpoint, obj['endpoint']] }, - 'loggingSamplingStrategy' => ->(obj) { [:logging_sampling_strategy, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLoggingSamplingStrategy.new(obj['loggingSamplingStrategy'], to_s)] }, - 'bigqueryTables' => ->(obj) { [:bigquery_tables, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobBigqueryTablesArray.parse(obj['bigqueryTables'], to_s)] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'scheduleState' => ->(obj) { [:schedule_state, obj['scheduleState']] }, - 'error' => ->(obj) { [:error, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobError.new(obj['error'], to_s)] }, - 'modelMonitoringAlertConfig' => ->(obj) { [:model_monitoring_alert_config, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelMonitoringAlertConfig.new(obj['modelMonitoringAlertConfig'], to_s)] }, - 'latestMonitoringPipelineMetadata' => ->(obj) { [:latest_monitoring_pipeline_metadata, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLatestMonitoringPipelineMetadata.new(obj['latestMonitoringPipelineMetadata'], to_s)] }, - 'samplePredictInstance' => ->(obj) { [:sample_predict_instance, obj['samplePredictInstance']] }, - 'predictInstanceSchemaUri' => ->(obj) { [:predict_instance_schema_uri, obj['predictInstanceSchemaUri']] }, - 'nextScheduleTime' => ->(obj) { [:next_schedule_time, obj['nextScheduleTime']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'logTtl' => ->(obj) { [:log_ttl, obj['logTtl']] }, - 'statsAnomaliesBaseDirectory' => ->(obj) { [:stats_anomalies_base_directory, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobStatsAnomaliesBaseDirectory.new(obj['statsAnomaliesBaseDirectory'], to_s)] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'modelDeploymentMonitoringScheduleConfig' => ->(obj) { [:model_deployment_monitoring_schedule_config, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringScheduleConfig.new(obj['modelDeploymentMonitoringScheduleConfig'], to_s)] }, - 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, - 'name' => ->(obj) { [:name, obj['name']] }, + "modelDeploymentMonitoringObjectiveConfigs" => ->(obj) { [:model_deployment_monitoring_objective_configs, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsArray.parse(obj["modelDeploymentMonitoringObjectiveConfigs"], to_s)] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLabels.new(obj["labels"], to_s)] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "analysisInstanceSchemaUri" => ->(obj) { [:analysis_instance_schema_uri, obj["analysisInstanceSchemaUri"]] }, + "enableMonitoringPipelineLogs" => ->(obj) { [:enable_monitoring_pipeline_logs, obj["enableMonitoringPipelineLogs"]] }, + "endpoint" => ->(obj) { [:endpoint, obj["endpoint"]] }, + "loggingSamplingStrategy" => ->(obj) { [:logging_sampling_strategy, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLoggingSamplingStrategy.new(obj["loggingSamplingStrategy"], to_s)] }, + "bigqueryTables" => ->(obj) { [:bigquery_tables, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobBigqueryTablesArray.parse(obj["bigqueryTables"], to_s)] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "scheduleState" => ->(obj) { [:schedule_state, obj["scheduleState"]] }, + "error" => ->(obj) { [:error, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobError.new(obj["error"], to_s)] }, + "modelMonitoringAlertConfig" => ->(obj) { [:model_monitoring_alert_config, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelMonitoringAlertConfig.new(obj["modelMonitoringAlertConfig"], to_s)] }, + "latestMonitoringPipelineMetadata" => ->(obj) { [:latest_monitoring_pipeline_metadata, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLatestMonitoringPipelineMetadata.new(obj["latestMonitoringPipelineMetadata"], to_s)] }, + "samplePredictInstance" => ->(obj) { [:sample_predict_instance, obj["samplePredictInstance"]] }, + "predictInstanceSchemaUri" => ->(obj) { [:predict_instance_schema_uri, obj["predictInstanceSchemaUri"]] }, + "nextScheduleTime" => ->(obj) { [:next_schedule_time, obj["nextScheduleTime"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "logTtl" => ->(obj) { [:log_ttl, obj["logTtl"]] }, + "statsAnomaliesBaseDirectory" => ->(obj) { [:stats_anomalies_base_directory, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobStatsAnomaliesBaseDirectory.new(obj["statsAnomaliesBaseDirectory"], to_s)] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "modelDeploymentMonitoringScheduleConfig" => ->(obj) { [:model_deployment_monitoring_schedule_config, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringScheduleConfig.new(obj["modelDeploymentMonitoringScheduleConfig"], to_s)] }, + "encryptionSpec" => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobEncryptionSpec.new(obj["encryptionSpec"], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/modelDeploymentMonitoringJobs' + "{{parent}}/modelDeploymentMonitoringJobs" end end diff --git a/libraries/google_vertex_ai_model_evaluation_slice.rb b/libraries/google_vertex_ai_model_evaluation_slice.rb index c445c5cb9..628d14edf 100644 --- a/libraries/google_vertex_ai_model_evaluation_slice.rb +++ b/libraries/google_vertex_ai_model_evaluation_slice.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,18 +13,18 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/modelevaluationslice_model_explanation' -require 'google/vertexai/property/modelevaluationslice_model_explanation_mean_attributions' -require 'google/vertexai/property/modelevaluationslice_slice' -require 'google/vertexai/property/modelevaluationslice_slice_slice_spec' -require 'google/vertexai/property/modelevaluationslice_slice_slice_spec_configs' +require "gcp_backend" +require "google/vertexai/property/modelevaluationslice_model_explanation" +require "google/vertexai/property/modelevaluationslice_model_explanation_mean_attributions" +require "google/vertexai/property/modelevaluationslice_slice" +require "google/vertexai/property/modelevaluationslice_slice_slice_spec" +require "google/vertexai/property/modelevaluationslice_slice_slice_spec_configs" # A provider to manage Vertex AI resources. class VertexAIModelEvaluationSlice < GcpResourceBase - name 'google_vertex_ai_model_evaluation_slice' - desc 'ModelEvaluationSlice' - supports platform: 'gcp' + name "google_vertex_ai_model_evaluation_slice" + desc "ModelEvaluationSlice" + supports platform: "gcp" attr_reader :params attr_reader :create_time @@ -37,17 +37,17 @@ class VertexAIModelEvaluationSlice < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @create_time = @fetched['createTime'] - @model_explanation = GoogleInSpec::VertexAI::Property::ModelEvaluationSliceModelExplanation.new(@fetched['modelExplanation'], to_s) - @name = @fetched['name'] - @metrics = @fetched['metrics'] - @slice = GoogleInSpec::VertexAI::Property::ModelEvaluationSliceSlice.new(@fetched['slice'], to_s) - @metrics_schema_uri = @fetched['metricsSchemaUri'] + @create_time = @fetched["createTime"] + @model_explanation = GoogleInSpec::VertexAI::Property::ModelEvaluationSliceModelExplanation.new(@fetched["modelExplanation"], to_s) + @name = @fetched["name"] + @metrics = @fetched["metrics"] + @slice = GoogleInSpec::VertexAI::Property::ModelEvaluationSliceSlice.new(@fetched["slice"], to_s) + @metrics_schema_uri = @fetched["metricsSchemaUri"] end def exists? @@ -61,10 +61,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_model_evaluation_slices.rb b/libraries/google_vertex_ai_model_evaluation_slices.rb index 396d70e78..752f78fe2 100644 --- a/libraries/google_vertex_ai_model_evaluation_slices.rb +++ b/libraries/google_vertex_ai_model_evaluation_slices.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIModelEvaluationSlices < GcpResourceBase - name 'google_vertex_ai_model_evaluation_slices' - desc 'ModelEvaluationSlice plural resource' - supports platform: 'gcp' + name "google_vertex_ai_model_evaluation_slices" + desc "ModelEvaluationSlice plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class VertexAIModelEvaluationSlices < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('modelEvaluationSlices') + @table = fetch_wrapped_resource("modelEvaluationSlices") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,22 +68,22 @@ def transform(key, value) def transformers { - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'modelExplanation' => ->(obj) { [:model_explanation, GoogleInSpec::VertexAI::Property::ModelEvaluationSliceModelExplanation.new(obj['modelExplanation'], to_s)] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'metrics' => ->(obj) { [:metrics, obj['metrics']] }, - 'slice' => ->(obj) { [:slice, GoogleInSpec::VertexAI::Property::ModelEvaluationSliceSlice.new(obj['slice'], to_s)] }, - 'metricsSchemaUri' => ->(obj) { [:metrics_schema_uri, obj['metricsSchemaUri']] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "modelExplanation" => ->(obj) { [:model_explanation, GoogleInSpec::VertexAI::Property::ModelEvaluationSliceModelExplanation.new(obj["modelExplanation"], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "metrics" => ->(obj) { [:metrics, obj["metrics"]] }, + "slice" => ->(obj) { [:slice, GoogleInSpec::VertexAI::Property::ModelEvaluationSliceSlice.new(obj["slice"], to_s)] }, + "metricsSchemaUri" => ->(obj) { [:metrics_schema_uri, obj["metricsSchemaUri"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/slices' + "{{parent}}/slices" end end diff --git a/libraries/google_vertex_ai_models.rb b/libraries/google_vertex_ai_models.rb index 48f09b955..8bbc5c825 100644 --- a/libraries/google_vertex_ai_models.rb +++ b/libraries/google_vertex_ai_models.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIModels < GcpResourceBase - name 'google_vertex_ai_models' - desc 'Model plural resource' - supports platform: 'gcp' + name "google_vertex_ai_models" + desc "Model plural resource" + supports platform: "gcp" attr_reader :table @@ -58,12 +58,12 @@ class VertexAIModels < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('models') + @table = fetch_wrapped_resource("models") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -91,45 +91,45 @@ def transform(key, value) def transformers { - 'modelSourceInfo' => ->(obj) { [:model_source_info, GoogleInSpec::VertexAI::Property::ModelModelSourceInfo.new(obj['modelSourceInfo'], to_s)] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'metadata' => ->(obj) { [:metadata, obj['metadata']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'deployedModels' => ->(obj) { [:deployed_models, GoogleInSpec::VertexAI::Property::ModelDeployedModelsArray.parse(obj['deployedModels'], to_s)] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'explanationSpec' => ->(obj) { [:explanation_spec, GoogleInSpec::VertexAI::Property::ModelExplanationSpec.new(obj['explanationSpec'], to_s)] }, - 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::ModelEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, - 'pipelineJob' => ->(obj) { [:pipeline_job, obj['pipelineJob']] }, - 'predictSchemata' => ->(obj) { [:predict_schemata, GoogleInSpec::VertexAI::Property::ModelPredictSchemata.new(obj['predictSchemata'], to_s)] }, - 'versionUpdateTime' => ->(obj) { [:version_update_time, obj['versionUpdateTime']] }, - 'supportedExportFormats' => ->(obj) { [:supported_export_formats, GoogleInSpec::VertexAI::Property::ModelSupportedExportFormatsArray.parse(obj['supportedExportFormats'], to_s)] }, - 'originalModelInfo' => ->(obj) { [:original_model_info, GoogleInSpec::VertexAI::Property::ModelOriginalModelInfo.new(obj['originalModelInfo'], to_s)] }, - 'metadataArtifact' => ->(obj) { [:metadata_artifact, obj['metadataArtifact']] }, - 'supportedInputStorageFormats' => ->(obj) { [:supported_input_storage_formats, obj['supportedInputStorageFormats']] }, - 'metadataSchemaUri' => ->(obj) { [:metadata_schema_uri, obj['metadataSchemaUri']] }, - 'containerSpec' => ->(obj) { [:container_spec, GoogleInSpec::VertexAI::Property::ModelContainerSpec.new(obj['containerSpec'], to_s)] }, - 'versionId' => ->(obj) { [:version_id, obj['versionId']] }, - 'artifactUri' => ->(obj) { [:artifact_uri, obj['artifactUri']] }, - 'trainingPipeline' => ->(obj) { [:training_pipeline, obj['trainingPipeline']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'supportedDeploymentResourcesTypes' => ->(obj) { [:supported_deployment_resources_types, obj['supportedDeploymentResourcesTypes']] }, - 'supportedOutputStorageFormats' => ->(obj) { [:supported_output_storage_formats, obj['supportedOutputStorageFormats']] }, - 'versionAliases' => ->(obj) { [:version_aliases, obj['versionAliases']] }, - 'versionCreateTime' => ->(obj) { [:version_create_time, obj['versionCreateTime']] }, - 'versionDescription' => ->(obj) { [:version_description, obj['versionDescription']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::ModelLabels.new(obj['labels'], to_s)] }, + "modelSourceInfo" => ->(obj) { [:model_source_info, GoogleInSpec::VertexAI::Property::ModelModelSourceInfo.new(obj["modelSourceInfo"], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "metadata" => ->(obj) { [:metadata, obj["metadata"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "deployedModels" => ->(obj) { [:deployed_models, GoogleInSpec::VertexAI::Property::ModelDeployedModelsArray.parse(obj["deployedModels"], to_s)] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "explanationSpec" => ->(obj) { [:explanation_spec, GoogleInSpec::VertexAI::Property::ModelExplanationSpec.new(obj["explanationSpec"], to_s)] }, + "encryptionSpec" => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::ModelEncryptionSpec.new(obj["encryptionSpec"], to_s)] }, + "pipelineJob" => ->(obj) { [:pipeline_job, obj["pipelineJob"]] }, + "predictSchemata" => ->(obj) { [:predict_schemata, GoogleInSpec::VertexAI::Property::ModelPredictSchemata.new(obj["predictSchemata"], to_s)] }, + "versionUpdateTime" => ->(obj) { [:version_update_time, obj["versionUpdateTime"]] }, + "supportedExportFormats" => ->(obj) { [:supported_export_formats, GoogleInSpec::VertexAI::Property::ModelSupportedExportFormatsArray.parse(obj["supportedExportFormats"], to_s)] }, + "originalModelInfo" => ->(obj) { [:original_model_info, GoogleInSpec::VertexAI::Property::ModelOriginalModelInfo.new(obj["originalModelInfo"], to_s)] }, + "metadataArtifact" => ->(obj) { [:metadata_artifact, obj["metadataArtifact"]] }, + "supportedInputStorageFormats" => ->(obj) { [:supported_input_storage_formats, obj["supportedInputStorageFormats"]] }, + "metadataSchemaUri" => ->(obj) { [:metadata_schema_uri, obj["metadataSchemaUri"]] }, + "containerSpec" => ->(obj) { [:container_spec, GoogleInSpec::VertexAI::Property::ModelContainerSpec.new(obj["containerSpec"], to_s)] }, + "versionId" => ->(obj) { [:version_id, obj["versionId"]] }, + "artifactUri" => ->(obj) { [:artifact_uri, obj["artifactUri"]] }, + "trainingPipeline" => ->(obj) { [:training_pipeline, obj["trainingPipeline"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "supportedDeploymentResourcesTypes" => ->(obj) { [:supported_deployment_resources_types, obj["supportedDeploymentResourcesTypes"]] }, + "supportedOutputStorageFormats" => ->(obj) { [:supported_output_storage_formats, obj["supportedOutputStorageFormats"]] }, + "versionAliases" => ->(obj) { [:version_aliases, obj["versionAliases"]] }, + "versionCreateTime" => ->(obj) { [:version_create_time, obj["versionCreateTime"]] }, + "versionDescription" => ->(obj) { [:version_description, obj["versionDescription"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::ModelLabels.new(obj["labels"], to_s)] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/models' + "{{parent}}/models" end end diff --git a/libraries/google_vertex_ai_models_evaluation.rb b/libraries/google_vertex_ai_models_evaluation.rb index 8800c4795..cd2ba6830 100644 --- a/libraries/google_vertex_ai_models_evaluation.rb +++ b/libraries/google_vertex_ai_models_evaluation.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,16 +13,16 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/modelsevaluation_explanation_specs' -require 'google/vertexai/property/modelsevaluation_model_explanation' -require 'google/vertexai/property/modelsevaluation_model_explanation_mean_attributions' +require "gcp_backend" +require "google/vertexai/property/modelsevaluation_explanation_specs" +require "google/vertexai/property/modelsevaluation_model_explanation" +require "google/vertexai/property/modelsevaluation_model_explanation_mean_attributions" # A provider to manage Vertex AI resources. class VertexAIModelsEvaluation < GcpResourceBase - name 'google_vertex_ai_models_evaluation' - desc 'ModelsEvaluation' - supports platform: 'gcp' + name "google_vertex_ai_models_evaluation" + desc "ModelsEvaluation" + supports platform: "gcp" attr_reader :params attr_reader :data_item_schema_uri @@ -40,22 +40,22 @@ class VertexAIModelsEvaluation < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @data_item_schema_uri = @fetched['dataItemSchemaUri'] - @metadata = @fetched['metadata'] - @metrics_schema_uri = @fetched['metricsSchemaUri'] - @create_time = @fetched['createTime'] - @annotation_schema_uri = @fetched['annotationSchemaUri'] - @metrics = @fetched['metrics'] - @explanation_specs = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsArray.parse(@fetched['explanationSpecs'], to_s) - @slice_dimensions = @fetched['sliceDimensions'] - @model_explanation = GoogleInSpec::VertexAI::Property::ModelsEvaluationModelExplanation.new(@fetched['modelExplanation'], to_s) - @name = @fetched['name'] - @display_name = @fetched['displayName'] + @data_item_schema_uri = @fetched["dataItemSchemaUri"] + @metadata = @fetched["metadata"] + @metrics_schema_uri = @fetched["metricsSchemaUri"] + @create_time = @fetched["createTime"] + @annotation_schema_uri = @fetched["annotationSchemaUri"] + @metrics = @fetched["metrics"] + @explanation_specs = GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsArray.parse(@fetched["explanationSpecs"], to_s) + @slice_dimensions = @fetched["sliceDimensions"] + @model_explanation = GoogleInSpec::VertexAI::Property::ModelsEvaluationModelExplanation.new(@fetched["modelExplanation"], to_s) + @name = @fetched["name"] + @display_name = @fetched["displayName"] end def exists? @@ -69,10 +69,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_models_evaluations.rb b/libraries/google_vertex_ai_models_evaluations.rb index 422ba5e4b..26e09f622 100644 --- a/libraries/google_vertex_ai_models_evaluations.rb +++ b/libraries/google_vertex_ai_models_evaluations.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIModelsEvaluations < GcpResourceBase - name 'google_vertex_ai_models_evaluations' - desc 'ModelsEvaluation plural resource' - supports platform: 'gcp' + name "google_vertex_ai_models_evaluations" + desc "ModelsEvaluation plural resource" + supports platform: "gcp" attr_reader :table @@ -40,12 +40,12 @@ class VertexAIModelsEvaluations < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('modelEvaluations') + @table = fetch_wrapped_resource("modelEvaluations") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -73,27 +73,27 @@ def transform(key, value) def transformers { - 'dataItemSchemaUri' => ->(obj) { [:data_item_schema_uri, obj['dataItemSchemaUri']] }, - 'metadata' => ->(obj) { [:metadata, obj['metadata']] }, - 'metricsSchemaUri' => ->(obj) { [:metrics_schema_uri, obj['metricsSchemaUri']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'annotationSchemaUri' => ->(obj) { [:annotation_schema_uri, obj['annotationSchemaUri']] }, - 'metrics' => ->(obj) { [:metrics, obj['metrics']] }, - 'explanationSpecs' => ->(obj) { [:explanation_specs, GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsArray.parse(obj['explanationSpecs'], to_s)] }, - 'sliceDimensions' => ->(obj) { [:slice_dimensions, obj['sliceDimensions']] }, - 'modelExplanation' => ->(obj) { [:model_explanation, GoogleInSpec::VertexAI::Property::ModelsEvaluationModelExplanation.new(obj['modelExplanation'], to_s)] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, + "dataItemSchemaUri" => ->(obj) { [:data_item_schema_uri, obj["dataItemSchemaUri"]] }, + "metadata" => ->(obj) { [:metadata, obj["metadata"]] }, + "metricsSchemaUri" => ->(obj) { [:metrics_schema_uri, obj["metricsSchemaUri"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "annotationSchemaUri" => ->(obj) { [:annotation_schema_uri, obj["annotationSchemaUri"]] }, + "metrics" => ->(obj) { [:metrics, obj["metrics"]] }, + "explanationSpecs" => ->(obj) { [:explanation_specs, GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsArray.parse(obj["explanationSpecs"], to_s)] }, + "sliceDimensions" => ->(obj) { [:slice_dimensions, obj["sliceDimensions"]] }, + "modelExplanation" => ->(obj) { [:model_explanation, GoogleInSpec::VertexAI::Property::ModelsEvaluationModelExplanation.new(obj["modelExplanation"], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/evaluations' + "{{parent}}/evaluations" end end diff --git a/libraries/google_vertex_ai_nas_job.rb b/libraries/google_vertex_ai_nas_job.rb index cfe6726d0..9168099ed 100644 --- a/libraries/google_vertex_ai_nas_job.rb +++ b/libraries/google_vertex_ai_nas_job.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,33 +13,33 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/nasjob_encryption_spec' -require 'google/vertexai/property/nasjob_error' -require 'google/vertexai/property/nasjob_labels' -require 'google/vertexai/property/nasjob_nas_job_output' -require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output' -require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials' -require 'google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials' -require 'google/vertexai/property/nasjob_nas_job_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_metric' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_base_output_directory' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_base_output_directory' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling' -require 'google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs' +require "gcp_backend" +require "google/vertexai/property/nasjob_encryption_spec" +require "google/vertexai/property/nasjob_error" +require "google/vertexai/property/nasjob_labels" +require "google/vertexai/property/nasjob_nas_job_output" +require "google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output" +require "google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_search_trials" +require "google/vertexai/property/nasjob_nas_job_output_multi_trial_job_output_train_trials" +require "google/vertexai/property/nasjob_nas_job_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_metric" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_base_output_directory" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_scheduling" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_search_trial_spec_search_trial_job_spec_worker_pool_specs" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_base_output_directory" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_scheduling" +require "google/vertexai/property/nasjob_nas_job_spec_multi_trial_algorithm_spec_train_trial_spec_train_trial_job_spec_worker_pool_specs" # A provider to manage Vertex AI resources. class VertexAINasJob < GcpResourceBase - name 'google_vertex_ai_nas_job' - desc 'NasJob' - supports platform: 'gcp' + name "google_vertex_ai_nas_job" + desc "NasJob" + supports platform: "gcp" attr_reader :params attr_reader :nas_job_output @@ -59,24 +59,24 @@ class VertexAINasJob < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @nas_job_output = GoogleInSpec::VertexAI::Property::NasJobNasJobOutput.new(@fetched['nasJobOutput'], to_s) - @name = @fetched['name'] - @end_time = @fetched['endTime'] - @error = GoogleInSpec::VertexAI::Property::NasJobError.new(@fetched['error'], to_s) - @state = @fetched['state'] - @create_time = @fetched['createTime'] - @display_name = @fetched['displayName'] - @nas_job_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpec.new(@fetched['nasJobSpec'], to_s) - @enable_restricted_image_training = @fetched['enableRestrictedImageTraining'] - @start_time = @fetched['startTime'] - @encryption_spec = GoogleInSpec::VertexAI::Property::NasJobEncryptionSpec.new(@fetched['encryptionSpec'], to_s) - @labels = GoogleInSpec::VertexAI::Property::NasJobLabels.new(@fetched['labels'], to_s) - @update_time = @fetched['updateTime'] + @nas_job_output = GoogleInSpec::VertexAI::Property::NasJobNasJobOutput.new(@fetched["nasJobOutput"], to_s) + @name = @fetched["name"] + @end_time = @fetched["endTime"] + @error = GoogleInSpec::VertexAI::Property::NasJobError.new(@fetched["error"], to_s) + @state = @fetched["state"] + @create_time = @fetched["createTime"] + @display_name = @fetched["displayName"] + @nas_job_spec = GoogleInSpec::VertexAI::Property::NasJobNasJobSpec.new(@fetched["nasJobSpec"], to_s) + @enable_restricted_image_training = @fetched["enableRestrictedImageTraining"] + @start_time = @fetched["startTime"] + @encryption_spec = GoogleInSpec::VertexAI::Property::NasJobEncryptionSpec.new(@fetched["encryptionSpec"], to_s) + @labels = GoogleInSpec::VertexAI::Property::NasJobLabels.new(@fetched["labels"], to_s) + @update_time = @fetched["updateTime"] end def exists? @@ -90,10 +90,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_nas_jobs.rb b/libraries/google_vertex_ai_nas_jobs.rb index dcdfee2d3..f57c74491 100644 --- a/libraries/google_vertex_ai_nas_jobs.rb +++ b/libraries/google_vertex_ai_nas_jobs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAINasJobs < GcpResourceBase - name 'google_vertex_ai_nas_jobs' - desc 'NasJob plural resource' - supports platform: 'gcp' + name "google_vertex_ai_nas_jobs" + desc "NasJob plural resource" + supports platform: "gcp" attr_reader :table @@ -42,12 +42,12 @@ class VertexAINasJobs < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('nasJobs') + @table = fetch_wrapped_resource("nasJobs") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -75,29 +75,29 @@ def transform(key, value) def transformers { - 'nasJobOutput' => ->(obj) { [:nas_job_output, GoogleInSpec::VertexAI::Property::NasJobNasJobOutput.new(obj['nasJobOutput'], to_s)] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, - 'error' => ->(obj) { [:error, GoogleInSpec::VertexAI::Property::NasJobError.new(obj['error'], to_s)] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'nasJobSpec' => ->(obj) { [:nas_job_spec, GoogleInSpec::VertexAI::Property::NasJobNasJobSpec.new(obj['nasJobSpec'], to_s)] }, - 'enableRestrictedImageTraining' => ->(obj) { [:enable_restricted_image_training, obj['enableRestrictedImageTraining']] }, - 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, - 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::NasJobEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::NasJobLabels.new(obj['labels'], to_s)] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, + "nasJobOutput" => ->(obj) { [:nas_job_output, GoogleInSpec::VertexAI::Property::NasJobNasJobOutput.new(obj["nasJobOutput"], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "endTime" => ->(obj) { [:end_time, obj["endTime"]] }, + "error" => ->(obj) { [:error, GoogleInSpec::VertexAI::Property::NasJobError.new(obj["error"], to_s)] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "nasJobSpec" => ->(obj) { [:nas_job_spec, GoogleInSpec::VertexAI::Property::NasJobNasJobSpec.new(obj["nasJobSpec"], to_s)] }, + "enableRestrictedImageTraining" => ->(obj) { [:enable_restricted_image_training, obj["enableRestrictedImageTraining"]] }, + "startTime" => ->(obj) { [:start_time, obj["startTime"]] }, + "encryptionSpec" => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::NasJobEncryptionSpec.new(obj["encryptionSpec"], to_s)] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::NasJobLabels.new(obj["labels"], to_s)] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/nasJobs' + "{{parent}}/nasJobs" end end diff --git a/libraries/google_vertex_ai_nas_jobs_nas_trial_detail.rb b/libraries/google_vertex_ai_nas_jobs_nas_trial_detail.rb index 675ed08cc..839d9fe2e 100644 --- a/libraries/google_vertex_ai_nas_jobs_nas_trial_detail.rb +++ b/libraries/google_vertex_ai_nas_jobs_nas_trial_detail.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,19 +13,19 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/nasjobsnastrialdetail_search_trial' -require 'google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement' -require 'google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement_metrics' -require 'google/vertexai/property/nasjobsnastrialdetail_train_trial' -require 'google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement' -require 'google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement_metrics' +require "gcp_backend" +require "google/vertexai/property/nasjobsnastrialdetail_search_trial" +require "google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement" +require "google/vertexai/property/nasjobsnastrialdetail_search_trial_final_measurement_metrics" +require "google/vertexai/property/nasjobsnastrialdetail_train_trial" +require "google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement" +require "google/vertexai/property/nasjobsnastrialdetail_train_trial_final_measurement_metrics" # A provider to manage Vertex AI resources. class VertexAINasJobsNasTrialDetail < GcpResourceBase - name 'google_vertex_ai_nas_jobs_nas_trial_detail' - desc 'NasJobsNasTrialDetail' - supports platform: 'gcp' + name "google_vertex_ai_nas_jobs_nas_trial_detail" + desc "NasJobsNasTrialDetail" + supports platform: "gcp" attr_reader :params attr_reader :parameters @@ -36,15 +36,15 @@ class VertexAINasJobsNasTrialDetail < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @parameters = @fetched['parameters'] - @name = @fetched['name'] - @search_trial = GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailSearchTrial.new(@fetched['searchTrial'], to_s) - @train_trial = GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailTrainTrial.new(@fetched['trainTrial'], to_s) + @parameters = @fetched["parameters"] + @name = @fetched["name"] + @search_trial = GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailSearchTrial.new(@fetched["searchTrial"], to_s) + @train_trial = GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailTrainTrial.new(@fetched["trainTrial"], to_s) end def exists? @@ -58,10 +58,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_nas_jobs_nas_trial_details.rb b/libraries/google_vertex_ai_nas_jobs_nas_trial_details.rb index 560dc777d..92e181154 100644 --- a/libraries/google_vertex_ai_nas_jobs_nas_trial_details.rb +++ b/libraries/google_vertex_ai_nas_jobs_nas_trial_details.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAINasJobsNasTrialDetails < GcpResourceBase - name 'google_vertex_ai_nas_jobs_nas_trial_details' - desc 'NasJobsNasTrialDetail plural resource' - supports platform: 'gcp' + name "google_vertex_ai_nas_jobs_nas_trial_details" + desc "NasJobsNasTrialDetail plural resource" + supports platform: "gcp" attr_reader :table @@ -33,12 +33,12 @@ class VertexAINasJobsNasTrialDetails < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('nasTrialDetails') + @table = fetch_wrapped_resource("nasTrialDetails") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs converted = [] @@ -65,20 +65,20 @@ def transform(key, value) def transformers { - 'parameters' => ->(obj) { [:parameters, obj['parameters']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'searchTrial' => ->(obj) { [:search_trial, GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailSearchTrial.new(obj['searchTrial'], to_s)] }, - 'trainTrial' => ->(obj) { [:train_trial, GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailTrainTrial.new(obj['trainTrial'], to_s)] }, + "parameters" => ->(obj) { [:parameters, obj["parameters"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "searchTrial" => ->(obj) { [:search_trial, GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailSearchTrial.new(obj["searchTrial"], to_s)] }, + "trainTrial" => ->(obj) { [:train_trial, GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailTrainTrial.new(obj["trainTrial"], to_s)] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/nasTrialDetails' + "{{parent}}/nasTrialDetails" end end diff --git a/libraries/google_vertex_ai_pipeline_job.rb b/libraries/google_vertex_ai_pipeline_job.rb index 8ff5dad4b..4ffd2da6f 100644 --- a/libraries/google_vertex_ai_pipeline_job.rb +++ b/libraries/google_vertex_ai_pipeline_job.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,30 +13,30 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/pipelinejob_encryption_spec' -require 'google/vertexai/property/pipelinejob_error' -require 'google/vertexai/property/pipelinejob_job_detail' -require 'google/vertexai/property/pipelinejob_job_detail_pipeline_context' -require 'google/vertexai/property/pipelinejob_job_detail_pipeline_context_labels' -require 'google/vertexai/property/pipelinejob_job_detail_pipeline_context_metadata' -require 'google/vertexai/property/pipelinejob_job_detail_pipeline_run_context' -require 'google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_labels' -require 'google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_metadata' -require 'google/vertexai/property/pipelinejob_job_detail_task_details' -require 'google/vertexai/property/pipelinejob_labels' -require 'google/vertexai/property/pipelinejob_pipeline_spec' -require 'google/vertexai/property/pipelinejob_runtime_config' -require 'google/vertexai/property/pipelinejob_runtime_config_input_artifacts' -require 'google/vertexai/property/pipelinejob_runtime_config_parameter_values' -require 'google/vertexai/property/pipelinejob_runtime_config_parameters' -require 'google/vertexai/property/pipelinejob_template_metadata' +require "gcp_backend" +require "google/vertexai/property/pipelinejob_encryption_spec" +require "google/vertexai/property/pipelinejob_error" +require "google/vertexai/property/pipelinejob_job_detail" +require "google/vertexai/property/pipelinejob_job_detail_pipeline_context" +require "google/vertexai/property/pipelinejob_job_detail_pipeline_context_labels" +require "google/vertexai/property/pipelinejob_job_detail_pipeline_context_metadata" +require "google/vertexai/property/pipelinejob_job_detail_pipeline_run_context" +require "google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_labels" +require "google/vertexai/property/pipelinejob_job_detail_pipeline_run_context_metadata" +require "google/vertexai/property/pipelinejob_job_detail_task_details" +require "google/vertexai/property/pipelinejob_labels" +require "google/vertexai/property/pipelinejob_pipeline_spec" +require "google/vertexai/property/pipelinejob_runtime_config" +require "google/vertexai/property/pipelinejob_runtime_config_input_artifacts" +require "google/vertexai/property/pipelinejob_runtime_config_parameter_values" +require "google/vertexai/property/pipelinejob_runtime_config_parameters" +require "google/vertexai/property/pipelinejob_template_metadata" # A provider to manage Vertex AI resources. class VertexAIPipelineJob < GcpResourceBase - name 'google_vertex_ai_pipeline_job' - desc 'PipelineJob' - supports platform: 'gcp' + name "google_vertex_ai_pipeline_job" + desc "PipelineJob" + supports platform: "gcp" attr_reader :params attr_reader :encryption_spec @@ -62,30 +62,30 @@ class VertexAIPipelineJob < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @encryption_spec = GoogleInSpec::VertexAI::Property::PipelineJobEncryptionSpec.new(@fetched['encryptionSpec'], to_s) - @end_time = @fetched['endTime'] - @error = GoogleInSpec::VertexAI::Property::PipelineJobError.new(@fetched['error'], to_s) - @update_time = @fetched['updateTime'] - @job_detail = GoogleInSpec::VertexAI::Property::PipelineJobJobDetail.new(@fetched['jobDetail'], to_s) - @template_metadata = GoogleInSpec::VertexAI::Property::PipelineJobTemplateMetadata.new(@fetched['templateMetadata'], to_s) - @state = @fetched['state'] - @create_time = @fetched['createTime'] - @name = @fetched['name'] - @schedule_name = @fetched['scheduleName'] - @reserved_ip_ranges = @fetched['reservedIpRanges'] - @start_time = @fetched['startTime'] - @service_account = @fetched['serviceAccount'] - @display_name = @fetched['displayName'] - @template_uri = @fetched['templateUri'] - @pipeline_spec = GoogleInSpec::VertexAI::Property::PipelineJobPipelineSpec.new(@fetched['pipelineSpec'], to_s) - @network = @fetched['network'] - @labels = GoogleInSpec::VertexAI::Property::PipelineJobLabels.new(@fetched['labels'], to_s) - @runtime_config = GoogleInSpec::VertexAI::Property::PipelineJobRuntimeConfig.new(@fetched['runtimeConfig'], to_s) + @encryption_spec = GoogleInSpec::VertexAI::Property::PipelineJobEncryptionSpec.new(@fetched["encryptionSpec"], to_s) + @end_time = @fetched["endTime"] + @error = GoogleInSpec::VertexAI::Property::PipelineJobError.new(@fetched["error"], to_s) + @update_time = @fetched["updateTime"] + @job_detail = GoogleInSpec::VertexAI::Property::PipelineJobJobDetail.new(@fetched["jobDetail"], to_s) + @template_metadata = GoogleInSpec::VertexAI::Property::PipelineJobTemplateMetadata.new(@fetched["templateMetadata"], to_s) + @state = @fetched["state"] + @create_time = @fetched["createTime"] + @name = @fetched["name"] + @schedule_name = @fetched["scheduleName"] + @reserved_ip_ranges = @fetched["reservedIpRanges"] + @start_time = @fetched["startTime"] + @service_account = @fetched["serviceAccount"] + @display_name = @fetched["displayName"] + @template_uri = @fetched["templateUri"] + @pipeline_spec = GoogleInSpec::VertexAI::Property::PipelineJobPipelineSpec.new(@fetched["pipelineSpec"], to_s) + @network = @fetched["network"] + @labels = GoogleInSpec::VertexAI::Property::PipelineJobLabels.new(@fetched["labels"], to_s) + @runtime_config = GoogleInSpec::VertexAI::Property::PipelineJobRuntimeConfig.new(@fetched["runtimeConfig"], to_s) end def exists? @@ -99,10 +99,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_pipeline_jobs.rb b/libraries/google_vertex_ai_pipeline_jobs.rb index 292ef914b..c0ea2e13f 100644 --- a/libraries/google_vertex_ai_pipeline_jobs.rb +++ b/libraries/google_vertex_ai_pipeline_jobs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIPipelineJobs < GcpResourceBase - name 'google_vertex_ai_pipeline_jobs' - desc 'PipelineJob plural resource' - supports platform: 'gcp' + name "google_vertex_ai_pipeline_jobs" + desc "PipelineJob plural resource" + supports platform: "gcp" attr_reader :table @@ -48,12 +48,12 @@ class VertexAIPipelineJobs < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('pipelineJobs') + @table = fetch_wrapped_resource("pipelineJobs") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -81,35 +81,35 @@ def transform(key, value) def transformers { - 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::PipelineJobEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, - 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, - 'error' => ->(obj) { [:error, GoogleInSpec::VertexAI::Property::PipelineJobError.new(obj['error'], to_s)] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'jobDetail' => ->(obj) { [:job_detail, GoogleInSpec::VertexAI::Property::PipelineJobJobDetail.new(obj['jobDetail'], to_s)] }, - 'templateMetadata' => ->(obj) { [:template_metadata, GoogleInSpec::VertexAI::Property::PipelineJobTemplateMetadata.new(obj['templateMetadata'], to_s)] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'scheduleName' => ->(obj) { [:schedule_name, obj['scheduleName']] }, - 'reservedIpRanges' => ->(obj) { [:reserved_ip_ranges, obj['reservedIpRanges']] }, - 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, - 'serviceAccount' => ->(obj) { [:service_account, obj['serviceAccount']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'templateUri' => ->(obj) { [:template_uri, obj['templateUri']] }, - 'pipelineSpec' => ->(obj) { [:pipeline_spec, GoogleInSpec::VertexAI::Property::PipelineJobPipelineSpec.new(obj['pipelineSpec'], to_s)] }, - 'network' => ->(obj) { [:network, obj['network']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::PipelineJobLabels.new(obj['labels'], to_s)] }, - 'runtimeConfig' => ->(obj) { [:runtime_config, GoogleInSpec::VertexAI::Property::PipelineJobRuntimeConfig.new(obj['runtimeConfig'], to_s)] }, + "encryptionSpec" => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::PipelineJobEncryptionSpec.new(obj["encryptionSpec"], to_s)] }, + "endTime" => ->(obj) { [:end_time, obj["endTime"]] }, + "error" => ->(obj) { [:error, GoogleInSpec::VertexAI::Property::PipelineJobError.new(obj["error"], to_s)] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "jobDetail" => ->(obj) { [:job_detail, GoogleInSpec::VertexAI::Property::PipelineJobJobDetail.new(obj["jobDetail"], to_s)] }, + "templateMetadata" => ->(obj) { [:template_metadata, GoogleInSpec::VertexAI::Property::PipelineJobTemplateMetadata.new(obj["templateMetadata"], to_s)] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "scheduleName" => ->(obj) { [:schedule_name, obj["scheduleName"]] }, + "reservedIpRanges" => ->(obj) { [:reserved_ip_ranges, obj["reservedIpRanges"]] }, + "startTime" => ->(obj) { [:start_time, obj["startTime"]] }, + "serviceAccount" => ->(obj) { [:service_account, obj["serviceAccount"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "templateUri" => ->(obj) { [:template_uri, obj["templateUri"]] }, + "pipelineSpec" => ->(obj) { [:pipeline_spec, GoogleInSpec::VertexAI::Property::PipelineJobPipelineSpec.new(obj["pipelineSpec"], to_s)] }, + "network" => ->(obj) { [:network, obj["network"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::PipelineJobLabels.new(obj["labels"], to_s)] }, + "runtimeConfig" => ->(obj) { [:runtime_config, GoogleInSpec::VertexAI::Property::PipelineJobRuntimeConfig.new(obj["runtimeConfig"], to_s)] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/pipelineJobs' + "{{parent}}/pipelineJobs" end end diff --git a/libraries/google_vertex_ai_schedule.rb b/libraries/google_vertex_ai_schedule.rb index e11aa5c2c..f451bf424 100644 --- a/libraries/google_vertex_ai_schedule.rb +++ b/libraries/google_vertex_ai_schedule.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,33 +13,33 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/schedule_create_pipeline_job_request' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_encryption_spec' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_error' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_labels' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_pipeline_spec' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_input_artifacts' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameter_values' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameters' -require 'google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_template_metadata' -require 'google/vertexai/property/schedule_last_scheduled_run_response' +require "gcp_backend" +require "google/vertexai/property/schedule_create_pipeline_job_request" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_encryption_spec" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_error" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_labels" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_context_metadata" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_labels" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_pipeline_run_context_metadata" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_job_detail_task_details" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_labels" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_pipeline_spec" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_input_artifacts" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameter_values" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_runtime_config_parameters" +require "google/vertexai/property/schedule_create_pipeline_job_request_pipeline_job_template_metadata" +require "google/vertexai/property/schedule_last_scheduled_run_response" # A provider to manage Vertex AI resources. class VertexAISchedule < GcpResourceBase - name 'google_vertex_ai_schedule' - desc 'Schedule' - supports platform: 'gcp' + name "google_vertex_ai_schedule" + desc "Schedule" + supports platform: "gcp" attr_reader :params attr_reader :started_run_count @@ -64,29 +64,29 @@ class VertexAISchedule < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @started_run_count = @fetched['startedRunCount'] - @allow_queueing = @fetched['allowQueueing'] - @name = @fetched['name'] - @cron = @fetched['cron'] - @last_pause_time = @fetched['lastPauseTime'] - @create_time = @fetched['createTime'] - @start_time = @fetched['startTime'] - @max_run_count = @fetched['maxRunCount'] - @next_run_time = @fetched['nextRunTime'] - @update_time = @fetched['updateTime'] - @last_scheduled_run_response = GoogleInSpec::VertexAI::Property::ScheduleLastScheduledRunResponse.new(@fetched['lastScheduledRunResponse'], to_s) - @last_resume_time = @fetched['lastResumeTime'] - @max_concurrent_run_count = @fetched['maxConcurrentRunCount'] - @state = @fetched['state'] - @create_pipeline_job_request = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequest.new(@fetched['createPipelineJobRequest'], to_s) - @display_name = @fetched['displayName'] - @catch_up = @fetched['catchUp'] - @end_time = @fetched['endTime'] + @started_run_count = @fetched["startedRunCount"] + @allow_queueing = @fetched["allowQueueing"] + @name = @fetched["name"] + @cron = @fetched["cron"] + @last_pause_time = @fetched["lastPauseTime"] + @create_time = @fetched["createTime"] + @start_time = @fetched["startTime"] + @max_run_count = @fetched["maxRunCount"] + @next_run_time = @fetched["nextRunTime"] + @update_time = @fetched["updateTime"] + @last_scheduled_run_response = GoogleInSpec::VertexAI::Property::ScheduleLastScheduledRunResponse.new(@fetched["lastScheduledRunResponse"], to_s) + @last_resume_time = @fetched["lastResumeTime"] + @max_concurrent_run_count = @fetched["maxConcurrentRunCount"] + @state = @fetched["state"] + @create_pipeline_job_request = GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequest.new(@fetched["createPipelineJobRequest"], to_s) + @display_name = @fetched["displayName"] + @catch_up = @fetched["catchUp"] + @end_time = @fetched["endTime"] end def exists? @@ -100,10 +100,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_schedules.rb b/libraries/google_vertex_ai_schedules.rb index 257cc0a28..ec780684f 100644 --- a/libraries/google_vertex_ai_schedules.rb +++ b/libraries/google_vertex_ai_schedules.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAISchedules < GcpResourceBase - name 'google_vertex_ai_schedules' - desc 'Schedule plural resource' - supports platform: 'gcp' + name "google_vertex_ai_schedules" + desc "Schedule plural resource" + supports platform: "gcp" attr_reader :table @@ -47,12 +47,12 @@ class VertexAISchedules < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('schedules') + @table = fetch_wrapped_resource("schedules") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -80,34 +80,34 @@ def transform(key, value) def transformers { - 'startedRunCount' => ->(obj) { [:started_run_count, obj['startedRunCount']] }, - 'allowQueueing' => ->(obj) { [:allow_queueing, obj['allowQueueing']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'cron' => ->(obj) { [:cron, obj['cron']] }, - 'lastPauseTime' => ->(obj) { [:last_pause_time, obj['lastPauseTime']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, - 'maxRunCount' => ->(obj) { [:max_run_count, obj['maxRunCount']] }, - 'nextRunTime' => ->(obj) { [:next_run_time, obj['nextRunTime']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'lastScheduledRunResponse' => ->(obj) { [:last_scheduled_run_response, GoogleInSpec::VertexAI::Property::ScheduleLastScheduledRunResponse.new(obj['lastScheduledRunResponse'], to_s)] }, - 'lastResumeTime' => ->(obj) { [:last_resume_time, obj['lastResumeTime']] }, - 'maxConcurrentRunCount' => ->(obj) { [:max_concurrent_run_count, obj['maxConcurrentRunCount']] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'createPipelineJobRequest' => ->(obj) { [:create_pipeline_job_request, GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequest.new(obj['createPipelineJobRequest'], to_s)] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'catchUp' => ->(obj) { [:catch_up, obj['catchUp']] }, - 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, + "startedRunCount" => ->(obj) { [:started_run_count, obj["startedRunCount"]] }, + "allowQueueing" => ->(obj) { [:allow_queueing, obj["allowQueueing"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "cron" => ->(obj) { [:cron, obj["cron"]] }, + "lastPauseTime" => ->(obj) { [:last_pause_time, obj["lastPauseTime"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "startTime" => ->(obj) { [:start_time, obj["startTime"]] }, + "maxRunCount" => ->(obj) { [:max_run_count, obj["maxRunCount"]] }, + "nextRunTime" => ->(obj) { [:next_run_time, obj["nextRunTime"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "lastScheduledRunResponse" => ->(obj) { [:last_scheduled_run_response, GoogleInSpec::VertexAI::Property::ScheduleLastScheduledRunResponse.new(obj["lastScheduledRunResponse"], to_s)] }, + "lastResumeTime" => ->(obj) { [:last_resume_time, obj["lastResumeTime"]] }, + "maxConcurrentRunCount" => ->(obj) { [:max_concurrent_run_count, obj["maxConcurrentRunCount"]] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "createPipelineJobRequest" => ->(obj) { [:create_pipeline_job_request, GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequest.new(obj["createPipelineJobRequest"], to_s)] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "catchUp" => ->(obj) { [:catch_up, obj["catchUp"]] }, + "endTime" => ->(obj) { [:end_time, obj["endTime"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/schedules' + "{{parent}}/schedules" end end diff --git a/libraries/google_vertex_ai_studies.rb b/libraries/google_vertex_ai_studies.rb index 0494594ee..d86013ee4 100644 --- a/libraries/google_vertex_ai_studies.rb +++ b/libraries/google_vertex_ai_studies.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIStudys < GcpResourceBase - name 'google_vertex_ai_studies' - desc 'Study plural resource' - supports platform: 'gcp' + name "google_vertex_ai_studies" + desc "Study plural resource" + supports platform: "gcp" attr_reader :table @@ -35,12 +35,12 @@ class VertexAIStudys < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('studies') + @table = fetch_wrapped_resource("studies") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -68,22 +68,22 @@ def transform(key, value) def transformers { - 'studySpec' => ->(obj) { [:study_spec, obj['studySpec']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'inactiveReason' => ->(obj) { [:inactive_reason, obj['inactiveReason']] }, + "studySpec" => ->(obj) { [:study_spec, obj["studySpec"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "inactiveReason" => ->(obj) { [:inactive_reason, obj["inactiveReason"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/studies' + "{{parent}}/studies" end end diff --git a/libraries/google_vertex_ai_studies_trial.rb b/libraries/google_vertex_ai_studies_trial.rb index 670805e78..03e65e409 100644 --- a/libraries/google_vertex_ai_studies_trial.rb +++ b/libraries/google_vertex_ai_studies_trial.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,18 +13,18 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/studiestrial_final_measurement' -require 'google/vertexai/property/studiestrial_final_measurement_metrics' -require 'google/vertexai/property/studiestrial_measurements' -require 'google/vertexai/property/studiestrial_parameters' -require 'google/vertexai/property/studiestrial_web_access_uris' +require "gcp_backend" +require "google/vertexai/property/studiestrial_final_measurement" +require "google/vertexai/property/studiestrial_final_measurement_metrics" +require "google/vertexai/property/studiestrial_measurements" +require "google/vertexai/property/studiestrial_parameters" +require "google/vertexai/property/studiestrial_web_access_uris" # A provider to manage Vertex AI resources. class VertexAIStudiesTrial < GcpResourceBase - name 'google_vertex_ai_studies_trial' - desc 'StudiesTrial' - supports platform: 'gcp' + name "google_vertex_ai_studies_trial" + desc "StudiesTrial" + supports platform: "gcp" attr_reader :params attr_reader :measurements @@ -43,23 +43,23 @@ class VertexAIStudiesTrial < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @measurements = GoogleInSpec::VertexAI::Property::StudiesTrialMeasurementsArray.parse(@fetched['measurements'], to_s) - @start_time = @fetched['startTime'] - @end_time = @fetched['endTime'] - @parameters = GoogleInSpec::VertexAI::Property::StudiesTrialParametersArray.parse(@fetched['parameters'], to_s) - @name = @fetched['name'] - @infeasible_reason = @fetched['infeasibleReason'] - @final_measurement = GoogleInSpec::VertexAI::Property::StudiesTrialFinalMeasurement.new(@fetched['finalMeasurement'], to_s) - @client_id = @fetched['clientId'] - @custom_job = @fetched['customJob'] - @state = @fetched['state'] - @web_access_uris = GoogleInSpec::VertexAI::Property::StudiesTrialWebAccessUris.new(@fetched['webAccessUris'], to_s) - @id = @fetched['id'] + @measurements = GoogleInSpec::VertexAI::Property::StudiesTrialMeasurementsArray.parse(@fetched["measurements"], to_s) + @start_time = @fetched["startTime"] + @end_time = @fetched["endTime"] + @parameters = GoogleInSpec::VertexAI::Property::StudiesTrialParametersArray.parse(@fetched["parameters"], to_s) + @name = @fetched["name"] + @infeasible_reason = @fetched["infeasibleReason"] + @final_measurement = GoogleInSpec::VertexAI::Property::StudiesTrialFinalMeasurement.new(@fetched["finalMeasurement"], to_s) + @client_id = @fetched["clientId"] + @custom_job = @fetched["customJob"] + @state = @fetched["state"] + @web_access_uris = GoogleInSpec::VertexAI::Property::StudiesTrialWebAccessUris.new(@fetched["webAccessUris"], to_s) + @id = @fetched["id"] end def exists? @@ -73,10 +73,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_studies_trials.rb b/libraries/google_vertex_ai_studies_trials.rb index eb1e48466..6dda4379d 100644 --- a/libraries/google_vertex_ai_studies_trials.rb +++ b/libraries/google_vertex_ai_studies_trials.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAIStudiesTrials < GcpResourceBase - name 'google_vertex_ai_studies_trials' - desc 'StudiesTrial plural resource' - supports platform: 'gcp' + name "google_vertex_ai_studies_trials" + desc "StudiesTrial plural resource" + supports platform: "gcp" attr_reader :table @@ -41,12 +41,12 @@ class VertexAIStudiesTrials < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('trials') + @table = fetch_wrapped_resource("trials") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -74,28 +74,28 @@ def transform(key, value) def transformers { - 'measurements' => ->(obj) { [:measurements, GoogleInSpec::VertexAI::Property::StudiesTrialMeasurementsArray.parse(obj['measurements'], to_s)] }, - 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, - 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, - 'parameters' => ->(obj) { [:parameters, GoogleInSpec::VertexAI::Property::StudiesTrialParametersArray.parse(obj['parameters'], to_s)] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'infeasibleReason' => ->(obj) { [:infeasible_reason, obj['infeasibleReason']] }, - 'finalMeasurement' => ->(obj) { [:final_measurement, GoogleInSpec::VertexAI::Property::StudiesTrialFinalMeasurement.new(obj['finalMeasurement'], to_s)] }, - 'clientId' => ->(obj) { [:client_id, obj['clientId']] }, - 'customJob' => ->(obj) { [:custom_job, obj['customJob']] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'webAccessUris' => ->(obj) { [:web_access_uris, GoogleInSpec::VertexAI::Property::StudiesTrialWebAccessUris.new(obj['webAccessUris'], to_s)] }, - 'id' => ->(obj) { [:id, obj['id']] }, + "measurements" => ->(obj) { [:measurements, GoogleInSpec::VertexAI::Property::StudiesTrialMeasurementsArray.parse(obj["measurements"], to_s)] }, + "startTime" => ->(obj) { [:start_time, obj["startTime"]] }, + "endTime" => ->(obj) { [:end_time, obj["endTime"]] }, + "parameters" => ->(obj) { [:parameters, GoogleInSpec::VertexAI::Property::StudiesTrialParametersArray.parse(obj["parameters"], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "infeasibleReason" => ->(obj) { [:infeasible_reason, obj["infeasibleReason"]] }, + "finalMeasurement" => ->(obj) { [:final_measurement, GoogleInSpec::VertexAI::Property::StudiesTrialFinalMeasurement.new(obj["finalMeasurement"], to_s)] }, + "clientId" => ->(obj) { [:client_id, obj["clientId"]] }, + "customJob" => ->(obj) { [:custom_job, obj["customJob"]] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "webAccessUris" => ->(obj) { [:web_access_uris, GoogleInSpec::VertexAI::Property::StudiesTrialWebAccessUris.new(obj["webAccessUris"], to_s)] }, + "id" => ->(obj) { [:id, obj["id"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/trials' + "{{parent}}/trials" end end diff --git a/libraries/google_vertex_ai_study.rb b/libraries/google_vertex_ai_study.rb index 5d580e433..313922894 100644 --- a/libraries/google_vertex_ai_study.rb +++ b/libraries/google_vertex_ai_study.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Vertex AI resources. class VertexAIStudy < GcpResourceBase - name 'google_vertex_ai_study' - desc 'Study' - supports platform: 'gcp' + name "google_vertex_ai_study" + desc "Study" + supports platform: "gcp" attr_reader :params attr_reader :study_spec @@ -32,17 +32,17 @@ class VertexAIStudy < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @study_spec = @fetched['studySpec'] - @name = @fetched['name'] - @display_name = @fetched['displayName'] - @state = @fetched['state'] - @create_time = @fetched['createTime'] - @inactive_reason = @fetched['inactiveReason'] + @study_spec = @fetched["studySpec"] + @name = @fetched["name"] + @display_name = @fetched["displayName"] + @state = @fetched["state"] + @create_time = @fetched["createTime"] + @inactive_reason = @fetched["inactiveReason"] end def exists? @@ -56,10 +56,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_tensorboard.rb b/libraries/google_vertex_ai_tensorboard.rb index 5d5e18f86..88d12a4f8 100644 --- a/libraries/google_vertex_ai_tensorboard.rb +++ b/libraries/google_vertex_ai_tensorboard.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,15 +13,15 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/tensorboard_encryption_spec' -require 'google/vertexai/property/tensorboard_labels' +require "gcp_backend" +require "google/vertexai/property/tensorboard_encryption_spec" +require "google/vertexai/property/tensorboard_labels" # A provider to manage Vertex AI resources. class VertexAITensorboard < GcpResourceBase - name 'google_vertex_ai_tensorboard' - desc 'Tensorboard' - supports platform: 'gcp' + name "google_vertex_ai_tensorboard" + desc "Tensorboard" + supports platform: "gcp" attr_reader :params attr_reader :name @@ -39,22 +39,22 @@ class VertexAITensorboard < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @name = @fetched['name'] - @is_default = @fetched['isDefault'] - @update_time = @fetched['updateTime'] - @labels = GoogleInSpec::VertexAI::Property::TensorboardLabels.new(@fetched['labels'], to_s) - @blob_storage_path_prefix = @fetched['blobStoragePathPrefix'] - @etag = @fetched['etag'] - @create_time = @fetched['createTime'] - @run_count = @fetched['runCount'] - @encryption_spec = GoogleInSpec::VertexAI::Property::TensorboardEncryptionSpec.new(@fetched['encryptionSpec'], to_s) - @display_name = @fetched['displayName'] - @description = @fetched['description'] + @name = @fetched["name"] + @is_default = @fetched["isDefault"] + @update_time = @fetched["updateTime"] + @labels = GoogleInSpec::VertexAI::Property::TensorboardLabels.new(@fetched["labels"], to_s) + @blob_storage_path_prefix = @fetched["blobStoragePathPrefix"] + @etag = @fetched["etag"] + @create_time = @fetched["createTime"] + @run_count = @fetched["runCount"] + @encryption_spec = GoogleInSpec::VertexAI::Property::TensorboardEncryptionSpec.new(@fetched["encryptionSpec"], to_s) + @display_name = @fetched["displayName"] + @description = @fetched["description"] end def exists? @@ -68,10 +68,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_tensorboard_experiment_run.rb b/libraries/google_vertex_ai_tensorboard_experiment_run.rb index fbbf5b915..e070b3b9f 100644 --- a/libraries/google_vertex_ai_tensorboard_experiment_run.rb +++ b/libraries/google_vertex_ai_tensorboard_experiment_run.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/tensorboardexperimentrun_labels' +require "gcp_backend" +require "google/vertexai/property/tensorboardexperimentrun_labels" # A provider to manage Vertex AI resources. class VertexAITensorboardExperimentRun < GcpResourceBase - name 'google_vertex_ai_tensorboard_experiment_run' - desc 'TensorboardExperimentRun' - supports platform: 'gcp' + name "google_vertex_ai_tensorboard_experiment_run" + desc "TensorboardExperimentRun" + supports platform: "gcp" attr_reader :params attr_reader :display_name @@ -34,18 +34,18 @@ class VertexAITensorboardExperimentRun < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @display_name = @fetched['displayName'] - @update_time = @fetched['updateTime'] - @description = @fetched['description'] - @etag = @fetched['etag'] - @labels = GoogleInSpec::VertexAI::Property::TensorboardExperimentRunLabels.new(@fetched['labels'], to_s) - @create_time = @fetched['createTime'] - @name = @fetched['name'] + @display_name = @fetched["displayName"] + @update_time = @fetched["updateTime"] + @description = @fetched["description"] + @etag = @fetched["etag"] + @labels = GoogleInSpec::VertexAI::Property::TensorboardExperimentRunLabels.new(@fetched["labels"], to_s) + @create_time = @fetched["createTime"] + @name = @fetched["name"] end def exists? @@ -59,10 +59,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_tensorboard_experiment_run_time_series_resource.rb b/libraries/google_vertex_ai_tensorboard_experiment_run_time_series_resource.rb index e37fa5bee..924986478 100644 --- a/libraries/google_vertex_ai_tensorboard_experiment_run_time_series_resource.rb +++ b/libraries/google_vertex_ai_tensorboard_experiment_run_time_series_resource.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" # A provider to manage Vertex AI resources. class VertexAITensorboardExperimentRunTimeSeriesResource < GcpResourceBase - name 'google_vertex_ai_tensorboard_experiment_run_time_series_resource' - desc 'TensorboardExperimentRunTimeSeriesResource' - supports platform: 'gcp' + name "google_vertex_ai_tensorboard_experiment_run_time_series_resource" + desc "TensorboardExperimentRunTimeSeriesResource" + supports platform: "gcp" attr_reader :params attr_reader :plugin_name @@ -36,21 +36,21 @@ class VertexAITensorboardExperimentRunTimeSeriesResource < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @plugin_name = @fetched['pluginName'] - @plugin_data = @fetched['pluginData'] - @description = @fetched['description'] - @etag = @fetched['etag'] - @display_name = @fetched['displayName'] - @update_time = @fetched['updateTime'] - @create_time = @fetched['createTime'] - @name = @fetched['name'] - @metadata = @fetched['metadata'] - @value_type = @fetched['valueType'] + @plugin_name = @fetched["pluginName"] + @plugin_data = @fetched["pluginData"] + @description = @fetched["description"] + @etag = @fetched["etag"] + @display_name = @fetched["displayName"] + @update_time = @fetched["updateTime"] + @create_time = @fetched["createTime"] + @name = @fetched["name"] + @metadata = @fetched["metadata"] + @value_type = @fetched["valueType"] end def exists? @@ -64,10 +64,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_tensorboard_experiment_run_time_series_resources.rb b/libraries/google_vertex_ai_tensorboard_experiment_run_time_series_resources.rb index bc1527c73..4cdc6b187 100644 --- a/libraries/google_vertex_ai_tensorboard_experiment_run_time_series_resources.rb +++ b/libraries/google_vertex_ai_tensorboard_experiment_run_time_series_resources.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAITensorboardExperimentRunTimeSeriesResources < GcpResourceBase - name 'google_vertex_ai_tensorboard_experiment_run_time_series_resources' - desc 'TensorboardExperimentRunTimeSeriesResource plural resource' - supports platform: 'gcp' + name "google_vertex_ai_tensorboard_experiment_run_time_series_resources" + desc "TensorboardExperimentRunTimeSeriesResource plural resource" + supports platform: "gcp" attr_reader :table @@ -39,12 +39,12 @@ class VertexAITensorboardExperimentRunTimeSeriesResources < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('tensorboardTimeSeries') + @table = fetch_wrapped_resource("tensorboardTimeSeries") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -72,26 +72,26 @@ def transform(key, value) def transformers { - 'pluginName' => ->(obj) { [:plugin_name, obj['pluginName']] }, - 'pluginData' => ->(obj) { [:plugin_data, obj['pluginData']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'metadata' => ->(obj) { [:metadata, obj['metadata']] }, - 'valueType' => ->(obj) { [:value_type, obj['valueType']] }, + "pluginName" => ->(obj) { [:plugin_name, obj["pluginName"]] }, + "pluginData" => ->(obj) { [:plugin_data, obj["pluginData"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "metadata" => ->(obj) { [:metadata, obj["metadata"]] }, + "valueType" => ->(obj) { [:value_type, obj["valueType"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/timeSeries' + "{{parent}}/timeSeries" end end diff --git a/libraries/google_vertex_ai_tensorboard_experiment_runs.rb b/libraries/google_vertex_ai_tensorboard_experiment_runs.rb index ec8a71d13..fdcaf4614 100644 --- a/libraries/google_vertex_ai_tensorboard_experiment_runs.rb +++ b/libraries/google_vertex_ai_tensorboard_experiment_runs.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAITensorboardExperimentRuns < GcpResourceBase - name 'google_vertex_ai_tensorboard_experiment_runs' - desc 'TensorboardExperimentRun plural resource' - supports platform: 'gcp' + name "google_vertex_ai_tensorboard_experiment_runs" + desc "TensorboardExperimentRun plural resource" + supports platform: "gcp" attr_reader :table @@ -36,12 +36,12 @@ class VertexAITensorboardExperimentRuns < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('tensorboardRuns') + @table = fetch_wrapped_resource("tensorboardRuns") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -69,23 +69,23 @@ def transform(key, value) def transformers { - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'description' => ->(obj) { [:description, obj['description']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::TensorboardExperimentRunLabels.new(obj['labels'], to_s)] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'name' => ->(obj) { [:name, obj['name']] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::TensorboardExperimentRunLabels.new(obj["labels"], to_s)] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/runs' + "{{parent}}/runs" end end diff --git a/libraries/google_vertex_ai_tensorboards.rb b/libraries/google_vertex_ai_tensorboards.rb index f4a078039..9c7b45434 100644 --- a/libraries/google_vertex_ai_tensorboards.rb +++ b/libraries/google_vertex_ai_tensorboards.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAITensorboards < GcpResourceBase - name 'google_vertex_ai_tensorboards' - desc 'Tensorboard plural resource' - supports platform: 'gcp' + name "google_vertex_ai_tensorboards" + desc "Tensorboard plural resource" + supports platform: "gcp" attr_reader :table @@ -40,12 +40,12 @@ class VertexAITensorboards < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('tensorboards') + @table = fetch_wrapped_resource("tensorboards") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -73,27 +73,27 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { [:name, obj['name']] }, - 'isDefault' => ->(obj) { [:is_default, obj['isDefault']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::TensorboardLabels.new(obj['labels'], to_s)] }, - 'blobStoragePathPrefix' => ->(obj) { [:blob_storage_path_prefix, obj['blobStoragePathPrefix']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'runCount' => ->(obj) { [:run_count, obj['runCount']] }, - 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::TensorboardEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'description' => ->(obj) { [:description, obj['description']] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "isDefault" => ->(obj) { [:is_default, obj["isDefault"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::TensorboardLabels.new(obj["labels"], to_s)] }, + "blobStoragePathPrefix" => ->(obj) { [:blob_storage_path_prefix, obj["blobStoragePathPrefix"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "runCount" => ->(obj) { [:run_count, obj["runCount"]] }, + "encryptionSpec" => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::TensorboardEncryptionSpec.new(obj["encryptionSpec"], to_s)] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "description" => ->(obj) { [:description, obj["description"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/tensorboards' + "{{parent}}/tensorboards" end end diff --git a/libraries/google_vertex_ai_tensorboards_experiment.rb b/libraries/google_vertex_ai_tensorboards_experiment.rb index ddbe75e1b..b02055a8d 100644 --- a/libraries/google_vertex_ai_tensorboards_experiment.rb +++ b/libraries/google_vertex_ai_tensorboards_experiment.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/tensorboardsexperiment_labels' +require "gcp_backend" +require "google/vertexai/property/tensorboardsexperiment_labels" # A provider to manage Vertex AI resources. class VertexAITensorboardsExperiment < GcpResourceBase - name 'google_vertex_ai_tensorboards_experiment' - desc 'TensorboardsExperiment' - supports platform: 'gcp' + name "google_vertex_ai_tensorboards_experiment" + desc "TensorboardsExperiment" + supports platform: "gcp" attr_reader :params attr_reader :description @@ -35,19 +35,19 @@ class VertexAITensorboardsExperiment < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @description = @fetched['description'] - @source = @fetched['source'] - @display_name = @fetched['displayName'] - @create_time = @fetched['createTime'] - @update_time = @fetched['updateTime'] - @labels = GoogleInSpec::VertexAI::Property::TensorboardsExperimentLabels.new(@fetched['labels'], to_s) - @name = @fetched['name'] - @etag = @fetched['etag'] + @description = @fetched["description"] + @source = @fetched["source"] + @display_name = @fetched["displayName"] + @create_time = @fetched["createTime"] + @update_time = @fetched["updateTime"] + @labels = GoogleInSpec::VertexAI::Property::TensorboardsExperimentLabels.new(@fetched["labels"], to_s) + @name = @fetched["name"] + @etag = @fetched["etag"] end def exists? @@ -61,10 +61,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_tensorboards_experiments.rb b/libraries/google_vertex_ai_tensorboards_experiments.rb index b5ea7d63b..240e6f68b 100644 --- a/libraries/google_vertex_ai_tensorboards_experiments.rb +++ b/libraries/google_vertex_ai_tensorboards_experiments.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAITensorboardsExperiments < GcpResourceBase - name 'google_vertex_ai_tensorboards_experiments' - desc 'TensorboardsExperiment plural resource' - supports platform: 'gcp' + name "google_vertex_ai_tensorboards_experiments" + desc "TensorboardsExperiment plural resource" + supports platform: "gcp" attr_reader :table @@ -37,12 +37,12 @@ class VertexAITensorboardsExperiments < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('tensorboardExperiments') + @table = fetch_wrapped_resource("tensorboardExperiments") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -70,24 +70,24 @@ def transform(key, value) def transformers { - 'description' => ->(obj) { [:description, obj['description']] }, - 'source' => ->(obj) { [:source, obj['source']] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::TensorboardsExperimentLabels.new(obj['labels'], to_s)] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'etag' => ->(obj) { [:etag, obj['etag']] }, + "description" => ->(obj) { [:description, obj["description"]] }, + "source" => ->(obj) { [:source, obj["source"]] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::TensorboardsExperimentLabels.new(obj["labels"], to_s)] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "etag" => ->(obj) { [:etag, obj["etag"]] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/experiments' + "{{parent}}/experiments" end end diff --git a/libraries/google_vertex_ai_training_pipeline.rb b/libraries/google_vertex_ai_training_pipeline.rb index 641d4ffac..3abafa0c2 100644 --- a/libraries/google_vertex_ai_training_pipeline.rb +++ b/libraries/google_vertex_ai_training_pipeline.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,55 +13,55 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/vertexai/property/trainingpipeline_encryption_spec' -require 'google/vertexai/property/trainingpipeline_error' -require 'google/vertexai/property/trainingpipeline_input_data_config' -require 'google/vertexai/property/trainingpipeline_input_data_config_bigquery_destination' -require 'google/vertexai/property/trainingpipeline_input_data_config_filter_split' -require 'google/vertexai/property/trainingpipeline_input_data_config_fraction_split' -require 'google/vertexai/property/trainingpipeline_input_data_config_gcs_destination' -require 'google/vertexai/property/trainingpipeline_input_data_config_predefined_split' -require 'google/vertexai/property/trainingpipeline_input_data_config_stratified_split' -require 'google/vertexai/property/trainingpipeline_input_data_config_timestamp_split' -require 'google/vertexai/property/trainingpipeline_labels' -require 'google/vertexai/property/trainingpipeline_model_to_upload' -require 'google/vertexai/property/trainingpipeline_model_to_upload_container_spec' -require 'google/vertexai/property/trainingpipeline_model_to_upload_container_spec_env' -require 'google/vertexai/property/trainingpipeline_model_to_upload_container_spec_ports' -require 'google/vertexai/property/trainingpipeline_model_to_upload_deployed_models' -require 'google/vertexai/property/trainingpipeline_model_to_upload_encryption_spec' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_inputs' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_outputs' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source_gcs_source' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_sampled_shapley_attribution' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_blur_baseline_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' -require 'google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' -require 'google/vertexai/property/trainingpipeline_model_to_upload_labels' -require 'google/vertexai/property/trainingpipeline_model_to_upload_model_source_info' -require 'google/vertexai/property/trainingpipeline_model_to_upload_original_model_info' -require 'google/vertexai/property/trainingpipeline_model_to_upload_predict_schemata' -require 'google/vertexai/property/trainingpipeline_model_to_upload_supported_export_formats' +require "gcp_backend" +require "google/vertexai/property/trainingpipeline_encryption_spec" +require "google/vertexai/property/trainingpipeline_error" +require "google/vertexai/property/trainingpipeline_input_data_config" +require "google/vertexai/property/trainingpipeline_input_data_config_bigquery_destination" +require "google/vertexai/property/trainingpipeline_input_data_config_filter_split" +require "google/vertexai/property/trainingpipeline_input_data_config_fraction_split" +require "google/vertexai/property/trainingpipeline_input_data_config_gcs_destination" +require "google/vertexai/property/trainingpipeline_input_data_config_predefined_split" +require "google/vertexai/property/trainingpipeline_input_data_config_stratified_split" +require "google/vertexai/property/trainingpipeline_input_data_config_timestamp_split" +require "google/vertexai/property/trainingpipeline_labels" +require "google/vertexai/property/trainingpipeline_model_to_upload" +require "google/vertexai/property/trainingpipeline_model_to_upload_container_spec" +require "google/vertexai/property/trainingpipeline_model_to_upload_container_spec_env" +require "google/vertexai/property/trainingpipeline_model_to_upload_container_spec_ports" +require "google/vertexai/property/trainingpipeline_model_to_upload_deployed_models" +require "google/vertexai/property/trainingpipeline_model_to_upload_encryption_spec" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_inputs" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_metadata_outputs" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_example_gcs_source_gcs_source" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_examples_presets" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_sampled_shapley_attribution" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_blur_baseline_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma" +require "google/vertexai/property/trainingpipeline_model_to_upload_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma" +require "google/vertexai/property/trainingpipeline_model_to_upload_labels" +require "google/vertexai/property/trainingpipeline_model_to_upload_model_source_info" +require "google/vertexai/property/trainingpipeline_model_to_upload_original_model_info" +require "google/vertexai/property/trainingpipeline_model_to_upload_predict_schemata" +require "google/vertexai/property/trainingpipeline_model_to_upload_supported_export_formats" # A provider to manage Vertex AI resources. class VertexAITrainingPipeline < GcpResourceBase - name 'google_vertex_ai_training_pipeline' - desc 'TrainingPipeline' - supports platform: 'gcp' + name "google_vertex_ai_training_pipeline" + desc "TrainingPipeline" + supports platform: "gcp" attr_reader :params attr_reader :end_time @@ -85,28 +85,28 @@ class VertexAITrainingPipeline < GcpResourceBase def initialize(params) super(params.merge({ use_http_transport: true })) @params = params - @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get') + @fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, "Get") parse unless @fetched.nil? end def parse - @end_time = @fetched['endTime'] - @error = GoogleInSpec::VertexAI::Property::TrainingPipelineError.new(@fetched['error'], to_s) - @display_name = @fetched['displayName'] - @name = @fetched['name'] - @input_data_config = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfig.new(@fetched['inputDataConfig'], to_s) - @parent_model = @fetched['parentModel'] - @update_time = @fetched['updateTime'] - @state = @fetched['state'] - @labels = GoogleInSpec::VertexAI::Property::TrainingPipelineLabels.new(@fetched['labels'], to_s) - @training_task_definition = @fetched['trainingTaskDefinition'] - @start_time = @fetched['startTime'] - @create_time = @fetched['createTime'] - @training_task_metadata = @fetched['trainingTaskMetadata'] - @training_task_inputs = @fetched['trainingTaskInputs'] - @model_id = @fetched['modelId'] - @encryption_spec = GoogleInSpec::VertexAI::Property::TrainingPipelineEncryptionSpec.new(@fetched['encryptionSpec'], to_s) - @model_to_upload = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUpload.new(@fetched['modelToUpload'], to_s) + @end_time = @fetched["endTime"] + @error = GoogleInSpec::VertexAI::Property::TrainingPipelineError.new(@fetched["error"], to_s) + @display_name = @fetched["displayName"] + @name = @fetched["name"] + @input_data_config = GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfig.new(@fetched["inputDataConfig"], to_s) + @parent_model = @fetched["parentModel"] + @update_time = @fetched["updateTime"] + @state = @fetched["state"] + @labels = GoogleInSpec::VertexAI::Property::TrainingPipelineLabels.new(@fetched["labels"], to_s) + @training_task_definition = @fetched["trainingTaskDefinition"] + @start_time = @fetched["startTime"] + @create_time = @fetched["createTime"] + @training_task_metadata = @fetched["trainingTaskMetadata"] + @training_task_inputs = @fetched["trainingTaskInputs"] + @model_id = @fetched["modelId"] + @encryption_spec = GoogleInSpec::VertexAI::Property::TrainingPipelineEncryptionSpec.new(@fetched["encryptionSpec"], to_s) + @model_to_upload = GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUpload.new(@fetched["modelToUpload"], to_s) end def exists? @@ -120,10 +120,10 @@ def to_s private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{name}}' + "{{name}}" end end diff --git a/libraries/google_vertex_ai_training_pipelines.rb b/libraries/google_vertex_ai_training_pipelines.rb index cb44e1d89..070908e94 100644 --- a/libraries/google_vertex_ai_training_pipelines.rb +++ b/libraries/google_vertex_ai_training_pipelines.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false + # ---------------------------------------------------------------------------- # @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'gcp_backend' +require "gcp_backend" class VertexAITrainingPipelines < GcpResourceBase - name 'google_vertex_ai_training_pipelines' - desc 'TrainingPipeline plural resource' - supports platform: 'gcp' + name "google_vertex_ai_training_pipelines" + desc "TrainingPipeline plural resource" + supports platform: "gcp" attr_reader :table @@ -46,12 +46,12 @@ class VertexAITrainingPipelines < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('trainingPipelines') + @table = fetch_wrapped_resource("trainingPipelines") end def fetch_wrapped_resource(wrap_path) # fetch_resource returns an array of responses (to handle pagination) - result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + result = @connection.fetch_all(product_url, resource_base_url, @params, "Get") return if result.nil? # Conversion of string -> object hash to symbol -> object hash that InSpec needs @@ -79,33 +79,33 @@ def transform(key, value) def transformers { - 'endTime' => ->(obj) { [:end_time, obj['endTime']] }, - 'error' => ->(obj) { [:error, GoogleInSpec::VertexAI::Property::TrainingPipelineError.new(obj['error'], to_s)] }, - 'displayName' => ->(obj) { [:display_name, obj['displayName']] }, - 'name' => ->(obj) { [:name, obj['name']] }, - 'inputDataConfig' => ->(obj) { [:input_data_config, GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfig.new(obj['inputDataConfig'], to_s)] }, - 'parentModel' => ->(obj) { [:parent_model, obj['parentModel']] }, - 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'state' => ->(obj) { [:state, obj['state']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::TrainingPipelineLabels.new(obj['labels'], to_s)] }, - 'trainingTaskDefinition' => ->(obj) { [:training_task_definition, obj['trainingTaskDefinition']] }, - 'startTime' => ->(obj) { [:start_time, obj['startTime']] }, - 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, - 'trainingTaskMetadata' => ->(obj) { [:training_task_metadata, obj['trainingTaskMetadata']] }, - 'trainingTaskInputs' => ->(obj) { [:training_task_inputs, obj['trainingTaskInputs']] }, - 'modelId' => ->(obj) { [:model_id, obj['modelId']] }, - 'encryptionSpec' => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::TrainingPipelineEncryptionSpec.new(obj['encryptionSpec'], to_s)] }, - 'modelToUpload' => ->(obj) { [:model_to_upload, GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUpload.new(obj['modelToUpload'], to_s)] }, + "endTime" => ->(obj) { [:end_time, obj["endTime"]] }, + "error" => ->(obj) { [:error, GoogleInSpec::VertexAI::Property::TrainingPipelineError.new(obj["error"], to_s)] }, + "displayName" => ->(obj) { [:display_name, obj["displayName"]] }, + "name" => ->(obj) { [:name, obj["name"]] }, + "inputDataConfig" => ->(obj) { [:input_data_config, GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfig.new(obj["inputDataConfig"], to_s)] }, + "parentModel" => ->(obj) { [:parent_model, obj["parentModel"]] }, + "updateTime" => ->(obj) { [:update_time, obj["updateTime"]] }, + "state" => ->(obj) { [:state, obj["state"]] }, + "labels" => ->(obj) { [:labels, GoogleInSpec::VertexAI::Property::TrainingPipelineLabels.new(obj["labels"], to_s)] }, + "trainingTaskDefinition" => ->(obj) { [:training_task_definition, obj["trainingTaskDefinition"]] }, + "startTime" => ->(obj) { [:start_time, obj["startTime"]] }, + "createTime" => ->(obj) { [:create_time, obj["createTime"]] }, + "trainingTaskMetadata" => ->(obj) { [:training_task_metadata, obj["trainingTaskMetadata"]] }, + "trainingTaskInputs" => ->(obj) { [:training_task_inputs, obj["trainingTaskInputs"]] }, + "modelId" => ->(obj) { [:model_id, obj["modelId"]] }, + "encryptionSpec" => ->(obj) { [:encryption_spec, GoogleInSpec::VertexAI::Property::TrainingPipelineEncryptionSpec.new(obj["encryptionSpec"], to_s)] }, + "modelToUpload" => ->(obj) { [:model_to_upload, GoogleInSpec::VertexAI::Property::TrainingPipelineModelToUpload.new(obj["modelToUpload"], to_s)] }, } end private def product_url(_ = nil) - 'https://{{region}}-aiplatform.googleapis.com/v1/' + "https://{{region}}-aiplatform.googleapis.com/v1/" end def resource_base_url - '{{parent}}/trainingPipelines' + "{{parent}}/trainingPipelines" end end