diff --git a/CHANGELOG.md b/CHANGELOG.md index cb4021c1d..22c89b210 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,36 @@ # Change Log - + +## [v1.11.59](https://github.com/inspec/inspec-gcp/tree/v1.11.59) (2023-12-08) + +#### Merged Pull Requests +- Removed worng dir [#551](https://github.com/inspec/inspec-gcp/pull/551) ([sa-progress](https://github.com/sa-progress)) + + +## [v1.11.58](https://github.com/inspec/inspec-gcp/tree/v1.11.58) (2023-12-08) + +#### Merged Pull Requests +- CHEF-7364-MAGIC-MODULE-composer-Projects__locations__environment - Resource Implementation [#546](https://github.com/inspec/inspec-gcp/pull/546) ([sa-progress](https://github.com/sa-progress)) + +## [v1.11.57](https://github.com/inspec/inspec-gcp/tree/v1.11.57) (2023-12-06) + +#### Merged Pull Requests +- chore: uncomment terraform scripts [#549](https://github.com/inspec/inspec-gcp/pull/549) ([ahasunos](https://github.com/ahasunos)) + +## [v1.11.56](https://github.com/inspec/inspec-gcp/tree/v1.11.56) (2023-12-06) + +#### Merged Pull Requests +- CHEF-7369 Updated dataproc_cluster resource [#545](https://github.com/inspec/inspec-gcp/pull/545) ([Nik08](https://github.com/Nik08)) + +## [v1.11.55](https://github.com/inspec/inspec-gcp/tree/v1.11.55) (2023-12-05) + +#### Merged Pull Requests +- Chore: Remove redundant `return` statement to fix rubocop 1.58.0 lint offense [#548](https://github.com/inspec/inspec-gcp/pull/548) ([ahasunos](https://github.com/ahasunos)) + ## [v1.11.54](https://github.com/inspec/inspec-gcp/tree/v1.11.54) (2023-12-01) #### Merged Pull Requests - CHEF-7355-MAGIC-MODULE-apigee-Organization - Resource Implementation [#541](https://github.com/inspec/inspec-gcp/pull/541) ([sa-progress](https://github.com/sa-progress)) - ## [v1.11.53](https://github.com/inspec/inspec-gcp/tree/v1.11.53) (2023-11-29) diff --git a/README.md b/README.md index e9dde7920..d8d840848 100644 --- a/README.md +++ b/README.md @@ -197,6 +197,7 @@ The following resources are available in the InSpec GCP Profile | [google_access_context_manager_access_level](docs/resources/google_access_context_manager_access_level.md) | [google_access_context_manager_access_levels](docs/resources/google_access_context_manager_access_levels.md) | | [google_access_context_manager_access_policy](docs/resources/google_access_context_manager_access_policy.md) | [google_access_context_manager_access_policies](docs/resources/google_access_context_manager_access_policies.md) | | [google_access_context_manager_service_perimeter](docs/resources/google_access_context_manager_service_perimeter.md) | [google_access_context_manager_service_perimeters](docs/resources/google_access_context_manager_service_perimeters.md) | +| [google_apigee_organization_envgroup_attachment](docs/resources/google_apigee_organization_envgroup_attachment.md) | [google_apigee_organization_envgroup_attachments](docs/resources/google_apigee_organization_envgroup_attachments.md) | | [google_appengine_standard_app_version](docs/resources/google_appengine_standard_app_version.md) | [google_appengine_standard_app_versions](docs/resources/google_appengine_standard_app_versions.md) | | [google_bigquery_dataset](docs/resources/google_bigquery_dataset.md) | [google_bigquery_datasets](docs/resources/google_bigquery_datasets.md) | | [google_bigquery_table](docs/resources/google_bigquery_table.md) | [google_bigquery_tables](docs/resources/google_bigquery_tables.md) | @@ -373,6 +374,7 @@ The following resources are available in the InSpec GCP Profile | [google_vertex_ai_tensorboard_experiment_run](docs/resources/google_vertex_ai_tensorboard_experiment_run.md) | [google_vertex_ai_tensorboard_experiment_runs](docs/resources/google_vertex_ai_tensorboard_experiment_runs.md) | | [google_vertex_ai_tensorboard_experiment_run_time_series_resource](docs/resources/google_vertex_ai_tensorboard_experiment_run_time_series_resource.md) | [google_vertex_ai_tensorboard_experiment_run_time_series_resources](docs/resources/google_vertex_ai_tensorboard_experiment_run_time_series_resources.md) | | [google_vertex_ai_training_pipeline](docs/resources/google_vertex_ai_training_pipeline.md) | [google_vertex_ai_training_pipelines](docs/resources/google_vertex_ai_training_pipelines.md) | +| [google_composer_project_location_environment](docs/resources/google_composer_project_location_environment.md) | [google_composer_project_location_environments](docs/resources/google_composer_project_location_environment.md) | ## Examples diff --git a/VERSION b/VERSION index 1027fe014..5cd337349 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.11.54 \ No newline at end of file +1.11.59 \ No newline at end of file diff --git a/build/inspec/Gemfile b/build/inspec/Gemfile deleted file mode 100644 index 1af5bd5d6..000000000 --- a/build/inspec/Gemfile +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -source 'https://rubygems.org' - -gem 'bundle' -gem 'faraday', '>= 0.16.2' -gem 'google-api-client' -gem 'googleauth' -gem 'google-cloud' -gem 'inifile' -gem 'inspec-bin', '4.16.0' -gem 'rubocop', '>= 0.77.0' - -group :development do - gem 'github_changelog_generator' - gem 'pry-coolline' - gem 'rake' - gem 'vcr' - gem 'webmock' -end diff --git a/build/inspec/build/inspec/test/integration/build/gcp-mm.tf b/build/inspec/build/inspec/test/integration/build/gcp-mm.tf deleted file mode 100644 index f86c2ac7c..000000000 --- a/build/inspec/build/inspec/test/integration/build/gcp-mm.tf +++ /dev/null @@ -1,1347 +0,0 @@ -#variable "ssl_policy" { -# type = any -#} -# -#variable "topic" { -# type = any -#} -# -#variable "subscription" { -# type = any -#} -# -#variable "managed_zone" { -# type = any -#} -# -#variable "record_set" { -# type = any -#} -# -#variable "instance_group_manager" { -# type = any -#} -# -#variable "autoscaler" { -# type = any -#} -# -#variable "target_pool" { -# type = any -#} -# -#variable "trigger" { -# type = any -#} -# -#variable "health_check" { -# type = any -#} -# -#variable "backend_service" { -# type = any -#} -# -#variable "http_health_check" { -# type = any -#} -# -#variable "https_health_check" { -# type = any -#} -# -#variable "instance_template" { -# type = any -#} -# -#variable "global_address" { -# type = any -#} -# -#variable "url_map" { -# type = any -#} -# -#variable "http_proxy" { -# type = any -#} -# -#variable "global_forwarding_rule" { -# type = any -#} -# -#variable "target_tcp_proxy" { -# type = any -#} -# -#variable "route" { -# type = any -#} -# -#variable "router" { -# type = any -#} -# -#variable "snapshot" { -# type = any -#} -# -#variable "https_proxy" { -# type = any -#} -# -#variable "ssl_certificate" { -# type = any -#} -# -#variable "dataset" { -# type = any -#} -# -#variable "bigquery_table" { -# type = any -#} -# -#variable "repository" { -# type = any -#} -# -#variable "folder" { -# type = any -#} -# -#variable "gcp_organization_id" { -# type = string -# default = "none" -#} -# -#variable "cloudfunction" { -# type = any -#} -# -#variable "backend_bucket" { -# type = any -#} -# -#variable "gcp_cloud_function_region" {} -# -#variable "regional_node_pool" { -# type = any -#} -# -#variable "region_backend_service_health_check" { -# type = any -#} -# -#variable "region_backend_service" { -# type = any -#} -# -#variable "org_sink" { -# type = any -#} -# -#variable "standardappversion" { -# type = any -#} -# -#variable "ml_model" { -# type = any -#} -# -#variable "dataproc_cluster" { -# type = any -#} -# -#variable "folder_exclusion" { -# type = any -#} -# -#variable "filestore_instance" { -# type = any -#} -# -#variable "folder_sink" { -# type = any -#} -# -#variable "runtimeconfig_config" { -# type = any -#} -# -#variable "runtimeconfig_variable" { -# type = any -#} -# -#variable "redis" { -# type = any -#} -# -#variable "network_endpoint_group" { -# type = any -#} -# -#variable "node_template" { -# type = any -#} -# -#variable "node_group" { -# type = any -#} -# -#variable "router_nat" { -# type = any -#} -# -#variable "service" { -# type = any -#} -# -#variable "spannerinstance" { -# type = any -#} -# -#variable "spannerdatabase" { -# type = any -#} -# -#variable "scheduler_job" { -# type = any -#} -# -# -#resource "google_compute_ssl_policy" "custom-ssl-policy" { -# name = var.ssl_policy["name"] -# min_tls_version = var.ssl_policy["min_tls_version"] -# profile = var.ssl_policy["profile"] -# custom_features = [var.ssl_policy["custom_feature"], var.ssl_policy["custom_feature2"]] -# project = var.gcp_project_id -#} -# -#resource "google_pubsub_topic" "topic" { -# project = var.gcp_project_id -# name = var.topic["name"] -#} -# -#resource "google_pubsub_subscription" "default" { -# project = var.gcp_project_id -# name = var.subscription["name"] -# topic = google_pubsub_topic.topic.name -# ack_deadline_seconds = var.subscription["ack_deadline_seconds"] -#} -# -#resource "google_dns_managed_zone" "prod" { -# name = var.managed_zone["name"] -# dns_name = var.managed_zone["dns_name"] -# description = var.managed_zone["description"] -# -# labels = { -# key = var.managed_zone["label_value"] -# } -# project = var.gcp_project_id -#} -# -#resource "google_dns_record_set" "a" { -# name = var.record_set["name"] -# managed_zone = google_dns_managed_zone.prod.name -# type = var.record_set["type"] -# ttl = var.record_set["ttl"] -# -# rrdatas = [var.record_set["rrdatas1"], var.record_set["rrdatas2"]] -# project = var.gcp_project_id -#} -# -#resource "google_compute_instance_group_manager" "gcp-inspec-igm" { -# project = var.gcp_project_id -# zone = var.gcp_zone -# name = var.instance_group_manager["name"] -# version { -# instance_template = google_compute_instance_template.default.self_link -# } -# base_instance_name = var.instance_group_manager["base_instance_name"] -# target_pools = [] -# target_size = 0 -# named_port { -# name = var.instance_group_manager["named_port_name"] -# port = var.instance_group_manager["named_port_port"] -# } -#} -# -#resource "google_compute_autoscaler" "gcp-inspec-autoscaler" { -# project = var.gcp_project_id -# name = var.autoscaler["name"] -# zone = var.gcp_zone -# target = google_compute_instance_group_manager.gcp-inspec-igm.self_link -# -# autoscaling_policy { -# max_replicas = var.autoscaler["max_replicas"] -# min_replicas = var.autoscaler["min_replicas"] -# cooldown_period = var.autoscaler["cooldown_period"] -# -# cpu_utilization { -# target = var.autoscaler["cpu_utilization_target"] -# } -# } -#} -# -#resource "google_compute_target_pool" "gcp-inspec-target-pool" { -# project = var.gcp_project_id -# name = var.target_pool["name"] -# session_affinity = var.target_pool["session_affinity"] -# -# instances = [ -# "${var.gcp_zone}/${var.gcp_ext_vm_name}", -# ] -#} -# -#resource "google_cloudbuild_trigger" "gcp-inspec-cloudbuild-trigger" { -# project = var.gcp_project_id -# trigger_template { -# branch_name = var.trigger["trigger_template_branch"] -# project_id = var.trigger["trigger_template_project"] -# repo_name = var.trigger["trigger_template_repo"] -# } -# filename = var.trigger["filename"] -#} -# -#resource "google_compute_health_check" "gcp-inspec-health-check" { -# project = var.gcp_project_id -# name = var.health_check["name"] -# -# timeout_sec = var.health_check["timeout_sec"] -# check_interval_sec = var.health_check["check_interval_sec"] -# -# tcp_health_check { -# port = var.health_check["tcp_health_check_port"] -# } -#} -# -#resource "google_compute_backend_service" "gcp-inspec-backend-service" { -# project = var.gcp_project_id -# name = var.backend_service["name"] -# description = var.backend_service["description"] -# port_name = var.backend_service["port_name"] -# protocol = var.backend_service["protocol"] -# timeout_sec = var.backend_service["timeout_sec"] -# enable_cdn = var.backend_service["enable_cdn"] -# -# backend { -# group = google_compute_instance_group_manager.gcp-inspec-igm.instance_group -# } -# -# health_checks = [google_compute_health_check.gcp-inspec-health-check.self_link] -#} -# -#resource "google_compute_health_check" "gcp-inspec-region-backend-service-hc" { -# project = var.gcp_project_id -# name = var.region_backend_service_health_check["name"] -# -# timeout_sec = var.region_backend_service_health_check["timeout_sec"] -# check_interval_sec = var.region_backend_service_health_check["check_interval_sec"] -# -# tcp_health_check { -# port = var.region_backend_service_health_check["tcp_health_check_port"] -# } -#} -# -#resource "google_compute_region_backend_service" "gcp-inspec-region-backend-service" { -# project = var.gcp_project_id -# region = var.gcp_location -# name = var.region_backend_service["name"] -# description = var.region_backend_service["description"] -# protocol = var.region_backend_service["protocol"] -# timeout_sec = var.region_backend_service["timeout_sec"] -# -# health_checks = [google_compute_health_check.gcp-inspec-region-backend-service-hc.self_link] -#} -# -#resource "google_compute_http_health_check" "gcp-inspec-http-health-check" { -# project = var.gcp_project_id -# name = var.http_health_check["name"] -# request_path = var.http_health_check["request_path"] -# -# timeout_sec = var.http_health_check["timeout_sec"] -# check_interval_sec = var.http_health_check["check_interval_sec"] -#} -# -#resource "google_compute_https_health_check" "gcp-inspec-https-health-check" { -# project = var.gcp_project_id -# name = var.https_health_check["name"] -# request_path = var.https_health_check["request_path"] -# -# timeout_sec = var.https_health_check["timeout_sec"] -# check_interval_sec = var.https_health_check["check_interval_sec"] -# unhealthy_threshold = var.https_health_check["unhealthy_threshold"] -#} -# -#resource "google_compute_instance_template" "gcp-inspec-instance-template" { -# project = var.gcp_project_id -# name = var.instance_template["name"] -# description = var.instance_template["description"] -# -# tags = [var.instance_template["tag"]] -# -# instance_description = var.instance_template["instance_description"] -# machine_type = var.instance_template["machine_type"] -# can_ip_forward = var.instance_template["can_ip_forward"] -# -# scheduling { -# automatic_restart = var.instance_template["scheduling_automatic_restart"] -# on_host_maintenance = var.instance_template["scheduling_on_host_maintenance"] -# } -# -# // Create a new boot disk from an image -# disk { -# source_image = var.instance_template["disk_source_image"] -# auto_delete = var.instance_template["disk_auto_delete"] -# boot = var.instance_template["disk_boot"] -# } -# -# network_interface { -# network = var.instance_template["network_interface_network"] -# } -# -# service_account { -# scopes = [var.instance_template["service_account_scope"]] -# } -#} -# -#resource "google_compute_global_address" "gcp-inspec-global-address" { -# project = var.gcp_project_id -# name = var.global_address["name"] -# ip_version = var.global_address["ip_version"] -#} -# -#resource "google_compute_url_map" "gcp-inspec-url-map" { -# project = var.gcp_project_id -# name = var.url_map["name"] -# description = var.url_map["description"] -# -# default_service = google_compute_backend_service.gcp-inspec-backend-service.self_link -# -# host_rule { -# hosts = [var.url_map["host_rule_host"]] -# path_matcher = var.url_map["path_matcher_name"] -# } -# -# path_matcher { -# name = var.url_map["path_matcher_name"] -# default_service = google_compute_backend_service.gcp-inspec-backend-service.self_link -# -# path_rule { -# paths = [var.url_map["path_rule_path"]] -# service = google_compute_backend_service.gcp-inspec-backend-service.self_link -# } -# } -# -# test { -# service = google_compute_backend_service.gcp-inspec-backend-service.self_link -# host = var.url_map["test_host"] -# path = var.url_map["test_path"] -# } -#} -# -#resource "google_compute_target_http_proxy" "gcp-inspec-http-proxy" { -# project = var.gcp_project_id -# name = var.http_proxy["name"] -# url_map = google_compute_url_map.gcp-inspec-url-map.self_link -# description = var.http_proxy["description"] -#} -# -#resource "google_compute_global_forwarding_rule" "gcp-inspec-global-forwarding-rule" { -# project = var.gcp_project_id -# name = var.global_forwarding_rule["name"] -# target = google_compute_target_http_proxy.gcp-inspec-http-proxy.self_link -# port_range = var.global_forwarding_rule["port_range"] -#} -# -#resource "google_compute_backend_service" "gcp-inspec-tcp-backend-service" { -# project = var.gcp_project_id -# name = var.target_tcp_proxy["tcp_backend_service_name"] -# protocol = "TCP" -# timeout_sec = 10 -# -# health_checks = [google_compute_health_check.gcp-inspec-health-check.self_link] -#} -# -#resource "google_compute_target_tcp_proxy" "gcp-inspec-target-tcp-proxy" { -# project = var.gcp_project_id -# name = var.target_tcp_proxy["name"] -# proxy_header = var.target_tcp_proxy["proxy_header"] -# backend_service = google_compute_backend_service.gcp-inspec-tcp-backend-service.self_link -#} -# -#resource "google_compute_route" "gcp-inspec-route" { -# project = var.gcp_project_id -# name = var.route["name"] -# dest_range = var.route["dest_range"] -# network = google_compute_network.inspec-gcp-network.name -# next_hop_ip = var.route["next_hop_ip"] -# priority = var.route["priority"] -# # google_compute_route depends on next_hop_ip belonging to a subnetwork -# # of the named network in this block. Since inspec-gcp-network does not -# # automatically create subnetworks, we need to create a dependency so -# # the route is not created before the subnetwork -# depends_on = [google_compute_subnetwork.inspec-gcp-subnetwork] -#} -# -#resource "google_compute_router" "gcp-inspec-router" { -# project = var.gcp_project_id -# name = var.router["name"] -# network = google_compute_network.inspec-gcp-network.name -# bgp { -# asn = var.router["bgp_asn"] -# advertise_mode = var.router["bgp_advertise_mode"] -# advertised_groups = [var.router["bgp_advertised_group"]] -# advertised_ip_ranges { -# range = var.router["bgp_advertised_ip_range1"] -# } -# advertised_ip_ranges { -# range = var.router["bgp_advertised_ip_range2"] -# } -# } -#} -# -#resource "google_compute_disk" "snapshot-disk" { -# project = var.gcp_project_id -# name = var.snapshot["disk_name"] -# type = var.snapshot["disk_type"] -# zone = var.gcp_zone -# image = var.snapshot["disk_image"] -# labels = { -# environment = "generic_compute_disk_label" -# } -#} -# -#resource "google_compute_snapshot" "gcp-inspec-snapshot" { -# project = var.gcp_project_id -# name = var.snapshot["name"] -# source_disk = google_compute_disk.snapshot-disk.name -# zone = var.gcp_zone -#} -# -#resource "google_compute_ssl_certificate" "gcp-inspec-ssl-certificate" { -# project = var.gcp_project_id -# name = var.ssl_certificate["name"] -# private_key = var.ssl_certificate["private_key"] -# certificate = var.ssl_certificate["certificate"] -# description = var.ssl_certificate["description"] -#} -# -#resource "google_compute_target_https_proxy" "gcp-inspec-https-proxy" { -# project = var.gcp_project_id -# name = var.https_proxy["name"] -# url_map = google_compute_url_map.gcp-inspec-url-map.self_link -# description = var.https_proxy["description"] -# ssl_certificates = [google_compute_ssl_certificate.gcp-inspec-ssl-certificate.self_link] -#} -# -#resource "google_bigquery_dataset" "gcp-inspec-dataset" { -# project = var.gcp_project_id -# dataset_id = var.dataset["dataset_id"] -# friendly_name = var.dataset["friendly_name"] -# description = var.dataset["description"] -# location = var.dataset["location"] -# default_table_expiration_ms = var.dataset["default_table_expiration_ms"] -# -# access { -# role = var.dataset["access_writer_role"] -# special_group = var.dataset["access_writer_special_group"] -# } -# -# access { -# role = "OWNER" -# special_group = "projectOwners" -# } -#} -# -#resource "google_bigquery_table" "gcp-inspec-bigquery-table" { -# project = var.gcp_project_id -# dataset_id = google_bigquery_dataset.gcp-inspec-dataset.dataset_id -# table_id = var.bigquery_table["table_id"] -# -# time_partitioning { -# type = var.bigquery_table["time_partitioning_type"] -# } -# -# description = var.bigquery_table["description"] -# expiration_time = var.bigquery_table["expiration_time"] -#} -# -#resource "google_sourcerepo_repository" "gcp-inspec-sourcerepo-repository" { -# project = var.gcp_project_id -# name = var.repository["name"] -#} -# -#resource "google_folder" "inspec-gcp-folder" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# display_name = var.folder["display_name"] -# parent = "organizations/${var.gcp_organization_id}" -#} -# -#resource "google_storage_bucket_object" "archive" { -# name = "index.js.zip" -# bucket = google_storage_bucket.generic-storage-bucket.name -# source = "../configuration/index.js.zip" -#} -# -#resource "google_cloudfunctions_function" "function" { -# project = var.gcp_project_id -# region = var.gcp_cloud_function_region -# name = var.cloudfunction["name"] -# description = var.cloudfunction["description"] -# available_memory_mb = var.cloudfunction["available_memory_mb"] -# source_archive_bucket = google_storage_bucket.generic-storage-bucket.name -# source_archive_object = google_storage_bucket_object.archive.name -# trigger_http = var.cloudfunction["trigger_http"] -# timeout = var.cloudfunction["timeout"] -# entry_point = var.cloudfunction["entry_point"] -# runtime = "nodejs8" -# -# environment_variables = { -# MY_ENV_VAR = var.cloudfunction["env_var_value"] -# } -#} -# -#resource "google_compute_backend_bucket" "image_backend" { -# project = var.gcp_project_id -# name = var.backend_bucket["name"] -# description = var.backend_bucket["description"] -# bucket_name = google_storage_bucket.generic-storage-bucket.name -# enable_cdn = var.backend_bucket["enable_cdn"] -#} -# -#resource "google_container_node_pool" "inspec-gcp-node-pool" { -# project = var.gcp_project_id -# name = var.regional_node_pool["name"] -# location = google_container_cluster.primary.location -# cluster = google_container_cluster.primary.name -# node_count = var.regional_node_pool["node_count"] -#} -# -#resource "google_logging_organization_sink" "my-sink" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# name = var.org_sink.name -# org_id = var.gcp_organization_id -# -# # Can export to pubsub, cloud storage, or bigquery -# destination = "storage.googleapis.com/${google_storage_bucket.generic-storage-bucket.name}" -# -# # Log all WARN or higher severity messages relating to instances -# filter = var.org_sink.filter -#} -# -#variable "project_sink" { -# type = any -#} -# -#resource "google_logging_project_sink" "project-logging-sink" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# project = var.gcp_project_id -# -# name = var.project_sink.name -# destination = "storage.googleapis.com/${google_storage_bucket.project-logging-bucket[0].name}" -# -# filter = var.project_sink.filter -# -# unique_writer_identity = true -#} -# -#resource "google_storage_bucket" "bucket" { -# name = "inspec-gcp-static-${var.gcp_project_id}" -# project = var.gcp_project_id -# location = var.gcp_location -# force_destroy = true -# -# labels = { -# "key" = "value" -# } -# -# retention_policy { -# retention_period = 1000 -# } -#} -# -#resource "google_storage_bucket_object" "object" { -# name = "hello-world.zip" -# bucket = google_storage_bucket.bucket.name -# source = "../configuration/hello-world.zip" -#} -# -#resource "google_app_engine_standard_app_version" "default" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# project = var.gcp_project_id -# version_id = var.standardappversion["version_id"] -# service = var.standardappversion["service"] -# runtime = var.standardappversion["runtime"] -# noop_on_destroy = true -# entrypoint { -# shell = var.standardappversion["entrypoint"] -# } -# -# deployment { -# zip { -# source_url = "https://storage.googleapis.com/${google_storage_bucket.bucket.name}/hello-world.zip" -# } -# } -# -# env_variables = { -# port = var.standardappversion["port"] -# } -#} -# -#resource "google_ml_engine_model" "inspec-gcp-model" { -# project = var.gcp_project_id -# name = var.ml_model["name"] -# description = var.ml_model["description"] -# regions = [var.ml_model["region"]] -# online_prediction_logging = var.ml_model["online_prediction_logging"] -# online_prediction_console_logging = var.ml_model["online_prediction_console_logging"] -#} -# -#resource "google_compute_firewall" "dataproc" { -# project = var.gcp_project_id -# name = "dataproc-firewall" -# network = google_compute_network.dataproc.name -# -# source_ranges = ["10.128.0.0/9"] -# allow { -# protocol = "icmp" -# } -# -# allow { -# protocol = "tcp" -# ports = ["0-65535"] -# } -# allow { -# protocol = "udp" -# ports = ["0-65535"] -# } -#} -# -#resource "google_compute_network" "dataproc" { -# project = var.gcp_project_id -# name = "dataproc-network" -#} -# -#resource "google_dataproc_cluster" "mycluster" { -# project = var.gcp_project_id -# region = var.gcp_location -# name = var.dataproc_cluster["name"] -# -# labels = { -# "${var.dataproc_cluster["label_key"]}" = var.dataproc_cluster["label_value"] -# } -# -# cluster_config { -# master_config { -# num_instances = var.dataproc_cluster["config"]["master_config"]["num_instances"] -# machine_type = var.dataproc_cluster["config"]["master_config"]["machine_type"] -# disk_config { -# boot_disk_type = var.dataproc_cluster["config"]["master_config"]["boot_disk_type"] -# boot_disk_size_gb = var.dataproc_cluster["config"]["master_config"]["boot_disk_size_gb"] -# } -# } -# -# worker_config { -# num_instances = var.dataproc_cluster["config"]["worker_config"]["num_instances"] -# machine_type = var.dataproc_cluster["config"]["worker_config"]["machine_type"] -# disk_config { -# boot_disk_size_gb = var.dataproc_cluster["config"]["worker_config"]["boot_disk_size_gb"] -# num_local_ssds = var.dataproc_cluster["config"]["worker_config"]["num_local_ssds"] -# } -# } -# -# # Override or set some custom properties -# software_config { -# override_properties = { -# "${var.dataproc_cluster["config"]["software_config"]["prop_key"]}" = var.dataproc_cluster["config"]["software_config"]["prop_value"] -# } -# } -# -# gce_cluster_config { -# network = google_compute_network.dataproc.self_link -# tags = [var.dataproc_cluster["config"]["gce_cluster_config"]["tag"]] -# } -# } -#} -# -#resource "google_logging_folder_exclusion" "my-exclusion" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# name = var.folder_exclusion["name"] -# folder = google_folder.inspec-gcp-folder.0.name -# -# description = var.folder_exclusion["description"] -# -# filter = var.folder_exclusion["filter"] -#} -# -#variable "project_exclusion" { -# type = any -#} -# -#resource "google_logging_project_exclusion" "project-exclusion" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# name = var.project_exclusion["name"] -# project = var.gcp_project_id -# -# description = var.project_exclusion["description"] -# -# filter = var.project_exclusion["filter"] -#} -# -#resource "google_filestore_instance" "instance" { -# project = var.gcp_project_id -# name = var.filestore_instance["name"] -# zone = var.filestore_instance["zone"] -# tier = var.filestore_instance["tier"] -# -# file_shares { -# capacity_gb = var.filestore_instance["fileshare_capacity_gb"] -# name = var.filestore_instance["fileshare_name"] -# } -# -# networks { -# network = var.filestore_instance["network_name"] -# modes = [var.filestore_instance["network_mode"]] -# } -#} -# -#resource "google_logging_folder_sink" "folder-sink" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# name = var.folder_sink.name -# folder = google_folder.inspec-gcp-folder.0.name -# -# destination = "storage.googleapis.com/${google_storage_bucket.generic-storage-bucket.name}" -# -# filter = var.folder_sink.filter -#} -# -#resource "google_runtimeconfig_config" "inspec-runtime-config" { -# project = var.gcp_project_id -# name = var.runtimeconfig_config["name"] -# description = var.runtimeconfig_config["description"] -#} -# -#resource "google_runtimeconfig_variable" "inspec-runtime-variable" { -# project = var.gcp_project_id -# parent = google_runtimeconfig_config.inspec-runtime-config.name -# name = var.runtimeconfig_variable["name"] -# text = var.runtimeconfig_variable["text"] -#} -# -#resource "google_redis_instance" "inspec-redis" { -# project = var.gcp_project_id -# name = var.redis["name"] -# tier = var.redis["tier"] -# memory_size_gb = var.redis["memory_size_gb"] -# -# location_id = var.redis["location_id"] -# alternative_location_id = var.redis["alternative_location_id"] -# -# redis_version = var.redis["redis_version"] -# display_name = var.redis["display_name"] -# reserved_ip_range = var.redis["reserved_ip_range"] -# -# labels = { -# "${var.redis["label_key"]}" = var.redis["label_value"] -# } -#} -# -#resource "google_compute_network_endpoint_group" "inspec-endpoint-group" { -# project = var.gcp_project_id -# name = var.network_endpoint_group["name"] -# network = google_compute_subnetwork.inspec-gcp-subnetwork.network -# subnetwork = google_compute_subnetwork.inspec-gcp-subnetwork.self_link -# default_port = var.network_endpoint_group["default_port"] -# zone = var.gcp_zone -#} -# -#data "google_compute_node_types" "zone-node-type" { -# project = var.gcp_project_id -# zone = var.gcp_zone -#} -# -#resource "google_compute_node_template" "inspec-template" { -# project = var.gcp_project_id -# region = var.gcp_location -# -# name = var.node_template["name"] -# node_type = data.google_compute_node_types.zone-node-type.names[0] -# -# node_affinity_labels = { -# "${var.node_template["label_key"]}" = var.node_template["label_value"] -# } -#} -# -#resource "google_compute_node_group" "inspec-node-group" { -# project = var.gcp_project_id -# name = var.node_group["name"] -# zone = var.gcp_zone -# description = var.node_group["description"] -# -# size = var.node_group["size"] -# node_template = google_compute_node_template.inspec-template.self_link -#} -# -#resource "google_compute_router_nat" "inspec-nat" { -# project = var.gcp_project_id -# name = var.router_nat["name"] -# router = google_compute_router.gcp-inspec-router.name -# region = google_compute_router.gcp-inspec-router.region -# nat_ip_allocate_option = var.router_nat["nat_ip_allocate_option"] -# source_subnetwork_ip_ranges_to_nat = var.router_nat["source_subnetwork_ip_ranges_to_nat"] -# min_ports_per_vm = var.router_nat["min_ports_per_vm"] -# -# log_config { -# enable = var.router_nat["log_config_enable"] -# filter = var.router_nat["log_config_filter"] -# } -#} -# -#resource "google_project_service" "project" { -# project = var.gcp_project_id -# service = var.service["name"] -#} -# -#resource "google_service_account" "spanner_service_account" { -# project = var.gcp_project_id -# account_id = "${var.gcp_service_account_display_name}-sp" -# display_name = "${var.gcp_service_account_display_name}-sp" -#} -# -#resource "google_service_account_key" "userkey" { -# service_account_id = google_service_account.spanner_service_account.name -# public_key_type = "TYPE_X509_PEM_FILE" -#} -# -#resource "google_spanner_instance" "spanner_instance" { -# project = var.gcp_project_id -# config = var.spannerinstance["config"] -# name = var.spannerinstance["name"] -# display_name = var.spannerinstance["display_name"] -# num_nodes = var.spannerinstance["num_nodes"] -# labels = { -# "${var.spannerinstance["label_key"]}" = var.spannerinstance["label_value"] -# } -#} -# -#resource "google_spanner_instance_iam_binding" "instance" { -# project = var.gcp_project_id -# instance = google_spanner_instance.spanner_instance.name -# role = "roles/editor" -# -# members = [ -# "serviceAccount:${google_service_account.spanner_service_account.email}", -# ] -#} -# -#resource "google_spanner_database" "database" { -# project = var.gcp_project_id -# instance = google_spanner_instance.spanner_instance.name -# name = var.spannerdatabase["name"] -# ddl = [var.spannerdatabase["ddl"]] -#} -# -#resource "google_cloud_scheduler_job" "job" { -# project = var.gcp_project_id -# region = var.scheduler_job["region"] -# name = var.scheduler_job["name"] -# description = var.scheduler_job["description"] -# schedule = var.scheduler_job["schedule"] -# time_zone = var.scheduler_job["time_zone"] -# -# http_target { -# http_method = var.scheduler_job["http_method"] -# uri = var.scheduler_job["http_target_uri"] -# } -#} -# -#variable "service_perimeter" { -# type = any -#} -# -#resource "google_access_context_manager_service_perimeter" "service-perimeter" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# parent = "accessPolicies/${google_access_context_manager_access_policy.access-policy.0.name}" -# name = "accessPolicies/${google_access_context_manager_access_policy.access-policy.0.name}/servicePerimeters/${var.service_perimeter["name"]}" -# title = var.service_perimeter["title"] -# status { -# restricted_services = [var.service_perimeter["restricted_service"]] -# } -#} -# -#resource "google_access_context_manager_access_policy" "access-policy" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# parent = "organizations/${var.gcp_organization_id}" -# title = var.service_perimeter["policy_title"] -#} -# -#resource "google_access_context_manager_access_level" "access-level" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# parent = "accessPolicies/${google_access_context_manager_access_policy.access-policy.0.name}" -# name = "accessPolicies/${google_access_context_manager_access_policy.access-policy.0.name}/accessLevels/os_lock" -# title = "os_lock" -# basic { -# conditions { -# device_policy { -# require_screen_lock = true -# } -# regions = [ -# "CH", -# "IT", -# "US", -# ] -# } -# } -#} -# -#variable "firewall" { -# type = any -#} -# -#resource "google_compute_firewall" "mm-firewall" { -# project = var.gcp_project_id -# name = var.firewall["name"] -# enable_logging = true -# network = google_compute_network.inspec-gcp-network.name -# -# allow { -# protocol = "tcp" -# ports = ["80", "8080", "1000-2000"] -# } -# -# source_tags = [var.firewall["source_tag"]] -#} -# -#variable "address" { -# type = any -#} -# -#resource "google_compute_address" "internal_with_subnet_and_address" { -# project = var.gcp_project_id -# name = var.address["name"] -# subnetwork = google_compute_subnetwork.inspec-gcp-subnetwork.self_link -# address_type = var.address["address_type"] -# address = var.address["address"] -# region = var.gcp_location -#} -# -#variable "instance_group" { -# type = any -#} -# -#resource "google_compute_instance_group" "inspec-instance-group" { -# project = var.gcp_project_id -# zone = var.gcp_zone -# name = var.instance_group["name"] -# description = var.instance_group["description"] -# -# named_port { -# name = var.instance_group["named_port_name"] -# port = var.instance_group["named_port_port"] -# } -#} -# -#variable "instance" { -# type = any -#} -# -#resource "google_compute_instance" "inspec-instance" { -# project = var.gcp_project_id -# zone = var.gcp_zone -# name = var.instance["name"] -# machine_type = var.instance["machine_type"] -# -# tags = [var.instance["tag_1"], var.instance["tag_2"]] -# -# boot_disk { -# initialize_params { -# image = "debian-cloud/debian-9" -# } -# } -# -# network_interface { -# network = "default" -# -# access_config { -# // Ephemeral IP -# } -# } -# -# metadata = { -# "${var.instance["metadata_key"]}" = var.instance["metadata_value"] -# } -# -# metadata_startup_script = var.instance["startup_script"] -# -# service_account { -# scopes = [var.instance["sa_scope"]] -# } -#} -# -#variable "network" { -# type = any -#} -# -#resource "google_compute_network" "inspec-network" { -# project = var.gcp_project_id -# name = var.network["name"] -# routing_mode = var.network["routing_mode"] -#} -# -#variable "subnetwork" { -# type = any -#} -# -#resource "google_compute_subnetwork" "subnet-with-logging" { -# project = var.gcp_project_id -# region = var.gcp_location -# name = var.subnetwork["name"] -# ip_cidr_range = var.subnetwork["ip_cidr_range"] -# network = google_compute_network.inspec-network.self_link -# -# log_config { -# aggregation_interval = var.subnetwork["log_interval"] -# flow_sampling = var.subnetwork["log_sampling"] -# metadata = var.subnetwork["log_metadata"] -# } -#} -# -#variable "rigm" { -# type = any -#} -# -variable "sql_connect" { - type = any -} -# -#resource "google_compute_region_instance_group_manager" "inspec-rigm" { -# project = var.gcp_project_id -# region = var.gcp_location -# name = var.rigm["name"] -# -# base_instance_name = var.rigm["base_instance_name"] -# -# version { -# instance_template = google_compute_instance_template.gcp-inspec-instance-template.self_link -# } -# -# target_pools = [google_compute_target_pool.gcp-inspec-target-pool.self_link] -# target_size = var.rigm["target_size"] -# -# named_port { -# name = var.rigm["named_port_name"] -# port = var.rigm["named_port_port"] -# } -# -# auto_healing_policies { -# health_check = google_compute_health_check.gcp-inspec-health-check.self_link -# initial_delay_sec = var.rigm["healing_delay"] -# } -#} -# -#variable "vpn_tunnel" { -# type = any -#} -# -#resource "google_compute_vpn_tunnel" "tunnel1" { -# project = var.gcp_project_id -# name = var.vpn_tunnel["name"] -# peer_ip = var.vpn_tunnel["peer_ip"] -# shared_secret = var.vpn_tunnel["shared_secret"] -# -# remote_traffic_selector = ["0.0.0.0/0"] -# local_traffic_selector = ["0.0.0.0/0"] -# target_vpn_gateway = google_compute_vpn_gateway.inspec-gcp-vpn-gateway.self_link -# -# depends_on = [ -# google_compute_forwarding_rule.inspec-gcp-fr-esp, -# google_compute_forwarding_rule.inspec-gcp-fr-udp500, -# google_compute_forwarding_rule.inspec-gcp-fr-udp4500, -# ] -#} -# -#variable "alert_policy" { -# type = any -#} -# -#resource "google_monitoring_alert_policy" "alert_policy" { -# project = var.gcp_project_id -# display_name = var.alert_policy["display_name"] -# combiner = var.alert_policy["combiner"] -# conditions { -# display_name = var.alert_policy["condition_display_name"] -# condition_threshold { -# filter = var.alert_policy["condition_filter"] -# duration = var.alert_policy["condition_duration"] -# comparison = var.alert_policy["condition_comparison"] -# aggregations { -# alignment_period = "60s" -# per_series_aligner = "ALIGN_RATE" -# } -# } -# } -#} -# -#variable "dns_managed_zone" { -# type = any -#} -# -#variable "gcp_dns_zone_name" {} -# -#resource "google_dns_managed_zone" "example-zone" { -# project = var.gcp_project_id -# name = var.dns_managed_zone["name"] -# dns_name = "${var.gcp_dns_zone_name}" -# description = var.dns_managed_zone["description"] -# dnssec_config { -# state = var.dns_managed_zone["dnssec_config_state"] -# default_key_specs { -# algorithm = "rsasha256" -# key_type = "zoneSigning" -# key_length = 2048 -# } -# default_key_specs { -# algorithm = "rsasha512" -# key_type = "keySigning" -# key_length = 2048 -# } -# } -#} -# -#variable "logging_metric" { -# type = any -#} -# -#resource "google_logging_metric" "logging_metric" { -# project = var.gcp_project_id -# name = var.logging_metric["name"] -# filter = var.logging_metric["filter"] -# metric_descriptor { -# metric_kind = var.logging_metric["metric_kind"] -# value_type = var.logging_metric["value_type"] -# } -#} -# -#variable "compute_image" { -# type = any -#} -# -#resource "google_compute_image" "example" { -# project = var.gcp_project_id -# name = var.compute_image["name"] -# -# raw_disk { -# source = var.compute_image["source"] -# } -#} -# -#variable "gcp_organization_iam_custom_role_id" {} -# -#resource "google_organization_iam_custom_role" "generic_org_iam_custom_role" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# org_id = var.gcp_organization_id -# role_id = var.gcp_organization_iam_custom_role_id -# title = "GCP Inspec Generic Organization IAM Custom Role" -# description = "Custom role allowing to list IAM roles only" -# permissions = ["iam.roles.list"] -#} -# -#variable "security_policy" { -# type = any -#} -# -#resource "google_compute_security_policy" "policy" { -# project = var.gcp_project_id -# name = var.security_policy["name"] -# -# rule { -# action = var.security_policy["action"] -# priority = var.security_policy["priority"] -# match { -# versioned_expr = "SRC_IPS_V1" -# config { -# src_ip_ranges = [var.security_policy["ip_range"]] -# } -# } -# description = var.security_policy["description"] -# } -# -# rule { -# action = "allow" -# priority = "2147483647" -# match { -# versioned_expr = "SRC_IPS_V1" -# config { -# src_ip_ranges = ["*"] -# } -# } -# description = "default rule" -# } -#} -# -#variable "memcache_instance" { -# type = any -#} -# -#resource "google_compute_network" "memcache_network" { -# provider = google-beta -# project = var.gcp_project_id -# name = "inspec-gcp-memcache" -#} -# -#resource "google_compute_global_address" "service_range" { -# provider = google-beta -# project = var.gcp_project_id -# name = "inspec-gcp-memcache" -# purpose = "VPC_PEERING" -# address_type = "INTERNAL" -# prefix_length = 16 -# network = google_compute_network.memcache_network.id -#} -# -#resource "google_service_networking_connection" "private_service_connection" { -# provider = google-beta -# network = google_compute_network.memcache_network.id -# service = "servicenetworking.googleapis.com" -# reserved_peering_ranges = [google_compute_global_address.service_range.name] -#} -# -#resource "google_memcache_instance" "instance" { -# provider = google-beta -# name = var.memcache_instance["name"] -# project = var.gcp_project_id -# region = var.gcp_location -# authorized_network = google_service_networking_connection.private_service_connection.network -# -# node_config { -# cpu_count = 1 -# memory_size_mb = 1024 -# } -# node_count = 1 -#} -# -#resource "google_compute_interconnect_attachment" "on_prem" { -# name = "on-prem-attachment" -# edge_availability_domain = "AVAILABILITY_DOMAIN_1" -# type = "PARTNER" -# router = google_compute_router.gcp-inspec-router.id -# mtu = 1500 -#} -# -resource "google_sql_ssl_cert" "client_cert" { - common_name = var.sql_connect["common_name"] - instance = var.gcp_db_instance_name -} - -resource "google_data_loss_prevention_stored_info_type" "basic" { - parent = "projects/my-project-name" - description = "Description" - display_name = "Displayname" - - regex { - pattern = "patient" - group_indexes = [2] - } -} \ No newline at end of file diff --git a/build/inspec/build/inspec/test/integration/configuration/hello-world.zip b/build/inspec/build/inspec/test/integration/configuration/hello-world.zip deleted file mode 100644 index 34c746dd3..000000000 Binary files a/build/inspec/build/inspec/test/integration/configuration/hello-world.zip and /dev/null differ diff --git a/build/inspec/build/inspec/test/integration/configuration/index.js.zip b/build/inspec/build/inspec/test/integration/configuration/index.js.zip deleted file mode 100644 index a9e89ba30..000000000 Binary files a/build/inspec/build/inspec/test/integration/configuration/index.js.zip and /dev/null differ diff --git a/build/inspec/build/inspec/test/integration/configuration/mm-attributes.yml b/build/inspec/build/inspec/test/integration/configuration/mm-attributes.yml deleted file mode 100644 index c37367af8..000000000 --- a/build/inspec/build/inspec/test/integration/configuration/mm-attributes.yml +++ /dev/null @@ -1,536 +0,0 @@ -ssl_policy: - name: 'inspec-gcp-ssl-policy' - min_tls_version: 'TLS_1_2' - profile: 'CUSTOM' - custom_feature: 'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384' - custom_feature2: 'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384' - -topic: - name: 'inspec-gcp-topic' - -subscription: - name: 'inspec-gcp-subscription' - ack_deadline_seconds: 20 - -managed_zone: - name: 'inspec-gcp-managed-zone' - dns_name: 'my.domain.com.' - description: 'A test DNS zone' - label_key: key - label_value: 'value' - -record_set: - name: 'backend.my.domain.com.' - type: 'A' - ttl: 300 - rrdatas1: '8.8.8.8' - rrdatas2: '8.8.4.4' - -instance_group_manager: - name: 'inspec-gcp-igm' - base_instance_name: 'igm' - named_port_name: 'port' - named_port_port: 80 - -autoscaler: - name: 'inspec-gcp-autoscaler' - max_replicas: 5 - min_replicas: 1 - cooldown_period: 60 - cpu_utilization_target: 0.5 - -target_pool: - name: 'inspec-gcp-target-pool' - session_affinity: CLIENT_IP - -trigger: - trigger_template_project: trigger-project - trigger_template_branch: trigger-branch - trigger_template_repo: trigger-repo - filename: cloudbuild.yaml - -health_check: - name: inspec-gcp-health-check - timeout_sec: 10 - check_interval_sec: 10 - tcp_health_check_port: 80 - -backend_service: - name: inspec-gcp-backend-service - description: A description - port_name: http - protocol: HTTP - timeout_sec: 10 - enable_cdn: true - -region_backend_service_health_check: - name: inspec-gcp-region-health-check - timeout_sec: 15 - check_interval_sec: 15 - tcp_health_check_port: 81 - -region_backend_service: - name: inspec-gcp-region-backend-service - description: A regional description - protocol: TCP - timeout_sec: 15 - -http_health_check: - name: inspec-gcp-http-health-check - request_path: /health_check - timeout_sec: 20 - check_interval_sec: 20 - -https_health_check: - name: inspec-gcp-https-health-check - request_path: /https_health_check - timeout_sec: 15 - check_interval_sec: 15 - unhealthy_threshold: 3 - -instance_template: - name: inspec-gcp-instance-template - description: A description of the instance template - instance_description: A description of the instance itself - machine_type: f1-micro - tag: foo - can_ip_forward: false - scheduling_automatic_restart: true - scheduling_on_host_maintenance: MIGRATE - disk_source_image: debian-cloud/debian-9 - disk_auto_delete: true - disk_boot: true - network_interface_network: default - service_account_scope: storage-ro - -global_address: - name: inspec-gcp-global-address - ip_version: IPV6 - -url_map: - name: inspec-gcp-url-map - description: URL map description - host_rule_host: site.com - path_matcher_name: allpaths - path_rule_path: /home - test_host: test.com - test_path: /home - -http_proxy: - name: inspec-gcp-http-proxy - description: A HTTP proxy - -global_forwarding_rule: - name: inspec-gcp-global-forwarding-rule - port_range: 80-80 - -target_tcp_proxy: - name: inspec-gcp-target-tcp-proxy - proxy_header: NONE - tcp_backend_service_name: gcp-inspec-tcp-backend-service - -route: - name: inspec-gcp-route - dest_range: 15.0.0.0/24 - next_hop_ip: 10.2.0.1 - priority: 100 - -router: - name: inspec-gcp-router - bgp_asn: 64514 - bgp_advertise_mode: CUSTOM - bgp_advertised_group: "ALL_SUBNETS" - bgp_advertised_ip_range1: "1.2.3.4" - bgp_advertised_ip_range2: "6.7.0.0/16" - -snapshot: - name: inspec-gcp-disk-snapshot - disk_name: inspec-snapshot-disk - disk_type: pd-standard - disk_image: debian-cloud/debian-10-buster-v20191014 - -https_proxy: - name: inspec-gcp-https-proxy - description: A HTTPS target proxy - -ssl_certificate: - name: inspec-gcp-ssl-certificate - description: A fake ssl certificate (DO NOT USE) - certificate: | - -----BEGIN CERTIFICATE----- - MIICqjCCAk+gAwIBAgIJAIuJ+0352Kq4MAoGCCqGSM49BAMCMIGwMQswCQYDVQQG - EwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjERMA8GA1UEBwwIS2lya2xhbmQxFTAT - BgNVBAoMDEdvb2dsZSwgSW5jLjEeMBwGA1UECwwVR29vZ2xlIENsb3VkIFBsYXRm - b3JtMR8wHQYDVQQDDBZ3d3cubXktc2VjdXJlLXNpdGUuY29tMSEwHwYJKoZIhvcN - AQkBFhJuZWxzb25hQGdvb2dsZS5jb20wHhcNMTcwNjI4MDQ1NjI2WhcNMjcwNjI2 - MDQ1NjI2WjCBsDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24xETAP - BgNVBAcMCEtpcmtsYW5kMRUwEwYDVQQKDAxHb29nbGUsIEluYy4xHjAcBgNVBAsM - FUdvb2dsZSBDbG91ZCBQbGF0Zm9ybTEfMB0GA1UEAwwWd3d3Lm15LXNlY3VyZS1z - aXRlLmNvbTEhMB8GCSqGSIb3DQEJARYSbmVsc29uYUBnb29nbGUuY29tMFkwEwYH - KoZIzj0CAQYIKoZIzj0DAQcDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ - 4mzkzTv0dXyB750fOGN02HtkpBOZzzvUARTR10JQoSe2/5PIwaNQME4wHQYDVR0O - BBYEFKIQC3A2SDpxcdfn0YLKineDNq/BMB8GA1UdIwQYMBaAFKIQC3A2SDpxcdfn - 0YLKineDNq/BMAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDSQAwRgIhALs4vy+O - M3jcqgA4fSW/oKw6UJxp+M6a+nGMX+UJR3YgAiEAvvl39QRVAiv84hdoCuyON0lJ - zqGNhIPGq2ULqXKK8BY= - -----END CERTIFICATE----- - private_key: | - -----BEGIN EC PRIVATE KEY----- - MHcCAQEEIObtRo8tkUqoMjeHhsOh2ouPpXCgBcP+EDxZCB/tws15oAoGCCqGSM49 - AwEHoUQDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ4mzkzTv0dXyB750f - OGN02HtkpBOZzzvUARTR10JQoSe2/5PIwQ== - -----END EC PRIVATE KEY----- - -dataset: - dataset_id: inspec_gcp_dataset - friendly_name: A BigQuery dataset test - description: Test BigQuery dataset description - location: EU - default_table_expiration_ms: 3600000 - access_writer_role: WRITER - access_writer_special_group: projectWriters - -bigquery_table: - table_id: inspec_gcp_bigquery_table - description: A BigQuery table - expiration_time: 1738882264000 - time_partitioning_type: DAY - -repository: - name: inspec-gcp-repository - -folder: - display_name: inspec-gcp-folder - -cloudfunction: - name: inspec-gcp-function - description: A description of the function - available_memory_mb: 128 - trigger_http: true - timeout: 60 - entry_point: hello - env_var_value: val1 - -backend_bucket: - name: inspec-gcp-backend-bucket - description: Backend bucket example - enable_cdn: true - -regional_node_pool: - name: inspec-gcp-regional-node-pool - cluster_name: inspec-gcp-regional-node-pool-cluster - node_count: 1 - initial_node_count: 1 - -org_sink: - name: inspec-gcp-org-sink - filter: resource.type = gce_instance - -standardappversion: - version_id: v2 - service: default - runtime: nodejs10 - entrypoint: "node ./app.js" - port: "8080" - -ml_model: - name: ml_model - region: us-central1 - description: My awesome ML model - online_prediction_logging: true - online_prediction_console_logging: true - -dataproc_cluster: - name: inspec-dataproc-cluster - label_key: label - label_value: value - config: - master_config: - num_instances: 1 - machine_type: n1-standard-1 - boot_disk_type: pd-ssd - boot_disk_size_gb: 30 - worker_config: - num_instances: 2 - machine_type: n1-standard-1 - boot_disk_size_gb: 40 - num_local_ssds: 1 - preemptible_worker_config: - num_instances: 0 - software_config: - prop_key: "dataproc:dataproc.allow.zero.workers" - prop_value: "true" - gce_cluster_config: - tag: foo - -folder_exclusion: - name: inspec-folder-exclusion - description: My folder exclusion description - filter: "resource.type = gce_instance AND severity <= DEBUG" - -filestore_instance: - name: inspecgcp - zone: us-central1-b - tier: PREMIUM - fileshare_capacity_gb: 2660 - fileshare_name: inspecgcp - network_name: default - network_mode: MODE_IPV4 - -folder_sink: - name: inspec-gcp-folder-sink - filter: resource.type = gce_instance AND severity >= ERROR - -runtimeconfig_config: - name: inspec-gcp-runtime-config - description: My runtime configurations - -runtimeconfig_variable: - name: prod-variables/hostname - text: example.com - -redis: - name: my-redis-cache - tier: STANDARD_HA - memory_size_gb: 1 - region: us-central1 - location_id: us-central1-a - alternative_location_id: us-central1-f - redis_version: REDIS_3_2 - display_name: InSpec test instance - reserved_ip_range: "192.168.0.0/29" - label_key: key - label_value: value - -network_endpoint_group: - name: inspec-gcp-endpoint-group - default_port: 90 - -node_template: - name: inspec-node-template - label_key: key - label_value: value - -node_group: - name: inspec-node-group - description: A description of the node group - size: 0 - -router_nat: - name: inspec-router-nat - nat_ip_allocate_option: AUTO_ONLY - source_subnetwork_ip_ranges_to_nat: ALL_SUBNETWORKS_ALL_IP_RANGES - min_ports_per_vm: 2 - log_config_enable: true - log_config_filter: ERRORS_ONLY - -service: - name: maps-android-backend.googleapis.com - -spannerinstance: - config: regional-us-east1 - name: spinstance - display_name: inspectest - num_nodes: 1 - label_key: env - label_value: test - -spannerdatabase: - name: spdatabase - instance: spinstance - ddl: "CREATE TABLE test (test STRING(MAX),) PRIMARY KEY (test)" - -scheduler_job: - # region must match where the appengine instance is deployed - region: us-central1 - name: job-name - description: A description - schedule: "*/8 * * * *" - time_zone: America/New_York - http_method: POST - http_target_uri: https://example.com/ping - -service_perimeter: - name: restrict_all - title: restrict_all - restricted_service: storage.googleapis.com - policy_title: policytitle - -firewall: - name: inspec-gcp-firewall - source_tag: some-tag - -address: - name: inspec-gcp-global-address - address_type: INTERNAL - address: "10.2.0.3" - -instance_group: - name: inspec-instance-group - description: My instance group for testing - named_port_name: https - named_port_port: 8080 - -instance: - name: inspec-instance - machine_type: n1-standard-1 - tag_1: foo - tag_2: bar - metadata_key: '123' - metadata_value: asdf - sa_scope: https://www.googleapis.com/auth/compute.readonly - startup_script: "echo hi > /test.txt" - -network: - name: inspec-network - routing_mode: REGIONAL - -subnetwork: - name: inspec-subnet - ip_cidr_range: "10.2.0.0/16" - log_interval: INTERVAL_10_MIN - log_sampling: .5 - log_metadata: INCLUDE_ALL_METADATA - -rigm: - name: inspec-rigm - base_instance_name: rigm1 - target_size: 1 - named_port_name: https - named_port_port: 8888 - healing_delay: 300 - -vpn_tunnel: - name: inspec-vpn-tunnel - peer_ip: "15.0.0.120" - shared_secret: super secret - -project_sink: - name: inspec-gcp-org-sink - filter: resource.type = gce_instance AND severity = DEBUG - -project_exclusion: - name: inspec-project-exclusion - description: My project exclusion description - filter: resource.type = gce_instance AND severity <= DEBUG - -alert_policy: - display_name: Display - combiner: OR - condition_display_name: condition - condition_filter: "metric.type=\"compute.googleapis.com/instance/disk/write_bytes_count\" AND resource.type=\"gce_instance\"" - condition_duration: 60s - condition_comparison: COMPARISON_GT - -dns_managed_zone: - # managed zone dns_name must be randomly generated, so it happens in the other script - name: example-zone - description: example description - dnssec_config_state: 'on' - -logging_metric: - name: some/metric - filter: 'resource.type=gae_app AND severity>=ERROR' - metric_kind: DELTA - value_type: INT64 - -compute_image: - name: inspec-image - source: https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz - -security_policy: - name: sec-policy - action: deny(403) - priority: "1000" - ip_range: "9.9.9.0/24" - description: my description - -memcache_instance: - name: mem-instance - -accelerator_type: - name: accelerator_id - -global_operation: - name: operation-1635274037755-5cf45e8217d56-c081cd9a-c3ea7346 - operationType: "compute.externalVpnGateways.insert" - -interconnect_location: - name: akl-zone1-1353 - facility_provider_facility_id: 'Auckland - Albany' - facility_provider: Vocus - -image_family_views: - zone: us-central1-c - name: image-1 - source_type: RAW - status: READY - archive_size_bytes: 539099200 - disk_size_gb: 3 - family: test - -license_code: - name: akl-zone1-1353 - -region_instance_group: - name: instance-group-2 - region: us-central1 - size: 1 - named_port_name: 'port' - named_port_port: 80 - -region_operation: - name: operation-1641188435323-5d4a6f5b26934-9281422c-dce238f5 - region: us-central1 - operation_type: "compute.instanceGroupManagers.insert" - status: DONE - progress: 100 - -sql_database_flag: - name : audit_log - type : STRING - applies_to: MYSQL_5_6 - allowed_string_values: ON - requires_restart: true - -sql_connect: - region: us-central1 - database_version: POSTGRES_13 - backend_type: SECOND_GEN - cert_serial_number: 0 - common_name: "test_gcp_1" - sha1_fingerprint: "80c5c611c0a591db967c7dda3467e23127288fed" - instance: test-pg - -sql_operation: - name: e5c522f1-8391-4830-a8ff-ff1cc4a7b2a5 - status: DONE - operation_type: CREATE -public_delegated_prefix: - name: test - -region_health_check: - name: inspec-gcp-region-health-check - region: us-central1 - timeout_sec: 10 - check_interval_sec: 10 - tcp_health_check_port: 80 - -dlp: - name: "i-inspec-gcp-dlp" - location: "us-east-2" - type: "INSPECT_JOB" - state: "ACTIVE" - inspectDetails: - requestedOptions: - snapshotInspectTemplate: "" - jobConfig: - storageConfig: - hybridOptions: - description: "test" - tableOptions: "" - description: "Description" - display_name: "Displayname" - - - diff --git a/build/inspec/docs/resources/google_data_loss_prevention_stored_info_type.md b/build/inspec/docs/resources/google_data_loss_prevention_stored_info_type.md deleted file mode 100644 index 2b7237908..000000000 --- a/build/inspec/docs/resources/google_data_loss_prevention_stored_info_type.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: About the google_data_loss_prevention_stored_info_type resource -platform: gcp ---- - -## Syntax -A `google_data_loss_prevention_stored_info_type` is used to test a Google StoredInfoType resource - -## Examples -``` - -describe google_data_loss_prevention_stored_info_type(parent: "projects/#{'chef-gcp-inspec'}/locations/#{'us-east-2'}",name: '') do -it { should exist } -its('name') { should cmp 'i-inspec-gcp-dlp' } -end - -describe google_data_loss_prevention_stored_info_type(parent: "projects/#{'chef-gcp-inspec'}/locations/#{'us-east-2'}", name: 'nonexistent') do -it { should_not exist } -end -``` - -## Properties -Properties that can be accessed from the `google_data_loss_prevention_stored_info_type` resource: - - - * `name`: The resource name of the info type. Set by the server. - - * `description`: A description of the info type. - - * `display_name`: User set display name of the info type. - - * `regex`: Regular expression which defines the rule. - - * `pattern`: Pattern defining the regular expression. Its syntax (https://github.com/google/re2/wiki/Syntax) can be found under the google/re2 repository on GitHub. - - * `group_indexes`: The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included. - - * `dictionary`: Dictionary which defines the rule. - - * `word_list`: List of words or phrases to search for. - - * `words`: Words or phrases defining the dictionary. The dictionary must contain at least one phrase and every phrase must contain at least 2 characters that are letters or digits. - - * `cloud_storage_path`: Newline-delimited file of words in Cloud Storage. Only a single file is accepted. - - * `path`: A url representing a file or path (no wildcards) in Cloud Storage. Example: `gs://[BUCKET_NAME]/dictionary.txt` - - * `large_custom_dictionary`: Dictionary which defines the rule. - - * `output_path`: Location to store dictionary artifacts in Google Cloud Storage. These files will only be accessible by project owners and the DLP API. If any of these artifacts are modified, the dictionary is considered invalid and can no longer be used. - - * `path`: A url representing a file or path (no wildcards) in Cloud Storage. Example: `gs://[BUCKET_NAME]/dictionary.txt` - - * `cloud_storage_file_set`: Set of files containing newline-delimited lists of dictionary phrases. - - * `url`: The url, in the format `gs:///`. Trailing wildcard in the path is allowed. - - * `big_query_field`: Field in a BigQuery table where each cell represents a dictionary phrase. - - * `table`: Field in a BigQuery table where each cell represents a dictionary phrase. - - * `project_id`: The Google Cloud Platform project ID of the project containing the table. - - * `dataset_id`: The dataset ID of the table. - - * `table_id`: The name of the table. - - * `field`: Designated field in the BigQuery table. - - * `name`: Name describing the field. - - * `parent`: The parent of the info type in any of the following formats: * `projects/{{project}}` * `projects/{{project}}/locations/{{location}}` * `organizations/{{organization_id}}` * `organizations/{{organization_id}}/locations/{{location}}` - - -## GCP Permissions diff --git a/build/inspec/docs/resources/google_data_loss_prevention_stored_info_types.md b/build/inspec/docs/resources/google_data_loss_prevention_stored_info_types.md deleted file mode 100644 index 1cfcc5094..000000000 --- a/build/inspec/docs/resources/google_data_loss_prevention_stored_info_types.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: About the google_data_loss_prevention_stored_info_types resource -platform: gcp ---- - -## Syntax -A `google_data_loss_prevention_stored_info_types` is used to test a Google StoredInfoType resource - -## Examples -``` - - -describe google_data_loss_prevention_stored_info_types(parent: "projects/#{'chef-gcp-inspec'}/locations/#{'us-east-2'}") do -it { should exist } -its('names') { should include 'i-inspec-gcp-dlp' } -end -``` - -## Properties -Properties that can be accessed from the `google_data_loss_prevention_stored_info_types` resource: - -See [google_data_loss_prevention_stored_info_type.md](google_data_loss_prevention_stored_info_type.md) for more detailed information - * `names`: an array of `google_data_loss_prevention_stored_info_type` name - * `descriptions`: an array of `google_data_loss_prevention_stored_info_type` description - * `display_names`: an array of `google_data_loss_prevention_stored_info_type` display_name - * `regexes`: an array of `google_data_loss_prevention_stored_info_type` regex - * `dictionaries`: an array of `google_data_loss_prevention_stored_info_type` dictionary - * `large_custom_dictionaries`: an array of `google_data_loss_prevention_stored_info_type` large_custom_dictionary - * `parents`: an array of `google_data_loss_prevention_stored_info_type` parent - -## Filter Criteria -This resource supports all of the above properties as filter criteria, which can be used -with `where` as a block or a method. - -## GCP Permissions diff --git a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_large_custom_dictionary.rb b/build/inspec/libraries/google/datalossprevention/property/storedinfotype_large_custom_dictionary.rb deleted file mode 100644 index 382a00ccb..000000000 --- a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_large_custom_dictionary.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: false - -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- -require 'google/datalossprevention/property/storedinfotype_large_custom_dictionary_big_query_field' -require 'google/datalossprevention/property/storedinfotype_large_custom_dictionary_big_query_field_field' -require 'google/datalossprevention/property/storedinfotype_large_custom_dictionary_big_query_field_table' -require 'google/datalossprevention/property/storedinfotype_large_custom_dictionary_cloud_storage_file_set' -require 'google/datalossprevention/property/storedinfotype_large_custom_dictionary_output_path' -module GoogleInSpec - module DataLossPrevention - module Property - class StoredInfoTypeLargeCustomDictionary - attr_reader :output_path - - attr_reader :cloud_storage_file_set - - attr_reader :big_query_field - - def initialize(args = nil, parent_identifier = nil) - return if args.nil? - @parent_identifier = parent_identifier - @output_path = GoogleInSpec::DataLossPrevention::Property::StoredInfoTypeLargeCustomDictionaryOutputPath.new(args['outputPath'], to_s) - @cloud_storage_file_set = GoogleInSpec::DataLossPrevention::Property::StoredInfoTypeLargeCustomDictionaryCloudStorageFileSet.new(args['cloudStorageFileSet'], to_s) - @big_query_field = GoogleInSpec::DataLossPrevention::Property::StoredInfoTypeLargeCustomDictionaryBigQueryField.new(args['bigQueryField'], to_s) - end - - def to_s - "#{@parent_identifier} StoredInfoTypeLargeCustomDictionary" - end - end - end - end -end diff --git a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_large_custom_dictionary_output_path.rb b/build/inspec/libraries/google/datalossprevention/property/storedinfotype_large_custom_dictionary_output_path.rb deleted file mode 100644 index 990736e25..000000000 --- a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_large_custom_dictionary_output_path.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: false - -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- -module GoogleInSpec - module DataLossPrevention - module Property - class StoredInfoTypeLargeCustomDictionaryOutputPath - attr_reader :path - - def initialize(args = nil, parent_identifier = nil) - return if args.nil? - @parent_identifier = parent_identifier - @path = args['path'] - end - - def to_s - "#{@parent_identifier} StoredInfoTypeLargeCustomDictionaryOutputPath" - end - end - end - end -end diff --git a/build/inspec/libraries/google/iam/property/iam_binding_condition.rb b/build/inspec/libraries/google/iam/property/iam_binding_condition.rb deleted file mode 100644 index fcabcbe7a..000000000 --- a/build/inspec/libraries/google/iam/property/iam_binding_condition.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: false - -# Copyright 2017 Google Inc. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -module GoogleInSpec - module Iam - module Property - class IamBindingCondition - attr_reader :title - - attr_reader :description - - attr_reader :expression - - def initialize(args = nil, parent_identifier = nil) - return if args.nil? - @parent_identifier = parent_identifier - @title = args['title'] - @description = args['description'] - @expression = args['expression'] - end - - def to_s - "#{@parent_identifier} IamBindingCondition" - end - end - end - end -end diff --git a/build/inspec/libraries/google/iam/property/iam_policy_audit_configs.rb b/build/inspec/libraries/google/iam/property/iam_policy_audit_configs.rb deleted file mode 100644 index e960b9b1f..000000000 --- a/build/inspec/libraries/google/iam/property/iam_policy_audit_configs.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: false - -# Copyright 2017 Google Inc. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# 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' -module GoogleInSpec - module Iam - module Property - class IamPolicyAuditConfigs - attr_reader :service - - attr_reader :audit_log_configs - - 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) - end - - def to_s - "#{@parent_identifier} IamPolicyAuditConfigs" - end - end - - class IamPolicyAuditConfigsArray - def self.parse(value, parent_identifier) - return if value.nil? - return IamPolicyAuditConfigs.new(value, parent_identifier) unless value.is_a?(::Array) - value.map { |v| IamPolicyAuditConfigs.new(v, parent_identifier) } - end - end - end - end -end diff --git a/build/inspec/libraries/google/iam/property/iam_policy_audit_configs_audit_log_configs.rb b/build/inspec/libraries/google/iam/property/iam_policy_audit_configs_audit_log_configs.rb deleted file mode 100644 index 371e49b38..000000000 --- a/build/inspec/libraries/google/iam/property/iam_policy_audit_configs_audit_log_configs.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: false - -# Copyright 2017 Google Inc. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -module GoogleInSpec - module Iam - module Property - class IamPolicyAuditConfigsAuditLogConfigs - attr_reader :log_type - - attr_reader :exempted_members - - def initialize(args = nil, parent_identifier = nil) - return if args.nil? - @parent_identifier = parent_identifier - @log_type = args['logType'] - @exempted_members = args['exemptedMembers'] - end - - def to_s - "#{@parent_identifier} IamPolicyAuditConfigsAuditLogConfigs" - end - end - - class IamPolicyAuditConfigsAuditLogConfigsArray - def self.parse(value, parent_identifier) - return if value.nil? - return IamPolicyAuditConfigsAuditLogConfigs.new(value, parent_identifier) unless value.is_a?(::Array) - value.map { |v| IamPolicyAuditConfigsAuditLogConfigs.new(v, parent_identifier) } - end - end - end - end -end diff --git a/build/inspec/libraries/google/iam/property/iam_policy_bindings.rb b/build/inspec/libraries/google/iam/property/iam_policy_bindings.rb deleted file mode 100644 index 7277ae4cb..000000000 --- a/build/inspec/libraries/google/iam/property/iam_policy_bindings.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: false - -# Copyright 2017 Google Inc. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'google/iam/property/iam_binding_condition' -module GoogleInSpec - module Iam - module Property - class IamPolicyBindings - attr_reader :role - - attr_reader :members - - attr_reader :condition - - 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) - end - - def to_s - "#{@parent_identifier} IamPolicyBindings" - end - end - - class IamPolicyBindingsArray - def self.parse(value, parent_identifier) - return if value.nil? - return IamPolicyBindings.new(value, parent_identifier) unless value.is_a?(::Array) - value.map { |v| IamPolicyBindings.new(v, parent_identifier) } - end - end - end - end -end diff --git a/build/inspec/libraries/google_data_loss_prevention_stored_info_type.rb b/build/inspec/libraries/google_data_loss_prevention_stored_info_type.rb deleted file mode 100644 index e1b9e6f1a..000000000 --- a/build/inspec/libraries/google_data_loss_prevention_stored_info_type.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: false - -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- -require 'gcp_backend' -require 'google/datalossprevention/property/storedinfotype_dictionary' -require 'google/datalossprevention/property/storedinfotype_dictionary_cloud_storage_path' -require 'google/datalossprevention/property/storedinfotype_dictionary_word_list' -require 'google/datalossprevention/property/storedinfotype_large_custom_dictionary' -require 'google/datalossprevention/property/storedinfotype_large_custom_dictionary_big_query_field' -require 'google/datalossprevention/property/storedinfotype_large_custom_dictionary_big_query_field_field' -require 'google/datalossprevention/property/storedinfotype_large_custom_dictionary_big_query_field_table' -require 'google/datalossprevention/property/storedinfotype_large_custom_dictionary_cloud_storage_file_set' -require 'google/datalossprevention/property/storedinfotype_large_custom_dictionary_output_path' -require 'google/datalossprevention/property/storedinfotype_regex' - -# A provider to manage Data loss prevention resources. -class DataLossPreventionStoredInfoType < GcpResourceBase - name 'google_data_loss_prevention_stored_info_type' - desc 'StoredInfoType' - supports platform: 'gcp' - - attr_reader :params - attr_reader :name - attr_reader :description - attr_reader :display_name - attr_reader :regex - attr_reader :dictionary - attr_reader :large_custom_dictionary - attr_reader :parent - - def initialize(params) - super(params.merge({ use_http_transport: true })) - @params = params - @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::DataLossPrevention::Property::StoredInfoTypeRegex.new(@fetched['regex'], to_s) - @dictionary = GoogleInSpec::DataLossPrevention::Property::StoredInfoTypeDictionary.new(@fetched['dictionary'], to_s) - @large_custom_dictionary = GoogleInSpec::DataLossPrevention::Property::StoredInfoTypeLargeCustomDictionary.new(@fetched['largeCustomDictionary'], to_s) - @parent = @fetched['parent'] - end - - def exists? - !@fetched.nil? - end - - def to_s - "StoredInfoType #{@params[:name]}" - end - - private - - def product_url(_ = nil) - 'https://dlp.googleapis.com/v2/' - end - - def resource_base_url - '{{parent}}/storedInfoTypes/{{name}}' - end -end diff --git a/build/inspec/test/integration/build/gcp-mm.tf b/build/inspec/test/integration/build/gcp-mm.tf deleted file mode 100644 index 53de3d66a..000000000 --- a/build/inspec/test/integration/build/gcp-mm.tf +++ /dev/null @@ -1,1553 +0,0 @@ -#variable "ssl_policy" { -# type = any -#} -# -#variable "topic" { -# type = any -#} -# -#variable "subscription" { -# type = any -#} -# -#variable "managed_zone" { -# type = any -#} -# -#variable "record_set" { -# type = any -#} -# -#variable "instance_group_manager" { -# type = any -#} -# -#variable "autoscaler" { -# type = any -#} -# -#variable "target_pool" { -# type = any -#} -# -#variable "trigger" { -# type = any -#} -# -#variable "health_check" { -# type = any -#} -# -#variable "backend_service" { -# type = any -#} -# -#variable "http_health_check" { -# type = any -#} -# -#variable "https_health_check" { -# type = any -#} -# -#variable "instance_template" { -# type = any -#} -# -#variable "global_address" { -# type = any -#} -# -#variable "url_map" { -# type = any -#} -# -#variable "http_proxy" { -# type = any -#} -# -#variable "global_forwarding_rule" { -# type = any -#} -# -#variable "target_tcp_proxy" { -# type = any -#} -# -#variable "route" { -# type = any -#} -# -#variable "router" { -# type = any -#} -# -#variable "snapshot" { -# type = any -#} -# -#variable "https_proxy" { -# type = any -#} -# -#variable "ssl_certificate" { -# type = any -#} -# -#variable "dataset" { -# type = any -#} -# -#variable "bigquery_table" { -# type = any -#} -# -#variable "repository" { -# type = any -#} -# -#variable "folder" { -# type = any -#} -# -#variable "gcp_organization_id" { -# type = string -# default = "none" -#} -# -#variable "cloudfunction" { -# type = any -#} -# -#variable "backend_bucket" { -# type = any -#} -# -#variable "gcp_cloud_function_region" {} -# -#variable "regional_node_pool" { -# type = any -#} -# -#variable "region_backend_service_health_check" { -# type = any -#} -# -#variable "region_backend_service" { -# type = any -#} -# -#variable "org_sink" { -# type = any -#} -# -#variable "standardappversion" { -# type = any -#} -# -#variable "ml_model" { -# type = any -#} -# -#variable "dataproc_cluster" { -# type = any -#} -# -#variable "folder_exclusion" { -# type = any -#} -# -#variable "filestore_instance" { -# type = any -#} -# -#variable "folder_sink" { -# type = any -#} -# -#variable "runtimeconfig_config" { -# type = any -#} -# -#variable "runtimeconfig_variable" { -# type = any -#} -# -#variable "redis" { -# type = any -#} -# -#variable "network_endpoint_group" { -# type = any -#} -# -#variable "node_template" { -# type = any -#} -# -#variable "node_group" { -# type = any -#} -# -#variable "router_nat" { -# type = any -#} -# -#variable "service" { -# type = any -#} -# -#variable "spannerinstance" { -# type = any -#} -# -#variable "spannerdatabase" { -# type = any -#} -# -#variable "scheduler_job" { -# type = any -#} -# -# -#resource "google_compute_ssl_policy" "custom-ssl-policy" { -# name = var.ssl_policy["name"] -# min_tls_version = var.ssl_policy["min_tls_version"] -# profile = var.ssl_policy["profile"] -# custom_features = [var.ssl_policy["custom_feature"], var.ssl_policy["custom_feature2"]] -# project = var.gcp_project_id -#} -# -#resource "google_pubsub_topic" "topic" { -# project = var.gcp_project_id -# name = var.topic["name"] -#} -# -#resource "google_pubsub_subscription" "default" { -# project = var.gcp_project_id -# name = var.subscription["name"] -# topic = google_pubsub_topic.topic.name -# ack_deadline_seconds = var.subscription["ack_deadline_seconds"] -#} -# -#resource "google_dns_managed_zone" "prod" { -# name = var.managed_zone["name"] -# dns_name = var.managed_zone["dns_name"] -# description = var.managed_zone["description"] -# -# labels = { -# key = var.managed_zone["label_value"] -# } -# project = var.gcp_project_id -#} -# -#resource "google_dns_record_set" "a" { -# name = var.record_set["name"] -# managed_zone = google_dns_managed_zone.prod.name -# type = var.record_set["type"] -# ttl = var.record_set["ttl"] -# -# rrdatas = [var.record_set["rrdatas1"], var.record_set["rrdatas2"]] -# project = var.gcp_project_id -#} -# -#resource "google_compute_instance_group_manager" "gcp-inspec-igm" { -# project = var.gcp_project_id -# zone = var.gcp_zone -# name = var.instance_group_manager["name"] -# version { -# instance_template = google_compute_instance_template.default.self_link -# } -# base_instance_name = var.instance_group_manager["base_instance_name"] -# target_pools = [] -# target_size = 0 -# named_port { -# name = var.instance_group_manager["named_port_name"] -# port = var.instance_group_manager["named_port_port"] -# } -#} -# -#resource "google_compute_autoscaler" "gcp-inspec-autoscaler" { -# project = var.gcp_project_id -# name = var.autoscaler["name"] -# zone = var.gcp_zone -# target = google_compute_instance_group_manager.gcp-inspec-igm.self_link -# -# autoscaling_policy { -# max_replicas = var.autoscaler["max_replicas"] -# min_replicas = var.autoscaler["min_replicas"] -# cooldown_period = var.autoscaler["cooldown_period"] -# -# cpu_utilization { -# target = var.autoscaler["cpu_utilization_target"] -# } -# } -#} -# -#resource "google_compute_target_pool" "gcp-inspec-target-pool" { -# project = var.gcp_project_id -# name = var.target_pool["name"] -# session_affinity = var.target_pool["session_affinity"] -# -# instances = [ -# "${var.gcp_zone}/${var.gcp_ext_vm_name}", -# ] -#} -# -#resource "google_cloudbuild_trigger" "gcp-inspec-cloudbuild-trigger" { -# project = var.gcp_project_id -# trigger_template { -# branch_name = var.trigger["trigger_template_branch"] -# project_id = var.trigger["trigger_template_project"] -# repo_name = var.trigger["trigger_template_repo"] -# } -# filename = var.trigger["filename"] -#} -# -#resource "google_compute_health_check" "gcp-inspec-health-check" { -# project = var.gcp_project_id -# name = var.health_check["name"] -# -# timeout_sec = var.health_check["timeout_sec"] -# check_interval_sec = var.health_check["check_interval_sec"] -# -# tcp_health_check { -# port = var.health_check["tcp_health_check_port"] -# } -#} -# -#resource "google_compute_backend_service" "gcp-inspec-backend-service" { -# project = var.gcp_project_id -# name = var.backend_service["name"] -# description = var.backend_service["description"] -# port_name = var.backend_service["port_name"] -# protocol = var.backend_service["protocol"] -# timeout_sec = var.backend_service["timeout_sec"] -# enable_cdn = var.backend_service["enable_cdn"] -# -# backend { -# group = google_compute_instance_group_manager.gcp-inspec-igm.instance_group -# } -# -# health_checks = [google_compute_health_check.gcp-inspec-health-check.self_link] -#} -# -#resource "google_compute_health_check" "gcp-inspec-region-backend-service-hc" { -# project = var.gcp_project_id -# name = var.region_backend_service_health_check["name"] -# -# timeout_sec = var.region_backend_service_health_check["timeout_sec"] -# check_interval_sec = var.region_backend_service_health_check["check_interval_sec"] -# -# tcp_health_check { -# port = var.region_backend_service_health_check["tcp_health_check_port"] -# } -#} -# -#resource "google_compute_region_backend_service" "gcp-inspec-region-backend-service" { -# project = var.gcp_project_id -# region = var.gcp_location -# name = var.region_backend_service["name"] -# description = var.region_backend_service["description"] -# protocol = var.region_backend_service["protocol"] -# timeout_sec = var.region_backend_service["timeout_sec"] -# -# health_checks = [google_compute_health_check.gcp-inspec-region-backend-service-hc.self_link] -#} -# -#resource "google_compute_http_health_check" "gcp-inspec-http-health-check" { -# project = var.gcp_project_id -# name = var.http_health_check["name"] -# request_path = var.http_health_check["request_path"] -# -# timeout_sec = var.http_health_check["timeout_sec"] -# check_interval_sec = var.http_health_check["check_interval_sec"] -#} -# -#resource "google_compute_https_health_check" "gcp-inspec-https-health-check" { -# project = var.gcp_project_id -# name = var.https_health_check["name"] -# request_path = var.https_health_check["request_path"] -# -# timeout_sec = var.https_health_check["timeout_sec"] -# check_interval_sec = var.https_health_check["check_interval_sec"] -# unhealthy_threshold = var.https_health_check["unhealthy_threshold"] -#} -# -#resource "google_compute_instance_template" "gcp-inspec-instance-template" { -# project = var.gcp_project_id -# name = var.instance_template["name"] -# description = var.instance_template["description"] -# -# tags = [var.instance_template["tag"]] -# -# instance_description = var.instance_template["instance_description"] -# machine_type = var.instance_template["machine_type"] -# can_ip_forward = var.instance_template["can_ip_forward"] -# -# scheduling { -# automatic_restart = var.instance_template["scheduling_automatic_restart"] -# on_host_maintenance = var.instance_template["scheduling_on_host_maintenance"] -# } -# -# // Create a new boot disk from an image -# disk { -# source_image = var.instance_template["disk_source_image"] -# auto_delete = var.instance_template["disk_auto_delete"] -# boot = var.instance_template["disk_boot"] -# } -# -# network_interface { -# network = var.instance_template["network_interface_network"] -# } -# -# service_account { -# scopes = [var.instance_template["service_account_scope"]] -# } -#} -# -#resource "google_compute_global_address" "gcp-inspec-global-address" { -# project = var.gcp_project_id -# name = var.global_address["name"] -# ip_version = var.global_address["ip_version"] -#} -# -#resource "google_compute_url_map" "gcp-inspec-url-map" { -# project = var.gcp_project_id -# name = var.url_map["name"] -# description = var.url_map["description"] -# -# default_service = google_compute_backend_service.gcp-inspec-backend-service.self_link -# -# host_rule { -# hosts = [var.url_map["host_rule_host"]] -# path_matcher = var.url_map["path_matcher_name"] -# } -# -# path_matcher { -# name = var.url_map["path_matcher_name"] -# default_service = google_compute_backend_service.gcp-inspec-backend-service.self_link -# -# path_rule { -# paths = [var.url_map["path_rule_path"]] -# service = google_compute_backend_service.gcp-inspec-backend-service.self_link -# } -# } -# -# test { -# service = google_compute_backend_service.gcp-inspec-backend-service.self_link -# host = var.url_map["test_host"] -# path = var.url_map["test_path"] -# } -#} -# -#resource "google_compute_target_http_proxy" "gcp-inspec-http-proxy" { -# project = var.gcp_project_id -# name = var.http_proxy["name"] -# url_map = google_compute_url_map.gcp-inspec-url-map.self_link -# description = var.http_proxy["description"] -#} -# -#resource "google_compute_global_forwarding_rule" "gcp-inspec-global-forwarding-rule" { -# project = var.gcp_project_id -# name = var.global_forwarding_rule["name"] -# target = google_compute_target_http_proxy.gcp-inspec-http-proxy.self_link -# port_range = var.global_forwarding_rule["port_range"] -#} -# -#resource "google_compute_backend_service" "gcp-inspec-tcp-backend-service" { -# project = var.gcp_project_id -# name = var.target_tcp_proxy["tcp_backend_service_name"] -# protocol = "TCP" -# timeout_sec = 10 -# -# health_checks = [google_compute_health_check.gcp-inspec-health-check.self_link] -#} -# -#resource "google_compute_target_tcp_proxy" "gcp-inspec-target-tcp-proxy" { -# project = var.gcp_project_id -# name = var.target_tcp_proxy["name"] -# proxy_header = var.target_tcp_proxy["proxy_header"] -# backend_service = google_compute_backend_service.gcp-inspec-tcp-backend-service.self_link -#} -# -#resource "google_compute_route" "gcp-inspec-route" { -# project = var.gcp_project_id -# name = var.route["name"] -# dest_range = var.route["dest_range"] -# network = google_compute_network.inspec-gcp-network.name -# next_hop_ip = var.route["next_hop_ip"] -# priority = var.route["priority"] -# # google_compute_route depends on next_hop_ip belonging to a subnetwork -# # of the named network in this block. Since inspec-gcp-network does not -# # automatically create subnetworks, we need to create a dependency so -# # the route is not created before the subnetwork -# depends_on = [google_compute_subnetwork.inspec-gcp-subnetwork] -#} -# -#resource "google_compute_router" "gcp-inspec-router" { -# project = var.gcp_project_id -# name = var.router["name"] -# network = google_compute_network.inspec-gcp-network.name -# bgp { -# asn = var.router["bgp_asn"] -# advertise_mode = var.router["bgp_advertise_mode"] -# advertised_groups = [var.router["bgp_advertised_group"]] -# advertised_ip_ranges { -# range = var.router["bgp_advertised_ip_range1"] -# } -# advertised_ip_ranges { -# range = var.router["bgp_advertised_ip_range2"] -# } -# } -#} -# -#resource "google_compute_disk" "snapshot-disk" { -# project = var.gcp_project_id -# name = var.snapshot["disk_name"] -# type = var.snapshot["disk_type"] -# zone = var.gcp_zone -# image = var.snapshot["disk_image"] -# labels = { -# environment = "generic_compute_disk_label" -# } -#} -# -#resource "google_compute_snapshot" "gcp-inspec-snapshot" { -# project = var.gcp_project_id -# name = var.snapshot["name"] -# source_disk = google_compute_disk.snapshot-disk.name -# zone = var.gcp_zone -#} -# -#resource "google_compute_ssl_certificate" "gcp-inspec-ssl-certificate" { -# project = var.gcp_project_id -# name = var.ssl_certificate["name"] -# private_key = var.ssl_certificate["private_key"] -# certificate = var.ssl_certificate["certificate"] -# description = var.ssl_certificate["description"] -#} -# -#resource "google_compute_target_https_proxy" "gcp-inspec-https-proxy" { -# project = var.gcp_project_id -# name = var.https_proxy["name"] -# url_map = google_compute_url_map.gcp-inspec-url-map.self_link -# description = var.https_proxy["description"] -# ssl_certificates = [google_compute_ssl_certificate.gcp-inspec-ssl-certificate.self_link] -#} -# -#resource "google_bigquery_dataset" "gcp-inspec-dataset" { -# project = var.gcp_project_id -# dataset_id = var.dataset["dataset_id"] -# friendly_name = var.dataset["friendly_name"] -# description = var.dataset["description"] -# location = var.dataset["location"] -# default_table_expiration_ms = var.dataset["default_table_expiration_ms"] -# -# access { -# role = var.dataset["access_writer_role"] -# special_group = var.dataset["access_writer_special_group"] -# } -# -# access { -# role = "OWNER" -# special_group = "projectOwners" -# } -#} -# -#resource "google_bigquery_table" "gcp-inspec-bigquery-table" { -# project = var.gcp_project_id -# dataset_id = google_bigquery_dataset.gcp-inspec-dataset.dataset_id -# table_id = var.bigquery_table["table_id"] -# -# time_partitioning { -# type = var.bigquery_table["time_partitioning_type"] -# } -# -# description = var.bigquery_table["description"] -# expiration_time = var.bigquery_table["expiration_time"] -#} -# -#resource "google_sourcerepo_repository" "gcp-inspec-sourcerepo-repository" { -# project = var.gcp_project_id -# name = var.repository["name"] -#} -# -#resource "google_folder" "inspec-gcp-folder" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# display_name = var.folder["display_name"] -# parent = "organizations/${var.gcp_organization_id}" -#} -# -#resource "google_storage_bucket_object" "archive" { -# name = "index.js.zip" -# bucket = google_storage_bucket.generic-storage-bucket.name -# source = "../configuration/index.js.zip" -#} -# -#resource "google_cloudfunctions_function" "function" { -# project = var.gcp_project_id -# region = var.gcp_cloud_function_region -# name = var.cloudfunction["name"] -# description = var.cloudfunction["description"] -# available_memory_mb = var.cloudfunction["available_memory_mb"] -# source_archive_bucket = google_storage_bucket.generic-storage-bucket.name -# source_archive_object = google_storage_bucket_object.archive.name -# trigger_http = var.cloudfunction["trigger_http"] -# timeout = var.cloudfunction["timeout"] -# entry_point = var.cloudfunction["entry_point"] -# runtime = "nodejs8" -# -# environment_variables = { -# MY_ENV_VAR = var.cloudfunction["env_var_value"] -# } -#} -# -#resource "google_compute_backend_bucket" "image_backend" { -# project = var.gcp_project_id -# name = var.backend_bucket["name"] -# description = var.backend_bucket["description"] -# bucket_name = google_storage_bucket.generic-storage-bucket.name -# enable_cdn = var.backend_bucket["enable_cdn"] -#} -# -#resource "google_container_node_pool" "inspec-gcp-node-pool" { -# project = var.gcp_project_id -# name = var.regional_node_pool["name"] -# location = google_container_cluster.primary.location -# cluster = google_container_cluster.primary.name -# node_count = var.regional_node_pool["node_count"] -#} -# -#resource "google_logging_organization_sink" "my-sink" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# name = var.org_sink.name -# org_id = var.gcp_organization_id -# -# # Can export to pubsub, cloud storage, or bigquery -# destination = "storage.googleapis.com/${google_storage_bucket.generic-storage-bucket.name}" -# -# # Log all WARN or higher severity messages relating to instances -# filter = var.org_sink.filter -#} -# -#variable "project_sink" { -# type = any -#} -# -#resource "google_logging_project_sink" "project-logging-sink" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# project = var.gcp_project_id -# -# name = var.project_sink.name -# destination = "storage.googleapis.com/${google_storage_bucket.project-logging-bucket[0].name}" -# -# filter = var.project_sink.filter -# -# unique_writer_identity = true -#} -# -#resource "google_storage_bucket" "bucket" { -# name = "inspec-gcp-static-${var.gcp_project_id}" -# project = var.gcp_project_id -# location = var.gcp_location -# force_destroy = true -# -# labels = { -# "key" = "value" -# } -# -# retention_policy { -# retention_period = 1000 -# } -#} -# -#resource "google_storage_bucket_object" "object" { -# name = "hello-world.zip" -# bucket = google_storage_bucket.bucket.name -# source = "../configuration/hello-world.zip" -#} -# -#resource "google_app_engine_standard_app_version" "default" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# project = var.gcp_project_id -# version_id = var.standardappversion["version_id"] -# service = var.standardappversion["service"] -# runtime = var.standardappversion["runtime"] -# noop_on_destroy = true -# entrypoint { -# shell = var.standardappversion["entrypoint"] -# } -# -# deployment { -# zip { -# source_url = "https://storage.googleapis.com/${google_storage_bucket.bucket.name}/hello-world.zip" -# } -# } -# -# env_variables = { -# port = var.standardappversion["port"] -# } -#} -# -#resource "google_ml_engine_model" "inspec-gcp-model" { -# project = var.gcp_project_id -# name = var.ml_model["name"] -# description = var.ml_model["description"] -# regions = [var.ml_model["region"]] -# online_prediction_logging = var.ml_model["online_prediction_logging"] -# online_prediction_console_logging = var.ml_model["online_prediction_console_logging"] -#} -# -#resource "google_compute_firewall" "dataproc" { -# project = var.gcp_project_id -# name = "dataproc-firewall" -# network = google_compute_network.dataproc.name -# -# source_ranges = ["10.128.0.0/9"] -# allow { -# protocol = "icmp" -# } -# -# allow { -# protocol = "tcp" -# ports = ["0-65535"] -# } -# allow { -# protocol = "udp" -# ports = ["0-65535"] -# } -#} -# -#resource "google_compute_network" "dataproc" { -# project = var.gcp_project_id -# name = "dataproc-network" -#} -# -#resource "google_dataproc_cluster" "mycluster" { -# project = var.gcp_project_id -# region = var.gcp_location -# name = var.dataproc_cluster["name"] -# -# labels = { -# "${var.dataproc_cluster["label_key"]}" = var.dataproc_cluster["label_value"] -# } -# -# cluster_config { -# master_config { -# num_instances = var.dataproc_cluster["config"]["master_config"]["num_instances"] -# machine_type = var.dataproc_cluster["config"]["master_config"]["machine_type"] -# disk_config { -# boot_disk_type = var.dataproc_cluster["config"]["master_config"]["boot_disk_type"] -# boot_disk_size_gb = var.dataproc_cluster["config"]["master_config"]["boot_disk_size_gb"] -# } -# } -# -# worker_config { -# num_instances = var.dataproc_cluster["config"]["worker_config"]["num_instances"] -# machine_type = var.dataproc_cluster["config"]["worker_config"]["machine_type"] -# disk_config { -# boot_disk_size_gb = var.dataproc_cluster["config"]["worker_config"]["boot_disk_size_gb"] -# num_local_ssds = var.dataproc_cluster["config"]["worker_config"]["num_local_ssds"] -# } -# } -# -# # Override or set some custom properties -# software_config { -# override_properties = { -# "${var.dataproc_cluster["config"]["software_config"]["prop_key"]}" = var.dataproc_cluster["config"]["software_config"]["prop_value"] -# } -# } -# -# gce_cluster_config { -# network = google_compute_network.dataproc.self_link -# tags = [var.dataproc_cluster["config"]["gce_cluster_config"]["tag"]] -# } -# } -#} -# -#resource "google_logging_folder_exclusion" "my-exclusion" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# name = var.folder_exclusion["name"] -# folder = google_folder.inspec-gcp-folder.0.name -# -# description = var.folder_exclusion["description"] -# -# filter = var.folder_exclusion["filter"] -#} -# -#variable "project_exclusion" { -# type = any -#} -# -#resource "google_logging_project_exclusion" "project-exclusion" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# name = var.project_exclusion["name"] -# project = var.gcp_project_id -# -# description = var.project_exclusion["description"] -# -# filter = var.project_exclusion["filter"] -#} -# -#resource "google_filestore_instance" "instance" { -# project = var.gcp_project_id -# name = var.filestore_instance["name"] -# zone = var.filestore_instance["zone"] -# tier = var.filestore_instance["tier"] -# -# file_shares { -# capacity_gb = var.filestore_instance["fileshare_capacity_gb"] -# name = var.filestore_instance["fileshare_name"] -# } -# -# networks { -# network = var.filestore_instance["network_name"] -# modes = [var.filestore_instance["network_mode"]] -# } -#} -# -#resource "google_logging_folder_sink" "folder-sink" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# name = var.folder_sink.name -# folder = google_folder.inspec-gcp-folder.0.name -# -# destination = "storage.googleapis.com/${google_storage_bucket.generic-storage-bucket.name}" -# -# filter = var.folder_sink.filter -#} -# -#resource "google_runtimeconfig_config" "inspec-runtime-config" { -# project = var.gcp_project_id -# name = var.runtimeconfig_config["name"] -# description = var.runtimeconfig_config["description"] -#} -# -#resource "google_runtimeconfig_variable" "inspec-runtime-variable" { -# project = var.gcp_project_id -# parent = google_runtimeconfig_config.inspec-runtime-config.name -# name = var.runtimeconfig_variable["name"] -# text = var.runtimeconfig_variable["text"] -#} -# -#resource "google_redis_instance" "inspec-redis" { -# project = var.gcp_project_id -# name = var.redis["name"] -# tier = var.redis["tier"] -# memory_size_gb = var.redis["memory_size_gb"] -# -# location_id = var.redis["location_id"] -# alternative_location_id = var.redis["alternative_location_id"] -# -# redis_version = var.redis["redis_version"] -# display_name = var.redis["display_name"] -# reserved_ip_range = var.redis["reserved_ip_range"] -# -# labels = { -# "${var.redis["label_key"]}" = var.redis["label_value"] -# } -#} -# -#resource "google_compute_network_endpoint_group" "inspec-endpoint-group" { -# project = var.gcp_project_id -# name = var.network_endpoint_group["name"] -# network = google_compute_subnetwork.inspec-gcp-subnetwork.network -# subnetwork = google_compute_subnetwork.inspec-gcp-subnetwork.self_link -# default_port = var.network_endpoint_group["default_port"] -# zone = var.gcp_zone -#} -# -#data "google_compute_node_types" "zone-node-type" { -# project = var.gcp_project_id -# zone = var.gcp_zone -#} -# -#resource "google_compute_node_template" "inspec-template" { -# project = var.gcp_project_id -# region = var.gcp_location -# -# name = var.node_template["name"] -# node_type = data.google_compute_node_types.zone-node-type.names[0] -# -# node_affinity_labels = { -# "${var.node_template["label_key"]}" = var.node_template["label_value"] -# } -#} -# -#resource "google_compute_node_group" "inspec-node-group" { -# project = var.gcp_project_id -# name = var.node_group["name"] -# zone = var.gcp_zone -# description = var.node_group["description"] -# -# size = var.node_group["size"] -# node_template = google_compute_node_template.inspec-template.self_link -#} -# -#resource "google_compute_router_nat" "inspec-nat" { -# project = var.gcp_project_id -# name = var.router_nat["name"] -# router = google_compute_router.gcp-inspec-router.name -# region = google_compute_router.gcp-inspec-router.region -# nat_ip_allocate_option = var.router_nat["nat_ip_allocate_option"] -# source_subnetwork_ip_ranges_to_nat = var.router_nat["source_subnetwork_ip_ranges_to_nat"] -# min_ports_per_vm = var.router_nat["min_ports_per_vm"] -# -# log_config { -# enable = var.router_nat["log_config_enable"] -# filter = var.router_nat["log_config_filter"] -# } -#} -# -#resource "google_project_service" "project" { -# project = var.gcp_project_id -# service = var.service["name"] -#} -# -#resource "google_service_account" "spanner_service_account" { -# project = var.gcp_project_id -# account_id = "${var.gcp_service_account_display_name}-sp" -# display_name = "${var.gcp_service_account_display_name}-sp" -#} -# -#resource "google_service_account_key" "userkey" { -# service_account_id = google_service_account.spanner_service_account.name -# public_key_type = "TYPE_X509_PEM_FILE" -#} -# -#resource "google_spanner_instance" "spanner_instance" { -# project = var.gcp_project_id -# config = var.spannerinstance["config"] -# name = var.spannerinstance["name"] -# display_name = var.spannerinstance["display_name"] -# num_nodes = var.spannerinstance["num_nodes"] -# labels = { -# "${var.spannerinstance["label_key"]}" = var.spannerinstance["label_value"] -# } -#} -# -#resource "google_spanner_instance_iam_binding" "instance" { -# project = var.gcp_project_id -# instance = google_spanner_instance.spanner_instance.name -# role = "roles/editor" -# -# members = [ -# "serviceAccount:${google_service_account.spanner_service_account.email}", -# ] -#} -# -#resource "google_spanner_database" "database" { -# project = var.gcp_project_id -# instance = google_spanner_instance.spanner_instance.name -# name = var.spannerdatabase["name"] -# ddl = [var.spannerdatabase["ddl"]] -#} -# -#resource "google_cloud_scheduler_job" "job" { -# project = var.gcp_project_id -# region = var.scheduler_job["region"] -# name = var.scheduler_job["name"] -# description = var.scheduler_job["description"] -# schedule = var.scheduler_job["schedule"] -# time_zone = var.scheduler_job["time_zone"] -# -# http_target { -# http_method = var.scheduler_job["http_method"] -# uri = var.scheduler_job["http_target_uri"] -# } -#} -# -#variable "service_perimeter" { -# type = any -#} -# -#resource "google_access_context_manager_service_perimeter" "service-perimeter" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# parent = "accessPolicies/${google_access_context_manager_access_policy.access-policy.0.name}" -# name = "accessPolicies/${google_access_context_manager_access_policy.access-policy.0.name}/servicePerimeters/${var.service_perimeter["name"]}" -# title = var.service_perimeter["title"] -# status { -# restricted_services = [var.service_perimeter["restricted_service"]] -# } -#} -# -#resource "google_access_context_manager_access_policy" "access-policy" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# parent = "organizations/${var.gcp_organization_id}" -# title = var.service_perimeter["policy_title"] -#} -# -#resource "google_access_context_manager_access_level" "access-level" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# parent = "accessPolicies/${google_access_context_manager_access_policy.access-policy.0.name}" -# name = "accessPolicies/${google_access_context_manager_access_policy.access-policy.0.name}/accessLevels/os_lock" -# title = "os_lock" -# basic { -# conditions { -# device_policy { -# require_screen_lock = true -# } -# regions = [ -# "CH", -# "IT", -# "US", -# ] -# } -# } -#} -# -#variable "firewall" { -# type = any -#} -# -#resource "google_compute_firewall" "mm-firewall" { -# project = var.gcp_project_id -# name = var.firewall["name"] -# enable_logging = true -# network = google_compute_network.inspec-gcp-network.name -# -# allow { -# protocol = "tcp" -# ports = ["80", "8080", "1000-2000"] -# } -# -# source_tags = [var.firewall["source_tag"]] -#} -# -#variable "address" { -# type = any -#} -# -#resource "google_compute_address" "internal_with_subnet_and_address" { -# project = var.gcp_project_id -# name = var.address["name"] -# subnetwork = google_compute_subnetwork.inspec-gcp-subnetwork.self_link -# address_type = var.address["address_type"] -# address = var.address["address"] -# region = var.gcp_location -#} -# -#variable "instance_group" { -# type = any -#} -# -#resource "google_compute_instance_group" "inspec-instance-group" { -# project = var.gcp_project_id -# zone = var.gcp_zone -# name = var.instance_group["name"] -# description = var.instance_group["description"] -# -# named_port { -# name = var.instance_group["named_port_name"] -# port = var.instance_group["named_port_port"] -# } -#} -# -#variable "instance" { -# type = any -#} -# -#resource "google_compute_instance" "inspec-instance" { -# project = var.gcp_project_id -# zone = var.gcp_zone -# name = var.instance["name"] -# machine_type = var.instance["machine_type"] -# -# tags = [var.instance["tag_1"], var.instance["tag_2"]] -# -# boot_disk { -# initialize_params { -# image = "debian-cloud/debian-9" -# } -# } -# -# network_interface { -# network = "default" -# -# access_config { -# // Ephemeral IP -# } -# } -# -# metadata = { -# "${var.instance["metadata_key"]}" = var.instance["metadata_value"] -# } -# -# metadata_startup_script = var.instance["startup_script"] -# -# service_account { -# scopes = [var.instance["sa_scope"]] -# } -#} -# -#variable "network" { -# type = any -#} -# -#resource "google_compute_network" "inspec-network" { -# project = var.gcp_project_id -# name = var.network["name"] -# routing_mode = var.network["routing_mode"] -#} -# -#variable "subnetwork" { -# type = any -#} -# -#resource "google_compute_subnetwork" "subnet-with-logging" { -# project = var.gcp_project_id -# region = var.gcp_location -# name = var.subnetwork["name"] -# ip_cidr_range = var.subnetwork["ip_cidr_range"] -# network = google_compute_network.inspec-network.self_link -# -# log_config { -# aggregation_interval = var.subnetwork["log_interval"] -# flow_sampling = var.subnetwork["log_sampling"] -# metadata = var.subnetwork["log_metadata"] -# } -#} -# -#variable "rigm" { -# type = any -#} -# -variable "sql_connect" { - type = any -} -# -#resource "google_compute_region_instance_group_manager" "inspec-rigm" { -# project = var.gcp_project_id -# region = var.gcp_location -# name = var.rigm["name"] -# -# base_instance_name = var.rigm["base_instance_name"] -# -# version { -# instance_template = google_compute_instance_template.gcp-inspec-instance-template.self_link -# } -# -# target_pools = [google_compute_target_pool.gcp-inspec-target-pool.self_link] -# target_size = var.rigm["target_size"] -# -# named_port { -# name = var.rigm["named_port_name"] -# port = var.rigm["named_port_port"] -# } -# -# auto_healing_policies { -# health_check = google_compute_health_check.gcp-inspec-health-check.self_link -# initial_delay_sec = var.rigm["healing_delay"] -# } -#} -# -#variable "vpn_tunnel" { -# type = any -#} -# -#resource "google_compute_vpn_tunnel" "tunnel1" { -# project = var.gcp_project_id -# name = var.vpn_tunnel["name"] -# peer_ip = var.vpn_tunnel["peer_ip"] -# shared_secret = var.vpn_tunnel["shared_secret"] -# -# remote_traffic_selector = ["0.0.0.0/0"] -# local_traffic_selector = ["0.0.0.0/0"] -# target_vpn_gateway = google_compute_vpn_gateway.inspec-gcp-vpn-gateway.self_link -# -# depends_on = [ -# google_compute_forwarding_rule.inspec-gcp-fr-esp, -# google_compute_forwarding_rule.inspec-gcp-fr-udp500, -# google_compute_forwarding_rule.inspec-gcp-fr-udp4500, -# ] -#} -# -#variable "alert_policy" { -# type = any -#} -# -#resource "google_monitoring_alert_policy" "alert_policy" { -# project = var.gcp_project_id -# display_name = var.alert_policy["display_name"] -# combiner = var.alert_policy["combiner"] -# conditions { -# display_name = var.alert_policy["condition_display_name"] -# condition_threshold { -# filter = var.alert_policy["condition_filter"] -# duration = var.alert_policy["condition_duration"] -# comparison = var.alert_policy["condition_comparison"] -# aggregations { -# alignment_period = "60s" -# per_series_aligner = "ALIGN_RATE" -# } -# } -# } -#} -# -#variable "dns_managed_zone" { -# type = any -#} -# -#variable "gcp_dns_zone_name" {} -# -#resource "google_dns_managed_zone" "example-zone" { -# project = var.gcp_project_id -# name = var.dns_managed_zone["name"] -# dns_name = "${var.gcp_dns_zone_name}" -# description = var.dns_managed_zone["description"] -# dnssec_config { -# state = var.dns_managed_zone["dnssec_config_state"] -# default_key_specs { -# algorithm = "rsasha256" -# key_type = "zoneSigning" -# key_length = 2048 -# } -# default_key_specs { -# algorithm = "rsasha512" -# key_type = "keySigning" -# key_length = 2048 -# } -# } -#} -# -#variable "logging_metric" { -# type = any -#} -# -#resource "google_logging_metric" "logging_metric" { -# project = var.gcp_project_id -# name = var.logging_metric["name"] -# filter = var.logging_metric["filter"] -# metric_descriptor { -# metric_kind = var.logging_metric["metric_kind"] -# value_type = var.logging_metric["value_type"] -# } -#} -# -#variable "compute_image" { -# type = any -#} -# -#resource "google_compute_image" "example" { -# project = var.gcp_project_id -# name = var.compute_image["name"] -# -# raw_disk { -# source = var.compute_image["source"] -# } -#} -# -#variable "gcp_organization_iam_custom_role_id" {} -# -#resource "google_organization_iam_custom_role" "generic_org_iam_custom_role" { -# count = "${var.gcp_organization_id == "" ? 0 : var.gcp_enable_privileged_resources}" -# org_id = var.gcp_organization_id -# role_id = var.gcp_organization_iam_custom_role_id -# title = "GCP Inspec Generic Organization IAM Custom Role" -# description = "Custom role allowing to list IAM roles only" -# permissions = ["iam.roles.list"] -#} -# -#variable "security_policy" { -# type = any -#} -# -#resource "google_compute_security_policy" "policy" { -# project = var.gcp_project_id -# name = var.security_policy["name"] -# -# rule { -# action = var.security_policy["action"] -# priority = var.security_policy["priority"] -# match { -# versioned_expr = "SRC_IPS_V1" -# config { -# src_ip_ranges = [var.security_policy["ip_range"]] -# } -# } -# description = var.security_policy["description"] -# } -# -# rule { -# action = "allow" -# priority = "2147483647" -# match { -# versioned_expr = "SRC_IPS_V1" -# config { -# src_ip_ranges = ["*"] -# } -# } -# description = "default rule" -# } -#} -# -#variable "memcache_instance" { -# type = any -#} -# -#resource "google_compute_network" "memcache_network" { -# provider = google-beta -# project = var.gcp_project_id -# name = "inspec-gcp-memcache" -#} -# -#resource "google_compute_global_address" "service_range" { -# provider = google-beta -# project = var.gcp_project_id -# name = "inspec-gcp-memcache" -# purpose = "VPC_PEERING" -# address_type = "INTERNAL" -# prefix_length = 16 -# network = google_compute_network.memcache_network.id -#} -# -#resource "google_service_networking_connection" "private_service_connection" { -# provider = google-beta -# network = google_compute_network.memcache_network.id -# service = "servicenetworking.googleapis.com" -# reserved_peering_ranges = [google_compute_global_address.service_range.name] -#} -# -#resource "google_memcache_instance" "instance" { -# provider = google-beta -# name = var.memcache_instance["name"] -# project = var.gcp_project_id -# region = var.gcp_location -# authorized_network = google_service_networking_connection.private_service_connection.network -# -# node_config { -# cpu_count = 1 -# memory_size_mb = 1024 -# } -# node_count = 1 -#} -# -#resource "google_compute_interconnect_attachment" "on_prem" { -# name = "on-prem-attachment" -# edge_availability_domain = "AVAILABILITY_DOMAIN_1" -# type = "PARTNER" -# router = google_compute_router.gcp-inspec-router.id -# mtu = 1500 -#} -# -resource "google_sql_ssl_cert" "client_cert" { - common_name = var.sql_connect["common_name"] - instance = var.gcp_db_instance_name -} - -resource "google_data_loss_prevention_stored_info_type" "basic" { - parent = "projects/my-project-name" - description = "Description" - display_name = "Displayname" - - regex { - pattern = "patient" - group_indexes = [2] - } -} - - - - -resource "google_vertex_ai_tensorboard" "tensorboard" { - display_name = "terraform-${local.name_suffix}" - description = "sample description" - labels = { - "key1" : "value1", - "key2" : "value2" - } - region = "us-central1" -} - - -resource "google_ml_engine_model" "default" { - name = "default-${local.name_suffix}" - description = "My model" - regions = ["us-central1"] -} - - -resource "google_vertex_ai_featurestore" "featurestore" { - name = "terraform-${local.name_suffix}" - labels = { - foo = "bar" - } - region = "us-central1" - online_serving_config { - fixed_node_count = 2 - } -} - -resource "google_vertex_ai_featurestore_entitytype" "entity" { - name = "terraform-${local.name_suffix}" - labels = { - foo = "bar" - } - featurestore = google_vertex_ai_featurestore.featurestore.id -} - -resource "google_vertex_ai_featurestore_entitytype_feature" "feature" { - name = "terraform-${local.name_suffix}" - labels = { - foo = "bar" - } - entitytype = google_vertex_ai_featurestore_entitytype.entity.id - - value_type = "INT64_ARRAY" -} - - -resource "google_vertex_ai_index_endpoint" "index_endpoint" { - display_name = "sample-endpoint" - description = "A sample vertex endpoint" - region = "us-central1" - labels = { - label-one = "value-one" - } - network = "projects/${data.google_project.project.number}/global/networks/${data.google_compute_network.vertex_network.name}" - depends_on = [ - google_service_networking_connection.vertex_vpc_connection - ] -} - -resource "google_service_networking_connection" "vertex_vpc_connection" { - network = data.google_compute_network.vertex_network.id - service = "servicenetworking.googleapis.com" - reserved_peering_ranges = [google_compute_global_address.vertex_range.name] -} - -resource "google_compute_global_address" "vertex_range" { - name = "address-name-${local.name_suffix}" - purpose = "VPC_PEERING" - address_type = "INTERNAL" - prefix_length = 24 - network = data.google_compute_network.vertex_network.id -} - -data "google_compute_network" "vertex_network" { - name = "network-name-${local.name_suffix}" -} - -data "google_project" "project" {} - - -resource "google_service_directory_namespace" "example" { - provider = google-beta - namespace_id = "example-namespace-${local.name_suffix}" - location = "us-central1" -} - -resource "google_service_directory_service" "example" { - provider = google-beta - service_id = "example-service-${local.name_suffix}" - namespace = google_service_directory_namespace.example.id -} - -resource "google_service_directory_endpoint" "example" { - provider = google-beta - endpoint_id = "example-endpoint-${local.name_suffix}" - service = google_service_directory_service.example.id - - metadata = { - stage = "prod" - region = "us-central1" - } - - address = "1.2.3.4" - port = 5353 -} - - -resource "google_service_directory_namespace" "example" { - provider = google-beta - namespace_id = "example-namespace-${local.name_suffix}" - location = "us-central1" -} - -resource "google_service_directory_service" "example" { - provider = google-beta - service_id = "example-service-${local.name_suffix}" - namespace = google_service_directory_namespace.example.id -} - -resource "google_service_directory_endpoint" "example" { - provider = google-beta - endpoint_id = "example-endpoint-${local.name_suffix}" - service = google_service_directory_service.example.id - - metadata = { - stage = "prod" - region = "us-central1" - } - - address = "1.2.3.4" - port = 5353 -} - - -resource "google_service_directory_namespace" "example" { - provider = google-beta - namespace_id = "example-namespace-${local.name_suffix}" - location = "us-central1" -} - -resource "google_service_directory_service" "example" { - provider = google-beta - service_id = "example-service-${local.name_suffix}" - namespace = google_service_directory_namespace.example.id -} - -resource "google_service_directory_endpoint" "example" { - provider = google-beta - endpoint_id = "example-endpoint-${local.name_suffix}" - service = google_service_directory_service.example.id - - metadata = { - stage = "prod" - region = "us-central1" - } - - address = "1.2.3.4" - port = 5353 -} - - -resource "google_service_directory_namespace" "example" { - provider = google-beta - namespace_id = "example-namespace-${local.name_suffix}" - location = "us-central1" -} - -resource "google_service_directory_service" "example" { - provider = google-beta - service_id = "example-service-${local.name_suffix}" - namespace = google_service_directory_namespace.example.id -} - -resource "google_service_directory_endpoint" "example" { - provider = google-beta - endpoint_id = "example-endpoint-${local.name_suffix}" - service = google_service_directory_service.example.id - - metadata = { - stage = "prod" - region = "us-central1" - } - - address = "1.2.3.4" - port = 5353 -} - - -resource "google_datastore_index" "default" { - kind = "foo" - properties { - name = "property_a-${local.name_suffix}" - direction = "ASCENDING" - } - properties { - name = "property_b-${local.name_suffix}" - direction = "ASCENDING" - } -} - diff --git a/build/inspec/test/integration/configuration/hello-world.zip b/build/inspec/test/integration/configuration/hello-world.zip deleted file mode 100644 index 34c746dd3..000000000 Binary files a/build/inspec/test/integration/configuration/hello-world.zip and /dev/null differ diff --git a/build/inspec/test/integration/configuration/index.js.zip b/build/inspec/test/integration/configuration/index.js.zip deleted file mode 100644 index a9e89ba30..000000000 Binary files a/build/inspec/test/integration/configuration/index.js.zip and /dev/null differ diff --git a/build/inspec/test/integration/configuration/mm-attributes.yml b/build/inspec/test/integration/configuration/mm-attributes.yml deleted file mode 100644 index c3b880ef9..000000000 --- a/build/inspec/test/integration/configuration/mm-attributes.yml +++ /dev/null @@ -1,903 +0,0 @@ -ssl_policy: - name: 'inspec-gcp-ssl-policy' - min_tls_version: 'TLS_1_2' - profile: 'CUSTOM' - custom_feature: 'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384' - custom_feature2: 'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384' - -topic: - name: 'inspec-gcp-topic' - -subscription: - name: 'inspec-gcp-subscription' - ack_deadline_seconds: 20 - -managed_zone: - name: 'inspec-gcp-managed-zone' - dns_name: 'my.domain.com.' - description: 'A test DNS zone' - label_key: key - label_value: 'value' - -record_set: - name: 'backend.my.domain.com.' - type: 'A' - ttl: 300 - rrdatas1: '8.8.8.8' - rrdatas2: '8.8.4.4' - -instance_group_manager: - name: 'inspec-gcp-igm' - base_instance_name: 'igm' - named_port_name: 'port' - named_port_port: 80 - -autoscaler: - name: 'inspec-gcp-autoscaler' - max_replicas: 5 - min_replicas: 1 - cooldown_period: 60 - cpu_utilization_target: 0.5 - -target_pool: - name: 'inspec-gcp-target-pool' - session_affinity: CLIENT_IP - -trigger: - trigger_template_project: trigger-project - trigger_template_branch: trigger-branch - trigger_template_repo: trigger-repo - filename: cloudbuild.yaml - -health_check: - name: inspec-gcp-health-check - timeout_sec: 10 - check_interval_sec: 10 - tcp_health_check_port: 80 - -backend_service: - name: inspec-gcp-backend-service - description: A description - port_name: http - protocol: HTTP - timeout_sec: 10 - enable_cdn: true - -region_backend_service_health_check: - name: inspec-gcp-region-health-check - timeout_sec: 15 - check_interval_sec: 15 - tcp_health_check_port: 81 - -region_backend_service: - name: inspec-gcp-region-backend-service - description: A regional description - protocol: TCP - timeout_sec: 15 - -http_health_check: - name: inspec-gcp-http-health-check - request_path: /health_check - timeout_sec: 20 - check_interval_sec: 20 - -https_health_check: - name: inspec-gcp-https-health-check - request_path: /https_health_check - timeout_sec: 15 - check_interval_sec: 15 - unhealthy_threshold: 3 - -instance_template: - name: inspec-gcp-instance-template - description: A description of the instance template - instance_description: A description of the instance itself - machine_type: f1-micro - tag: foo - can_ip_forward: false - scheduling_automatic_restart: true - scheduling_on_host_maintenance: MIGRATE - disk_source_image: debian-cloud/debian-9 - disk_auto_delete: true - disk_boot: true - network_interface_network: default - service_account_scope: storage-ro - -global_address: - name: inspec-gcp-global-address - ip_version: IPV6 - -url_map: - name: inspec-gcp-url-map - description: URL map description - host_rule_host: site.com - path_matcher_name: allpaths - path_rule_path: /home - test_host: test.com - test_path: /home - -http_proxy: - name: inspec-gcp-http-proxy - description: A HTTP proxy - -global_forwarding_rule: - name: inspec-gcp-global-forwarding-rule - port_range: 80-80 - -target_tcp_proxy: - name: inspec-gcp-target-tcp-proxy - proxy_header: NONE - tcp_backend_service_name: gcp-inspec-tcp-backend-service - -route: - name: inspec-gcp-route - dest_range: 15.0.0.0/24 - next_hop_ip: 10.2.0.1 - priority: 100 - -router: - name: inspec-gcp-router - bgp_asn: 64514 - bgp_advertise_mode: CUSTOM - bgp_advertised_group: "ALL_SUBNETS" - bgp_advertised_ip_range1: "1.2.3.4" - bgp_advertised_ip_range2: "6.7.0.0/16" - -snapshot: - name: inspec-gcp-disk-snapshot - disk_name: inspec-snapshot-disk - disk_type: pd-standard - disk_image: debian-cloud/debian-10-buster-v20191014 - -https_proxy: - name: inspec-gcp-https-proxy - description: A HTTPS target proxy - -ssl_certificate: - name: inspec-gcp-ssl-certificate - description: A fake ssl certificate (DO NOT USE) - certificate: | - -----BEGIN CERTIFICATE----- - MIICqjCCAk+gAwIBAgIJAIuJ+0352Kq4MAoGCCqGSM49BAMCMIGwMQswCQYDVQQG - EwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjERMA8GA1UEBwwIS2lya2xhbmQxFTAT - BgNVBAoMDEdvb2dsZSwgSW5jLjEeMBwGA1UECwwVR29vZ2xlIENsb3VkIFBsYXRm - b3JtMR8wHQYDVQQDDBZ3d3cubXktc2VjdXJlLXNpdGUuY29tMSEwHwYJKoZIhvcN - AQkBFhJuZWxzb25hQGdvb2dsZS5jb20wHhcNMTcwNjI4MDQ1NjI2WhcNMjcwNjI2 - MDQ1NjI2WjCBsDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24xETAP - BgNVBAcMCEtpcmtsYW5kMRUwEwYDVQQKDAxHb29nbGUsIEluYy4xHjAcBgNVBAsM - FUdvb2dsZSBDbG91ZCBQbGF0Zm9ybTEfMB0GA1UEAwwWd3d3Lm15LXNlY3VyZS1z - aXRlLmNvbTEhMB8GCSqGSIb3DQEJARYSbmVsc29uYUBnb29nbGUuY29tMFkwEwYH - KoZIzj0CAQYIKoZIzj0DAQcDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ - 4mzkzTv0dXyB750fOGN02HtkpBOZzzvUARTR10JQoSe2/5PIwaNQME4wHQYDVR0O - BBYEFKIQC3A2SDpxcdfn0YLKineDNq/BMB8GA1UdIwQYMBaAFKIQC3A2SDpxcdfn - 0YLKineDNq/BMAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDSQAwRgIhALs4vy+O - M3jcqgA4fSW/oKw6UJxp+M6a+nGMX+UJR3YgAiEAvvl39QRVAiv84hdoCuyON0lJ - zqGNhIPGq2ULqXKK8BY= - -----END CERTIFICATE----- - private_key: | - -----BEGIN EC PRIVATE KEY----- - MHcCAQEEIObtRo8tkUqoMjeHhsOh2ouPpXCgBcP+EDxZCB/tws15oAoGCCqGSM49 - AwEHoUQDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ4mzkzTv0dXyB750f - OGN02HtkpBOZzzvUARTR10JQoSe2/5PIwQ== - -----END EC PRIVATE KEY----- - -dataset: - dataset_id: inspec_gcp_dataset - friendly_name: A BigQuery dataset test - description: Test BigQuery dataset description - location: EU - default_table_expiration_ms: 3600000 - access_writer_role: WRITER - access_writer_special_group: projectWriters - -bigquery_table: - table_id: inspec_gcp_bigquery_table - description: A BigQuery table - expiration_time: 1738882264000 - time_partitioning_type: DAY - -repository: - name: inspec-gcp-repository - -folder: - display_name: inspec-gcp-folder - -cloudfunction: - name: inspec-gcp-function - description: A description of the function - available_memory_mb: 128 - trigger_http: true - timeout: 60 - entry_point: hello - env_var_value: val1 - -backend_bucket: - name: inspec-gcp-backend-bucket - description: Backend bucket example - enable_cdn: true - -regional_node_pool: - name: inspec-gcp-regional-node-pool - cluster_name: inspec-gcp-regional-node-pool-cluster - node_count: 1 - initial_node_count: 1 - -org_sink: - name: inspec-gcp-org-sink - filter: resource.type = gce_instance - -standardappversion: - version_id: v2 - service: default - runtime: nodejs10 - entrypoint: "node ./app.js" - port: "8080" - -ml_model: - name: ml_model - region: us-central1 - description: My awesome ML model - online_prediction_logging: true - online_prediction_console_logging: true - -dataproc_cluster: - name: inspec-dataproc-cluster - label_key: label - label_value: value - config: - master_config: - num_instances: 1 - machine_type: n1-standard-1 - boot_disk_type: pd-ssd - boot_disk_size_gb: 30 - worker_config: - num_instances: 2 - machine_type: n1-standard-1 - boot_disk_size_gb: 40 - num_local_ssds: 1 - preemptible_worker_config: - num_instances: 0 - software_config: - prop_key: "dataproc:dataproc.allow.zero.workers" - prop_value: "true" - gce_cluster_config: - tag: foo - -folder_exclusion: - name: inspec-folder-exclusion - description: My folder exclusion description - filter: "resource.type = gce_instance AND severity <= DEBUG" - -filestore_instance: - name: inspecgcp - zone: us-central1-b - tier: PREMIUM - fileshare_capacity_gb: 2660 - fileshare_name: inspecgcp - network_name: default - network_mode: MODE_IPV4 - -folder_sink: - name: inspec-gcp-folder-sink - filter: resource.type = gce_instance AND severity >= ERROR - -runtimeconfig_config: - name: inspec-gcp-runtime-config - description: My runtime configurations - -runtimeconfig_variable: - name: prod-variables/hostname - text: example.com - -redis: - name: my-redis-cache - tier: STANDARD_HA - memory_size_gb: 1 - region: us-central1 - location_id: us-central1-a - alternative_location_id: us-central1-f - redis_version: REDIS_3_2 - display_name: InSpec test instance - reserved_ip_range: "192.168.0.0/29" - label_key: key - label_value: value - -network_endpoint_group: - name: inspec-gcp-endpoint-group - default_port: 90 - -global_network_endpoint_group: - name: inspec-gcp-global-endpoint-group - network_endpoint_type: INTERNET_IP_PORT - default_port: 90 - -node_template: - name: inspec-node-template - label_key: key - label_value: value - -node_group: - name: inspec-node-group - description: A description of the node group - size: 0 - -router_nat: - name: inspec-router-nat - nat_ip_allocate_option: AUTO_ONLY - source_subnetwork_ip_ranges_to_nat: ALL_SUBNETWORKS_ALL_IP_RANGES - min_ports_per_vm: 2 - log_config_enable: true - log_config_filter: ERRORS_ONLY - -service: - name: maps-android-backend.googleapis.com - -spannerinstance: - config: regional-us-east1 - name: spinstance - display_name: inspectest - num_nodes: 1 - label_key: env - label_value: test - -spannerdatabase: - name: spdatabase - instance: spinstance - ddl: "CREATE TABLE test (test STRING(MAX),) PRIMARY KEY (test)" - -scheduler_job: - # region must match where the appengine instance is deployed - region: us-central1 - name: job-name - description: A description - schedule: "*/8 * * * *" - time_zone: America/New_York - http_method: POST - http_target_uri: https://example.com/ping - -service_perimeter: - name: restrict_all - title: restrict_all - restricted_service: storage.googleapis.com - policy_title: policytitle - -firewall: - name: inspec-gcp-firewall - source_tag: some-tag - -address: - name: inspec-gcp-global-address - address_type: INTERNAL - address: "10.2.0.3" - -instance_group: - name: inspec-instance-group - description: My instance group for testing - named_port_name: https - named_port_port: 8080 - -instance: - name: inspec-instance - machine_type: n1-standard-1 - tag_1: foo - tag_2: bar - metadata_key: '123' - metadata_value: asdf - sa_scope: https://www.googleapis.com/auth/compute.readonly - startup_script: "echo hi > /test.txt" - -network: - name: inspec-network - routing_mode: REGIONAL - -subnetwork: - name: inspec-subnet - ip_cidr_range: "10.2.0.0/16" - log_interval: INTERVAL_10_MIN - log_sampling: .5 - log_metadata: INCLUDE_ALL_METADATA - -rigm: - name: inspec-rigm - base_instance_name: rigm1 - target_size: 1 - named_port_name: https - named_port_port: 8888 - healing_delay: 300 - -vpn_tunnel: - name: inspec-vpn-tunnel - peer_ip: "15.0.0.120" - shared_secret: super secret - -project_sink: - name: inspec-gcp-org-sink - filter: resource.type = gce_instance AND severity = DEBUG - -project_exclusion: - name: inspec-project-exclusion - description: My project exclusion description - filter: resource.type = gce_instance AND severity <= DEBUG - -alert_policy: - display_name: Display - combiner: OR - condition_display_name: condition - condition_filter: "metric.type=\"compute.googleapis.com/instance/disk/write_bytes_count\" AND resource.type=\"gce_instance\"" - condition_duration: 60s - condition_comparison: COMPARISON_GT - -dns_managed_zone: - # managed zone dns_name must be randomly generated, so it happens in the other script - name: example-zone - description: example description - dnssec_config_state: 'on' - -logging_metric: - name: some/metric - filter: 'resource.type=gae_app AND severity>=ERROR' - metric_kind: DELTA - value_type: INT64 - -compute_image: - name: inspec-image - source: https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz - -security_policy: - name: sec-policy - action: deny(403) - priority: "1000" - ip_range: "9.9.9.0/24" - description: my description - -memcache_instance: - name: mem-instance - -accelerator_type: - name: accelerator_id - -global_operation: - name: operation-1635274037755-5cf45e8217d56-c081cd9a-c3ea7346 - operationType: "compute.externalVpnGateways.insert" - -interconnect_location: - name: akl-zone1-1353 - facility_provider_facility_id: 'Auckland - Albany' - facility_provider: Vocus - -image_family_views: - zone: us-central1-c - name: image-1 - source_type: RAW - status: READY - archive_size_bytes: 539099200 - disk_size_gb: 3 - family: test - -license_code: - name: akl-zone1-1353 - -region_instance_group: - name: instance-group-2 - region: us-central1 - size: 1 - named_port_name: 'port' - named_port_port: 80 - -region_operation: - name: operation-1641188435323-5d4a6f5b26934-9281422c-dce238f5 - region: us-central1 - operation_type: "compute.instanceGroupManagers.insert" - status: DONE - progress: 100 - -sql_database_flag: - name : audit_log - type : STRING - applies_to: MYSQL_5_6 - allowed_string_values: ON - requires_restart: true - -sql_connect: - region: us-central1 - database_version: POSTGRES_13 - backend_type: SECOND_GEN - cert_serial_number: 0 - common_name: "test_gcp_1" - sha1_fingerprint: "80c5c611c0a591db967c7dda3467e23127288fed" - instance: test-pg - -sql_operation: - name: e5c522f1-8391-4830-a8ff-ff1cc4a7b2a5 - status: DONE - operation_type: CREATE -public_delegated_prefix: - name: test - -region_health_check: - name: inspec-gcp-region-health-check - region: us-central1 - timeout_sec: 10 - check_interval_sec: 10 - tcp_health_check_port: 80 - -dlp: - name: "i-inspec-gcp-dlp" - location: "us-east-2" - type: "INSPECT_JOB" - state: "ACTIVE" - inspectDetails: - requestedOptions: - snapshotInspectTemplate: "" - jobConfig: - storageConfig: - hybridOptions: - description: "test" - tableOptions: "" - description: "Description" - display_name: "Displayname" - job_attribute_name: "job_attribute-1" - job_trigger_status: "HEALTHY" - job_trigger_name: "name1" - job_trigger_display_name: "dp" - job_trigger_description: "description" - deidentify_templates: - name: "dlp-template-inspec" - location: "europe-west2" - type: "Infotype" - -featurestore: - name : "value_name" - region : "value_region" - parent : "value_parent" - state : "value_state" - create_time : "value_createtime" - etag : "value_etag" - update_time : "value_updatetime" - -training_pipeline: - name : "value_name" - job_id: "job_id" - region : "value_region" - parent : "value_parent" - - -nas_job: - name : "value_name" - region : "value_region" - parent : "value_parent" - end_time : "value_endtime" - state : "value_state" - create_time : "value_createtime" - display_name : "value_displayname" - start_time : "value_starttime" - update_time : "value_updatetime" - -batch_prediction_job: - name : "value_name" - region : "value_region" - parent : "value_parent" - create_time : "value_createtime" - model_version_id : "value_modelversionid" - end_time : "value_endtime" - start_time : "value_starttime" - update_time : "value_updatetime" - state : "value_state" - model : "value_model" - display_name : "value_displayname" - service_account : "value_serviceaccount" - -custom_job: - name : "value_name" - job_id: "job_id" - region : "value_region" - parent : "value_parent" - -index: - name : "value_name" - region : "value_region" - parent : "value_parent" - description : "value_description" - display_name : "value_displayname" - metadata_schema_uri : "value_metadataschemauri" - index_update_method : "value_indexupdatemethod" - update_time : "value_updatetime" - create_time : "value_createtime" - etag : "value_etag" - -tensorboard: - name : "value_name" - region : "value_region" - parent : "value_parent" - update_time : "value_updatetime" - blob_storage_path_prefix : "value_blobstoragepathprefix" - etag : "value_etag" - create_time : "value_createtime" - display_name : "value_displayname" - description : "value_description" - -model: - name : "value_name" - region : "value_region" - parent : "value_parent" - update_time : "value_updatetime" - etag : "value_etag" - description : "value_description" - create_time : "value_createtime" - pipeline_job : "value_pipelinejob" - version_update_time : "value_versionupdatetime" - metadata_artifact : "value_metadataartifact" - metadata_schema_uri : "value_metadataschemauri" - version_id : "value_versionid" - artifact_uri : "value_artifacturi" - training_pipeline : "value_trainingpipeline" - display_name : "value_displayname" - version_create_time : "value_versioncreatetime" - version_description : "value_versiondescription" - -index_endpoint: - name : "value_name" - region : "value_region" - parent : "value_parent" - display_name : "value_displayname" - create_time : "value_createtime" - network : "value_network" - update_time : "value_updatetime" - public_endpoint_domain_name : "value_publicendpointdomainname" - etag : "value_etag" - description : "value_description" - -featurestores_entity_type: - name : "value_name" - region : "value_region" - parent : "value_parent" - description : "value_description" - create_time : "value_createtime" - etag : "value_etag" - update_time : "value_updatetime" - - -tensorboard_experiment_run: - name : "sklearn-2023-09-22-17-16-16-a25b0" - tensorboard: "1976367752880848896" - experiment: "autologging-experiment-fyc24zb2" - region : "us-central1" - parent : "projects/165434197229/locations/us-central1/tensorboards/1976367752880848896/experiments/autologging-experiment-fyc24zb2/runs/" - -studies_trial: - name : "1" - region : "us-central1" - parent : "projects/165434197229/locations/us-central1/studies/2975668570413/trials/" - study: "890385007008" - start_time : "value_starttime" - end_time : "value_endtime" - infeasible_reason : "value_infeasiblereason" - client_id : "value_clientid" - custom_job : "value_customjob" - state : "value_state" - id : "value_id" - -hyperparameter_tuning_job: - name : "9200900561803673600" - region : "us-central1" - parent : "projects/165434197229/locations/us-central1/hyperparameterTuningJobs/" - state : "JOB_STATE_RUNNING" - end_time : "value_endtime" - update_time : "value_updatetime" - start_time : "value_starttime" - create_time : "value_createtime" - display_name : "inspec-hyper-test-hyperparameter-tuning-job" - -models_evaluation: - name : "value_name" - region : "value_region" - parent : "value_parent" - data_item_schema_uri : "value_dataitemschemauri" - metrics_schema_uri : "value_metricsschemauri" - create_time : "value_createtime" - annotation_schema_uri : "value_annotationschemauri" - display_name : "value_displayname" - -tensorboards_experiment: - name : "inspec-tensor-experiment" - region : "us-central1" - parent : "projects/165434197229/locations/us-central1/tensorboards/6346548241290493952/experiments/" - description : "value_description" - tensorboard: "6346548241290493952" - source : "value_source" - display_name : "inspec-tensor-experiment" - create_time : "value_createtime" - update_time : "value_updatetime" - etag : "value_etag" - -featurestore_entity_type_feature: - parent : "value_parent" - region : "value_region" - description : "value_description" - create_time : "value_createtime" - etag : "value_etag" - name : "value_name" - update_time : "value_updatetime" - value_type : "value_valuetype" - -dataset_data_item_annotation: - name: "1746031646898913280" - region: "us-central1" - dataset: "1044994542735982592" - dataItem: "75173735366921" - parent: "projects/165434197229/locations/us-central1/datasets/1044994542735982592/dataItems/75173735366921/annotations/" - -model_deployment_monitoring_job: - name : "4965515800912855040" - region : "us-central1" - parent : "projects/165434197229/locations/us-central1/modelDeploymentMonitoringJobs/" - state : "value_state" - analysis_instance_schema_uri : "value_analysisinstanceschemauri" - endpoint : "projects/165434197229/locations/us-central1/endpoints/5787303642054787072" - display_name : "churn" - schedule_state : "value_schedulestate" - predict_instance_schema_uri : "value_predictinstanceschemauri" - next_schedule_time : "value_nextscheduletime" - create_time : "value_createtime" - log_ttl : "value_logttl" - update_time : "value_updatetime" - -metadata_stores_metadata_schema: - name : "system-dag-execution-v0-0-1" - region : "us-central1" - parent : "projects/165434197229/locations/us-central1/metadataStores/default/metadataSchemas/" - metadataStore: "default" - schema_type : "EXECUTION_TYPE" - description : "value_description" - schema_version : "value_schemaversion" - create_time : "value_createtime" - schema : "value_schema" - -metadata_stores_execution: - name : "12528100122877440041" - region : "us-central1" - parent : "projects/165434197229/locations/us-central1/metadataStores/default/executions/" - metadataStore: "default" - create_time : "value_createtime" - schema_version : "value_schemaversion" - state : "value_state" - etag : "value_etag" - display_name : "endpoint-create-20230918054541-20230918054500491" - schema_title : "value_schematitle" - description : "value_description" - update_time : "value_updatetime" - -metadata_stores_context: - name : "autologging-experiment-w0apl7la-autologging-tf-experiment-w0apl7la" - region : "us-central1" - parent : "projects/165434197229/locations/us-central1/metadataStores/default/contexts/" - metadataStore: "default" - schema_title : "value_schematitle" - etag : "value_etag" - description : "value_description" - display_name : "autologging-tf-experiment-w0apl7la" - schema_version : "value_schemaversion" - create_time : "value_createtime" - update_time : "value_updatetime" - -metadata_stores_artifact: - name : "2811503570633325756" - region : "us-central1" - parent : "projects/165434197229/locations/us-central1/metadataStores/default/artifacts/" - metadataStore: "default" - schema_version : "value_schemaversion" - display_name : "value_displayname" - etag : "value_etag" - update_time : "value_updatetime" - state : "value_state" - uri : "value_uri" - create_time : "value_createtime" - schema_title : "value_schematitle" - description : "value_description" - -datasets_saved_query: - parent : "projects/165434197229/locations/us-central1/datasets/1044994542735982592/savedQueries/" - region : "us-central1" - dataset: "1044994542735982592" - update_time : "value_updatetime" - problem_type : "value_problemtype" - name : "2236927819407949824" - create_time : "value_createtime" - etag : "value_etag" - display_name : "inspec-annotation-test" - annotation_filter : "value_annotationfilter" - -datasets_annotation_spec: - name : "5438527833485869056" - region : "us-central1" - dataset: "1044994542735982592" - parent: "projects/165434197229/locations/us-central1/datasets/1044994542735982592/annotationSpecs/" - display_name : "InSpec" - etag : "value_etag" - create_time : "value_createtime" - update_time : "value_updatetime" - -nas_jobs_nas_trial_detail: - name : "1" - region : "us-central1" - nasJob: "3217974009958236160" - parent : "projects/ppradhan/locations/us-central1/nasJobs/3217974009958236160/nasTrialDetails/" - parameters : "value_parameters" - -metadata_store: - name : "default" - region : "us-central1" - parent : "projects/165434197229/locations/us-central1/metadataStores/" - description : "value_description" - create_time : "value_createtime" - update_time : "value_updatetime" - -endpoint: - name : "value_name" - region : "value_region" - parent : "value_parent" - update_time : "value_updatetime" - model_deployment_monitoring_job : "value_modeldeploymentmonitoringjob" - description : "value_description" - network : "value_network" - display_name : "value_displayname" - etag : "value_etag" - create_time : "value_createtime" - -models_evaluations_slice: - name : "value_name" - region : "value_region" - parent : "value_parent" - create_time : "value_createtime" - metrics_schema_uri : "value_metricsschemauri" - -datasets_data_item: - parent : "value_parent" - region : "value_region" - update_time : "value_updatetime" - etag : "value_etag" - name : "value_name" - create_time : "value_createtime" - -study: - name : "value_name" - region : "value_region" - parent : "value_parent" - display_name : "value_displayname" - state : "value_state" - create_time : "value_createtime" - inactive_reason : "value_inactivereason" - -tensorboard_experiment_run_time_series_resource: - name : "value_name" - region : "value_region" - parent : "value_parent" - plugin_name : "value_pluginname" - plugin_data : "value_plugindata" - description : "value_description" - etag : "value_etag" - display_name : "value_displayname" - update_time : "value_updatetime" - create_time : "value_createtime" - value_type : "value_valuetype" - -project_location_image_version: - parent : "value_parent" - -organization: - name : "ppradhan" - parent : "organizations/ppradhan" - runtime_type : "CLOUD" - authorized_network : "default" - project_id : "ppradhan" - subscription_type : "PAID" - created_at : ""1698225643253" - state : "ACTIVE" - analytics_region : "us-west1" - -organization_envgroup_attachment: - name: "6741d6ad-1307-4f03-b02a-9fb4562c0ff3", - parent: "organizations/ppradhan/envgroups/test-env-group/attachments", - created_at: "1698227493793", - environment: "test-env", - environment_group_id: "test-env-group" \ No newline at end of file diff --git a/build/inspec/test/integration/verify/controls/google_data_loss_prevention_stored_info_type.rb b/build/inspec/test/integration/verify/controls/google_data_loss_prevention_stored_info_type.rb deleted file mode 100644 index 268023f59..000000000 --- a/build/inspec/test/integration/verify/controls/google_data_loss_prevention_stored_info_type.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - -title 'Test GCP google_data_loss_prevention_stored_info_type resource.' - -gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') -dlp = input('dlp', value: { - "name": 'i-inspec-gcp-dlp', - "location": 'us-east-2', - "type": 'INSPECT_JOB', - "state": 'ACTIVE', - "inspectDetails": { - "requestedOptions": { - "snapshotInspectTemplate": '', - "jobConfig": { - "storageConfig": { - "hybridOptions": { - "description": 'test', - "tableOptions": '', - }, - }, - }, - }, - }, - "description": 'Description', - "display_name": 'Displayname', - }, description: 'DLP ') -control 'google_data_loss_prevention_stored_info_type-1.0' do - impact 1.0 - title 'google_data_loss_prevention_stored_info_type resource test' - - describe google_data_loss_prevention_stored_info_type(parent: "projects/#{gcp_project_id}/locations/#{dlp['location']}", name: dlp['stored_info_type_name']) do - it { should exist } - its('name') { should cmp dlp['name'] } - end - - describe google_data_loss_prevention_stored_info_type(parent: "projects/#{gcp_project_id}/locations/#{dlp['location']}", name: 'nonexistent') do - it { should_not exist } - end -end diff --git a/build/inspec/test/integration/verify/controls/google_data_loss_prevention_stored_info_types.rb b/build/inspec/test/integration/verify/controls/google_data_loss_prevention_stored_info_types.rb deleted file mode 100644 index ae0bdff7e..000000000 --- a/build/inspec/test/integration/verify/controls/google_data_loss_prevention_stored_info_types.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - -title 'Test GCP google_data_loss_prevention_stored_info_types resource.' - -gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') -dlp = input('dlp', value: { - "name": 'i-inspec-gcp-dlp', - "location": 'us-east-2', - "type": 'INSPECT_JOB', - "state": 'ACTIVE', - "inspectDetails": { - "requestedOptions": { - "snapshotInspectTemplate": '', - "jobConfig": { - "storageConfig": { - "hybridOptions": { - "description": 'test', - "tableOptions": '', - }, - }, - }, - }, - }, - "description": 'Description', - "display_name": 'Displayname', - }, description: 'DLP ') -control 'google_data_loss_prevention_stored_info_types-1.0' do - impact 1.0 - title 'google_data_loss_prevention_stored_info_types resource test' - - describe google_data_loss_prevention_stored_info_types(parent: "projects/#{gcp_project_id}/locations/#{dlp['location']}") do - it { should exist } - its('names') { should include dlp['name'] } - end -end diff --git a/docs/resources/google_composer_project_location_environment.md b/docs/resources/google_composer_project_location_environment.md new file mode 100644 index 000000000..eddffc04d --- /dev/null +++ b/docs/resources/google_composer_project_location_environment.md @@ -0,0 +1,265 @@ +--- +title: About the google_composer_project_location_environment resource +platform: gcp +--- + +## Syntax +A `google_composer_project_location_environment` is used to test a Google ProjectLocationEnvironment resource + +## Examples +``` +describe google_composer_project_location_environment(name: ' value_name') do + it { should exist } + its('name') { should cmp 'value_name' } + its('uuid') { should cmp 'value_uuid' } + its('state') { should cmp 'value_state' } + its('create_time') { should cmp 'value_createtime' } + its('update_time') { should cmp 'value_updatetime' } + its('satisfies_pzs') { should cmp 'value_satisfies_pzs' } + its('config.gke_cluster') { should cmp 'value_gke_cluster' } + its('labels.additional_properties') { should cmp label_hash } + its('storage_config.bucket') { should cmp 'value_bucket_id' } +end + +describe google_composer_project_location_environment(name: "does_not_exit") do + it { should_not exist } +end +``` + +## Properties +Properties that can be accessed from the `google_composer_project_location_environment` resource: + + + * `name`: The resource name of the environment, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" EnvironmentId must start with a lowercase letter followed by up to 63 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + + * `config`: Configuration information for an environment. + + * `gke_cluster`: Output only. The Kubernetes Engine cluster used to run this environment. + + * `dag_gcs_prefix`: Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud Storage objects reside in a flat namespace, a hierarchical file tree can be simulated using "/"-delimited object name prefixes. DAG objects for this environment reside in a simulated directory with the given prefix. + + * `node_count`: The number of nodes in the Kubernetes Engine cluster that will be used to run this environment. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. + + * `software_config`: Specifies the selection and configuration of software inside the environment. + + * `image_version`: The version of the software running in the environment. This encapsulates both the version of Cloud Composer functionality and the version of Apache Airflow. It must match the regular expression `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. When used as input, the server also checks if the provided version is supported and denies the request for an unsupported version. The Cloud Composer portion of the image version is a full [semantic version](https://semver.org), or an alias in the form of major version number or `latest`. When an alias is provided, the server replaces it with the current Cloud Composer version that satisfies the alias. The Apache Airflow portion of the image version is a full semantic version that points to one of the supported Apache Airflow versions, or an alias in the form of only major or major.minor versions specified. When an alias is provided, the server replaces it with the latest Apache Airflow version that satisfies the alias and is supported in the given Cloud Composer version. In all cases, the resolved image version is stored in the same field. See also [version list](/composer/docs/concepts/versioning/composer-versions) and [versioning overview](/composer/docs/concepts/versioning/composer-versioning-overview). + + * `airflow_config_overrides`: Optional. Apache Airflow configuration properties to override. Property keys contain the section and property names, separated by a hyphen, for example "core-dags_are_paused_at_creation". Section names must not contain hyphens ("-"), opening square brackets ("["), or closing square brackets ("]"). The property name must not be empty and must not contain an equals sign ("=") or semicolon (";"). Section and property names must not contain a period ("."). Apache Airflow configuration property names must be written in [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can contain any character, and can be written in any lower/upper case format. Certain Apache Airflow configuration property values are [blocked](/composer/docs/concepts/airflow-configurations), and cannot be overridden. + + * `additional_properties`: + + * `pypi_packages`: Optional. Custom Python Package Index (PyPI) packages to be installed in the environment. Keys refer to the lowercase package name such as "numpy" and values are the lowercase extras and version specifier such as "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a package without pinning it to a version specifier, use the empty string as the value. + + * `additional_properties`: + + * `env_variables`: Optional. Additional environment variables to provide to the Apache Airflow scheduler, worker, and webserver processes. Environment variable names must match the regular expression `a-zA-Z_*`. They cannot specify Apache Airflow software configuration overrides (they cannot match the regular expression `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the following reserved names: * `AIRFLOW_HOME` * `C_FORCE_ROOT` * `CONTAINER_NAME` * `DAGS_FOLDER` * `GCP_PROJECT` * `GCS_BUCKET` * `GKE_CLUSTER_NAME` * `SQL_DATABASE` * `SQL_INSTANCE` * `SQL_PASSWORD` * `SQL_PROJECT` * `SQL_REGION` * `SQL_USER` + + * `additional_properties`: + + * `python_version`: Optional. The major version of Python used to run the Apache Airflow scheduler, worker, and webserver processes. Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be updated. This field is only supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. Environments in newer versions always use Python major version 3. + + * `scheduler_count`: Optional. The number of schedulers for Airflow. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. + + * `node_config`: The configuration information for the Kubernetes Engine nodes running the Apache Airflow software. + + * `location`: Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which to deploy the VMs used to run the Apache Airflow software, specified as a [relative resource name](/apis/design/resource_names#relative_resource_name). For example: "projects/{projectId}/zones/{zoneId}". This `location` must belong to the enclosing environment's project and location. If both this field and `nodeConfig.machineType` are specified, `nodeConfig.machineType` must belong to this `location`; if both are unspecified, the service will pick a zone in the Compute Engine region corresponding to the Cloud Composer location, and propagate that choice to both fields. If only one field (`location` or `nodeConfig.machineType`) is specified, the location information from the specified field will be propagated to the unspecified field. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. + + * `machine_type`: Optional. The Compute Engine [machine type](/compute/docs/machine-types) used for cluster instances, specified as a [relative resource name](/apis/design/resource_names#relative_resource_name). For example: "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". The `machineType` must belong to the enclosing environment's project and location. If both this field and `nodeConfig.location` are specified, this `machineType` must belong to the `nodeConfig.location`; if both are unspecified, the service will pick a zone in the Compute Engine region corresponding to the Cloud Composer location, and propagate that choice to both fields. If exactly one of this field and `nodeConfig.location` is specified, the location information from the specified field will be propagated to the unspecified field. The `machineTypeId` must not be a [shared-core machine type](/compute/docs/machine-types#sharedcore). If this field is unspecified, the `machineTypeId` defaults to "n1-standard-1". This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. + + * `network`: Optional. The Compute Engine network to be used for machine communications, specified as a [relative resource name](/apis/design/resource_names#relative_resource_name). For example: "projects/{projectId}/global/networks/{networkId}". If unspecified, the "default" network ID in the environment's project is used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) is provided, `nodeConfig.subnetwork` must also be provided. For [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see `nodeConfig.subnetwork`. + + * `subnetwork`: Optional. The Compute Engine subnetwork to be used for machine communications, specified as a [relative resource name](/apis/design/resource_names#relative_resource_name). For example: "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" If a subnetwork is provided, `nodeConfig.network` must also be provided, and the subnetwork must belong to the enclosing environment's project and location. + + * `disk_size_gb`: Optional. The disk size in GB used for node VMs. Minimum size is 30GB. If unspecified, defaults to 100GB. Cannot be updated. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. + + * `oauth_scopes`: Optional. The set of Google API scopes to be made available on all node VMs. If `oauth_scopes` is empty, defaults to ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. + + * `service_account`: Optional. The Google Cloud Platform Service Account to be used by the node VMs. If a service account is not specified, the "default" Compute Engine service account is used. Cannot be updated. + + * `tags`: Optional. The list of instance tags applied to all node VMs. Tags are used to identify valid sources or targets for network firewalls. Each tag within the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). Cannot be updated. + + * `ip_allocation_policy`: Configuration for controlling how IPs are allocated in the GKE cluster running the Apache Airflow software. + + * `use_ip_aliases`: Optional. Whether or not to enable Alias IPs in the GKE cluster. If `true`, a VPC-native cluster is created. This field is only supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. Environments in newer versions always use VPC-native GKE clusters. + + * `cluster_secondary_range_name`: Optional. The name of the GKE cluster's secondary range used to allocate IP addresses to pods. For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, this field is applicable only when `use_ip_aliases` is true. + + * `cluster_ipv4_cidr_block`: Optional. The IP address range used to allocate IP addresses to pods in the GKE cluster. For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, this field is applicable only when `use_ip_aliases` is true. Set to blank to have GKE choose a range with the default size. Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific netmask. Set to a [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use. + + * `services_secondary_range_name`: Optional. The name of the services' secondary range used to allocate IP addresses to the GKE cluster. For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, this field is applicable only when `use_ip_aliases` is true. + + * `services_ipv4_cidr_block`: Optional. The IP address range of the services IP addresses in this GKE cluster. For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, this field is applicable only when `use_ip_aliases` is true. Set to blank to have GKE choose a range with the default size. Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific netmask. Set to a [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use. + + * `enable_ip_masq_agent`: Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for all destination addresses, except between pods traffic. See: https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent + + * `private_environment_config`: The configuration information for configuring a Private IP Cloud Composer environment. + + * `enable_private_environment`: Optional. If `true`, a Private IP Cloud Composer environment is created. If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be set to true for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. + + * `private_cluster_config`: Configuration options for the private GKE cluster in a Cloud Composer environment. + + * `enable_private_endpoint`: Optional. If `true`, access to the public endpoint of the GKE cluster is denied. + + * `master_ipv4_cidr_block`: Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If left blank, the default value of '172.16.0.0/23' is used. + + * `master_ipv4_reserved_range`: Output only. The IP range in CIDR notation to use for the hosted master network. This range is used for assigning internal IP addresses to the GKE cluster master or set of masters and to the internal load balancer virtual IP. This range must not overlap with any other ranges in use within the cluster's network. + + * `web_server_ipv4_cidr_block`: Optional. The CIDR block from which IP range for web server will be reserved. Needs to be disjoint from `private_cluster_config.master_ipv4_cidr_block` and `cloud_sql_ipv4_cidr_block`. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. + + * `cloud_sql_ipv4_cidr_block`: Optional. The CIDR block from which IP range in tenant project will be reserved for Cloud SQL. Needs to be disjoint from `web_server_ipv4_cidr_block`. + + * `web_server_ipv4_reserved_range`: Output only. The IP range reserved for the tenant project's App Engine VMs. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. + + * `cloud_composer_network_ipv4_cidr_block`: Optional. The CIDR block from which IP range for Cloud Composer Network in tenant project will be reserved. Needs to be disjoint from private_cluster_config.master_ipv4_cidr_block and cloud_sql_ipv4_cidr_block. This field is supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. + + * `cloud_composer_network_ipv4_reserved_range`: Output only. The IP range reserved for the tenant project's Cloud Composer network. This field is supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. + + * `enable_privately_used_public_ips`: Optional. When enabled, IPs from public (non-RFC1918) ranges can be used for `IPAllocationPolicy.cluster_ipv4_cidr_block` and `IPAllocationPolicy.service_ipv4_cidr_block`. + + * `cloud_composer_connection_subnetwork`: Optional. When specified, the environment will use Private Service Connect instead of VPC peerings to connect to Cloud SQL in the Tenant Project, and the PSC endpoint in the Customer Project will use an IP address from this subnetwork. + + * `networking_config`: Configuration options for networking connections in the Composer 2 environment. + + * `connection_type`: Optional. Indicates the user requested specifc connection type between Tenant and Customer projects. You cannot set networking connection type in public IP environment. + Possible values: + * CONNECTION_TYPE_UNSPECIFIED + * VPC_PEERING + * PRIVATE_SERVICE_CONNECT + + * `web_server_network_access_control`: Network-level access control policy for the Airflow web server. + + * `allowed_ip_ranges`: A collection of allowed IP ranges with descriptions. + + * `value`: IP address or range, defined using CIDR notation, of requests that this rule applies to. Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. IP range prefixes should be properly truncated. For example, `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, `2001:db8::1/32` should be truncated to `2001:db8::/32`. + + * `description`: Optional. User-provided description. It must contain at most 300 characters. + + * `database_config`: The configuration of Cloud SQL instance that is used by the Apache Airflow software. + + * `machine_type`: Optional. Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. + + * `zone`: Optional. The Compute Engine zone where the Airflow database is created. If zone is provided, it must be in the region selected for the environment. If zone is not provided, a zone is automatically selected. The zone can only be set during environment creation. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.*. + + * `web_server_config`: The configuration settings for the Airflow web server App Engine instance. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.* + + * `machine_type`: Optional. Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. If not specified, composer-n1-webserver-2 will be used. Value custom is returned only in response, if Airflow web server parameters were manually changed to a non-standard values. + + * `encryption_config`: The encryption options for the Cloud Composer environment and its dependencies.Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. + + * `kms_key_name`: Optional. Customer-managed Encryption Key available through Google's Key Management Service. Cannot be updated. If not specified, Google-managed key will be used. + + * `maintenance_window`: The configuration settings for Cloud Composer maintenance window. The following example: ``` { "startTime":"2019-08-01T01:00:00Z" "endTime":"2019-08-01T07:00:00Z" "recurrence":"FREQ=WEEKLY;BYDAY=TU,WE" } ``` would define a maintenance window between 01 and 07 hours UTC during each Tuesday and Wednesday. + + * `start_time`: Required. Start time of the first recurrence of the maintenance window. + + * `end_time`: Required. Maintenance window end time. It is used only to calculate the duration of the maintenance window. The value for end-time must be in the future, relative to `start_time`. + + * `recurrence`: Required. Maintenance window recurrence. Format is a subset of [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...` Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`. + + * `workloads_config`: The Kubernetes workloads configuration for GKE cluster associated with the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. + + * `scheduler`: Configuration for resources used by Airflow schedulers. + + * `cpu`: Optional. CPU request and limit for a single Airflow scheduler replica. + + * `memory_gb`: Optional. Memory (GB) request and limit for a single Airflow scheduler replica. + + * `storage_gb`: Optional. Storage (GB) request and limit for a single Airflow scheduler replica. + + * `count`: Optional. The number of schedulers. + + * `web_server`: Configuration for resources used by Airflow web server. + + * `cpu`: Optional. CPU request and limit for Airflow web server. + + * `memory_gb`: Optional. Memory (GB) request and limit for Airflow web server. + + * `storage_gb`: Optional. Storage (GB) request and limit for Airflow web server. + + * `worker`: Configuration for resources used by Airflow workers. + + * `cpu`: Optional. CPU request and limit for a single Airflow worker replica. + + * `memory_gb`: Optional. Memory (GB) request and limit for a single Airflow worker replica. + + * `storage_gb`: Optional. Storage (GB) request and limit for a single Airflow worker replica. + + * `min_count`: Optional. Minimum number of workers for autoscaling. + + * `max_count`: Optional. Maximum number of workers for autoscaling. + + * `triggerer`: Configuration for resources used by Airflow triggerers. + + * `count`: Optional. The number of triggerers. + + * `cpu`: Optional. CPU request and limit for a single Airflow triggerer replica. + + * `memory_gb`: Optional. Memory (GB) request and limit for a single Airflow triggerer replica. + + * `environment_size`: Optional. The size of the Cloud Composer environment. This field is supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. + Possible values: + * ENVIRONMENT_SIZE_UNSPECIFIED + * ENVIRONMENT_SIZE_SMALL + * ENVIRONMENT_SIZE_MEDIUM + * ENVIRONMENT_SIZE_LARGE + + * `airflow_uri`: Output only. The URI of the Apache Airflow Web UI hosted within this environment (see [Airflow web interface](/composer/docs/how-to/accessing/airflow-web-interface)). + + * `airflow_byoid_uri`: Output only. The 'bring your own identity' variant of the URI of the Apache Airflow Web UI hosted within this environment, to be accessed with external identities using workforce identity federation (see [Access environments with workforce identity federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). + + * `master_authorized_networks_config`: Configuration options for the master authorized networks feature. Enabled master authorized networks will disallow all external traffic to access Kubernetes master through HTTPS except traffic from the given CIDR blocks, Google Compute Engine Public IPs and Google Prod IPs. + + * `enabled`: Whether or not master authorized networks feature is enabled. + + * `cidr_blocks`: Up to 50 external networks that could access Kubernetes master through HTTPS. + + * `display_name`: User-defined name that identifies the CIDR block. + + * `cidr_block`: CIDR block that must be specified in CIDR notation. + + * `recovery_config`: The Recovery settings of an environment. + + * `scheduled_snapshots_config`: The configuration for scheduled snapshot creation mechanism. + + * `enabled`: Optional. Whether scheduled snapshots creation is enabled. + + * `snapshot_location`: Optional. The Cloud Storage location for storing automatically created snapshots. + + * `snapshot_creation_schedule`: Optional. The cron expression representing the time when snapshots creation mechanism runs. This field is subject to additional validation around frequency of execution. + + * `time_zone`: Optional. Time zone that sets the context to interpret snapshot_creation_schedule. + + * `resilience_mode`: Optional. Resilience mode of the Cloud Composer Environment. This field is supported for Cloud Composer environments in versions composer-2.2.0-airflow-*.*.* and newer. + Possible values: + * RESILIENCE_MODE_UNSPECIFIED + * HIGH_RESILIENCE + + * `uuid`: Output only. The UUID (Universally Unique IDentifier) associated with this environment. This value is generated when the environment is created. + + * `state`: The current state of the environment. + Possible values: + * STATE_UNSPECIFIED + * CREATING + * RUNNING + * UPDATING + * DELETING + * ERROR + + * `create_time`: Output only. The time at which this environment was created. + + * `update_time`: Output only. The time at which this environment was last modified. + + * `labels`: Optional. User-defined labels for this environment. The labels map can contain no more than 64 entries. Entries of the labels map are UTF8 strings that comply with the following restrictions: * Keys must conform to regexp: \p{Ll}\p{Lo}{0,62} * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} * Both keys and values are additionally constrained to be <= 128 bytes in size. + + * `additional_properties`: + + * `satisfies_pzs`: Output only. Reserved for future use. + + * `storage_config`: The configuration for data storage in the environment. + + * `bucket`: Optional. The name of the Cloud Storage bucket used by the environment. No `gs://` prefix. + + +## GCP Permissions + +Ensure the [https://composer.googleapis.com/](https://console.cloud.google.com/apis/library/composer.googleapis.com/) is enabled for the current project. diff --git a/docs/resources/google_composer_project_location_environments.md b/docs/resources/google_composer_project_location_environments.md new file mode 100644 index 000000000..5f8268837 --- /dev/null +++ b/docs/resources/google_composer_project_location_environments.md @@ -0,0 +1,42 @@ +--- +title: About the google_composer_project_location_environments resource +platform: gcp +--- + +## Syntax +A `google_composer_project_location_environments` is used to test a Google ProjectLocationEnvironment resource + +## Examples +``` + describe google_composer_project_location_environments(parent: ' value_parent') do + it { should exist } + its('name') { should include('value_name') } + its('uuid') { should include('value_uuid') } + its('state') { should include('value_state') } + its('create_time') { should include('value_createtime') } + its('update_time') { should include('value_updatetime') } + its('satisfies_pzs') { should include('value_satisfies_pzs') } + end +``` + +## Properties +Properties that can be accessed from the `google_composer_project_location_environments` resource: + +See [google_composer_project_location_environment.md](google_composer_project_location_environment.md) for more detailed information + * `names`: an array of `google_composer_project_location_environment` name + * `configs`: an array of `google_composer_project_location_environment` config + * `uuids`: an array of `google_composer_project_location_environment` uuid + * `states`: an array of `google_composer_project_location_environment` state + * `create_times`: an array of `google_composer_project_location_environment` create_time + * `update_times`: an array of `google_composer_project_location_environment` update_time + * `labels`: an array of `google_composer_project_location_environment` labels + * `satisfies_pzs`: an array of `google_composer_project_location_environment` satisfies_pzs + * `storage_configs`: an array of `google_composer_project_location_environment` storage_config + +## Filter Criteria +This resource supports all of the above properties as filter criteria, which can be used +with `where` as a block or a method. + +## GCP Permissions + +Ensure the [https://composer.googleapis.com/](https://console.cloud.google.com/apis/library/composer.googleapis.com/) is enabled for the current project. diff --git a/docs/resources/google_dataproc_cluster.md b/docs/resources/google_dataproc_cluster.md index 2177903c7..66f710e5b 100644 --- a/docs/resources/google_dataproc_cluster.md +++ b/docs/resources/google_dataproc_cluster.md @@ -192,6 +192,18 @@ Properties that can be accessed from the `google_dataproc_cluster` resource: * `region`: The region in which the cluster and associated nodes will be created in. + * `project_id`: The Google Cloud Platform project ID that the cluster belongs to. + + * `virtual_cluster_config`: Optional. The virtual cluster config is used when creating a Dataproc cluster that does not directly control the underlying compute resources, for example, when creating a Dataproc-on-GKE cluster (https://cloud.google.com/dataproc/docs/guides/dpgke/dataproc-gke-overview). Dataproc may set default values, and values may change when clusters are updated. Exactly one of config or virtual_cluster_config must be specified. + + * `status`: Output only. Cluster status. + + * `status_history`: Output only. The previous cluster status. + + * `cluster_uuid`: Output only. A cluster UUID (Unique Universal Identifier). Dataproc generates this value when it creates the cluster. + + * `metrics`: Output only. Contains cluster daemon metrics such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release. + ## GCP Permissions diff --git a/docs/resources/google_dataproc_clusters.md b/docs/resources/google_dataproc_clusters.md index 39371b642..8bf6bd25d 100644 --- a/docs/resources/google_dataproc_clusters.md +++ b/docs/resources/google_dataproc_clusters.md @@ -26,6 +26,12 @@ See [google_dataproc_cluster.md](google_dataproc_cluster.md) for more detailed i * `labels`: an array of `google_dataproc_cluster` labels * `configs`: an array of `google_dataproc_cluster` config * `regions`: an array of `google_dataproc_cluster` region + * `project_ids`: an array of `google_dataproc_cluster` project_id + * `virtual_cluster_configs`: an array of `google_dataproc_cluster` virtual_cluster_config + * `statuses`: an array of `google_dataproc_cluster` status + * `status_histories`: an array of `google_dataproc_cluster` status_history + * `cluster_uuids`: an array of `google_dataproc_cluster` cluster_uuid + * `metrics`: an array of `google_dataproc_cluster` metrics ## Filter Criteria This resource supports all of the above properties as filter criteria, which can be used diff --git a/generate/libraries/google_appengine_standard_app_versions.rb b/generate/libraries/google_appengine_standard_app_versions.rb index 94ca015cb..d998f6c3b 100644 --- a/generate/libraries/google_appengine_standard_app_versions.rb +++ b/generate/libraries/google_appengine_standard_app_versions.rb @@ -66,10 +66,10 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'id' => ->(obj) { return :version_id, obj['id'] }, - 'runtime' => ->(obj) { return :runtime, obj['runtime'] }, - 'threadsafe' => ->(obj) { return :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 diff --git a/generate/libraries/google_bigquery_datasets.rb b/generate/libraries/google_bigquery_datasets.rb index 67bacfe2c..7cfab93a9 100644 --- a/generate/libraries/google_bigquery_datasets.rb +++ b/generate/libraries/google_bigquery_datasets.rb @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'datasetReference' => ->(obj) { return :dataset_reference, GoogleInSpec::BigQuery::Property::DatasetDatasetReference.new(obj['datasetReference'], to_s) }, - 'defaultPartitionExpirationMs' => ->(obj) { return :default_partition_expiration_ms, obj['defaultPartitionExpirationMs'] }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'friendlyName' => ->(obj) { return :friendly_name, obj['friendlyName'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'location' => ->(obj) { return :location, obj['location'] }, - 'defaultEncryptionConfiguration' => ->(obj) { return :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 diff --git a/generate/libraries/google_bigquery_tables.rb b/generate/libraries/google_bigquery_tables.rb index f8d0ed05c..a7f82c74a 100644 --- a/generate/libraries/google_bigquery_tables.rb +++ b/generate/libraries/google_bigquery_tables.rb @@ -83,27 +83,27 @@ def transform(key, value) def transformers { - 'tableReference' => ->(obj) { return :table_reference, GoogleInSpec::BigQuery::Property::TableTableReference.new(obj['tableReference'], to_s) }, - 'clustering' => ->(obj) { return :clustering, obj['clustering'] }, - 'creationTime' => ->(obj) { return :creation_time, obj['creationTime'] }, - 'friendlyName' => ->(obj) { return :friendly_name, obj['friendlyName'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'lastModifiedTime' => ->(obj) { return :last_modified_time, obj['lastModifiedTime'] }, - 'location' => ->(obj) { return :location, obj['location'] }, - 'numBytes' => ->(obj) { return :num_bytes, obj['numBytes'] }, - 'numLongTermBytes' => ->(obj) { return :num_long_term_bytes, obj['numLongTermBytes'] }, - 'numRows' => ->(obj) { return :num_rows, obj['numRows'] }, - 'requirePartitionFilter' => ->(obj) { return :require_partition_filter, obj['requirePartitionFilter'] }, - 'type' => ->(obj) { return :type, obj['type'] }, - 'view' => ->(obj) { return :view, GoogleInSpec::BigQuery::Property::TableView.new(obj['view'], to_s) }, - 'timePartitioning' => ->(obj) { return :time_partitioning, GoogleInSpec::BigQuery::Property::TableTimePartitioning.new(obj['timePartitioning'], to_s) }, - 'streamingBuffer' => ->(obj) { return :streaming_buffer, GoogleInSpec::BigQuery::Property::TableStreamingBuffer.new(obj['streamingBuffer'], to_s) }, - 'schema' => ->(obj) { return :schema, GoogleInSpec::BigQuery::Property::TableSchema.new(obj['schema'], to_s) }, - 'encryptionConfiguration' => ->(obj) { return :encryption_configuration, GoogleInSpec::BigQuery::Property::TableEncryptionConfiguration.new(obj['encryptionConfiguration'], to_s) }, - 'expirationTime' => ->(obj) { return :expiration_time, obj['expirationTime'] }, - 'externalDataConfiguration' => ->(obj) { return :external_data_configuration, GoogleInSpec::BigQuery::Property::TableExternalDataConfiguration.new(obj['externalDataConfiguration'], to_s) }, - 'dataset' => ->(obj) { return :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 diff --git a/generate/libraries/google_cloudbuild_triggers.rb b/generate/libraries/google_cloudbuild_triggers.rb index 26655eeb4..f32b7fa6a 100644 --- a/generate/libraries/google_cloudbuild_triggers.rb +++ b/generate/libraries/google_cloudbuild_triggers.rb @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { return :id, obj['id'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'disabled' => ->(obj) { return :disabled, obj['disabled'] }, - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'substitutions' => ->(obj) { return :substitutions, obj['substitutions'] }, - 'filename' => ->(obj) { return :filename, obj['filename'] }, - 'ignoredFiles' => ->(obj) { return :ignored_files, obj['ignoredFiles'] }, - 'includedFiles' => ->(obj) { return :included_files, obj['includedFiles'] }, - 'triggerTemplate' => ->(obj) { return :trigger_template, GoogleInSpec::CloudBuild::Property::TriggerTriggerTemplate.new(obj['triggerTemplate'], to_s) }, - 'build' => ->(obj) { return :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 diff --git a/generate/libraries/google_cloudfunctions_cloud_functions.rb b/generate/libraries/google_cloudfunctions_cloud_functions.rb index f47c617fd..a270e3ba9 100644 --- a/generate/libraries/google_cloudfunctions_cloud_functions.rb +++ b/generate/libraries/google_cloudfunctions_cloud_functions.rb @@ -80,24 +80,24 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'status' => ->(obj) { return :status, obj['status'] }, - 'entryPoint' => ->(obj) { return :entry_point, obj['entryPoint'] }, - 'runtime' => ->(obj) { return :runtime, obj['runtime'] }, - 'timeout' => ->(obj) { return :timeout, obj['timeout'] }, - 'availableMemoryMb' => ->(obj) { return :available_memory_mb, obj['availableMemoryMb'] }, - 'serviceAccountEmail' => ->(obj) { return :service_account_email, obj['serviceAccountEmail'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'versionId' => ->(obj) { return :version_id, obj['versionId'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'environmentVariables' => ->(obj) { return :environment_variables, obj['environmentVariables'] }, - 'sourceArchiveUrl' => ->(obj) { return :source_archive_url, obj['sourceArchiveUrl'] }, - 'sourceUploadUrl' => ->(obj) { return :source_upload_url, obj['sourceUploadUrl'] }, - 'sourceRepository' => ->(obj) { return :source_repository, GoogleInSpec::CloudFunctions::Property::CloudFunctionSourceRepository.new(obj['sourceRepository'], to_s) }, - 'httpsTrigger' => ->(obj) { return :https_trigger, GoogleInSpec::CloudFunctions::Property::CloudFunctionHttpsTrigger.new(obj['httpsTrigger'], to_s) }, - 'eventTrigger' => ->(obj) { return :event_trigger, GoogleInSpec::CloudFunctions::Property::CloudFunctionEventTrigger.new(obj['eventTrigger'], to_s) }, - 'location' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_autoscalers.rb b/generate/libraries/google_compute_autoscalers.rb index d4b5704fa..edbf4160a 100644 --- a/generate/libraries/google_compute_autoscalers.rb +++ b/generate/libraries/google_compute_autoscalers.rb @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { return :id, obj['id'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'autoscalingPolicy' => ->(obj) { return :autoscaling_policy, GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicy.new(obj['autoscalingPolicy'], to_s) }, - 'target' => ->(obj) { return :target, obj['target'] }, - 'zone' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_backend_buckets.rb b/generate/libraries/google_compute_backend_buckets.rb index aec3a9b19..7a0ac1962 100644 --- a/generate/libraries/google_compute_backend_buckets.rb +++ b/generate/libraries/google_compute_backend_buckets.rb @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'bucketName' => ->(obj) { return :bucket_name, obj['bucketName'] }, - 'cdnPolicy' => ->(obj) { return :cdn_policy, GoogleInSpec::Compute::Property::BackendBucketCdnPolicy.new(obj['cdnPolicy'], to_s) }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'enableCdn' => ->(obj) { return :enable_cdn, obj['enableCdn'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_backend_services.rb b/generate/libraries/google_compute_backend_services.rb index ab036aa2c..3082c22cf 100644 --- a/generate/libraries/google_compute_backend_services.rb +++ b/generate/libraries/google_compute_backend_services.rb @@ -80,24 +80,24 @@ def transform(key, value) def transformers { - 'affinityCookieTtlSec' => ->(obj) { return :affinity_cookie_ttl_sec, obj['affinityCookieTtlSec'] }, - 'backends' => ->(obj) { return :backends, GoogleInSpec::Compute::Property::BackendServiceBackendsArray.parse(obj['backends'], to_s) }, - 'cdnPolicy' => ->(obj) { return :cdn_policy, GoogleInSpec::Compute::Property::BackendServiceCdnPolicy.new(obj['cdnPolicy'], to_s) }, - 'connectionDraining' => ->(obj) { return :connection_draining, GoogleInSpec::Compute::Property::BackendServiceConnectionDraining.new(obj['connectionDraining'], to_s) }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'fingerprint' => ->(obj) { return :fingerprint, obj['fingerprint'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'enableCDN' => ->(obj) { return :enable_cdn, obj['enableCDN'] }, - 'healthChecks' => ->(obj) { return :health_checks, obj['healthChecks'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'iap' => ->(obj) { return :iap, GoogleInSpec::Compute::Property::BackendServiceIap.new(obj['iap'], to_s) }, - 'loadBalancingScheme' => ->(obj) { return :load_balancing_scheme, obj['loadBalancingScheme'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'portName' => ->(obj) { return :port_name, obj['portName'] }, - 'protocol' => ->(obj) { return :protocol, obj['protocol'] }, - 'securityPolicy' => ->(obj) { return :security_policy, obj['securityPolicy'] }, - 'sessionAffinity' => ->(obj) { return :session_affinity, obj['sessionAffinity'] }, - 'timeoutSec' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_disks.rb b/generate/libraries/google_compute_disks.rb index 3cc5f0539..4f3515c39 100644 --- a/generate/libraries/google_compute_disks.rb +++ b/generate/libraries/google_compute_disks.rb @@ -83,27 +83,27 @@ def transform(key, value) def transformers { - 'labelFingerprint' => ->(obj) { return :label_fingerprint, obj['labelFingerprint'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'lastAttachTimestamp' => ->(obj) { return :last_attach_timestamp, parse_time_string(obj['lastAttachTimestamp']) }, - 'lastDetachTimestamp' => ->(obj) { return :last_detach_timestamp, parse_time_string(obj['lastDetachTimestamp']) }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'licenses' => ->(obj) { return :licenses, obj['licenses'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'sizeGb' => ->(obj) { return :size_gb, obj['sizeGb'] }, - 'users' => ->(obj) { return :users, obj['users'] }, - 'physicalBlockSizeBytes' => ->(obj) { return :physical_block_size_bytes, obj['physicalBlockSizeBytes'] }, - 'type' => ->(obj) { return :type, obj['type'] }, - 'sourceImage' => ->(obj) { return :source_image, obj['sourceImage'] }, - 'zone' => ->(obj) { return :zone, obj['zone'] }, - 'sourceImageEncryptionKey' => ->(obj) { return :source_image_encryption_key, GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(obj['sourceImageEncryptionKey'], to_s) }, - 'sourceImageId' => ->(obj) { return :source_image_id, obj['sourceImageId'] }, - 'diskEncryptionKey' => ->(obj) { return :disk_encryption_key, GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(obj['diskEncryptionKey'], to_s) }, - 'sourceSnapshot' => ->(obj) { return :source_snapshot, obj['sourceSnapshot'] }, - 'sourceSnapshotEncryptionKey' => ->(obj) { return :source_snapshot_encryption_key, GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(obj['sourceSnapshotEncryptionKey'], to_s) }, - 'sourceSnapshotId' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_firewalls.rb b/generate/libraries/google_compute_firewalls.rb index 06335762b..4d924c383 100644 --- a/generate/libraries/google_compute_firewalls.rb +++ b/generate/libraries/google_compute_firewalls.rb @@ -78,22 +78,22 @@ def transform(key, value) def transformers { - 'allowed' => ->(obj) { return :allowed, GoogleInSpec::Compute::Property::FirewallAllowedArray.parse(obj['allowed'], to_s) }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'denied' => ->(obj) { return :denied, GoogleInSpec::Compute::Property::FirewallDeniedArray.parse(obj['denied'], to_s) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'destinationRanges' => ->(obj) { return :destination_ranges, obj['destinationRanges'] }, - 'direction' => ->(obj) { return :direction, obj['direction'] }, - 'disabled' => ->(obj) { return :disabled, obj['disabled'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'priority' => ->(obj) { return :priority, obj['priority'] }, - 'sourceRanges' => ->(obj) { return :source_ranges, obj['sourceRanges'] }, - 'sourceServiceAccounts' => ->(obj) { return :source_service_accounts, obj['sourceServiceAccounts'] }, - 'sourceTags' => ->(obj) { return :source_tags, obj['sourceTags'] }, - 'targetServiceAccounts' => ->(obj) { return :target_service_accounts, obj['targetServiceAccounts'] }, - 'targetTags' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_global_addresses.rb b/generate/libraries/google_compute_global_addresses.rb index 8300a9bf4..e85f048bd 100644 --- a/generate/libraries/google_compute_global_addresses.rb +++ b/generate/libraries/google_compute_global_addresses.rb @@ -73,17 +73,17 @@ def transform(key, value) def transformers { - 'address' => ->(obj) { return :address, obj['address'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'ipVersion' => ->(obj) { return :ip_version, obj['ipVersion'] }, - 'region' => ->(obj) { return :region, obj['region'] }, - 'prefixLength' => ->(obj) { return :prefix_length, obj['prefixLength'] }, - 'addressType' => ->(obj) { return :address_type, obj['addressType'] }, - 'purpose' => ->(obj) { return :purpose, obj['purpose'] }, - 'network' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_global_forwarding_rules.rb b/generate/libraries/google_compute_global_forwarding_rules.rb index f3fec83ec..08cb63e8e 100644 --- a/generate/libraries/google_compute_global_forwarding_rules.rb +++ b/generate/libraries/google_compute_global_forwarding_rules.rb @@ -74,18 +74,18 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'IPAddress' => ->(obj) { return :ip_address, obj['IPAddress'] }, - 'IPProtocol' => ->(obj) { return :ip_protocol, obj['IPProtocol'] }, - 'ipVersion' => ->(obj) { return :ip_version, obj['ipVersion'] }, - 'loadBalancingScheme' => ->(obj) { return :load_balancing_scheme, obj['loadBalancingScheme'] }, - 'metadataFilters' => ->(obj) { return :metadata_filters, GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersArray.parse(obj['metadataFilters'], to_s) }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'portRange' => ->(obj) { return :port_range, obj['portRange'] }, - 'target' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_health_checks.rb b/generate/libraries/google_compute_health_checks.rb index ae410b022..8bc92e779 100644 --- a/generate/libraries/google_compute_health_checks.rb +++ b/generate/libraries/google_compute_health_checks.rb @@ -76,20 +76,20 @@ def transform(key, value) def transformers { - 'checkIntervalSec' => ->(obj) { return :check_interval_sec, obj['checkIntervalSec'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'healthyThreshold' => ->(obj) { return :healthy_threshold, obj['healthyThreshold'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'timeoutSec' => ->(obj) { return :timeout_sec, obj['timeoutSec'] }, - 'unhealthyThreshold' => ->(obj) { return :unhealthy_threshold, obj['unhealthyThreshold'] }, - 'type' => ->(obj) { return :type, obj['type'] }, - 'httpHealthCheck' => ->(obj) { return :http_health_check, GoogleInSpec::Compute::Property::HealthCheckHttpHealthCheck.new(obj['httpHealthCheck'], to_s) }, - 'httpsHealthCheck' => ->(obj) { return :https_health_check, GoogleInSpec::Compute::Property::HealthCheckHttpsHealthCheck.new(obj['httpsHealthCheck'], to_s) }, - 'tcpHealthCheck' => ->(obj) { return :tcp_health_check, GoogleInSpec::Compute::Property::HealthCheckTcpHealthCheck.new(obj['tcpHealthCheck'], to_s) }, - 'sslHealthCheck' => ->(obj) { return :ssl_health_check, GoogleInSpec::Compute::Property::HealthCheckSslHealthCheck.new(obj['sslHealthCheck'], to_s) }, - 'http2HealthCheck' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_http_health_checks.rb b/generate/libraries/google_compute_http_health_checks.rb index 9bf2bd5f3..87e30bdf1 100644 --- a/generate/libraries/google_compute_http_health_checks.rb +++ b/generate/libraries/google_compute_http_health_checks.rb @@ -73,17 +73,17 @@ def transform(key, value) def transformers { - 'checkIntervalSec' => ->(obj) { return :check_interval_sec, obj['checkIntervalSec'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'healthyThreshold' => ->(obj) { return :healthy_threshold, obj['healthyThreshold'] }, - 'host' => ->(obj) { return :host, obj['host'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'port' => ->(obj) { return :port, obj['port'] }, - 'requestPath' => ->(obj) { return :request_path, obj['requestPath'] }, - 'timeoutSec' => ->(obj) { return :timeout_sec, obj['timeoutSec'] }, - 'unhealthyThreshold' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_https_health_checks.rb b/generate/libraries/google_compute_https_health_checks.rb index 848ff3a3c..1b262e6db 100644 --- a/generate/libraries/google_compute_https_health_checks.rb +++ b/generate/libraries/google_compute_https_health_checks.rb @@ -73,17 +73,17 @@ def transform(key, value) def transformers { - 'checkIntervalSec' => ->(obj) { return :check_interval_sec, obj['checkIntervalSec'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'healthyThreshold' => ->(obj) { return :healthy_threshold, obj['healthyThreshold'] }, - 'host' => ->(obj) { return :host, obj['host'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'port' => ->(obj) { return :port, obj['port'] }, - 'requestPath' => ->(obj) { return :request_path, obj['requestPath'] }, - 'timeoutSec' => ->(obj) { return :timeout_sec, obj['timeoutSec'] }, - 'unhealthyThreshold' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_instance_group_managers.rb b/generate/libraries/google_compute_instance_group_managers.rb index 1d1964a32..3255f833c 100644 --- a/generate/libraries/google_compute_instance_group_managers.rb +++ b/generate/libraries/google_compute_instance_group_managers.rb @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'baseInstanceName' => ->(obj) { return :base_instance_name, obj['baseInstanceName'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'currentActions' => ->(obj) { return :current_actions, GoogleInSpec::Compute::Property::InstanceGroupManagerCurrentActions.new(obj['currentActions'], to_s) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'instanceGroup' => ->(obj) { return :instance_group, obj['instanceGroup'] }, - 'instanceTemplate' => ->(obj) { return :instance_template, obj['instanceTemplate'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'namedPorts' => ->(obj) { return :named_ports, GoogleInSpec::Compute::Property::InstanceGroupManagerNamedPortsArray.parse(obj['namedPorts'], to_s) }, - 'region' => ->(obj) { return :region, obj['region'] }, - 'targetPools' => ->(obj) { return :target_pools, obj['targetPools'] }, - 'targetSize' => ->(obj) { return :target_size, obj['targetSize'] }, - 'zone' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_instance_templates.rb b/generate/libraries/google_compute_instance_templates.rb index b24af7665..8d8e921ec 100644 --- a/generate/libraries/google_compute_instance_templates.rb +++ b/generate/libraries/google_compute_instance_templates.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'properties' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_instances.rb b/generate/libraries/google_compute_instances.rb index 2997a82e0..7c1ac0b43 100644 --- a/generate/libraries/google_compute_instances.rb +++ b/generate/libraries/google_compute_instances.rb @@ -84,28 +84,28 @@ def transform(key, value) def transformers { - 'canIpForward' => ->(obj) { return :can_ip_forward, obj['canIpForward'] }, - 'cpuPlatform' => ->(obj) { return :cpu_platform, obj['cpuPlatform'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, obj['creationTimestamp'] }, - 'deletionProtection' => ->(obj) { return :deletion_protection, obj['deletionProtection'] }, - 'disks' => ->(obj) { return :disks, GoogleInSpec::Compute::Property::InstanceDisksArray.parse(obj['disks'], to_s) }, - 'guestAccelerators' => ->(obj) { return :guest_accelerators, GoogleInSpec::Compute::Property::InstanceGuestAcceleratorsArray.parse(obj['guestAccelerators'], to_s) }, - 'hostname' => ->(obj) { return :hostname, obj['hostname'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'labelFingerprint' => ->(obj) { return :label_fingerprint, obj['labelFingerprint'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'metadata' => ->(obj) { return :metadata, obj['metadata'] }, - 'machineType' => ->(obj) { return :machine_type, obj['machineType'] }, - 'minCpuPlatform' => ->(obj) { return :min_cpu_platform, obj['minCpuPlatform'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'networkInterfaces' => ->(obj) { return :network_interfaces, GoogleInSpec::Compute::Property::InstanceNetworkInterfacesArray.parse(obj['networkInterfaces'], to_s) }, - 'scheduling' => ->(obj) { return :scheduling, GoogleInSpec::Compute::Property::InstanceScheduling.new(obj['scheduling'], to_s) }, - 'serviceAccounts' => ->(obj) { return :service_accounts, GoogleInSpec::Compute::Property::InstanceServiceAccountsArray.parse(obj['serviceAccounts'], to_s) }, - 'shieldedInstanceConfig' => ->(obj) { return :shielded_instance_config, GoogleInSpec::Compute::Property::InstanceShieldedInstanceConfig.new(obj['shieldedInstanceConfig'], to_s) }, - 'status' => ->(obj) { return :status, obj['status'] }, - 'statusMessage' => ->(obj) { return :status_message, obj['statusMessage'] }, - 'tags' => ->(obj) { return :tags, GoogleInSpec::Compute::Property::InstanceTags.new(obj['tags'], to_s) }, - 'zone' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_network_endpoint_groups.rb b/generate/libraries/google_compute_network_endpoint_groups.rb index 78c78ce58..53bc4c375 100644 --- a/generate/libraries/google_compute_network_endpoint_groups.rb +++ b/generate/libraries/google_compute_network_endpoint_groups.rb @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'networkEndpointType' => ->(obj) { return :network_endpoint_type, obj['networkEndpointType'] }, - 'size' => ->(obj) { return :size, obj['size'] }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'subnetwork' => ->(obj) { return :subnetwork, obj['subnetwork'] }, - 'defaultPort' => ->(obj) { return :default_port, obj['defaultPort'] }, - 'zone' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_networks.rb b/generate/libraries/google_compute_networks.rb index 5bbdb0dc8..d4619245e 100644 --- a/generate/libraries/google_compute_networks.rb +++ b/generate/libraries/google_compute_networks.rb @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'description' => ->(obj) { return :description, obj['description'] }, - 'gatewayIPv4' => ->(obj) { return :gateway_ipv4, obj['gatewayIPv4'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'subnetworks' => ->(obj) { return :subnetworks, obj['subnetworks'] }, - 'autoCreateSubnetworks' => ->(obj) { return :auto_create_subnetworks, obj['autoCreateSubnetworks'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'routingConfig' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_node_groups.rb b/generate/libraries/google_compute_node_groups.rb index 0ab05988d..4bf3674ad 100644 --- a/generate/libraries/google_compute_node_groups.rb +++ b/generate/libraries/google_compute_node_groups.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'nodeTemplate' => ->(obj) { return :node_template, obj['nodeTemplate'] }, - 'size' => ->(obj) { return :size, obj['size'] }, - 'zone' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_node_templates.rb b/generate/libraries/google_compute_node_templates.rb index 113b42404..73e841808 100644 --- a/generate/libraries/google_compute_node_templates.rb +++ b/generate/libraries/google_compute_node_templates.rb @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'nodeAffinityLabels' => ->(obj) { return :node_affinity_labels, obj['nodeAffinityLabels'] }, - 'nodeType' => ->(obj) { return :node_type, obj['nodeType'] }, - 'nodeTypeFlexibility' => ->(obj) { return :node_type_flexibility, GoogleInSpec::Compute::Property::NodeTemplateNodeTypeFlexibility.new(obj['nodeTypeFlexibility'], to_s) }, - 'region' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_region_backend_services.rb b/generate/libraries/google_compute_region_backend_services.rb index 77e4a0c1a..c7137f2be 100644 --- a/generate/libraries/google_compute_region_backend_services.rb +++ b/generate/libraries/google_compute_region_backend_services.rb @@ -73,17 +73,17 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'healthChecks' => ->(obj) { return :health_checks, obj['healthChecks'] }, - 'backends' => ->(obj) { return :backends, GoogleInSpec::Compute::Property::RegionBackendServiceBackendsArray.parse(obj['backends'], to_s) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'fingerprint' => ->(obj) { return :fingerprint, obj['fingerprint'] }, - 'protocol' => ->(obj) { return :protocol, obj['protocol'] }, - 'sessionAffinity' => ->(obj) { return :session_affinity, obj['sessionAffinity'] }, - 'region' => ->(obj) { return :region, obj['region'] }, - 'timeoutSec' => ->(obj) { return :timeout_sec, obj['timeoutSec'] }, - 'connectionDraining' => ->(obj) { return :connection_draining, GoogleInSpec::Compute::Property::RegionBackendServiceConnectionDraining.new(obj['connectionDraining'], to_s) }, - 'loadBalancingScheme' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_regions.rb b/generate/libraries/google_compute_regions.rb index ea501a47e..9b73e559f 100644 --- a/generate/libraries/google_compute_regions.rb +++ b/generate/libraries/google_compute_regions.rb @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'deprecated' => ->(obj) { return :deprecated, GoogleInSpec::Compute::Property::RegionDeprecated.new(obj['deprecated'], to_s) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :region_id, obj['id'] }, - 'name' => ->(obj) { return :region_name, obj['name'] }, - 'quotas' => ->(obj) { return :quotas, GoogleInSpec::Compute::Property::RegionQuotasArray.parse(obj['quotas'], to_s) }, - 'status' => ->(obj) { return :region_status, obj['status'] }, - 'zones' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_routers.rb b/generate/libraries/google_compute_routers.rb index 8497979f3..852693326 100644 --- a/generate/libraries/google_compute_routers.rb +++ b/generate/libraries/google_compute_routers.rb @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { return :id, obj['id'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'bgp' => ->(obj) { return :bgp, GoogleInSpec::Compute::Property::RouterBgp.new(obj['bgp'], to_s) }, - 'region' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_routes.rb b/generate/libraries/google_compute_routes.rb index 3fadf8bce..2dd78f16a 100644 --- a/generate/libraries/google_compute_routes.rb +++ b/generate/libraries/google_compute_routes.rb @@ -73,17 +73,17 @@ def transform(key, value) def transformers { - 'destRange' => ->(obj) { return :dest_range, obj['destRange'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'priority' => ->(obj) { return :priority, obj['priority'] }, - 'tags' => ->(obj) { return :tags, obj['tags'] }, - 'nextHopGateway' => ->(obj) { return :next_hop_gateway, obj['nextHopGateway'] }, - 'nextHopInstance' => ->(obj) { return :next_hop_instance, obj['nextHopInstance'] }, - 'nextHopIp' => ->(obj) { return :next_hop_ip, obj['nextHopIp'] }, - 'nextHopVpnTunnel' => ->(obj) { return :next_hop_vpn_tunnel, obj['nextHopVpnTunnel'] }, - 'nextHopNetwork' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_snapshots.rb b/generate/libraries/google_compute_snapshots.rb index 1b26acde5..49dcb1c35 100644 --- a/generate/libraries/google_compute_snapshots.rb +++ b/generate/libraries/google_compute_snapshots.rb @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'diskSizeGb' => ->(obj) { return :disk_size_gb, obj['diskSizeGb'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'storageBytes' => ->(obj) { return :storage_bytes, obj['storageBytes'] }, - 'licenses' => ->(obj) { return :licenses, obj['licenses'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'labelFingerprint' => ->(obj) { return :label_fingerprint, obj['labelFingerprint'] }, - 'sourceDisk' => ->(obj) { return :source_disk, obj['sourceDisk'] }, - 'zone' => ->(obj) { return :zone, obj['zone'] }, - 'snapshotEncryptionKey' => ->(obj) { return :snapshot_encryption_key, GoogleInSpec::Compute::Property::SnapshotSnapshotEncryptionKey.new(obj['snapshotEncryptionKey'], to_s) }, - 'sourceDiskEncryptionKey' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_ssl_certificates.rb b/generate/libraries/google_compute_ssl_certificates.rb index 8d91eb426..dbf853c8f 100644 --- a/generate/libraries/google_compute_ssl_certificates.rb +++ b/generate/libraries/google_compute_ssl_certificates.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'certificate' => ->(obj) { return :certificate, obj['certificate'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'privateKey' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_ssl_policies.rb b/generate/libraries/google_compute_ssl_policies.rb index a2a36e718..a81141114 100644 --- a/generate/libraries/google_compute_ssl_policies.rb +++ b/generate/libraries/google_compute_ssl_policies.rb @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'profile' => ->(obj) { return :profile, obj['profile'] }, - 'minTlsVersion' => ->(obj) { return :min_tls_version, obj['minTlsVersion'] }, - 'enabledFeatures' => ->(obj) { return :enabled_features, obj['enabledFeatures'] }, - 'customFeatures' => ->(obj) { return :custom_features, obj['customFeatures'] }, - 'fingerprint' => ->(obj) { return :fingerprint, obj['fingerprint'] }, - 'warnings' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_subnetworks.rb b/generate/libraries/google_compute_subnetworks.rb index 4768220c8..35d8d6562 100644 --- a/generate/libraries/google_compute_subnetworks.rb +++ b/generate/libraries/google_compute_subnetworks.rb @@ -74,18 +74,18 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'gatewayAddress' => ->(obj) { return :gateway_address, obj['gatewayAddress'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'ipCidrRange' => ->(obj) { return :ip_cidr_range, obj['ipCidrRange'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'fingerprint' => ->(obj) { return :fingerprint, obj['fingerprint'] }, - 'secondaryIpRanges' => ->(obj) { return :secondary_ip_ranges, GoogleInSpec::Compute::Property::SubnetworkSecondaryIpRangesArray.parse(obj['secondaryIpRanges'], to_s) }, - 'privateIpGoogleAccess' => ->(obj) { return :private_ip_google_access, obj['privateIpGoogleAccess'] }, - 'region' => ->(obj) { return :region, obj['region'] }, - 'logConfig' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_target_http_proxies.rb b/generate/libraries/google_compute_target_http_proxies.rb index b59d8539c..a1257dd64 100644 --- a/generate/libraries/google_compute_target_http_proxies.rb +++ b/generate/libraries/google_compute_target_http_proxies.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'urlMap' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_target_https_proxies.rb b/generate/libraries/google_compute_target_https_proxies.rb index 7c288170e..d7fabb3f5 100644 --- a/generate/libraries/google_compute_target_https_proxies.rb +++ b/generate/libraries/google_compute_target_https_proxies.rb @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'quicOverride' => ->(obj) { return :quic_override, obj['quicOverride'] }, - 'sslCertificates' => ->(obj) { return :ssl_certificates, obj['sslCertificates'] }, - 'sslPolicy' => ->(obj) { return :ssl_policy, obj['sslPolicy'] }, - 'urlMap' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_target_pools.rb b/generate/libraries/google_compute_target_pools.rb index 2936b0fdf..166a803d7 100644 --- a/generate/libraries/google_compute_target_pools.rb +++ b/generate/libraries/google_compute_target_pools.rb @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'backupPool' => ->(obj) { return :backup_pool, obj['backupPool'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'failoverRatio' => ->(obj) { return :failover_ratio, obj['failoverRatio'] }, - 'healthCheck' => ->(obj) { return :health_check, obj['healthCheck'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'instances' => ->(obj) { return :instances, obj['instances'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'sessionAffinity' => ->(obj) { return :session_affinity, obj['sessionAffinity'] }, - 'region' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_target_tcp_proxies.rb b/generate/libraries/google_compute_target_tcp_proxies.rb index fd701f51a..4c5c21664 100644 --- a/generate/libraries/google_compute_target_tcp_proxies.rb +++ b/generate/libraries/google_compute_target_tcp_proxies.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'proxyHeader' => ->(obj) { return :proxy_header, obj['proxyHeader'] }, - 'service' => ->(obj) { return :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 diff --git a/generate/libraries/google_compute_url_maps.rb b/generate/libraries/google_compute_url_maps.rb index 30ae613e3..45ee1bf48 100644 --- a/generate/libraries/google_compute_url_maps.rb +++ b/generate/libraries/google_compute_url_maps.rb @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'defaultService' => ->(obj) { return :default_service, obj['defaultService'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'hostRules' => ->(obj) { return :host_rules, GoogleInSpec::Compute::Property::UrlMapHostRulesArray.parse(obj['hostRules'], to_s) }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'fingerprint' => ->(obj) { return :fingerprint, obj['fingerprint'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'pathMatchers' => ->(obj) { return :path_matchers, GoogleInSpec::Compute::Property::UrlMapPathMatchersArray.parse(obj['pathMatchers'], to_s) }, - 'tests' => ->(obj) { return :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 diff --git a/generate/libraries/google_container_regional_clusters.rb b/generate/libraries/google_container_regional_clusters.rb index 7efef44f8..406177a9a 100644 --- a/generate/libraries/google_container_regional_clusters.rb +++ b/generate/libraries/google_container_regional_clusters.rb @@ -97,41 +97,41 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'initialNodeCount' => ->(obj) { return :initial_node_count, obj['initialNodeCount'] }, - 'nodeConfig' => ->(obj) { return :node_config, GoogleInSpec::Container::Property::RegionalClusterNodeConfig.new(obj['nodeConfig'], to_s) }, - 'masterAuth' => ->(obj) { return :master_auth, GoogleInSpec::Container::Property::RegionalClusterMasterAuth.new(obj['masterAuth'], to_s) }, - 'loggingService' => ->(obj) { return :logging_service, obj['loggingService'] }, - 'monitoringService' => ->(obj) { return :monitoring_service, obj['monitoringService'] }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'privateClusterConfig' => ->(obj) { return :private_cluster_config, GoogleInSpec::Container::Property::RegionalClusterPrivateClusterConfig.new(obj['privateClusterConfig'], to_s) }, - 'clusterIpv4Cidr' => ->(obj) { return :cluster_ipv4_cidr, obj['clusterIpv4Cidr'] }, - 'addonsConfig' => ->(obj) { return :addons_config, GoogleInSpec::Container::Property::RegionalClusterAddonsConfig.new(obj['addonsConfig'], to_s) }, - 'subnetwork' => ->(obj) { return :subnetwork, obj['subnetwork'] }, - 'locations' => ->(obj) { return :locations, obj['locations'] }, - 'resourceLabels' => ->(obj) { return :resource_labels, obj['resourceLabels'] }, - 'labelFingerprint' => ->(obj) { return :label_fingerprint, obj['labelFingerprint'] }, - 'legacyAbac' => ->(obj) { return :legacy_abac, GoogleInSpec::Container::Property::RegionalClusterLegacyAbac.new(obj['legacyAbac'], to_s) }, - 'networkPolicy' => ->(obj) { return :network_policy, GoogleInSpec::Container::Property::RegionalClusterNetworkPolicy.new(obj['networkPolicy'], to_s) }, - 'defaultMaxPodsConstraint' => ->(obj) { return :default_max_pods_constraint, GoogleInSpec::Container::Property::RegionalClusterDefaultMaxPodsConstraint.new(obj['defaultMaxPodsConstraint'], to_s) }, - 'ipAllocationPolicy' => ->(obj) { return :ip_allocation_policy, GoogleInSpec::Container::Property::RegionalClusterIpAllocationPolicy.new(obj['ipAllocationPolicy'], to_s) }, - 'endpoint' => ->(obj) { return :endpoint, obj['endpoint'] }, - 'initialClusterVersion' => ->(obj) { return :initial_cluster_version, obj['initialClusterVersion'] }, - 'currentMasterVersion' => ->(obj) { return :current_master_version, obj['currentMasterVersion'] }, - 'currentNodeVersion' => ->(obj) { return :current_node_version, obj['currentNodeVersion'] }, - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'status' => ->(obj) { return :status, obj['status'] }, - 'statusMessage' => ->(obj) { return :status_message, obj['statusMessage'] }, - 'nodeIpv4CidrSize' => ->(obj) { return :node_ipv4_cidr_size, obj['nodeIpv4CidrSize'] }, - 'servicesIpv4Cidr' => ->(obj) { return :services_ipv4_cidr, obj['servicesIpv4Cidr'] }, - 'currentNodeCount' => ->(obj) { return :current_node_count, obj['currentNodeCount'] }, - 'expireTime' => ->(obj) { return :expire_time, parse_time_string(obj['expireTime']) }, - 'enableTpu' => ->(obj) { return :enable_tpu, obj['enableTpu'] }, - 'tpuIpv4CidrBlock' => ->(obj) { return :tpu_ipv4_cidr_block, obj['tpuIpv4CidrBlock'] }, - 'conditions' => ->(obj) { return :conditions, GoogleInSpec::Container::Property::RegionalClusterConditionsArray.parse(obj['conditions'], to_s) }, - 'masterAuthorizedNetworksConfig' => ->(obj) { return :master_authorized_networks_config, GoogleInSpec::Container::Property::RegionalClusterMasterAuthorizedNetworksConfig.new(obj['masterAuthorizedNetworksConfig'], to_s) }, - 'location' => ->(obj) { return :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 diff --git a/generate/libraries/google_container_regional_node_pools.rb b/generate/libraries/google_container_regional_node_pools.rb index 638ed1dc3..480db9174 100644 --- a/generate/libraries/google_container_regional_node_pools.rb +++ b/generate/libraries/google_container_regional_node_pools.rb @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'config' => ->(obj) { return :config, GoogleInSpec::Container::Property::RegionalNodePoolConfig.new(obj['config'], to_s) }, - 'initialNodeCount' => ->(obj) { return :initial_node_count, obj['initialNodeCount'] }, - 'status' => ->(obj) { return :status, obj['status'] }, - 'statusMessage' => ->(obj) { return :status_message, obj['statusMessage'] }, - 'version' => ->(obj) { return :version, obj['version'] }, - 'autoscaling' => ->(obj) { return :autoscaling, GoogleInSpec::Container::Property::RegionalNodePoolAutoscaling.new(obj['autoscaling'], to_s) }, - 'management' => ->(obj) { return :management, GoogleInSpec::Container::Property::RegionalNodePoolManagement.new(obj['management'], to_s) }, - 'maxPodsConstraint' => ->(obj) { return :max_pods_constraint, GoogleInSpec::Container::Property::RegionalNodePoolMaxPodsConstraint.new(obj['maxPodsConstraint'], to_s) }, - 'conditions' => ->(obj) { return :conditions, GoogleInSpec::Container::Property::RegionalNodePoolConditionsArray.parse(obj['conditions'], to_s) }, - 'podIpv4CidrSize' => ->(obj) { return :pod_ipv4_cidr_size, obj['podIpv4CidrSize'] }, - 'cluster' => ->(obj) { return :cluster, obj['cluster'] }, - 'location' => ->(obj) { return :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 diff --git a/generate/libraries/google_dataproc_clusters.rb b/generate/libraries/google_dataproc_clusters.rb index 0a5ead2cc..66db33005 100644 --- a/generate/libraries/google_dataproc_clusters.rb +++ b/generate/libraries/google_dataproc_clusters.rb @@ -66,10 +66,10 @@ def transform(key, value) def transformers { - 'clusterName' => ->(obj) { return :cluster_name, obj['clusterName'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'config' => ->(obj) { return :config, GoogleInSpec::Dataproc::Property::ClusterConfig.new(obj['config'], to_s) }, - 'region' => ->(obj) { return :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 diff --git a/generate/libraries/google_dns_resource_record_sets.rb b/generate/libraries/google_dns_resource_record_sets.rb index a30e6feca..0f7fff532 100644 --- a/generate/libraries/google_dns_resource_record_sets.rb +++ b/generate/libraries/google_dns_resource_record_sets.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'type' => ->(obj) { return :type, obj['type'] }, - 'ttl' => ->(obj) { return :ttl, obj['ttl'] }, - 'rrdatas' => ->(obj) { return :target, obj['rrdatas'] }, - 'managed_zone' => ->(obj) { return :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 diff --git a/generate/libraries/google_filestore_instances.rb b/generate/libraries/google_filestore_instances.rb index 0d19e4adc..e64638d84 100644 --- a/generate/libraries/google_filestore_instances.rb +++ b/generate/libraries/google_filestore_instances.rb @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'tier' => ->(obj) { return :tier, obj['tier'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'fileShares' => ->(obj) { return :file_shares, GoogleInSpec::Filestore::Property::InstanceFileSharesArray.parse(obj['fileShares'], to_s) }, - 'networks' => ->(obj) { return :networks, GoogleInSpec::Filestore::Property::InstanceNetworksArray.parse(obj['networks'], to_s) }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'zone' => ->(obj) { return :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 diff --git a/generate/libraries/google_logging_folder_exclusions.rb b/generate/libraries/google_logging_folder_exclusions.rb index 75213c692..a3b3d9dc5 100644 --- a/generate/libraries/google_logging_folder_exclusions.rb +++ b/generate/libraries/google_logging_folder_exclusions.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'folder' => ->(obj) { return :folder, obj['folder'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'filter' => ->(obj) { return :filter, obj['filter'] }, - 'disabled' => ->(obj) { return :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 diff --git a/generate/libraries/google_logging_folder_log_sinks.rb b/generate/libraries/google_logging_folder_log_sinks.rb index 9ebf3de06..de5f6b8fa 100644 --- a/generate/libraries/google_logging_folder_log_sinks.rb +++ b/generate/libraries/google_logging_folder_log_sinks.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'folder' => ->(obj) { return :folder, obj['folder'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'filter' => ->(obj) { return :filter, obj['filter'] }, - 'destination' => ->(obj) { return :destination, obj['destination'] }, - 'writerIdentity' => ->(obj) { return :writer_identity, obj['writerIdentity'] }, - 'includeChildren' => ->(obj) { return :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 diff --git a/generate/libraries/google_logging_organization_log_sinks.rb b/generate/libraries/google_logging_organization_log_sinks.rb index 91e0ad255..692b472e8 100644 --- a/generate/libraries/google_logging_organization_log_sinks.rb +++ b/generate/libraries/google_logging_organization_log_sinks.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'organization' => ->(obj) { return :organization, obj['organization'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'filter' => ->(obj) { return :filter, obj['filter'] }, - 'destination' => ->(obj) { return :destination, obj['destination'] }, - 'writerIdentity' => ->(obj) { return :writer_identity, obj['writerIdentity'] }, - 'includeChildren' => ->(obj) { return :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 diff --git a/generate/libraries/google_ml_engine_models.rb b/generate/libraries/google_ml_engine_models.rb index c9fa5ce21..7151a94df 100644 --- a/generate/libraries/google_ml_engine_models.rb +++ b/generate/libraries/google_ml_engine_models.rb @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'defaultVersion' => ->(obj) { return :default_version, GoogleInSpec::MLEngine::Property::ModelDefaultVersion.new(obj['defaultVersion'], to_s) }, - 'regions' => ->(obj) { return :regions, obj['regions'] }, - 'onlinePredictionLogging' => ->(obj) { return :online_prediction_logging, obj['onlinePredictionLogging'] }, - 'onlinePredictionConsoleLogging' => ->(obj) { return :online_prediction_console_logging, obj['onlinePredictionConsoleLogging'] }, - 'labels' => ->(obj) { return :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 diff --git a/generate/libraries/google_pubsub_subscriptions.rb b/generate/libraries/google_pubsub_subscriptions.rb index 79fdc3cf1..bb67e0a5f 100644 --- a/generate/libraries/google_pubsub_subscriptions.rb +++ b/generate/libraries/google_pubsub_subscriptions.rb @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, name_from_self_link(obj['name']) }, - 'topic' => ->(obj) { return :topic, obj['topic'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'pushConfig' => ->(obj) { return :push_config, GoogleInSpec::Pubsub::Property::SubscriptionPushConfig.new(obj['pushConfig'], to_s) }, - 'ackDeadlineSeconds' => ->(obj) { return :ack_deadline_seconds, obj['ackDeadlineSeconds'] }, - 'messageRetentionDuration' => ->(obj) { return :message_retention_duration, obj['messageRetentionDuration'] }, - 'retainAckedMessages' => ->(obj) { return :retain_acked_messages, obj['retainAckedMessages'] }, - 'expirationPolicy' => ->(obj) { return :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 diff --git a/generate/libraries/google_pubsub_topics.rb b/generate/libraries/google_pubsub_topics.rb index 31537937b..ee104f682 100644 --- a/generate/libraries/google_pubsub_topics.rb +++ b/generate/libraries/google_pubsub_topics.rb @@ -66,10 +66,10 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, name_from_self_link(obj['name']) }, - 'kmsKeyName' => ->(obj) { return :kms_key_name, obj['kmsKeyName'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'messageStoragePolicy' => ->(obj) { return :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 diff --git a/generate/libraries/google_redis_instances.rb b/generate/libraries/google_redis_instances.rb index 07b176a14..11be18814 100644 --- a/generate/libraries/google_redis_instances.rb +++ b/generate/libraries/google_redis_instances.rb @@ -78,22 +78,22 @@ def transform(key, value) def transformers { - 'alternativeLocationId' => ->(obj) { return :alternative_location_id, obj['alternativeLocationId'] }, - 'authorizedNetwork' => ->(obj) { return :authorized_network, obj['authorizedNetwork'] }, - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'currentLocationId' => ->(obj) { return :current_location_id, obj['currentLocationId'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'host' => ->(obj) { return :host, obj['host'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'redisConfigs' => ->(obj) { return :redis_configs, obj['redisConfigs'] }, - 'locationId' => ->(obj) { return :location_id, obj['locationId'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'memorySizeGb' => ->(obj) { return :memory_size_gb, obj['memorySizeGb'] }, - 'port' => ->(obj) { return :port, obj['port'] }, - 'redisVersion' => ->(obj) { return :redis_version, obj['redisVersion'] }, - 'reservedIpRange' => ->(obj) { return :reserved_ip_range, obj['reservedIpRange'] }, - 'tier' => ->(obj) { return :tier, obj['tier'] }, - 'region' => ->(obj) { return :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 diff --git a/generate/libraries/google_resourcemanager_folders.rb b/generate/libraries/google_resourcemanager_folders.rb index bfc44c62b..85fdddc10 100644 --- a/generate/libraries/google_resourcemanager_folders.rb +++ b/generate/libraries/google_resourcemanager_folders.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'lifecycleState' => ->(obj) { return :lifecycle_state, obj['lifecycleState'] }, - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'parent' => ->(obj) { return :parent, obj['parent'] }, - 'displayName' => ->(obj) { return :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 diff --git a/generate/libraries/google_runtime_config_configs.rb b/generate/libraries/google_runtime_config_configs.rb index 094966aec..b320a1867 100644 --- a/generate/libraries/google_runtime_config_configs.rb +++ b/generate/libraries/google_runtime_config_configs.rb @@ -64,8 +64,8 @@ def transform(key, value) def transformers { - 'description' => ->(obj) { return :description, obj['description'] }, - 'name' => ->(obj) { return :name, obj['name'] }, + 'description' => ->(obj) { [:description, obj['description']] }, + 'name' => ->(obj) { [:name, obj['name']] }, } end diff --git a/generate/libraries/google_runtime_config_variables.rb b/generate/libraries/google_runtime_config_variables.rb index 76e90d6f4..64a085dab 100644 --- a/generate/libraries/google_runtime_config_variables.rb +++ b/generate/libraries/google_runtime_config_variables.rb @@ -66,10 +66,10 @@ def transform(key, value) def transformers { - 'value' => ->(obj) { return :value, obj['value'] }, - 'text' => ->(obj) { return :text, obj['text'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'config' => ->(obj) { return :config, obj['config'] }, + 'value' => ->(obj) { [:value, obj['value']] }, + 'text' => ->(obj) { [:text, obj['text']] }, + 'name' => ->(obj) { [:name, obj['name']] }, + 'config' => ->(obj) { [:config, obj['config']] }, } end diff --git a/generate/libraries/google_sourcerepo_repositories.rb b/generate/libraries/google_sourcerepo_repositories.rb index 186d75fa6..524f0d6d9 100644 --- a/generate/libraries/google_sourcerepo_repositories.rb +++ b/generate/libraries/google_sourcerepo_repositories.rb @@ -65,9 +65,9 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'url' => ->(obj) { return :url, obj['url'] }, - 'size' => ->(obj) { return :size, obj['size'] }, + 'name' => ->(obj) { [:name, obj['name']] }, + 'url' => ->(obj) { [:url, obj['url']] }, + 'size' => ->(obj) { [:size, obj['size']] }, } end diff --git a/inspec.yml b/inspec.yml index f72d3a600..1b3ca87ba 100644 --- a/inspec.yml +++ b/inspec.yml @@ -4,7 +4,7 @@ maintainer: spaterson@chef.io,russell.seymour@turtlesystems.co.uk summary: This resource pack provides compliance resources_old_ignore for Google Cloud Platform copyright: spaterson@chef.io,russell.seymour@turtlesystems.co.uk copyright_email: spaterson@chef.io,russell.seymour@turtlesystems.co.uk -version: 1.11.54 +version: 1.11.59 license: Apache-2.0 inspec_version: '>= 4.7.3' supports: diff --git a/libraries/google/composer/property/projectlocationenvironment_config.rb b/libraries/google/composer/property/projectlocationenvironment_config.rb new file mode 100644 index 000000000..728bbb763 --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config.rb @@ -0,0 +1,109 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# 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' +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfig + attr_reader :gke_cluster + + attr_reader :dag_gcs_prefix + + attr_reader :node_count + + attr_reader :software_config + + attr_reader :node_config + + attr_reader :private_environment_config + + attr_reader :web_server_network_access_control + + attr_reader :database_config + + attr_reader :web_server_config + + attr_reader :encryption_config + + attr_reader :maintenance_window + + attr_reader :workloads_config + + attr_reader :environment_size + + attr_reader :airflow_uri + + attr_reader :airflow_byoid_uri + + attr_reader :master_authorized_networks_config + + attr_reader :recovery_config + + attr_reader :resilience_mode + + 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'] + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfig" + end + end + end + end +end diff --git a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_regex.rb b/libraries/google/composer/property/projectlocationenvironment_config_database_config.rb similarity index 74% rename from build/inspec/libraries/google/datalossprevention/property/storedinfotype_regex.rb rename to libraries/google/composer/property/projectlocationenvironment_config_database_config.rb index 63e9eed71..3bd003dcc 100644 --- a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_regex.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_database_config.rb @@ -14,22 +14,22 @@ # # ---------------------------------------------------------------------------- module GoogleInSpec - module DataLossPrevention + module Composer module Property - class StoredInfoTypeRegex - attr_reader :pattern + class ProjectLocationEnvironmentConfigDatabaseConfig + attr_reader :machine_type - attr_reader :group_indexes + attr_reader :zone def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @pattern = args['pattern'] - @group_indexes = args['groupIndexes'] + @machine_type = args['machineType'] + @zone = args['zone'] end def to_s - "#{@parent_identifier} StoredInfoTypeRegex" + "#{@parent_identifier} ProjectLocationEnvironmentConfigDatabaseConfig" end end end diff --git a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_large_custom_dictionary_cloud_storage_file_set.rb b/libraries/google/composer/property/projectlocationenvironment_config_encryption_config.rb similarity index 77% rename from build/inspec/libraries/google/datalossprevention/property/storedinfotype_large_custom_dictionary_cloud_storage_file_set.rb rename to libraries/google/composer/property/projectlocationenvironment_config_encryption_config.rb index 99e6099d6..b9b5bbb10 100644 --- a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_large_custom_dictionary_cloud_storage_file_set.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_encryption_config.rb @@ -14,19 +14,19 @@ # # ---------------------------------------------------------------------------- module GoogleInSpec - module DataLossPrevention + module Composer module Property - class StoredInfoTypeLargeCustomDictionaryCloudStorageFileSet - attr_reader :url + class ProjectLocationEnvironmentConfigEncryptionConfig + attr_reader :kms_key_name def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @url = args['url'] + @kms_key_name = args['kmsKeyName'] end def to_s - "#{@parent_identifier} StoredInfoTypeLargeCustomDictionaryCloudStorageFileSet" + "#{@parent_identifier} ProjectLocationEnvironmentConfigEncryptionConfig" end end end diff --git a/libraries/google/composer/property/projectlocationenvironment_config_maintenance_window.rb b/libraries/google/composer/property/projectlocationenvironment_config_maintenance_window.rb new file mode 100644 index 000000000..71bbeabb9 --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config_maintenance_window.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfigMaintenanceWindow + attr_reader :start_time + + attr_reader :end_time + + attr_reader :recurrence + + 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'] + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfigMaintenanceWindow" + end + end + end + end +end 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 new file mode 100644 index 000000000..4da07486a --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config_master_authorized_networks_config.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks' +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfig + attr_reader :enabled + + attr_reader :cidr_blocks + + 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) + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfig" + end + end + end + end +end diff --git a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_dictionary.rb b/libraries/google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks.rb similarity index 50% rename from build/inspec/libraries/google/datalossprevention/property/storedinfotype_dictionary.rb rename to libraries/google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks.rb index 9dcb65ede..2de397e69 100644 --- a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_dictionary.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_master_authorized_networks_config_cidr_blocks.rb @@ -13,25 +13,31 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/datalossprevention/property/storedinfotype_dictionary_cloud_storage_path' -require 'google/datalossprevention/property/storedinfotype_dictionary_word_list' module GoogleInSpec - module DataLossPrevention + module Composer module Property - class StoredInfoTypeDictionary - attr_reader :word_list + class ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfigCidrBlocks + attr_reader :display_name - attr_reader :cloud_storage_path + attr_reader :cidr_block def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @word_list = GoogleInSpec::DataLossPrevention::Property::StoredInfoTypeDictionaryWordList.new(args['wordList'], to_s) - @cloud_storage_path = GoogleInSpec::DataLossPrevention::Property::StoredInfoTypeDictionaryCloudStoragePath.new(args['cloudStoragePath'], to_s) + @display_name = args['displayName'] + @cidr_block = args['cidrBlock'] end def to_s - "#{@parent_identifier} StoredInfoTypeDictionary" + "#{@parent_identifier} ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfigCidrBlocks" + end + end + + class ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfigCidrBlocksArray + def self.parse(value, parent_identifier) + return if value.nil? + return ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfigCidrBlocks.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ProjectLocationEnvironmentConfigMasterAuthorizedNetworksConfigCidrBlocks.new(v, parent_identifier) } end end end diff --git a/libraries/google/composer/property/projectlocationenvironment_config_node_config.rb b/libraries/google/composer/property/projectlocationenvironment_config_node_config.rb new file mode 100644 index 000000000..6d5a6a773 --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config_node_config.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy' +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfigNodeConfig + attr_reader :location + + attr_reader :machine_type + + attr_reader :network + + attr_reader :subnetwork + + attr_reader :disk_size_gb + + attr_reader :oauth_scopes + + attr_reader :service_account + + attr_reader :tags + + attr_reader :ip_allocation_policy + + attr_reader :enable_ip_masq_agent + + 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'] + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfigNodeConfig" + end + end + end + end +end diff --git a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_large_custom_dictionary_big_query_field.rb b/libraries/google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy.rb similarity index 53% rename from build/inspec/libraries/google/datalossprevention/property/storedinfotype_large_custom_dictionary_big_query_field.rb rename to libraries/google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy.rb index 21f06fe2f..45c01c746 100644 --- a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_large_custom_dictionary_big_query_field.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_node_config_ip_allocation_policy.rb @@ -13,25 +13,32 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/datalossprevention/property/storedinfotype_large_custom_dictionary_big_query_field_field' -require 'google/datalossprevention/property/storedinfotype_large_custom_dictionary_big_query_field_table' module GoogleInSpec - module DataLossPrevention + module Composer module Property - class StoredInfoTypeLargeCustomDictionaryBigQueryField - attr_reader :table + class ProjectLocationEnvironmentConfigNodeConfigIpAllocationPolicy + attr_reader :use_ip_aliases - attr_reader :field + attr_reader :cluster_secondary_range_name + + attr_reader :cluster_ipv4_cidr_block + + attr_reader :services_secondary_range_name + + attr_reader :services_ipv4_cidr_block def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @table = GoogleInSpec::DataLossPrevention::Property::StoredInfoTypeLargeCustomDictionaryBigQueryFieldTable.new(args['table'], to_s) - @field = GoogleInSpec::DataLossPrevention::Property::StoredInfoTypeLargeCustomDictionaryBigQueryFieldField.new(args['field'], to_s) + @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 - "#{@parent_identifier} StoredInfoTypeLargeCustomDictionaryBigQueryField" + "#{@parent_identifier} ProjectLocationEnvironmentConfigNodeConfigIpAllocationPolicy" end end end diff --git a/libraries/google/composer/property/projectlocationenvironment_config_private_environment_config.rb b/libraries/google/composer/property/projectlocationenvironment_config_private_environment_config.rb new file mode 100644 index 000000000..7e2f54162 --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config_private_environment_config.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# 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' +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfigPrivateEnvironmentConfig + attr_reader :enable_private_environment + + attr_reader :private_cluster_config + + attr_reader :web_server_ipv4_cidr_block + + attr_reader :cloud_sql_ipv4_cidr_block + + attr_reader :web_server_ipv4_reserved_range + + attr_reader :cloud_composer_network_ipv4_cidr_block + + attr_reader :cloud_composer_network_ipv4_reserved_range + + attr_reader :enable_privately_used_public_ips + + attr_reader :cloud_composer_connection_subnetwork + + attr_reader :networking_config + + 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) + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfigPrivateEnvironmentConfig" + end + end + end + end +end 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 new file mode 100644 index 000000000..ec6076c2f --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config_private_environment_config_networking_config.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfigPrivateEnvironmentConfigNetworkingConfig + attr_reader :connection_type + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @connection_type = args['connectionType'] + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfigPrivateEnvironmentConfigNetworkingConfig" + end + end + end + end +end 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 new file mode 100644 index 000000000..bef1a4f08 --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config_private_environment_config_private_cluster_config.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfigPrivateEnvironmentConfigPrivateClusterConfig + attr_reader :enable_private_endpoint + + attr_reader :master_ipv4_cidr_block + + attr_reader :master_ipv4_reserved_range + + 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'] + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfigPrivateEnvironmentConfigPrivateClusterConfig" + end + end + end + end +end diff --git a/libraries/google/composer/property/projectlocationenvironment_config_recovery_config.rb b/libraries/google/composer/property/projectlocationenvironment_config_recovery_config.rb new file mode 100644 index 000000000..a0a60f360 --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config_recovery_config.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/composer/property/projectlocationenvironment_config_recovery_config_scheduled_snapshots_config' +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfigRecoveryConfig + attr_reader :scheduled_snapshots_config + + 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) + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfigRecoveryConfig" + end + end + end + end +end 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 new file mode 100644 index 000000000..2d21d1ae3 --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config_recovery_config_scheduled_snapshots_config.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfigRecoveryConfigScheduledSnapshotsConfig + attr_reader :enabled + + attr_reader :snapshot_location + + attr_reader :snapshot_creation_schedule + + attr_reader :time_zone + + 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'] + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfigRecoveryConfigScheduledSnapshotsConfig" + end + end + end + end +end diff --git a/libraries/google/composer/property/projectlocationenvironment_config_software_config.rb b/libraries/google/composer/property/projectlocationenvironment_config_software_config.rb new file mode 100644 index 000000000..32bbf91a9 --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config_software_config.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# 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' +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfigSoftwareConfig + attr_reader :image_version + + attr_reader :airflow_config_overrides + + attr_reader :pypi_packages + + attr_reader :env_variables + + attr_reader :python_version + + attr_reader :scheduler_count + + 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'] + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfigSoftwareConfig" + end + end + end + end +end 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 new file mode 100644 index 000000000..0cfa1d9ab --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config_software_config_airflow_config_overrides.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfigSoftwareConfigAirflowConfigOverrides + attr_reader :additional_properties + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @additional_properties = args['additionalProperties'] + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfigSoftwareConfigAirflowConfigOverrides" + end + end + end + end +end 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 new file mode 100644 index 000000000..76458dc48 --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config_software_config_env_variables.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfigSoftwareConfigEnvVariables + attr_reader :additional_properties + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @additional_properties = args['additionalProperties'] + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfigSoftwareConfigEnvVariables" + end + end + end + end +end 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 new file mode 100644 index 000000000..879265b0b --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config_software_config_pypi_packages.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfigSoftwareConfigPypiPackages + attr_reader :additional_properties + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @additional_properties = args['additionalProperties'] + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfigSoftwareConfigPypiPackages" + end + end + end + end +end diff --git a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_large_custom_dictionary_big_query_field_field.rb b/libraries/google/composer/property/projectlocationenvironment_config_web_server_config.rb similarity index 78% rename from build/inspec/libraries/google/datalossprevention/property/storedinfotype_large_custom_dictionary_big_query_field_field.rb rename to libraries/google/composer/property/projectlocationenvironment_config_web_server_config.rb index 14028bfe2..f11e520c2 100644 --- a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_large_custom_dictionary_big_query_field_field.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_web_server_config.rb @@ -14,19 +14,19 @@ # # ---------------------------------------------------------------------------- module GoogleInSpec - module DataLossPrevention + module Composer module Property - class StoredInfoTypeLargeCustomDictionaryBigQueryFieldField - attr_reader :name + class ProjectLocationEnvironmentConfigWebServerConfig + attr_reader :machine_type def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @name = args['name'] + @machine_type = args['machineType'] end def to_s - "#{@parent_identifier} StoredInfoTypeLargeCustomDictionaryBigQueryFieldField" + "#{@parent_identifier} ProjectLocationEnvironmentConfigWebServerConfig" end end end 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 new file mode 100644 index 000000000..792e0be66 --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config_web_server_network_access_control.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/composer/property/projectlocationenvironment_config_web_server_network_access_control_allowed_ip_ranges' +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfigWebServerNetworkAccessControl + attr_reader :allowed_ip_ranges + + 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) + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfigWebServerNetworkAccessControl" + end + end + end + end +end 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 new file mode 100644 index 000000000..f7afee094 --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config_web_server_network_access_control_allowed_ip_ranges.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfigWebServerNetworkAccessControlAllowedIpRanges + attr_reader :value + + attr_reader :description + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @value = args['value'] + @description = args['description'] + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfigWebServerNetworkAccessControlAllowedIpRanges" + end + end + + class ProjectLocationEnvironmentConfigWebServerNetworkAccessControlAllowedIpRangesArray + def self.parse(value, parent_identifier) + return if value.nil? + return ProjectLocationEnvironmentConfigWebServerNetworkAccessControlAllowedIpRanges.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ProjectLocationEnvironmentConfigWebServerNetworkAccessControlAllowedIpRanges.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/composer/property/projectlocationenvironment_config_workloads_config.rb b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config.rb new file mode 100644 index 000000000..f9740deae --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# 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' +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfigWorkloadsConfig + attr_reader :scheduler + + attr_reader :web_server + + attr_reader :worker + + attr_reader :triggerer + + 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) + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfigWorkloadsConfig" + end + end + end + end +end diff --git a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_large_custom_dictionary_big_query_field_table.rb b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_scheduler.rb similarity index 66% rename from build/inspec/libraries/google/datalossprevention/property/storedinfotype_large_custom_dictionary_big_query_field_table.rb rename to libraries/google/composer/property/projectlocationenvironment_config_workloads_config_scheduler.rb index 85cad9c08..40b2f1eaa 100644 --- a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_large_custom_dictionary_big_query_field_table.rb +++ b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_scheduler.rb @@ -14,25 +14,28 @@ # # ---------------------------------------------------------------------------- module GoogleInSpec - module DataLossPrevention + module Composer module Property - class StoredInfoTypeLargeCustomDictionaryBigQueryFieldTable - attr_reader :project_id + class ProjectLocationEnvironmentConfigWorkloadsConfigScheduler + attr_reader :cpu - attr_reader :dataset_id + attr_reader :memory_gb - attr_reader :table_id + attr_reader :storage_gb + + attr_reader :count 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'] + @cpu = args['cpu'] + @memory_gb = args['memoryGb'] + @storage_gb = args['storageGb'] + @count = args['count'] end def to_s - "#{@parent_identifier} StoredInfoTypeLargeCustomDictionaryBigQueryFieldTable" + "#{@parent_identifier} ProjectLocationEnvironmentConfigWorkloadsConfigScheduler" end end end diff --git a/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_triggerer.rb b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_triggerer.rb new file mode 100644 index 000000000..dec87cc6a --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_triggerer.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfigWorkloadsConfigTriggerer + attr_reader :count + + attr_reader :cpu + + attr_reader :memory_gb + + 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'] + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfigWorkloadsConfigTriggerer" + end + end + end + end +end 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 new file mode 100644 index 000000000..5d9b44dda --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_web_server.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfigWorkloadsConfigWebServer + attr_reader :cpu + + attr_reader :memory_gb + + attr_reader :storage_gb + + 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'] + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfigWorkloadsConfigWebServer" + end + end + end + end +end diff --git a/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_worker.rb b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_worker.rb new file mode 100644 index 000000000..1560b6720 --- /dev/null +++ b/libraries/google/composer/property/projectlocationenvironment_config_workloads_config_worker.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Composer + module Property + class ProjectLocationEnvironmentConfigWorkloadsConfigWorker + attr_reader :cpu + + attr_reader :memory_gb + + attr_reader :storage_gb + + attr_reader :min_count + + attr_reader :max_count + + 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'] + end + + def to_s + "#{@parent_identifier} ProjectLocationEnvironmentConfigWorkloadsConfigWorker" + end + end + end + end +end diff --git a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_dictionary_cloud_storage_path.rb b/libraries/google/composer/property/projectlocationenvironment_labels.rb similarity index 79% rename from build/inspec/libraries/google/datalossprevention/property/storedinfotype_dictionary_cloud_storage_path.rb rename to libraries/google/composer/property/projectlocationenvironment_labels.rb index 3c6ca4c19..6ff6720b7 100644 --- a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_dictionary_cloud_storage_path.rb +++ b/libraries/google/composer/property/projectlocationenvironment_labels.rb @@ -14,19 +14,20 @@ # # ---------------------------------------------------------------------------- module GoogleInSpec - module DataLossPrevention + module Composer module Property - class StoredInfoTypeDictionaryCloudStoragePath - attr_reader :path + class ProjectLocationEnvironmentLabels + attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) return if args.nil? + @parent_identifier = parent_identifier - @path = args['path'] + @additional_properties = args end def to_s - "#{@parent_identifier} StoredInfoTypeDictionaryCloudStoragePath" + "#{@parent_identifier} ProjectLocationEnvironmentLabels" end end end diff --git a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_dictionary_word_list.rb b/libraries/google/composer/property/projectlocationenvironment_storage_config.rb similarity index 80% rename from build/inspec/libraries/google/datalossprevention/property/storedinfotype_dictionary_word_list.rb rename to libraries/google/composer/property/projectlocationenvironment_storage_config.rb index b9fc370b4..ff019714e 100644 --- a/build/inspec/libraries/google/datalossprevention/property/storedinfotype_dictionary_word_list.rb +++ b/libraries/google/composer/property/projectlocationenvironment_storage_config.rb @@ -14,19 +14,19 @@ # # ---------------------------------------------------------------------------- module GoogleInSpec - module DataLossPrevention + module Composer module Property - class StoredInfoTypeDictionaryWordList - attr_reader :words + class ProjectLocationEnvironmentStorageConfig + attr_reader :bucket def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @words = args['words'] + @bucket = args['bucket'] end def to_s - "#{@parent_identifier} StoredInfoTypeDictionaryWordList" + "#{@parent_identifier} ProjectLocationEnvironmentStorageConfig" end end end diff --git a/libraries/google_access_context_manager_access_levels.rb b/libraries/google_access_context_manager_access_levels.rb index 1c8a1386b..f6c5d48f5 100644 --- a/libraries/google_access_context_manager_access_levels.rb +++ b/libraries/google_access_context_manager_access_levels.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'title' => ->(obj) { return :title, obj['title'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'basic' => ->(obj) { return :basic, GoogleInSpec::AccessContextManager::Property::AccessLevelBasic.new(obj['basic'], to_s) }, - 'custom' => ->(obj) { return :custom, GoogleInSpec::AccessContextManager::Property::AccessLevelCustom.new(obj['custom'], to_s) }, - 'parent' => ->(obj) { return :parent, name_from_self_link(obj['parent']) }, - 'name' => ->(obj) { return :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 diff --git a/libraries/google_access_context_manager_access_policies.rb b/libraries/google_access_context_manager_access_policies.rb index bfa1bf877..004a13719 100644 --- a/libraries/google_access_context_manager_access_policies.rb +++ b/libraries/google_access_context_manager_access_policies.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, name_from_self_link(obj['name']) }, - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'updateTime' => ->(obj) { return :update_time, parse_time_string(obj['updateTime']) }, - 'parent' => ->(obj) { return :parent, obj['parent'] }, - 'title' => ->(obj) { return :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 diff --git a/libraries/google_access_context_manager_service_perimeters.rb b/libraries/google_access_context_manager_service_perimeters.rb index 6f6025eed..be74aad2d 100644 --- a/libraries/google_access_context_manager_service_perimeters.rb +++ b/libraries/google_access_context_manager_service_perimeters.rb @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'title' => ->(obj) { return :title, obj['title'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'updateTime' => ->(obj) { return :update_time, parse_time_string(obj['updateTime']) }, - 'perimeterType' => ->(obj) { return :perimeter_type, obj['perimeterType'] }, - 'status' => ->(obj) { return :status, GoogleInSpec::AccessContextManager::Property::ServicePerimeterStatus.new(obj['status'], to_s) }, - 'spec' => ->(obj) { return :spec, GoogleInSpec::AccessContextManager::Property::ServicePerimeterSpec.new(obj['spec'], to_s) }, - 'useExplicitDryRunSpec' => ->(obj) { return :use_explicit_dry_run_spec, obj['useExplicitDryRunSpec'] }, - 'parent' => ->(obj) { return :parent, obj['parent'] }, - 'name' => ->(obj) { return :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 diff --git a/libraries/google_apigee_organizations.rb b/libraries/google_apigee_organizations.rb index c8613eb1c..0d074793c 100644 --- a/libraries/google_apigee_organizations.rb +++ b/libraries/google_apigee_organizations.rb @@ -90,34 +90,34 @@ def transform(key, value) def transformers { - 'apiConsumerDataEncryptionKeyName' => ->(obj) { return :api_consumer_data_encryption_key_name, obj['apiConsumerDataEncryptionKeyName'] }, - 'runtimeDatabaseEncryptionKeyName' => ->(obj) { return :runtime_database_encryption_key_name, obj['runtimeDatabaseEncryptionKeyName'] }, - 'environments' => ->(obj) { return :environments, obj['environments'] }, - 'runtimeType' => ->(obj) { return :runtime_type, obj['runtimeType'] }, - 'type' => ->(obj) { return :type, obj['type'] }, - 'portalDisabled' => ->(obj) { return :portal_disabled, obj['portalDisabled'] }, - 'authorizedNetwork' => ->(obj) { return :authorized_network, obj['authorizedNetwork'] }, - 'projectId' => ->(obj) { return :project_id, obj['projectId'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'caCertificate' => ->(obj) { return :ca_certificate, obj['caCertificate'] }, - 'subscriptionType' => ->(obj) { return :subscription_type, obj['subscriptionType'] }, - 'addonsConfig' => ->(obj) { return :addons_config, GoogleInSpec::Apigee::Property::OrganizationAddonsConfig.new(obj['addonsConfig'], to_s) }, - 'customerName' => ->(obj) { return :customer_name, obj['customerName'] }, - 'createdAt' => ->(obj) { return :created_at, obj['createdAt'] }, - 'lastModifiedAt' => ->(obj) { return :last_modified_at, obj['lastModifiedAt'] }, - 'subscriptionPlan' => ->(obj) { return :subscription_plan, obj['subscriptionPlan'] }, - 'properties' => ->(obj) { return :properties, GoogleInSpec::Apigee::Property::OrganizationProperties.new(obj['properties'], to_s) }, - 'state' => ->(obj) { return :state, obj['state'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'disableVpcPeering' => ->(obj) { return :disable_vpc_peering, obj['disableVpcPeering'] }, - 'controlPlaneEncryptionKeyName' => ->(obj) { return :control_plane_encryption_key_name, obj['controlPlaneEncryptionKeyName'] }, - 'analyticsRegion' => ->(obj) { return :analytics_region, obj['analyticsRegion'] }, - 'apiConsumerDataLocation' => ->(obj) { return :api_consumer_data_location, obj['apiConsumerDataLocation'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'apigeeProjectId' => ->(obj) { return :apigee_project_id, obj['apigeeProjectId'] }, - 'expiresAt' => ->(obj) { return :expires_at, obj['expiresAt'] }, - 'attributes' => ->(obj) { return :attributes, obj['attributes'] }, - 'billingType' => ->(obj) { return :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 diff --git a/libraries/google_appengine_standard_app_versions.rb b/libraries/google_appengine_standard_app_versions.rb index 546db82ea..266366ae7 100644 --- a/libraries/google_appengine_standard_app_versions.rb +++ b/libraries/google_appengine_standard_app_versions.rb @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'id' => ->(obj) { return :version_id, obj['id'] }, - 'runtime' => ->(obj) { return :runtime, obj['runtime'] }, - 'threadsafe' => ->(obj) { return :threadsafe, obj['threadsafe'] }, - 'vpcAccessConnector' => ->(obj) { return :vpc_access_connector, GoogleInSpec::AppEngine::Property::StandardAppVersionVPCAccessConnector.new(obj['vpcAccessConnector'], to_s) }, - 'inboundServices' => ->(obj) { return :inbound_services, obj['inboundServices'] }, - 'instanceClass' => ->(obj) { return :instance_class, obj['instanceClass'] }, - 'automaticScaling' => ->(obj) { return :automatic_scaling, GoogleInSpec::AppEngine::Property::StandardAppVersionAutomaticScaling.new(obj['automaticScaling'], to_s) }, - 'basicScaling' => ->(obj) { return :basic_scaling, GoogleInSpec::AppEngine::Property::StandardAppVersionBasicScaling.new(obj['basicScaling'], to_s) }, - 'manualScaling' => ->(obj) { return :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 diff --git a/libraries/google_bigquery_datasets.rb b/libraries/google_bigquery_datasets.rb index f739aa363..9e8852ff3 100644 --- a/libraries/google_bigquery_datasets.rb +++ b/libraries/google_bigquery_datasets.rb @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'datasetReference' => ->(obj) { return :dataset_reference, GoogleInSpec::BigQuery::Property::DatasetDatasetReference.new(obj['datasetReference'], to_s) }, - 'defaultPartitionExpirationMs' => ->(obj) { return :default_partition_expiration_ms, obj['defaultPartitionExpirationMs'] }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'friendlyName' => ->(obj) { return :friendly_name, obj['friendlyName'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'location' => ->(obj) { return :location, obj['location'] }, - 'defaultEncryptionConfiguration' => ->(obj) { return :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 diff --git a/libraries/google_bigquery_tables.rb b/libraries/google_bigquery_tables.rb index 3cbb31a4d..63a2b706e 100644 --- a/libraries/google_bigquery_tables.rb +++ b/libraries/google_bigquery_tables.rb @@ -83,27 +83,27 @@ def transform(key, value) def transformers { - 'tableReference' => ->(obj) { return :table_reference, GoogleInSpec::BigQuery::Property::TableTableReference.new(obj['tableReference'], to_s) }, - 'clustering' => ->(obj) { return :clustering, obj['clustering'] }, - 'creationTime' => ->(obj) { return :creation_time, obj['creationTime'] }, - 'friendlyName' => ->(obj) { return :friendly_name, obj['friendlyName'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'lastModifiedTime' => ->(obj) { return :last_modified_time, obj['lastModifiedTime'] }, - 'location' => ->(obj) { return :location, obj['location'] }, - 'numBytes' => ->(obj) { return :num_bytes, obj['numBytes'] }, - 'numLongTermBytes' => ->(obj) { return :num_long_term_bytes, obj['numLongTermBytes'] }, - 'numRows' => ->(obj) { return :num_rows, obj['numRows'] }, - 'requirePartitionFilter' => ->(obj) { return :require_partition_filter, obj['requirePartitionFilter'] }, - 'type' => ->(obj) { return :type, obj['type'] }, - 'view' => ->(obj) { return :view, GoogleInSpec::BigQuery::Property::TableView.new(obj['view'], to_s) }, - 'timePartitioning' => ->(obj) { return :time_partitioning, GoogleInSpec::BigQuery::Property::TableTimePartitioning.new(obj['timePartitioning'], to_s) }, - 'streamingBuffer' => ->(obj) { return :streaming_buffer, GoogleInSpec::BigQuery::Property::TableStreamingBuffer.new(obj['streamingBuffer'], to_s) }, - 'schema' => ->(obj) { return :schema, GoogleInSpec::BigQuery::Property::TableSchema.new(obj['schema'], to_s) }, - 'encryptionConfiguration' => ->(obj) { return :encryption_configuration, GoogleInSpec::BigQuery::Property::TableEncryptionConfiguration.new(obj['encryptionConfiguration'], to_s) }, - 'expirationTime' => ->(obj) { return :expiration_time, obj['expirationTime'] }, - 'externalDataConfiguration' => ->(obj) { return :external_data_configuration, GoogleInSpec::BigQuery::Property::TableExternalDataConfiguration.new(obj['externalDataConfiguration'], to_s) }, - 'dataset' => ->(obj) { return :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 diff --git a/libraries/google_cloud_scheduler_jobs.rb b/libraries/google_cloud_scheduler_jobs.rb index 2650b15dd..d1759c31d 100644 --- a/libraries/google_cloud_scheduler_jobs.rb +++ b/libraries/google_cloud_scheduler_jobs.rb @@ -73,17 +73,17 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'schedule' => ->(obj) { return :schedule, obj['schedule'] }, - 'timeZone' => ->(obj) { return :time_zone, obj['timeZone'] }, - 'state' => ->(obj) { return :state, obj['state'] }, - 'attemptDeadline' => ->(obj) { return :attempt_deadline, obj['attemptDeadline'] }, - 'retryConfig' => ->(obj) { return :retry_config, GoogleInSpec::CloudScheduler::Property::JobRetryConfig.new(obj['retryConfig'], to_s) }, - 'pubsubTarget' => ->(obj) { return :pubsub_target, GoogleInSpec::CloudScheduler::Property::JobPubsubTarget.new(obj['pubsubTarget'], to_s) }, - 'appEngineHttpTarget' => ->(obj) { return :app_engine_http_target, GoogleInSpec::CloudScheduler::Property::JobAppEngineHttpTarget.new(obj['appEngineHttpTarget'], to_s) }, - 'httpTarget' => ->(obj) { return :http_target, GoogleInSpec::CloudScheduler::Property::JobHttpTarget.new(obj['httpTarget'], to_s) }, - 'region' => ->(obj) { return :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 diff --git a/libraries/google_cloudbuild_triggers.rb b/libraries/google_cloudbuild_triggers.rb index 876ab032d..64c6fabe4 100644 --- a/libraries/google_cloudbuild_triggers.rb +++ b/libraries/google_cloudbuild_triggers.rb @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'tags' => ->(obj) { return :tags, obj['tags'] }, - 'disabled' => ->(obj) { return :disabled, obj['disabled'] }, - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'substitutions' => ->(obj) { return :substitutions, obj['substitutions'] }, - 'filename' => ->(obj) { return :filename, obj['filename'] }, - 'ignoredFiles' => ->(obj) { return :ignored_files, obj['ignoredFiles'] }, - 'includedFiles' => ->(obj) { return :included_files, obj['includedFiles'] }, - 'triggerTemplate' => ->(obj) { return :trigger_template, GoogleInSpec::CloudBuild::Property::TriggerTriggerTemplate.new(obj['triggerTemplate'], to_s) }, - 'github' => ->(obj) { return :github, GoogleInSpec::CloudBuild::Property::TriggerGithub.new(obj['github'], to_s) }, - 'build' => ->(obj) { return :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 diff --git a/libraries/google_cloudfunctions_cloud_functions.rb b/libraries/google_cloudfunctions_cloud_functions.rb index 0212fdf65..99ebfb8ea 100644 --- a/libraries/google_cloudfunctions_cloud_functions.rb +++ b/libraries/google_cloudfunctions_cloud_functions.rb @@ -80,24 +80,24 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'status' => ->(obj) { return :status, obj['status'] }, - 'entryPoint' => ->(obj) { return :entry_point, obj['entryPoint'] }, - 'runtime' => ->(obj) { return :runtime, obj['runtime'] }, - 'timeout' => ->(obj) { return :timeout, obj['timeout'] }, - 'availableMemoryMb' => ->(obj) { return :available_memory_mb, obj['availableMemoryMb'] }, - 'serviceAccountEmail' => ->(obj) { return :service_account_email, obj['serviceAccountEmail'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'versionId' => ->(obj) { return :version_id, obj['versionId'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'environmentVariables' => ->(obj) { return :environment_variables, obj['environmentVariables'] }, - 'sourceArchiveUrl' => ->(obj) { return :source_archive_url, obj['sourceArchiveUrl'] }, - 'sourceUploadUrl' => ->(obj) { return :source_upload_url, obj['sourceUploadUrl'] }, - 'sourceRepository' => ->(obj) { return :source_repository, GoogleInSpec::CloudFunctions::Property::CloudFunctionSourceRepository.new(obj['sourceRepository'], to_s) }, - 'httpsTrigger' => ->(obj) { return :https_trigger, GoogleInSpec::CloudFunctions::Property::CloudFunctionHttpsTrigger.new(obj['httpsTrigger'], to_s) }, - 'eventTrigger' => ->(obj) { return :event_trigger, GoogleInSpec::CloudFunctions::Property::CloudFunctionEventTrigger.new(obj['eventTrigger'], to_s) }, - 'location' => ->(obj) { return :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 diff --git a/libraries/google_composer_project_location_environment.rb b/libraries/google_composer_project_location_environment.rb new file mode 100644 index 000000000..fab23c92a --- /dev/null +++ b/libraries/google_composer_project_location_environment.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# 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' + +# A provider to manage composer resources. +class ComposerProjectLocationEnvironment < GcpResourceBase + name 'google_composer_project_location_environment' + desc 'ProjectLocationEnvironment' + supports platform: 'gcp' + + attr_reader :params + attr_reader :name + attr_reader :config + attr_reader :uuid + attr_reader :state + attr_reader :create_time + attr_reader :update_time + attr_reader :labels + attr_reader :satisfies_pzs + attr_reader :storage_config + + def initialize(params) + super(params.merge({ use_http_transport: true })) + @params = params + @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) + end + + def exists? + !@fetched.nil? + end + + def to_s + "ProjectLocationEnvironment #{@params[:name]}" + end + + private + + def product_url(_ = nil) + 'https://composer.googleapis.com/v1/' + end + + def resource_base_url + '{{name}}' + end +end diff --git a/build/inspec/libraries/google_data_loss_prevention_stored_info_types.rb b/libraries/google_composer_project_location_environments.rb similarity index 54% rename from build/inspec/libraries/google_data_loss_prevention_stored_info_types.rb rename to libraries/google_composer_project_location_environments.rb index ab4d792a0..df635d5fe 100644 --- a/build/inspec/libraries/google_data_loss_prevention_stored_info_types.rb +++ b/libraries/google_composer_project_location_environments.rb @@ -14,9 +14,9 @@ # # ---------------------------------------------------------------------------- require 'gcp_backend' -class DataLossPreventionStoredInfoTypes < GcpResourceBase - name 'google_data_loss_prevention_stored_info_types' - desc 'StoredInfoType plural resource' +class ComposerProjectLocationEnvironments < GcpResourceBase + name 'google_composer_project_location_environments' + desc 'ProjectLocationEnvironment plural resource' supports platform: 'gcp' attr_reader :table @@ -24,19 +24,21 @@ class DataLossPreventionStoredInfoTypes < GcpResourceBase filter_table_config = FilterTable.create filter_table_config.add(:names, field: :name) - filter_table_config.add(:descriptions, field: :description) - filter_table_config.add(:display_names, field: :display_name) - filter_table_config.add(:regexes, field: :regex) - filter_table_config.add(:dictionaries, field: :dictionary) - filter_table_config.add(:large_custom_dictionaries, field: :large_custom_dictionary) - filter_table_config.add(:parents, field: :parent) + filter_table_config.add(:configs, field: :config) + filter_table_config.add(:uuids, field: :uuid) + filter_table_config.add(:states, field: :state) + filter_table_config.add(:create_times, field: :create_time) + filter_table_config.add(:update_times, field: :update_time) + filter_table_config.add(:labels, field: :labels) + filter_table_config.add(:satisfies_pzs, field: :satisfies_pzs) + filter_table_config.add(:storage_configs, field: :storage_config) filter_table_config.connect(self, :table) def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('storedInfoTypes') + @table = fetch_wrapped_resource('environments') end def fetch_wrapped_resource(wrap_path) @@ -69,23 +71,25 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'regex' => ->(obj) { return :regex, GoogleInSpec::DataLossPrevention::Property::StoredInfoTypeRegex.new(obj['regex'], to_s) }, - 'dictionary' => ->(obj) { return :dictionary, GoogleInSpec::DataLossPrevention::Property::StoredInfoTypeDictionary.new(obj['dictionary'], to_s) }, - 'largeCustomDictionary' => ->(obj) { return :large_custom_dictionary, GoogleInSpec::DataLossPrevention::Property::StoredInfoTypeLargeCustomDictionary.new(obj['largeCustomDictionary'], to_s) }, - 'parent' => ->(obj) { return :parent, obj['parent'] }, + '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://dlp.googleapis.com/v2/' + 'https://composer.googleapis.com/v1/' end def resource_base_url - '{{parent}}/storedInfoTypes' + '{{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 a461c3c30..7f4fa830a 100644 --- a/libraries/google_composer_project_location_image_versions.rb +++ b/libraries/google_composer_project_location_image_versions.rb @@ -64,8 +64,8 @@ def transform(key, value) def transformers { - 'imageVersions' => ->(obj) { return :image_versions, obj['imageVersions'] }, - 'nextPageToken' => ->(obj) { return :next_page_token, obj['nextPageToken'] }, + 'imageVersions' => ->(obj) { [:image_versions, obj['imageVersions']] }, + 'nextPageToken' => ->(obj) { [:next_page_token, obj['nextPageToken']] }, } end diff --git a/libraries/google_compute_accelerator_types.rb b/libraries/google_compute_accelerator_types.rb index 691e3512f..b99f94bd7 100644 --- a/libraries/google_compute_accelerator_types.rb +++ b/libraries/google_compute_accelerator_types.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'deprecated' => ->(obj) { return :deprecated, GoogleInSpec::Compute::Property::AcceleratorTypeDeprecated.new(obj['deprecated'], to_s) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'zone' => ->(obj) { return :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 diff --git a/libraries/google_compute_addresses.rb b/libraries/google_compute_addresses.rb index 1da3fc96b..f3e569cca 100644 --- a/libraries/google_compute_addresses.rb +++ b/libraries/google_compute_addresses.rb @@ -76,20 +76,20 @@ def transform(key, value) def transformers { - 'address' => ->(obj) { return :address, obj['address'] }, - 'addressType' => ->(obj) { return :address_type, obj['addressType'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'purpose' => ->(obj) { return :purpose, obj['purpose'] }, - 'networkTier' => ->(obj) { return :network_tier, obj['networkTier'] }, - 'subnetwork' => ->(obj) { return :subnetwork, obj['subnetwork'] }, - 'users' => ->(obj) { return :users, obj['users'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'labelFingerprint' => ->(obj) { return :label_fingerprint, obj['labelFingerprint'] }, - 'status' => ->(obj) { return :status, obj['status'] }, - 'region' => ->(obj) { return :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 diff --git a/libraries/google_compute_autoscalers.rb b/libraries/google_compute_autoscalers.rb index d0db9a174..1ef20f5cb 100644 --- a/libraries/google_compute_autoscalers.rb +++ b/libraries/google_compute_autoscalers.rb @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { return :id, obj['id'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'autoscalingPolicy' => ->(obj) { return :autoscaling_policy, GoogleInSpec::Compute::Property::AutoscalerAutoscalingPolicy.new(obj['autoscalingPolicy'], to_s) }, - 'target' => ->(obj) { return :target, obj['target'] }, - 'zone' => ->(obj) { return :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 diff --git a/libraries/google_compute_backend_buckets.rb b/libraries/google_compute_backend_buckets.rb index 23862b19f..cfb109d90 100644 --- a/libraries/google_compute_backend_buckets.rb +++ b/libraries/google_compute_backend_buckets.rb @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'bucketName' => ->(obj) { return :bucket_name, obj['bucketName'] }, - 'cdnPolicy' => ->(obj) { return :cdn_policy, GoogleInSpec::Compute::Property::BackendBucketCdnPolicy.new(obj['cdnPolicy'], to_s) }, - 'customResponseHeaders' => ->(obj) { return :custom_response_headers, obj['customResponseHeaders'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'enableCdn' => ->(obj) { return :enable_cdn, obj['enableCdn'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :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 diff --git a/libraries/google_compute_backend_services.rb b/libraries/google_compute_backend_services.rb index 2b43d9508..c86ae42b8 100644 --- a/libraries/google_compute_backend_services.rb +++ b/libraries/google_compute_backend_services.rb @@ -87,31 +87,31 @@ def transform(key, value) def transformers { - 'affinityCookieTtlSec' => ->(obj) { return :affinity_cookie_ttl_sec, obj['affinityCookieTtlSec'] }, - 'backends' => ->(obj) { return :backends, GoogleInSpec::Compute::Property::BackendServiceBackendsArray.parse(obj['backends'], to_s) }, - 'circuitBreakers' => ->(obj) { return :circuit_breakers, GoogleInSpec::Compute::Property::BackendServiceCircuitBreakers.new(obj['circuitBreakers'], to_s) }, - 'consistentHash' => ->(obj) { return :consistent_hash, GoogleInSpec::Compute::Property::BackendServiceConsistentHash.new(obj['consistentHash'], to_s) }, - 'cdnPolicy' => ->(obj) { return :cdn_policy, GoogleInSpec::Compute::Property::BackendServiceCdnPolicy.new(obj['cdnPolicy'], to_s) }, - 'connectionDraining' => ->(obj) { return :connection_draining, GoogleInSpec::Compute::Property::BackendServiceConnectionDraining.new(obj['connectionDraining'], to_s) }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'customRequestHeaders' => ->(obj) { return :custom_request_headers, obj['customRequestHeaders'] }, - 'customResponseHeaders' => ->(obj) { return :custom_response_headers, obj['customResponseHeaders'] }, - 'fingerprint' => ->(obj) { return :fingerprint, obj['fingerprint'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'enableCDN' => ->(obj) { return :enable_cdn, obj['enableCDN'] }, - 'healthChecks' => ->(obj) { return :health_checks, obj['healthChecks'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'iap' => ->(obj) { return :iap, GoogleInSpec::Compute::Property::BackendServiceIap.new(obj['iap'], to_s) }, - 'loadBalancingScheme' => ->(obj) { return :load_balancing_scheme, obj['loadBalancingScheme'] }, - 'localityLbPolicy' => ->(obj) { return :locality_lb_policy, obj['localityLbPolicy'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'outlierDetection' => ->(obj) { return :outlier_detection, GoogleInSpec::Compute::Property::BackendServiceOutlierDetection.new(obj['outlierDetection'], to_s) }, - 'portName' => ->(obj) { return :port_name, obj['portName'] }, - 'protocol' => ->(obj) { return :protocol, obj['protocol'] }, - 'securityPolicy' => ->(obj) { return :security_policy, obj['securityPolicy'] }, - 'sessionAffinity' => ->(obj) { return :session_affinity, obj['sessionAffinity'] }, - 'timeoutSec' => ->(obj) { return :timeout_sec, obj['timeoutSec'] }, - 'logConfig' => ->(obj) { return :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 diff --git a/libraries/google_compute_disk_types.rb b/libraries/google_compute_disk_types.rb index 304228f59..da54b8fdc 100644 --- a/libraries/google_compute_disk_types.rb +++ b/libraries/google_compute_disk_types.rb @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'defaultDiskSizeGb' => ->(obj) { return :default_disk_size_gb, obj['defaultDiskSizeGb'] }, - 'deprecated' => ->(obj) { return :deprecated, GoogleInSpec::Compute::Property::DiskTypeDeprecated.new(obj['deprecated'], to_s) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'validDiskSize' => ->(obj) { return :valid_disk_size, obj['validDiskSize'] }, - 'zone' => ->(obj) { return :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 diff --git a/libraries/google_compute_disks.rb b/libraries/google_compute_disks.rb index 31e232432..793eef0d0 100644 --- a/libraries/google_compute_disks.rb +++ b/libraries/google_compute_disks.rb @@ -86,30 +86,30 @@ def transform(key, value) def transformers { - 'labelFingerprint' => ->(obj) { return :label_fingerprint, obj['labelFingerprint'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'lastAttachTimestamp' => ->(obj) { return :last_attach_timestamp, parse_time_string(obj['lastAttachTimestamp']) }, - 'lastDetachTimestamp' => ->(obj) { return :last_detach_timestamp, parse_time_string(obj['lastDetachTimestamp']) }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'licenses' => ->(obj) { return :licenses, obj['licenses'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'sizeGb' => ->(obj) { return :size_gb, obj['sizeGb'] }, - 'users' => ->(obj) { return :users, obj['users'] }, - 'physicalBlockSizeBytes' => ->(obj) { return :physical_block_size_bytes, obj['physicalBlockSizeBytes'] }, - 'interface' => ->(obj) { return :interface, obj['interface'] }, - 'type' => ->(obj) { return :type, obj['type'] }, - 'sourceImage' => ->(obj) { return :source_image, obj['sourceImage'] }, - 'resourcePolicies' => ->(obj) { return :resource_policies, obj['resourcePolicies'] }, - 'multiWriter' => ->(obj) { return :multi_writer, obj['multiWriter'] }, - 'zone' => ->(obj) { return :zone, obj['zone'] }, - 'sourceImageEncryptionKey' => ->(obj) { return :source_image_encryption_key, GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(obj['sourceImageEncryptionKey'], to_s) }, - 'sourceImageId' => ->(obj) { return :source_image_id, obj['sourceImageId'] }, - 'diskEncryptionKey' => ->(obj) { return :disk_encryption_key, GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(obj['diskEncryptionKey'], to_s) }, - 'sourceSnapshot' => ->(obj) { return :source_snapshot, obj['sourceSnapshot'] }, - 'sourceSnapshotEncryptionKey' => ->(obj) { return :source_snapshot_encryption_key, GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(obj['sourceSnapshotEncryptionKey'], to_s) }, - 'sourceSnapshotId' => ->(obj) { return :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 diff --git a/libraries/google_compute_external_vpn_gateways.rb b/libraries/google_compute_external_vpn_gateways.rb index 767a7754c..ea7f63215 100644 --- a/libraries/google_compute_external_vpn_gateways.rb +++ b/libraries/google_compute_external_vpn_gateways.rb @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'redundancyType' => ->(obj) { return :redundancy_type, obj['redundancyType'] }, - 'interfaces' => ->(obj) { return :interfaces, GoogleInSpec::Compute::Property::ExternalVpnGatewayInterfacesArray.parse(obj['interfaces'], to_s) }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'labelFingerprint' => ->(obj) { return :label_fingerprint, obj['labelFingerprint'] }, - 'nextPageToken' => ->(obj) { return :next_page_token, obj['nextPageToken'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :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 diff --git a/libraries/google_compute_firewalls.rb b/libraries/google_compute_firewalls.rb index 529aa04b5..7cb5322d1 100644 --- a/libraries/google_compute_firewalls.rb +++ b/libraries/google_compute_firewalls.rb @@ -79,23 +79,23 @@ def transform(key, value) def transformers { - 'allowed' => ->(obj) { return :allowed, GoogleInSpec::Compute::Property::FirewallAllowedArray.parse(obj['allowed'], to_s) }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'denied' => ->(obj) { return :denied, GoogleInSpec::Compute::Property::FirewallDeniedArray.parse(obj['denied'], to_s) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'destinationRanges' => ->(obj) { return :destination_ranges, obj['destinationRanges'] }, - 'direction' => ->(obj) { return :firewall_direction, obj['direction'] }, - 'disabled' => ->(obj) { return :disabled, obj['disabled'] }, - 'logConfig' => ->(obj) { return :log_config, GoogleInSpec::Compute::Property::FirewallLogConfig.new(obj['logConfig'], to_s) }, - 'id' => ->(obj) { return :firewall_id, obj['id'] }, - 'name' => ->(obj) { return :firewall_name, obj['name'] }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'priority' => ->(obj) { return :priority, obj['priority'] }, - 'sourceRanges' => ->(obj) { return :source_ranges, obj['sourceRanges'] }, - 'sourceServiceAccounts' => ->(obj) { return :source_service_accounts, obj['sourceServiceAccounts'] }, - 'sourceTags' => ->(obj) { return :source_tags, obj['sourceTags'] }, - 'targetServiceAccounts' => ->(obj) { return :target_service_accounts, obj['targetServiceAccounts'] }, - 'targetTags' => ->(obj) { return :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 diff --git a/libraries/google_compute_forwarding_rules.rb b/libraries/google_compute_forwarding_rules.rb index b14b3fe97..a3a3aba56 100644 --- a/libraries/google_compute_forwarding_rules.rb +++ b/libraries/google_compute_forwarding_rules.rb @@ -84,28 +84,28 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'isMirroringCollector' => ->(obj) { return :is_mirroring_collector, obj['isMirroringCollector'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :forwarding_rule_id, obj['id'] }, - 'IPAddress' => ->(obj) { return :ip_address, obj['IPAddress'] }, - 'IPProtocol' => ->(obj) { return :ip_protocol, obj['IPProtocol'] }, - 'backendService' => ->(obj) { return :backend_service, obj['backendService'] }, - 'loadBalancingScheme' => ->(obj) { return :forwarding_rule_load_balancing_scheme, obj['loadBalancingScheme'] }, - 'name' => ->(obj) { return :forwarding_rule_name, obj['name'] }, - 'network' => ->(obj) { return :forwarding_rule_network, name_from_self_link(obj['network']) }, - 'portRange' => ->(obj) { return :port_range, obj['portRange'] }, - 'ports' => ->(obj) { return :ports, obj['ports'] }, - 'subnetwork' => ->(obj) { return :subnetwork, obj['subnetwork'] }, - 'target' => ->(obj) { return :target, obj['target'] }, - 'allowGlobalAccess' => ->(obj) { return :allow_global_access, obj['allowGlobalAccess'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'labelFingerprint' => ->(obj) { return :label_fingerprint, obj['labelFingerprint'] }, - 'allPorts' => ->(obj) { return :all_ports, obj['allPorts'] }, - 'networkTier' => ->(obj) { return :network_tier, obj['networkTier'] }, - 'serviceLabel' => ->(obj) { return :service_label, obj['serviceLabel'] }, - 'serviceName' => ->(obj) { return :service_name, obj['serviceName'] }, - 'region' => ->(obj) { return :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 diff --git a/libraries/google_compute_global_addresses.rb b/libraries/google_compute_global_addresses.rb index e23d5c99f..1e41691ea 100644 --- a/libraries/google_compute_global_addresses.rb +++ b/libraries/google_compute_global_addresses.rb @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'address' => ->(obj) { return :address, obj['address'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'labelFingerprint' => ->(obj) { return :label_fingerprint, obj['labelFingerprint'] }, - 'ipVersion' => ->(obj) { return :ip_version, obj['ipVersion'] }, - 'region' => ->(obj) { return :region, obj['region'] }, - 'prefixLength' => ->(obj) { return :prefix_length, obj['prefixLength'] }, - 'addressType' => ->(obj) { return :address_type, obj['addressType'] }, - 'purpose' => ->(obj) { return :purpose, obj['purpose'] }, - 'network' => ->(obj) { return :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 diff --git a/libraries/google_compute_global_forwarding_rules.rb b/libraries/google_compute_global_forwarding_rules.rb index c47feb0c7..4986c043b 100644 --- a/libraries/google_compute_global_forwarding_rules.rb +++ b/libraries/google_compute_global_forwarding_rules.rb @@ -76,20 +76,20 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'IPAddress' => ->(obj) { return :ip_address, obj['IPAddress'] }, - 'IPProtocol' => ->(obj) { return :ip_protocol, obj['IPProtocol'] }, - 'ipVersion' => ->(obj) { return :ip_version, obj['ipVersion'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'labelFingerprint' => ->(obj) { return :label_fingerprint, obj['labelFingerprint'] }, - 'loadBalancingScheme' => ->(obj) { return :load_balancing_scheme, obj['loadBalancingScheme'] }, - 'metadataFilters' => ->(obj) { return :metadata_filters, GoogleInSpec::Compute::Property::GlobalForwardingRuleMetadataFiltersArray.parse(obj['metadataFilters'], to_s) }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'portRange' => ->(obj) { return :port_range, obj['portRange'] }, - 'target' => ->(obj) { return :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 diff --git a/libraries/google_compute_global_network_endpoint_groups.rb b/libraries/google_compute_global_network_endpoint_groups.rb index cab579ba9..a904e9639 100644 --- a/libraries/google_compute_global_network_endpoint_groups.rb +++ b/libraries/google_compute_global_network_endpoint_groups.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'networkEndpointType' => ->(obj) { return :network_endpoint_type, obj['networkEndpointType'] }, - 'defaultPort' => ->(obj) { return :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 diff --git a/libraries/google_compute_global_operations.rb b/libraries/google_compute_global_operations.rb index f202b7b3a..87f3cf9fd 100644 --- a/libraries/google_compute_global_operations.rb +++ b/libraries/google_compute_global_operations.rb @@ -76,20 +76,20 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'zone' => ->(obj) { return :zone, obj['zone'] }, - 'clientOperationId' => ->(obj) { return :client_operation_id, obj['clientOperationId'] }, - 'operationType' => ->(obj) { return :operation_type, obj['operationType'] }, - 'user' => ->(obj) { return :user, obj['user'] }, - 'progress' => ->(obj) { return :progress, obj['progress'] }, - 'insertTime' => ->(obj) { return :insert_time, parse_time_string(obj['insertTime']) }, - 'startTime' => ->(obj) { return :start_time, parse_time_string(obj['startTime']) }, - 'endTime' => ->(obj) { return :end_time, parse_time_string(obj['endTime']) }, - 'status' => ->(obj) { return :status, obj['status'] }, - 'statusMessage' => ->(obj) { return :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 diff --git a/libraries/google_compute_health_check_services.rb b/libraries/google_compute_health_check_services.rb index 4c026d061..a10e2da09 100644 --- a/libraries/google_compute_health_check_services.rb +++ b/libraries/google_compute_health_check_services.rb @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'healthStatusAggregationPolicy' => ->(obj) { return :health_status_aggregation_policy, obj['healthStatusAggregationPolicy'] }, - 'healthChecks' => ->(obj) { return :health_checks, obj['healthChecks'] }, - 'networkEndpointGroups' => ->(obj) { return :network_endpoint_groups, obj['networkEndpointGroups'] }, - 'notificationEndpoints' => ->(obj) { return :notification_endpoints, obj['notificationEndpoints'] }, - 'fingerprint' => ->(obj) { return :fingerprint, obj['fingerprint'] }, - 'nextPageToken' => ->(obj) { return :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 diff --git a/libraries/google_compute_health_checks.rb b/libraries/google_compute_health_checks.rb index 90cd8dfd2..8591bfc81 100644 --- a/libraries/google_compute_health_checks.rb +++ b/libraries/google_compute_health_checks.rb @@ -78,22 +78,22 @@ def transform(key, value) def transformers { - 'checkIntervalSec' => ->(obj) { return :check_interval_sec, obj['checkIntervalSec'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'healthyThreshold' => ->(obj) { return :healthy_threshold, obj['healthyThreshold'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'timeoutSec' => ->(obj) { return :timeout_sec, obj['timeoutSec'] }, - 'unhealthyThreshold' => ->(obj) { return :unhealthy_threshold, obj['unhealthyThreshold'] }, - 'type' => ->(obj) { return :type, obj['type'] }, - 'httpHealthCheck' => ->(obj) { return :http_health_check, GoogleInSpec::Compute::Property::HealthCheckHttpHealthCheck.new(obj['httpHealthCheck'], to_s) }, - 'httpsHealthCheck' => ->(obj) { return :https_health_check, GoogleInSpec::Compute::Property::HealthCheckHttpsHealthCheck.new(obj['httpsHealthCheck'], to_s) }, - 'tcpHealthCheck' => ->(obj) { return :tcp_health_check, GoogleInSpec::Compute::Property::HealthCheckTcpHealthCheck.new(obj['tcpHealthCheck'], to_s) }, - 'sslHealthCheck' => ->(obj) { return :ssl_health_check, GoogleInSpec::Compute::Property::HealthCheckSslHealthCheck.new(obj['sslHealthCheck'], to_s) }, - 'http2HealthCheck' => ->(obj) { return :http2_health_check, GoogleInSpec::Compute::Property::HealthCheckHttp2HealthCheck.new(obj['http2HealthCheck'], to_s) }, - 'grpcHealthCheck' => ->(obj) { return :grpc_health_check, GoogleInSpec::Compute::Property::HealthCheckGrpcHealthCheck.new(obj['grpcHealthCheck'], to_s) }, - 'logConfig' => ->(obj) { return :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 diff --git a/libraries/google_compute_http_health_checks.rb b/libraries/google_compute_http_health_checks.rb index af4d4c07a..1d798dfe4 100644 --- a/libraries/google_compute_http_health_checks.rb +++ b/libraries/google_compute_http_health_checks.rb @@ -73,17 +73,17 @@ def transform(key, value) def transformers { - 'checkIntervalSec' => ->(obj) { return :check_interval_sec, obj['checkIntervalSec'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'healthyThreshold' => ->(obj) { return :healthy_threshold, obj['healthyThreshold'] }, - 'host' => ->(obj) { return :host, obj['host'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'port' => ->(obj) { return :port, obj['port'] }, - 'requestPath' => ->(obj) { return :request_path, obj['requestPath'] }, - 'timeoutSec' => ->(obj) { return :timeout_sec, obj['timeoutSec'] }, - 'unhealthyThreshold' => ->(obj) { return :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 diff --git a/libraries/google_compute_https_health_checks.rb b/libraries/google_compute_https_health_checks.rb index fc67ec3dc..1fb4bcf0b 100644 --- a/libraries/google_compute_https_health_checks.rb +++ b/libraries/google_compute_https_health_checks.rb @@ -73,17 +73,17 @@ def transform(key, value) def transformers { - 'checkIntervalSec' => ->(obj) { return :check_interval_sec, obj['checkIntervalSec'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'healthyThreshold' => ->(obj) { return :healthy_threshold, obj['healthyThreshold'] }, - 'host' => ->(obj) { return :host, obj['host'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'port' => ->(obj) { return :port, obj['port'] }, - 'requestPath' => ->(obj) { return :request_path, obj['requestPath'] }, - 'timeoutSec' => ->(obj) { return :timeout_sec, obj['timeoutSec'] }, - 'unhealthyThreshold' => ->(obj) { return :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 diff --git a/libraries/google_compute_instance_group_managers.rb b/libraries/google_compute_instance_group_managers.rb index d9fb3f7b4..1b027ebab 100644 --- a/libraries/google_compute_instance_group_managers.rb +++ b/libraries/google_compute_instance_group_managers.rb @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'baseInstanceName' => ->(obj) { return :base_instance_name, obj['baseInstanceName'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'currentActions' => ->(obj) { return :current_actions, GoogleInSpec::Compute::Property::InstanceGroupManagerCurrentActions.new(obj['currentActions'], to_s) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'instanceGroup' => ->(obj) { return :instance_group, obj['instanceGroup'] }, - 'instanceTemplate' => ->(obj) { return :instance_template, obj['instanceTemplate'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'namedPorts' => ->(obj) { return :named_ports, GoogleInSpec::Compute::Property::InstanceGroupManagerNamedPortsArray.parse(obj['namedPorts'], to_s) }, - 'region' => ->(obj) { return :region, obj['region'] }, - 'targetPools' => ->(obj) { return :target_pools, obj['targetPools'] }, - 'targetSize' => ->(obj) { return :target_size, obj['targetSize'] }, - 'zone' => ->(obj) { return :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 diff --git a/libraries/google_compute_instance_groups.rb b/libraries/google_compute_instance_groups.rb index d3001a336..eeacbcb6f 100644 --- a/libraries/google_compute_instance_groups.rb +++ b/libraries/google_compute_instance_groups.rb @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :instance_group_id, obj['id'] }, - 'name' => ->(obj) { return :instance_group_name, obj['name'] }, - 'namedPorts' => ->(obj) { return :named_ports, GoogleInSpec::Compute::Property::InstanceGroupNamedPortsArray.parse(obj['namedPorts'], to_s) }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'region' => ->(obj) { return :region, obj['region'] }, - 'subnetwork' => ->(obj) { return :subnetwork, obj['subnetwork'] }, - 'zone' => ->(obj) { return :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 diff --git a/libraries/google_compute_instance_templates.rb b/libraries/google_compute_instance_templates.rb index 51ecc34a8..facadaf84 100644 --- a/libraries/google_compute_instance_templates.rb +++ b/libraries/google_compute_instance_templates.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'properties' => ->(obj) { return :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 diff --git a/libraries/google_compute_instances.rb b/libraries/google_compute_instances.rb index ba3ed529c..725bb9145 100644 --- a/libraries/google_compute_instances.rb +++ b/libraries/google_compute_instances.rb @@ -84,28 +84,28 @@ def transform(key, value) def transformers { - 'canIpForward' => ->(obj) { return :can_ip_forward, obj['canIpForward'] }, - 'cpuPlatform' => ->(obj) { return :cpu_platform, obj['cpuPlatform'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, obj['creationTimestamp'] }, - 'deletionProtection' => ->(obj) { return :deletion_protection, obj['deletionProtection'] }, - 'disks' => ->(obj) { return :disks, GoogleInSpec::Compute::Property::InstanceDisksArray.parse(obj['disks'], to_s) }, - 'guestAccelerators' => ->(obj) { return :guest_accelerators, GoogleInSpec::Compute::Property::InstanceGuestAcceleratorsArray.parse(obj['guestAccelerators'], to_s) }, - 'hostname' => ->(obj) { return :hostname, obj['hostname'] }, - 'id' => ->(obj) { return :instance_id, obj['id'] }, - 'labelFingerprint' => ->(obj) { return :label_fingerprint, obj['labelFingerprint'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'metadata' => ->(obj) { return :metadata, obj['metadata'] }, - 'machineType' => ->(obj) { return :machine_type, obj['machineType'] }, - 'minCpuPlatform' => ->(obj) { return :min_cpu_platform, obj['minCpuPlatform'] }, - 'name' => ->(obj) { return :instance_name, obj['name'] }, - 'networkInterfaces' => ->(obj) { return :network_interfaces, GoogleInSpec::Compute::Property::InstanceNetworkInterfacesArray.parse(obj['networkInterfaces'], to_s) }, - 'scheduling' => ->(obj) { return :scheduling, GoogleInSpec::Compute::Property::InstanceScheduling.new(obj['scheduling'], to_s) }, - 'serviceAccounts' => ->(obj) { return :service_accounts, GoogleInSpec::Compute::Property::InstanceServiceAccountsArray.parse(obj['serviceAccounts'], to_s) }, - 'shieldedInstanceConfig' => ->(obj) { return :shielded_instance_config, GoogleInSpec::Compute::Property::InstanceShieldedInstanceConfig.new(obj['shieldedInstanceConfig'], to_s) }, - 'status' => ->(obj) { return :status, obj['status'] }, - 'statusMessage' => ->(obj) { return :status_message, obj['statusMessage'] }, - 'tags' => ->(obj) { return :tags, GoogleInSpec::Compute::Property::InstanceTags.new(obj['tags'], to_s) }, - 'zone' => ->(obj) { return :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 diff --git a/libraries/google_compute_interconnect_locations.rb b/libraries/google_compute_interconnect_locations.rb index 27572fb2b..4c2a90643 100644 --- a/libraries/google_compute_interconnect_locations.rb +++ b/libraries/google_compute_interconnect_locations.rb @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'availabilityZone' => ->(obj) { return :availability_zone, obj['availabilityZone'] }, - 'clientOperationId' => ->(obj) { return :client_operation_id, obj['clientOperationId'] }, - 'facilityProvider' => ->(obj) { return :facility_provider, obj['facilityProvider'] }, - 'facilityProviderFacilityId' => ->(obj) { return :facility_provider_facility_id, obj['facilityProviderFacilityId'] }, - 'status' => ->(obj) { return :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 diff --git a/libraries/google_compute_interconnects.rb b/libraries/google_compute_interconnects.rb index bcc3085ed..34355b985 100644 --- a/libraries/google_compute_interconnects.rb +++ b/libraries/google_compute_interconnects.rb @@ -83,27 +83,27 @@ def transform(key, value) def transformers { - 'adminEnabled' => ->(obj) { return :admin_enabled, obj['adminEnabled'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'location' => ->(obj) { return :location, obj['location'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'nocContactEmail' => ->(obj) { return :noc_contact_email, obj['nocContactEmail'] }, - 'peerIpAddress' => ->(obj) { return :peer_ip_address, obj['peerIpAddress'] }, - 'googleIpAddress' => ->(obj) { return :google_ip_address, obj['googleIpAddress'] }, - 'clientOperationId' => ->(obj) { return :client_operation_id, obj['clientOperationId'] }, - 'googleReferenceId' => ->(obj) { return :google_reference_id, obj['googleReferenceId'] }, - 'provisionedLinkCount' => ->(obj) { return :provisioned_link_count, obj['provisionedLinkCount'] }, - 'customerName' => ->(obj) { return :customer_name, obj['customerName'] }, - 'requestedLinkCount' => ->(obj) { return :requested_link_count, obj['requestedLinkCount'] }, - 'operationalStatus' => ->(obj) { return :operational_status, obj['operationalStatus'] }, - 'linkType' => ->(obj) { return :link_type, obj['linkType'] }, - 'interconnectType' => ->(obj) { return :interconnect_type, obj['interconnectType'] }, - 'interconnectAttachments' => ->(obj) { return :interconnect_attachments, obj['interconnectAttachments'] }, - 'expectedOutages' => ->(obj) { return :expected_outages, GoogleInSpec::Compute::Property::InterconnectExpectedOutagesArray.parse(obj['expectedOutages'], to_s) }, - 'circuitInfos' => ->(obj) { return :circuit_infos, GoogleInSpec::Compute::Property::InterconnectCircuitInfosArray.parse(obj['circuitInfos'], to_s) }, - 'satisfiesPzs' => ->(obj) { return :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 diff --git a/libraries/google_compute_network_endpoint_groups.rb b/libraries/google_compute_network_endpoint_groups.rb index a367b49ad..0e13e4758 100644 --- a/libraries/google_compute_network_endpoint_groups.rb +++ b/libraries/google_compute_network_endpoint_groups.rb @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'networkEndpointType' => ->(obj) { return :network_endpoint_type, obj['networkEndpointType'] }, - 'size' => ->(obj) { return :size, obj['size'] }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'subnetwork' => ->(obj) { return :subnetwork, obj['subnetwork'] }, - 'defaultPort' => ->(obj) { return :default_port, obj['defaultPort'] }, - 'zone' => ->(obj) { return :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 diff --git a/libraries/google_compute_networks.rb b/libraries/google_compute_networks.rb index 1dd4f8554..85f41b5bf 100644 --- a/libraries/google_compute_networks.rb +++ b/libraries/google_compute_networks.rb @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'description' => ->(obj) { return :description, obj['description'] }, - 'gatewayIPv4' => ->(obj) { return :gateway_ipv4, obj['gatewayIPv4'] }, - 'id' => ->(obj) { return :network_id, obj['id'] }, - 'name' => ->(obj) { return :network_name, obj['name'] }, - 'subnetworks' => ->(obj) { return :subnetworks, obj['subnetworks'] }, - 'autoCreateSubnetworks' => ->(obj) { return :auto_create_subnetworks, obj['autoCreateSubnetworks'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'routingConfig' => ->(obj) { return :routing_config, GoogleInSpec::Compute::Property::NetworkRoutingConfig.new(obj['routingConfig'], to_s) }, - 'peerings' => ->(obj) { return :peerings, GoogleInSpec::Compute::Property::NetworkPeeringsArray.parse(obj['peerings'], to_s) }, - 'mtu' => ->(obj) { return :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 diff --git a/libraries/google_compute_node_groups.rb b/libraries/google_compute_node_groups.rb index 682505e59..b0b2764f7 100644 --- a/libraries/google_compute_node_groups.rb +++ b/libraries/google_compute_node_groups.rb @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'nodeTemplate' => ->(obj) { return :node_template, obj['nodeTemplate'] }, - 'size' => ->(obj) { return :size, obj['size'] }, - 'maintenancePolicy' => ->(obj) { return :maintenance_policy, obj['maintenancePolicy'] }, - 'autoscalingPolicy' => ->(obj) { return :autoscaling_policy, GoogleInSpec::Compute::Property::NodeGroupAutoscalingPolicy.new(obj['autoscalingPolicy'], to_s) }, - 'zone' => ->(obj) { return :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 diff --git a/libraries/google_compute_node_templates.rb b/libraries/google_compute_node_templates.rb index 7d693f895..4503cd0f8 100644 --- a/libraries/google_compute_node_templates.rb +++ b/libraries/google_compute_node_templates.rb @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'nodeAffinityLabels' => ->(obj) { return :node_affinity_labels, obj['nodeAffinityLabels'] }, - 'nodeType' => ->(obj) { return :node_type, obj['nodeType'] }, - 'nodeTypeFlexibility' => ->(obj) { return :node_type_flexibility, GoogleInSpec::Compute::Property::NodeTemplateNodeTypeFlexibility.new(obj['nodeTypeFlexibility'], to_s) }, - 'serverBinding' => ->(obj) { return :server_binding, GoogleInSpec::Compute::Property::NodeTemplateServerBinding.new(obj['serverBinding'], to_s) }, - 'cpuOvercommitType' => ->(obj) { return :cpu_overcommit_type, obj['cpuOvercommitType'] }, - 'region' => ->(obj) { return :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 diff --git a/libraries/google_compute_public_delegated_prefixes.rb b/libraries/google_compute_public_delegated_prefixes.rb index e71a11715..ca005368d 100644 --- a/libraries/google_compute_public_delegated_prefixes.rb +++ b/libraries/google_compute_public_delegated_prefixes.rb @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'ipCidrRange' => ->(obj) { return :ip_cidr_range, obj['ipCidrRange'] }, - 'parentPrefix' => ->(obj) { return :parent_prefix, obj['parentPrefix'] }, - 'isLiveMigration' => ->(obj) { return :is_live_migration, obj['isLiveMigration'] }, - 'fingerprint' => ->(obj) { return :fingerprint, obj['fingerprint'] }, - 'status' => ->(obj) { return :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 diff --git a/libraries/google_compute_region_backend_services.rb b/libraries/google_compute_region_backend_services.rb index 87dcac425..dc8d3b829 100644 --- a/libraries/google_compute_region_backend_services.rb +++ b/libraries/google_compute_region_backend_services.rb @@ -86,30 +86,30 @@ def transform(key, value) def transformers { - 'affinityCookieTtlSec' => ->(obj) { return :affinity_cookie_ttl_sec, obj['affinityCookieTtlSec'] }, - 'backends' => ->(obj) { return :backends, GoogleInSpec::Compute::Property::RegionBackendServiceBackendsArray.parse(obj['backends'], to_s) }, - 'circuitBreakers' => ->(obj) { return :circuit_breakers, GoogleInSpec::Compute::Property::RegionBackendServiceCircuitBreakers.new(obj['circuitBreakers'], to_s) }, - 'consistentHash' => ->(obj) { return :consistent_hash, GoogleInSpec::Compute::Property::RegionBackendServiceConsistentHash.new(obj['consistentHash'], to_s) }, - 'cdnPolicy' => ->(obj) { return :cdn_policy, GoogleInSpec::Compute::Property::RegionBackendServiceCdnPolicy.new(obj['cdnPolicy'], to_s) }, - 'connectionDraining' => ->(obj) { return :connection_draining, GoogleInSpec::Compute::Property::RegionBackendServiceConnectionDraining.new(obj['connectionDraining'], to_s) }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'failoverPolicy' => ->(obj) { return :failover_policy, GoogleInSpec::Compute::Property::RegionBackendServiceFailoverPolicy.new(obj['failoverPolicy'], to_s) }, - 'enableCDN' => ->(obj) { return :enable_cdn, obj['enableCDN'] }, - 'fingerprint' => ->(obj) { return :fingerprint, obj['fingerprint'] }, - 'healthChecks' => ->(obj) { return :health_checks, obj['healthChecks'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'loadBalancingScheme' => ->(obj) { return :load_balancing_scheme, obj['loadBalancingScheme'] }, - 'localityLbPolicy' => ->(obj) { return :locality_lb_policy, obj['localityLbPolicy'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'outlierDetection' => ->(obj) { return :outlier_detection, GoogleInSpec::Compute::Property::RegionBackendServiceOutlierDetection.new(obj['outlierDetection'], to_s) }, - 'portName' => ->(obj) { return :port_name, obj['portName'] }, - 'protocol' => ->(obj) { return :protocol, obj['protocol'] }, - 'sessionAffinity' => ->(obj) { return :session_affinity, obj['sessionAffinity'] }, - 'timeoutSec' => ->(obj) { return :timeout_sec, obj['timeoutSec'] }, - 'logConfig' => ->(obj) { return :log_config, GoogleInSpec::Compute::Property::RegionBackendServiceLogConfig.new(obj['logConfig'], to_s) }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'region' => ->(obj) { return :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 diff --git a/libraries/google_compute_region_health_checks.rb b/libraries/google_compute_region_health_checks.rb index ae6bb9359..60b5162bd 100644 --- a/libraries/google_compute_region_health_checks.rb +++ b/libraries/google_compute_region_health_checks.rb @@ -79,23 +79,23 @@ def transform(key, value) def transformers { - 'checkIntervalSec' => ->(obj) { return :check_interval_sec, obj['checkIntervalSec'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'healthyThreshold' => ->(obj) { return :healthy_threshold, obj['healthyThreshold'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'unhealthyThreshold' => ->(obj) { return :unhealthy_threshold, obj['unhealthyThreshold'] }, - 'timeoutSec' => ->(obj) { return :timeout_sec, obj['timeoutSec'] }, - 'type' => ->(obj) { return :type, obj['type'] }, - 'httpHealthCheck' => ->(obj) { return :http_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckHttpHealthCheck.new(obj['httpHealthCheck'], to_s) }, - 'httpsHealthCheck' => ->(obj) { return :https_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckHttpsHealthCheck.new(obj['httpsHealthCheck'], to_s) }, - 'tcpHealthCheck' => ->(obj) { return :tcp_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckTcpHealthCheck.new(obj['tcpHealthCheck'], to_s) }, - 'sslHealthCheck' => ->(obj) { return :ssl_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckSslHealthCheck.new(obj['sslHealthCheck'], to_s) }, - 'http2HealthCheck' => ->(obj) { return :http2_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckHttp2HealthCheck.new(obj['http2HealthCheck'], to_s) }, - 'grpcHealthCheck' => ->(obj) { return :grpc_health_check, GoogleInSpec::Compute::Property::RegionHealthCheckGrpcHealthCheck.new(obj['grpcHealthCheck'], to_s) }, - 'logConfig' => ->(obj) { return :log_config, GoogleInSpec::Compute::Property::RegionHealthCheckLogConfig.new(obj['logConfig'], to_s) }, - 'region' => ->(obj) { return :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 diff --git a/libraries/google_compute_region_instance_group_managers.rb b/libraries/google_compute_region_instance_group_managers.rb index c52d4da7d..b060ba8c7 100644 --- a/libraries/google_compute_region_instance_group_managers.rb +++ b/libraries/google_compute_region_instance_group_managers.rb @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'baseInstanceName' => ->(obj) { return :base_instance_name, obj['baseInstanceName'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'currentActions' => ->(obj) { return :current_actions, GoogleInSpec::Compute::Property::RegionInstanceGroupManagerCurrentActions.new(obj['currentActions'], to_s) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :instance_group_manager_id, obj['id'] }, - 'instanceGroup' => ->(obj) { return :instance_group, obj['instanceGroup'] }, - 'instanceTemplate' => ->(obj) { return :instance_template, obj['instanceTemplate'] }, - 'name' => ->(obj) { return :instance_group_manager_name, obj['name'] }, - 'namedPorts' => ->(obj) { return :named_ports, GoogleInSpec::Compute::Property::RegionInstanceGroupManagerNamedPortsArray.parse(obj['namedPorts'], to_s) }, - 'targetPools' => ->(obj) { return :target_pools, obj['targetPools'] }, - 'targetSize' => ->(obj) { return :target_size, obj['targetSize'] }, - 'autoHealingPolicies' => ->(obj) { return :auto_healing_policies, GoogleInSpec::Compute::Property::RegionInstanceGroupManagerAutoHealingPoliciesArray.parse(obj['autoHealingPolicies'], to_s) }, - 'region' => ->(obj) { return :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 diff --git a/libraries/google_compute_region_instance_groups.rb b/libraries/google_compute_region_instance_groups.rb index 624429670..f774ccb85 100644 --- a/libraries/google_compute_region_instance_groups.rb +++ b/libraries/google_compute_region_instance_groups.rb @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'fingerprint' => ->(obj) { return :fingerprint, obj['fingerprint'] }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'zone' => ->(obj) { return :zone, obj['zone'] }, - 'size' => ->(obj) { return :size, obj['size'] }, - 'region' => ->(obj) { return :region, obj['region'] }, - 'namedPorts' => ->(obj) { return :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 diff --git a/libraries/google_compute_region_operations.rb b/libraries/google_compute_region_operations.rb index 22d415376..acd14e49c 100644 --- a/libraries/google_compute_region_operations.rb +++ b/libraries/google_compute_region_operations.rb @@ -74,18 +74,18 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'targetId' => ->(obj) { return :target_id, obj['targetId'] }, - 'status' => ->(obj) { return :status, obj['status'] }, - 'user' => ->(obj) { return :user, obj['user'] }, - 'insertTime' => ->(obj) { return :insert_time, obj['insertTime'] }, - 'startTime' => ->(obj) { return :start_time, obj['startTime'] }, - 'endTime' => ->(obj) { return :end_time, obj['endTime'] }, - 'progress' => ->(obj) { return :progress, obj['progress'] }, - 'zone' => ->(obj) { return :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 diff --git a/libraries/google_compute_region_security_policies.rb b/libraries/google_compute_region_security_policies.rb index 665d492af..4a9535988 100644 --- a/libraries/google_compute_region_security_policies.rb +++ b/libraries/google_compute_region_security_policies.rb @@ -78,22 +78,22 @@ def transform(key, value) def transformers { - 'kind' => ->(obj) { return :kind, obj['kind'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, obj['creationTimestamp'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'rules' => ->(obj) { return :rules, GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesArray.parse(obj['rules'], to_s) }, - 'adaptiveProtectionConfig' => ->(obj) { return :adaptive_protection_config, GoogleInSpec::Compute::Property::RegionSecurityPolicyAdaptiveProtectionConfig.new(obj['adaptiveProtectionConfig'], to_s) }, - 'ddosProtectionConfig' => ->(obj) { return :ddos_protection_config, GoogleInSpec::Compute::Property::RegionSecurityPolicyDdosProtectionConfig.new(obj['ddosProtectionConfig'], to_s) }, - 'advancedOptionsConfig' => ->(obj) { return :advanced_options_config, GoogleInSpec::Compute::Property::RegionSecurityPolicyAdvancedOptionsConfig.new(obj['advancedOptionsConfig'], to_s) }, - 'recaptchaOptionsConfig' => ->(obj) { return :recaptcha_options_config, GoogleInSpec::Compute::Property::RegionSecurityPolicyRecaptchaOptionsConfig.new(obj['recaptchaOptionsConfig'], to_s) }, - 'fingerprint' => ->(obj) { return :fingerprint, obj['fingerprint'] }, - 'selfLink' => ->(obj) { return :self_link, obj['selfLink'] }, - 'type' => ->(obj) { return :type, obj['type'] }, - 'labels' => ->(obj) { return :labels, GoogleInSpec::Compute::Property::RegionSecurityPolicyLabels.new(obj['labels'], to_s) }, - 'labelFingerprint' => ->(obj) { return :label_fingerprint, obj['labelFingerprint'] }, - 'region' => ->(obj) { return :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 diff --git a/libraries/google_compute_regional_disks.rb b/libraries/google_compute_regional_disks.rb index 3943fe377..26ba93310 100644 --- a/libraries/google_compute_regional_disks.rb +++ b/libraries/google_compute_regional_disks.rb @@ -73,30 +73,30 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { return :id, obj['id'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'sizeGb' => ->(obj) { return :size_gb, obj['sizeGb'] }, - 'zone' => ->(obj) { return :zone, obj['zone'] }, - 'sourceSnapshot' => ->(obj) { return :source_snapshot, obj['sourceSnapshot'] }, - 'sourceSnapshotId' => ->(obj) { return :source_snapshot_id, obj['sourceSnapshotId'] }, - 'sourceSnapshotEncryptionKey' => ->(obj) { return :source_snapshot_encryption_key, GoogleInSpec::Compute::Property::DiskSourceSnapshotEncryptionKey.new(obj['sourceSnapshotEncryptionKey'], to_s) }, - 'sourceImage' => ->(obj) { return :source_image, obj['sourceImage'] }, - 'sourceImageId' => ->(obj) { return :source_image_id, obj['sourceImageId'] }, - 'sourceImageEncryptionKey' => ->(obj) { return :source_image_encryption_key, GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(obj['sourceImageEncryptionKey'], to_s) }, - 'type' => ->(obj) { return :type, obj['type'] }, - 'licenses' => ->(obj) { return :licenses, obj['licenses'] }, - 'lastAttachTimestamp' => ->(obj) { return :last_attach_timestamp, parse_time_string(obj['lastAttachTimestamp']) }, - 'lastDetachTimestamp' => ->(obj) { return :last_detach_timestamp, parse_time_string(obj['lastDetachTimestamp']) }, - 'users' => ->(obj) { return :users, obj['users'] }, - 'diskEncryptionKey' => ->(obj) { return :disk_encryption_key, GoogleInSpec::Compute::Property::DiskDiskEncryptionKey.new(obj['diskEncryptionKey'], to_s) }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'labelFingerprint' => ->(obj) { return :label_fingerprint, obj['labelFingerprint'] }, - 'physicalBlockSizeBytes' => ->(obj) { return :physical_block_size_bytes, obj['physicalBlockSizeBytes'] }, - 'region' => ->(obj) { return :region, obj['region'] }, - 'replica_zones' => ->(obj) { return :replica_zones, obj['replica_zones'] }, - 'status' => ->(obj) { return :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 diff --git a/libraries/google_compute_regions.rb b/libraries/google_compute_regions.rb index 38c1e0714..5878bc619 100644 --- a/libraries/google_compute_regions.rb +++ b/libraries/google_compute_regions.rb @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'deprecated' => ->(obj) { return :deprecated, GoogleInSpec::Compute::Property::RegionDeprecated.new(obj['deprecated'], to_s) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :region_id, obj['id'] }, - 'name' => ->(obj) { return :region_name, obj['name'] }, - 'quotas' => ->(obj) { return :quotas, GoogleInSpec::Compute::Property::RegionQuotasArray.parse(obj['quotas'], to_s) }, - 'status' => ->(obj) { return :region_status, obj['status'] }, - 'zones' => ->(obj) { return :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 diff --git a/libraries/google_compute_router_nats.rb b/libraries/google_compute_router_nats.rb index e2b2a8126..5a6fc2dd3 100644 --- a/libraries/google_compute_router_nats.rb +++ b/libraries/google_compute_router_nats.rb @@ -77,21 +77,21 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'natIpAllocateOption' => ->(obj) { return :nat_ip_allocate_option, obj['natIpAllocateOption'] }, - 'natIps' => ->(obj) { return :nat_ips, obj['natIps'] }, - 'drainNatIps' => ->(obj) { return :drain_nat_ips, obj['drainNatIps'] }, - 'sourceSubnetworkIpRangesToNat' => ->(obj) { return :source_subnetwork_ip_ranges_to_nat, obj['sourceSubnetworkIpRangesToNat'] }, - 'subnetworks' => ->(obj) { return :subnetwork, GoogleInSpec::Compute::Property::RouterNatSubnetworkArray.parse(obj['subnetworks'], to_s) }, - 'minPortsPerVm' => ->(obj) { return :min_ports_per_vm, obj['minPortsPerVm'] }, - 'udpIdleTimeoutSec' => ->(obj) { return :udp_idle_timeout_sec, obj['udpIdleTimeoutSec'] }, - 'icmpIdleTimeoutSec' => ->(obj) { return :icmp_idle_timeout_sec, obj['icmpIdleTimeoutSec'] }, - 'tcpEstablishedIdleTimeoutSec' => ->(obj) { return :tcp_established_idle_timeout_sec, obj['tcpEstablishedIdleTimeoutSec'] }, - 'tcpTransitoryIdleTimeoutSec' => ->(obj) { return :tcp_transitory_idle_timeout_sec, obj['tcpTransitoryIdleTimeoutSec'] }, - 'logConfig' => ->(obj) { return :log_config, GoogleInSpec::Compute::Property::RouterNatLogConfig.new(obj['logConfig'], to_s) }, - 'enableEndpointIndependentMapping' => ->(obj) { return :enable_endpoint_independent_mapping, obj['enableEndpointIndependentMapping'] }, - 'router' => ->(obj) { return :router, obj['router'] }, - 'region' => ->(obj) { return :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 diff --git a/libraries/google_compute_routers.rb b/libraries/google_compute_routers.rb index e7ce0add6..7d632e13a 100644 --- a/libraries/google_compute_routers.rb +++ b/libraries/google_compute_routers.rb @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { return :id, obj['id'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'bgp' => ->(obj) { return :bgp, GoogleInSpec::Compute::Property::RouterBgp.new(obj['bgp'], to_s) }, - 'region' => ->(obj) { return :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 diff --git a/libraries/google_compute_routes.rb b/libraries/google_compute_routes.rb index 40b6ae122..552ff124e 100644 --- a/libraries/google_compute_routes.rb +++ b/libraries/google_compute_routes.rb @@ -74,18 +74,18 @@ def transform(key, value) def transformers { - 'destRange' => ->(obj) { return :dest_range, obj['destRange'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'priority' => ->(obj) { return :priority, obj['priority'] }, - 'tags' => ->(obj) { return :tags, obj['tags'] }, - 'nextHopGateway' => ->(obj) { return :next_hop_gateway, obj['nextHopGateway'] }, - 'nextHopInstance' => ->(obj) { return :next_hop_instance, obj['nextHopInstance'] }, - 'nextHopIp' => ->(obj) { return :next_hop_ip, obj['nextHopIp'] }, - 'nextHopVpnTunnel' => ->(obj) { return :next_hop_vpn_tunnel, obj['nextHopVpnTunnel'] }, - 'nextHopNetwork' => ->(obj) { return :next_hop_network, obj['nextHopNetwork'] }, - 'nextHopIlb' => ->(obj) { return :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 diff --git a/libraries/google_compute_security_policies.rb b/libraries/google_compute_security_policies.rb index 0081cc59d..9f5f96812 100644 --- a/libraries/google_compute_security_policies.rb +++ b/libraries/google_compute_security_policies.rb @@ -65,9 +65,9 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'rules' => ->(obj) { return :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 diff --git a/libraries/google_compute_snapshots.rb b/libraries/google_compute_snapshots.rb index 0a986c8fc..ff3e2d495 100644 --- a/libraries/google_compute_snapshots.rb +++ b/libraries/google_compute_snapshots.rb @@ -76,20 +76,20 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'diskSizeGb' => ->(obj) { return :disk_size_gb, obj['diskSizeGb'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'storageBytes' => ->(obj) { return :storage_bytes, obj['storageBytes'] }, - 'storageLocations' => ->(obj) { return :storage_locations, obj['storageLocations'] }, - 'licenses' => ->(obj) { return :licenses, obj['licenses'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'labelFingerprint' => ->(obj) { return :label_fingerprint, obj['labelFingerprint'] }, - 'sourceDisk' => ->(obj) { return :source_disk, obj['sourceDisk'] }, - 'zone' => ->(obj) { return :zone, obj['zone'] }, - 'snapshotEncryptionKey' => ->(obj) { return :snapshot_encryption_key, GoogleInSpec::Compute::Property::SnapshotSnapshotEncryptionKey.new(obj['snapshotEncryptionKey'], to_s) }, - 'sourceDiskEncryptionKey' => ->(obj) { return :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 diff --git a/libraries/google_compute_ssl_certificates.rb b/libraries/google_compute_ssl_certificates.rb index 2215d85d7..2c608533a 100644 --- a/libraries/google_compute_ssl_certificates.rb +++ b/libraries/google_compute_ssl_certificates.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'certificate' => ->(obj) { return :certificate, obj['certificate'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'privateKey' => ->(obj) { return :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 diff --git a/libraries/google_compute_ssl_policies.rb b/libraries/google_compute_ssl_policies.rb index a0636c69d..594c9044a 100644 --- a/libraries/google_compute_ssl_policies.rb +++ b/libraries/google_compute_ssl_policies.rb @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'profile' => ->(obj) { return :profile, obj['profile'] }, - 'minTlsVersion' => ->(obj) { return :min_tls_version, obj['minTlsVersion'] }, - 'enabledFeatures' => ->(obj) { return :enabled_features, obj['enabledFeatures'] }, - 'customFeatures' => ->(obj) { return :custom_features, obj['customFeatures'] }, - 'fingerprint' => ->(obj) { return :fingerprint, obj['fingerprint'] }, - 'warnings' => ->(obj) { return :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 diff --git a/libraries/google_compute_subnetworks.rb b/libraries/google_compute_subnetworks.rb index 297de61bd..458ae9740 100644 --- a/libraries/google_compute_subnetworks.rb +++ b/libraries/google_compute_subnetworks.rb @@ -76,20 +76,20 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'gatewayAddress' => ->(obj) { return :gateway_address, obj['gatewayAddress'] }, - 'id' => ->(obj) { return :subnetwork_id, obj['id'] }, - 'ipCidrRange' => ->(obj) { return :ip_cidr_range, obj['ipCidrRange'] }, - 'name' => ->(obj) { return :subnetwork_name, obj['name'] }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'purpose' => ->(obj) { return :purpose, obj['purpose'] }, - 'role' => ->(obj) { return :role, obj['role'] }, - 'secondaryIpRanges' => ->(obj) { return :secondary_ip_ranges, GoogleInSpec::Compute::Property::SubnetworkSecondaryIpRangesArray.parse(obj['secondaryIpRanges'], to_s) }, - 'privateIpGoogleAccess' => ->(obj) { return :private_ip_google_access, obj['privateIpGoogleAccess'] }, - 'privateIpv6GoogleAccess' => ->(obj) { return :private_ipv6_google_access, obj['privateIpv6GoogleAccess'] }, - 'region' => ->(obj) { return :region, obj['region'] }, - 'logConfig' => ->(obj) { return :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 diff --git a/libraries/google_compute_target_http_proxies.rb b/libraries/google_compute_target_http_proxies.rb index f7230aaba..cb40068d8 100644 --- a/libraries/google_compute_target_http_proxies.rb +++ b/libraries/google_compute_target_http_proxies.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'urlMap' => ->(obj) { return :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 diff --git a/libraries/google_compute_target_https_proxies.rb b/libraries/google_compute_target_https_proxies.rb index ce020873a..529b249de 100644 --- a/libraries/google_compute_target_https_proxies.rb +++ b/libraries/google_compute_target_https_proxies.rb @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'quicOverride' => ->(obj) { return :quic_override, obj['quicOverride'] }, - 'sslCertificates' => ->(obj) { return :ssl_certificates, obj['sslCertificates'] }, - 'sslPolicy' => ->(obj) { return :ssl_policy, obj['sslPolicy'] }, - 'urlMap' => ->(obj) { return :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 diff --git a/libraries/google_compute_target_pools.rb b/libraries/google_compute_target_pools.rb index 48870753e..dc739a622 100644 --- a/libraries/google_compute_target_pools.rb +++ b/libraries/google_compute_target_pools.rb @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'backupPool' => ->(obj) { return :backup_pool, obj['backupPool'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'failoverRatio' => ->(obj) { return :failover_ratio, obj['failoverRatio'] }, - 'healthCheck' => ->(obj) { return :health_check, obj['healthCheck'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'instances' => ->(obj) { return :instances, obj['instances'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'sessionAffinity' => ->(obj) { return :session_affinity, obj['sessionAffinity'] }, - 'region' => ->(obj) { return :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 diff --git a/libraries/google_compute_target_tcp_proxies.rb b/libraries/google_compute_target_tcp_proxies.rb index 2fc8a8754..525ba1072 100644 --- a/libraries/google_compute_target_tcp_proxies.rb +++ b/libraries/google_compute_target_tcp_proxies.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'proxyHeader' => ->(obj) { return :proxy_header, obj['proxyHeader'] }, - 'service' => ->(obj) { return :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 diff --git a/libraries/google_compute_url_maps.rb b/libraries/google_compute_url_maps.rb index 693daaba5..3aea28e0a 100644 --- a/libraries/google_compute_url_maps.rb +++ b/libraries/google_compute_url_maps.rb @@ -74,18 +74,18 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'defaultService' => ->(obj) { return :default_service, obj['defaultService'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'fingerprint' => ->(obj) { return :fingerprint, obj['fingerprint'] }, - 'headerAction' => ->(obj) { return :header_action, GoogleInSpec::Compute::Property::UrlMapHeaderAction.new(obj['headerAction'], to_s) }, - 'hostRules' => ->(obj) { return :host_rules, GoogleInSpec::Compute::Property::UrlMapHostRulesArray.parse(obj['hostRules'], to_s) }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'pathMatchers' => ->(obj) { return :path_matchers, GoogleInSpec::Compute::Property::UrlMapPathMatchersArray.parse(obj['pathMatchers'], to_s) }, - 'tests' => ->(obj) { return :tests, GoogleInSpec::Compute::Property::UrlMapTestsArray.parse(obj['tests'], to_s) }, - 'defaultUrlRedirect' => ->(obj) { return :default_url_redirect, GoogleInSpec::Compute::Property::UrlMapDefaultUrlRedirect.new(obj['defaultUrlRedirect'], to_s) }, - 'defaultRouteAction' => ->(obj) { return :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 diff --git a/libraries/google_compute_vpn_tunnels.rb b/libraries/google_compute_vpn_tunnels.rb index bebe82670..e43a4cd10 100644 --- a/libraries/google_compute_vpn_tunnels.rb +++ b/libraries/google_compute_vpn_tunnels.rb @@ -82,26 +82,26 @@ def transform(key, value) def transformers { - 'id' => ->(obj) { return :id, obj['id'] }, - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'name' => ->(obj) { return :vpn_tunnel_name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'targetVpnGateway' => ->(obj) { return :target_vpn_gateway, obj['targetVpnGateway'] }, - 'vpnGateway' => ->(obj) { return :vpn_gateway, obj['vpnGateway'] }, - 'vpnGatewayInterface' => ->(obj) { return :vpn_gateway_interface, obj['vpnGatewayInterface'] }, - 'peerExternalGateway' => ->(obj) { return :peer_external_gateway, obj['peerExternalGateway'] }, - 'peerExternalGatewayInterface' => ->(obj) { return :peer_external_gateway_interface, obj['peerExternalGatewayInterface'] }, - 'peerGcpGateway' => ->(obj) { return :peer_gcp_gateway, obj['peerGcpGateway'] }, - 'router' => ->(obj) { return :router, obj['router'] }, - 'peerIp' => ->(obj) { return :peer_ip, obj['peerIp'] }, - 'sharedSecret' => ->(obj) { return :shared_secret, obj['sharedSecret'] }, - 'sharedSecretHash' => ->(obj) { return :shared_secret_hash, obj['sharedSecretHash'] }, - 'ikeVersion' => ->(obj) { return :ike_version, obj['ikeVersion'] }, - 'localTrafficSelector' => ->(obj) { return :local_traffic_selector, obj['localTrafficSelector'] }, - 'remoteTrafficSelector' => ->(obj) { return :remote_traffic_selector, obj['remoteTrafficSelector'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'labelFingerprint' => ->(obj) { return :label_fingerprint, obj['labelFingerprint'] }, - 'region' => ->(obj) { return :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 diff --git a/libraries/google_compute_zone_operations.rb b/libraries/google_compute_zone_operations.rb index d98d5f46e..204a37bd0 100644 --- a/libraries/google_compute_zone_operations.rb +++ b/libraries/google_compute_zone_operations.rb @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'statusMessage' => ->(obj) { return :status_message, obj['statusMessage'] }, - 'targetId' => ->(obj) { return :target_id, obj['targetId'] }, - 'status' => ->(obj) { return :status, obj['status'] }, - 'user' => ->(obj) { return :user, obj['user'] }, - 'insertTime' => ->(obj) { return :insert_time, obj['insertTime'] }, - 'startTime' => ->(obj) { return :start_time, obj['startTime'] }, - 'endTime' => ->(obj) { return :end_time, obj['endTime'] }, - 'progress' => ->(obj) { return :progress, obj['progress'] }, - 'region' => ->(obj) { return :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 diff --git a/libraries/google_compute_zones.rb b/libraries/google_compute_zones.rb index 724cb6429..d1eca5b19 100644 --- a/libraries/google_compute_zones.rb +++ b/libraries/google_compute_zones.rb @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, - 'deprecated' => ->(obj) { return :deprecated, GoogleInSpec::Compute::Property::ZoneDeprecated.new(obj['deprecated'], to_s) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'id' => ->(obj) { return :zone_id, obj['id'] }, - 'name' => ->(obj) { return :zone_name, obj['name'] }, - 'region' => ->(obj) { return :region, obj['region'] }, - 'status' => ->(obj) { return :zone_status, obj['status'] }, - 'availableCpuPlatforms' => ->(obj) { return :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 diff --git a/libraries/google_container_clusters.rb b/libraries/google_container_clusters.rb index 4f0a1d39e..c4694c1dd 100644 --- a/libraries/google_container_clusters.rb +++ b/libraries/google_container_clusters.rb @@ -104,48 +104,48 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :cluster_name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'initialNodeCount' => ->(obj) { return :initial_node_count, obj['initialNodeCount'] }, - 'nodeConfig' => ->(obj) { return :node_config, GoogleInSpec::Container::Property::ClusterNodeConfig.new(obj['nodeConfig'], to_s) }, - 'masterAuth' => ->(obj) { return :master_auth, GoogleInSpec::Container::Property::ClusterMasterAuth.new(obj['masterAuth'], to_s) }, - 'loggingService' => ->(obj) { return :logging_service, obj['loggingService'] }, - 'monitoringService' => ->(obj) { return :monitoring_service, obj['monitoringService'] }, - 'network' => ->(obj) { return :cluster_network, obj['network'] }, - 'databaseEncryption' => ->(obj) { return :database_encryption, GoogleInSpec::Container::Property::ClusterDatabaseEncryption.new(obj['databaseEncryption'], to_s) }, - 'privateClusterConfig' => ->(obj) { return :private_cluster_config, GoogleInSpec::Container::Property::ClusterPrivateClusterConfig.new(obj['privateClusterConfig'], to_s) }, - 'clusterIpv4Cidr' => ->(obj) { return :cluster_ipv4_cidr, obj['clusterIpv4Cidr'] }, - 'enableTpu' => ->(obj) { return :enable_tpu, obj['enableTpu'] }, - 'tpuIpv4CidrBlock' => ->(obj) { return :tpu_ipv4_cidr_block, obj['tpuIpv4CidrBlock'] }, - 'addonsConfig' => ->(obj) { return :addons_config, GoogleInSpec::Container::Property::ClusterAddonsConfig.new(obj['addonsConfig'], to_s) }, - 'subnetwork' => ->(obj) { return :subnetwork, obj['subnetwork'] }, - 'locations' => ->(obj) { return :locations, obj['locations'] }, - 'resourceLabels' => ->(obj) { return :resource_labels, obj['resourceLabels'] }, - 'labelFingerprint' => ->(obj) { return :label_fingerprint, obj['labelFingerprint'] }, - 'legacyAbac' => ->(obj) { return :legacy_abac, GoogleInSpec::Container::Property::ClusterLegacyAbac.new(obj['legacyAbac'], to_s) }, - 'networkPolicy' => ->(obj) { return :network_policy, GoogleInSpec::Container::Property::ClusterNetworkPolicy.new(obj['networkPolicy'], to_s) }, - 'defaultMaxPodsConstraint' => ->(obj) { return :default_max_pods_constraint, GoogleInSpec::Container::Property::ClusterDefaultMaxPodsConstraint.new(obj['defaultMaxPodsConstraint'], to_s) }, - 'ipAllocationPolicy' => ->(obj) { return :ip_allocation_policy, GoogleInSpec::Container::Property::ClusterIpAllocationPolicy.new(obj['ipAllocationPolicy'], to_s) }, - 'endpoint' => ->(obj) { return :endpoint, obj['endpoint'] }, - 'initialClusterVersion' => ->(obj) { return :initial_cluster_version, obj['initialClusterVersion'] }, - 'currentMasterVersion' => ->(obj) { return :current_master_version, obj['currentMasterVersion'] }, - 'currentNodeVersion' => ->(obj) { return :current_node_version, obj['currentNodeVersion'] }, - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'status' => ->(obj) { return :cluster_status, obj['status'] }, - 'statusMessage' => ->(obj) { return :status_message, obj['statusMessage'] }, - 'nodeIpv4CidrSize' => ->(obj) { return :node_ipv4_cidr_size, obj['nodeIpv4CidrSize'] }, - 'servicesIpv4Cidr' => ->(obj) { return :services_ipv4_cidr, obj['servicesIpv4Cidr'] }, - 'currentNodeCount' => ->(obj) { return :current_node_count, obj['currentNodeCount'] }, - 'expireTime' => ->(obj) { return :expire_time, parse_time_string(obj['expireTime']) }, - 'conditions' => ->(obj) { return :conditions, GoogleInSpec::Container::Property::ClusterConditionsArray.parse(obj['conditions'], to_s) }, - 'masterAuthorizedNetworksConfig' => ->(obj) { return :master_authorized_networks_config, GoogleInSpec::Container::Property::ClusterMasterAuthorizedNetworksConfig.new(obj['masterAuthorizedNetworksConfig'], to_s) }, - 'nodePools' => ->(obj) { return :node_pools, GoogleInSpec::Container::Property::ClusterNodePoolsArray.parse(obj['nodePools'], to_s) }, - 'binaryAuthorization' => ->(obj) { return :binary_authorization, GoogleInSpec::Container::Property::ClusterBinaryAuthorization.new(obj['binaryAuthorization'], to_s) }, - 'releaseChannel' => ->(obj) { return :release_channel, GoogleInSpec::Container::Property::ClusterReleaseChannel.new(obj['releaseChannel'], to_s) }, - 'shieldedNodes' => ->(obj) { return :shielded_nodes, GoogleInSpec::Container::Property::ClusterShieldedNodes.new(obj['shieldedNodes'], to_s) }, - 'networkConfig' => ->(obj) { return :network_config, GoogleInSpec::Container::Property::ClusterNetworkConfig.new(obj['networkConfig'], to_s) }, - 'enableKubernetesAlpha' => ->(obj) { return :enable_kubernetes_alpha, obj['enableKubernetesAlpha'] }, - 'location' => ->(obj) { return :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 diff --git a/libraries/google_container_node_pools.rb b/libraries/google_container_node_pools.rb index 5b8a3cf96..f10129287 100644 --- a/libraries/google_container_node_pools.rb +++ b/libraries/google_container_node_pools.rb @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :node_pool_name, obj['name'] }, - 'config' => ->(obj) { return :config, GoogleInSpec::Container::Property::NodePoolConfig.new(obj['config'], to_s) }, - 'initialNodeCount' => ->(obj) { return :initial_node_count, obj['initialNodeCount'] }, - 'status' => ->(obj) { return :node_pool_status, obj['status'] }, - 'statusMessage' => ->(obj) { return :status_message, obj['statusMessage'] }, - 'version' => ->(obj) { return :version, obj['version'] }, - 'autoscaling' => ->(obj) { return :autoscaling, GoogleInSpec::Container::Property::NodePoolAutoscaling.new(obj['autoscaling'], to_s) }, - 'management' => ->(obj) { return :management, GoogleInSpec::Container::Property::NodePoolManagement.new(obj['management'], to_s) }, - 'maxPodsConstraint' => ->(obj) { return :max_pods_constraint, GoogleInSpec::Container::Property::NodePoolMaxPodsConstraint.new(obj['maxPodsConstraint'], to_s) }, - 'conditions' => ->(obj) { return :conditions, GoogleInSpec::Container::Property::NodePoolConditionsArray.parse(obj['conditions'], to_s) }, - 'podIpv4CidrSize' => ->(obj) { return :pod_ipv4_cidr_size, obj['podIpv4CidrSize'] }, - 'cluster' => ->(obj) { return :cluster, obj['cluster'] }, - 'location' => ->(obj) { return :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 diff --git a/libraries/google_dataproc_cluster.rb b/libraries/google_dataproc_cluster.rb index fd594a470..46a363af2 100644 --- a/libraries/google_dataproc_cluster.rb +++ b/libraries/google_dataproc_cluster.rb @@ -42,6 +42,12 @@ class DataprocCluster < GcpResourceBase attr_reader :labels attr_reader :config attr_reader :region + attr_reader :project_id + attr_reader :virtual_cluster_config + attr_reader :status + attr_reader :status_history + attr_reader :cluster_uuid + attr_reader :metrics def initialize(params) super(params.merge({ use_http_transport: true })) @@ -55,6 +61,12 @@ def parse @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? diff --git a/libraries/google_dataproc_clusters.rb b/libraries/google_dataproc_clusters.rb index 338959419..f15c8a25f 100644 --- a/libraries/google_dataproc_clusters.rb +++ b/libraries/google_dataproc_clusters.rb @@ -27,6 +27,12 @@ class DataprocClusters < GcpResourceBase filter_table_config.add(:labels, field: :labels) filter_table_config.add(:configs, field: :config) filter_table_config.add(:regions, field: :region) + filter_table_config.add(:project_ids, field: :project_id) + filter_table_config.add(:virtual_cluster_configs, field: :virtual_cluster_config) + filter_table_config.add(:statuses, field: :status) + filter_table_config.add(:status_histories, field: :status_history) + filter_table_config.add(:cluster_uuids, field: :cluster_uuid) + filter_table_config.add(:metrics, field: :metrics) filter_table_config.connect(self, :table) @@ -66,10 +72,16 @@ def transform(key, value) def transformers { - 'clusterName' => ->(obj) { return :cluster_name, obj['clusterName'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'config' => ->(obj) { return :config, GoogleInSpec::Dataproc::Property::ClusterConfig.new(obj['config'], to_s) }, - 'region' => ->(obj) { return :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']] }, + '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 diff --git a/libraries/google_dlp_dts.rb b/libraries/google_dlp_dts.rb index 7fee6df1f..a5a0516a1 100644 --- a/libraries/google_dlp_dts.rb +++ b/libraries/google_dlp_dts.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'config' => ->(obj) { return :config, GoogleInSpec::DLP::Property::DTConfig.new(obj['config'], to_s) }, - 'parent' => ->(obj) { return :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 diff --git a/libraries/google_dlp_inspect_templates.rb b/libraries/google_dlp_inspect_templates.rb index 36f3de6a4..15afb2ded 100644 --- a/libraries/google_dlp_inspect_templates.rb +++ b/libraries/google_dlp_inspect_templates.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'inspectConfig' => ->(obj) { return :inspect_config, GoogleInSpec::DLP::Property::InspectTemplateInspectConfig.new(obj['inspectConfig'], to_s) }, - 'parent' => ->(obj) { return :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 diff --git a/libraries/google_dlp_job_triggers.rb b/libraries/google_dlp_job_triggers.rb index 2ce6f36e3..7e343a1ea 100644 --- a/libraries/google_dlp_job_triggers.rb +++ b/libraries/google_dlp_job_triggers.rb @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'lastRunTime' => ->(obj) { return :last_run_time, parse_time_string(obj['lastRunTime']) }, - 'status' => ->(obj) { return :status, obj['status'] }, - 'triggers' => ->(obj) { return :triggers, GoogleInSpec::DLP::Property::JobTriggerTriggersArray.parse(obj['triggers'], to_s) }, - 'inspectJob' => ->(obj) { return :inspect_job, GoogleInSpec::DLP::Property::JobTriggerInspectJob.new(obj['inspectJob'], to_s) }, - 'parent' => ->(obj) { return :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 diff --git a/libraries/google_dlp_jobs.rb b/libraries/google_dlp_jobs.rb index b66c1a2cc..1b6ed3b44 100644 --- a/libraries/google_dlp_jobs.rb +++ b/libraries/google_dlp_jobs.rb @@ -74,18 +74,18 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'type' => ->(obj) { return :type, obj['type'] }, - 'state' => ->(obj) { return :state, obj['state'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'startTime' => ->(obj) { return :start_time, obj['startTime'] }, - 'endTime' => ->(obj) { return :end_time, obj['endTime'] }, - 'jobTriggerName' => ->(obj) { return :job_trigger_name, obj['jobTriggerName'] }, - 'errors' => ->(obj) { return :errors, GoogleInSpec::DLP::Property::JobErrorsArray.parse(obj['errors'], to_s) }, - 'actDet' => ->(obj) { return :act_det, GoogleInSpec::DLP::Property::JobActDetArray.parse(obj['actDet'], to_s) }, - 'riskDetails' => ->(obj) { return :risk_details, obj['riskDetails'] }, - 'inspectDetails' => ->(obj) { return :inspect_details, obj['inspectDetails'] }, - 'parent' => ->(obj) { return :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 diff --git a/libraries/google_dlp_stored_info_types.rb b/libraries/google_dlp_stored_info_types.rb index 0b668c0ab..d6f6d3008 100644 --- a/libraries/google_dlp_stored_info_types.rb +++ b/libraries/google_dlp_stored_info_types.rb @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'regex' => ->(obj) { return :regex, GoogleInSpec::DLP::Property::StoredInfoTypeRegex.new(obj['regex'], to_s) }, - 'dictionary' => ->(obj) { return :dictionary, GoogleInSpec::DLP::Property::StoredInfoTypeDictionary.new(obj['dictionary'], to_s) }, - 'largeCustomDictionary' => ->(obj) { return :large_custom_dictionary, GoogleInSpec::DLP::Property::StoredInfoTypeLargeCustomDictionary.new(obj['largeCustomDictionary'], to_s) }, - 'parent' => ->(obj) { return :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 diff --git a/libraries/google_dns_managed_zones.rb b/libraries/google_dns_managed_zones.rb index c806d6630..cab456ed3 100644 --- a/libraries/google_dns_managed_zones.rb +++ b/libraries/google_dns_managed_zones.rb @@ -79,21 +79,21 @@ def transform(key, value) def transformers { - 'description' => ->(obj) { return :description, obj['description'] }, - 'dnsName' => ->(obj) { return :zone_dns_name, obj['dnsName'] }, - 'dnssecConfig' => ->(obj) { return :dnssec_config, GoogleInSpec::DNS::Property::ManagedZoneDnssecConfig.new(obj['dnssecConfig'], to_s) }, - 'id' => ->(obj) { return :zone_id, obj['id'] }, - 'name' => ->(obj) { return :zone_name, obj['name'] }, - 'nameServers' => ->(obj) { return :name_servers, obj['nameServers'] }, - 'nameServerSet' => ->(obj) { return :name_server_set, obj['nameServerSet'] }, - 'creationTime' => ->(obj) { return :creation_time, parse_time_string(obj['creationTime']) }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'visibility' => ->(obj) { return :visibility, obj['visibility'] }, - 'privateVisibilityConfig' => ->(obj) { return :private_visibility_config, GoogleInSpec::DNS::Property::ManagedZonePrivateVisibilityConfig.new(obj['privateVisibilityConfig'], to_s) }, - 'forwardingConfig' => ->(obj) { return :forwarding_config, GoogleInSpec::DNS::Property::ManagedZoneForwardingConfig.new(obj['forwardingConfig'], to_s) }, - 'peeringConfig' => ->(obj) { return :peering_config, GoogleInSpec::DNS::Property::ManagedZonePeeringConfig.new(obj['peeringConfig'], to_s) }, - 'reverseLookupConfig' => ->(obj) { return :reverse_lookup, obj['reverseLookupConfig'] }, - 'serviceDirectoryConfig' => ->(obj) { return :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 diff --git a/libraries/google_dns_resource_record_sets.rb b/libraries/google_dns_resource_record_sets.rb index 0df4c5914..a046571f3 100644 --- a/libraries/google_dns_resource_record_sets.rb +++ b/libraries/google_dns_resource_record_sets.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'type' => ->(obj) { return :type, obj['type'] }, - 'ttl' => ->(obj) { return :ttl, obj['ttl'] }, - 'rrdatas' => ->(obj) { return :target, obj['rrdatas'] }, - 'managed_zone' => ->(obj) { return :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 diff --git a/libraries/google_filestore_instances.rb b/libraries/google_filestore_instances.rb index 5bf42616f..79f14ff7a 100644 --- a/libraries/google_filestore_instances.rb +++ b/libraries/google_filestore_instances.rb @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'tier' => ->(obj) { return :tier, obj['tier'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'fileShares' => ->(obj) { return :file_shares, GoogleInSpec::Filestore::Property::InstanceFileSharesArray.parse(obj['fileShares'], to_s) }, - 'networks' => ->(obj) { return :networks, GoogleInSpec::Filestore::Property::InstanceNetworksArray.parse(obj['networks'], to_s) }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'zone' => ->(obj) { return :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 diff --git a/libraries/google_iam_organization_custom_roles.rb b/libraries/google_iam_organization_custom_roles.rb index e877af2b1..3fbcf3365 100644 --- a/libraries/google_iam_organization_custom_roles.rb +++ b/libraries/google_iam_organization_custom_roles.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'title' => ->(obj) { return :title, obj['title'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'includedPermissions' => ->(obj) { return :included_permissions, obj['includedPermissions'] }, - 'stage' => ->(obj) { return :stage, obj['stage'] }, - 'deleted' => ->(obj) { return :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 diff --git a/libraries/google_kms_crypto_keys.rb b/libraries/google_kms_crypto_keys.rb index 947429abf..913dccd43 100644 --- a/libraries/google_kms_crypto_keys.rb +++ b/libraries/google_kms_crypto_keys.rb @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :crypto_key_name, name_from_self_link(obj['name']) }, - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'purpose' => ->(obj) { return :purpose, obj['purpose'] }, - 'rotationPeriod' => ->(obj) { return :rotation_period, obj['rotationPeriod'] }, - 'versionTemplate' => ->(obj) { return :version_template, GoogleInSpec::KMS::Property::CryptoKeyVersionTemplate.new(obj['versionTemplate'], to_s) }, - 'nextRotationTime' => ->(obj) { return :next_rotation_time, parse_time_string(obj['nextRotationTime']) }, - 'keyRing' => ->(obj) { return :key_ring, obj['keyRing'] }, - 'skipInitialVersionCreation' => ->(obj) { return :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 diff --git a/libraries/google_kms_ekm_connections.rb b/libraries/google_kms_ekm_connections.rb index 871e1d0a4..fb8fae9bd 100644 --- a/libraries/google_kms_ekm_connections.rb +++ b/libraries/google_kms_ekm_connections.rb @@ -66,10 +66,10 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'serviceResolvers' => ->(obj) { return :service_resolvers, GoogleInSpec::KMS::Property::EkmConnectionServiceResolvers.new(obj['serviceResolvers'], to_s) }, - 'location' => ->(obj) { return :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 diff --git a/libraries/google_kms_key_ring_import_jobs.rb b/libraries/google_kms_key_ring_import_jobs.rb index 2db8a4cf5..e5bb23c4e 100644 --- a/libraries/google_kms_key_ring_import_jobs.rb +++ b/libraries/google_kms_key_ring_import_jobs.rb @@ -74,18 +74,18 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'importMethod' => ->(obj) { return :import_method, obj['importMethod'] }, - 'protectionLevel' => ->(obj) { return :protection_level, obj['protectionLevel'] }, - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'generateTime' => ->(obj) { return :generate_time, parse_time_string(obj['generateTime']) }, - 'expireTime' => ->(obj) { return :expire_time, parse_time_string(obj['expireTime']) }, - 'expireEventTime' => ->(obj) { return :expire_event_time, parse_time_string(obj['expireEventTime']) }, - 'state' => ->(obj) { return :state, obj['state'] }, - 'publicKey' => ->(obj) { return :public_key, GoogleInSpec::KMS::Property::KeyRingImportJobPublicKey.new(obj['publicKey'], to_s) }, - 'attestation' => ->(obj) { return :attestation, GoogleInSpec::KMS::Property::KeyRingImportJobAttestation.new(obj['attestation'], to_s) }, - 'keyRing' => ->(obj) { return :key_ring, obj['keyRing'] }, - 'importJobId' => ->(obj) { return :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 diff --git a/libraries/google_kms_key_rings.rb b/libraries/google_kms_key_rings.rb index d79fc10a8..2d06dbc15 100644 --- a/libraries/google_kms_key_rings.rb +++ b/libraries/google_kms_key_rings.rb @@ -67,9 +67,9 @@ def transform(key, value) def transformers { - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'name' => ->(obj) { return :key_ring_url, obj['name'] }, - 'location' => ->(obj) { return :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 diff --git a/libraries/google_kms_locations.rb b/libraries/google_kms_locations.rb index 03bec2609..eb3424ccc 100644 --- a/libraries/google_kms_locations.rb +++ b/libraries/google_kms_locations.rb @@ -66,10 +66,10 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'locationId' => ->(obj) { return :location_id, obj['locationId'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'location' => ->(obj) { return :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 diff --git a/libraries/google_logging_folder_exclusions.rb b/libraries/google_logging_folder_exclusions.rb index 700fce7dd..5383b4b40 100644 --- a/libraries/google_logging_folder_exclusions.rb +++ b/libraries/google_logging_folder_exclusions.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'folder' => ->(obj) { return :folder, obj['folder'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'filter' => ->(obj) { return :filter, obj['filter'] }, - 'disabled' => ->(obj) { return :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 diff --git a/libraries/google_logging_folder_log_sinks.rb b/libraries/google_logging_folder_log_sinks.rb index cf721b4fe..e8bc5cfee 100644 --- a/libraries/google_logging_folder_log_sinks.rb +++ b/libraries/google_logging_folder_log_sinks.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'folder' => ->(obj) { return :folder, obj['folder'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'filter' => ->(obj) { return :filter, obj['filter'] }, - 'destination' => ->(obj) { return :destination, obj['destination'] }, - 'writerIdentity' => ->(obj) { return :writer_identity, obj['writerIdentity'] }, - 'includeChildren' => ->(obj) { return :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 diff --git a/libraries/google_logging_organization_log_sinks.rb b/libraries/google_logging_organization_log_sinks.rb index 97497779c..a40a78873 100644 --- a/libraries/google_logging_organization_log_sinks.rb +++ b/libraries/google_logging_organization_log_sinks.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'organization' => ->(obj) { return :organization, obj['organization'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'filter' => ->(obj) { return :filter, obj['filter'] }, - 'destination' => ->(obj) { return :destination, obj['destination'] }, - 'writerIdentity' => ->(obj) { return :writer_identity, obj['writerIdentity'] }, - 'includeChildren' => ->(obj) { return :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 diff --git a/libraries/google_logging_project_exclusions.rb b/libraries/google_logging_project_exclusions.rb index a6d1aa9ec..e42c90229 100644 --- a/libraries/google_logging_project_exclusions.rb +++ b/libraries/google_logging_project_exclusions.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'project' => ->(obj) { return :project, obj['project'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'filter' => ->(obj) { return :filter, obj['filter'] }, - 'disabled' => ->(obj) { return :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 diff --git a/libraries/google_logging_project_sinks.rb b/libraries/google_logging_project_sinks.rb index 890e5fde2..d128962d6 100644 --- a/libraries/google_logging_project_sinks.rb +++ b/libraries/google_logging_project_sinks.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'project' => ->(obj) { return :project, obj['project'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'filter' => ->(obj) { return :filter, obj['filter'] }, - 'destination' => ->(obj) { return :destination, obj['destination'] }, - 'writerIdentity' => ->(obj) { return :writer_identity, obj['writerIdentity'] }, - 'includeChildren' => ->(obj) { return :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 diff --git a/libraries/google_memcache_instances.rb b/libraries/google_memcache_instances.rb index 44a7106c0..6d3cf948c 100644 --- a/libraries/google_memcache_instances.rb +++ b/libraries/google_memcache_instances.rb @@ -76,20 +76,20 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'memcacheNodes' => ->(obj) { return :memcache_nodes, GoogleInSpec::Memcache::Property::InstanceMemcacheNodesArray.parse(obj['memcacheNodes'], to_s) }, - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'discoveryEndpoint' => ->(obj) { return :discovery_endpoint, obj['discoveryEndpoint'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'memcacheFullVersion' => ->(obj) { return :memcache_full_version, obj['memcacheFullVersion'] }, - 'zones' => ->(obj) { return :zones, obj['zones'] }, - 'authorizedNetwork' => ->(obj) { return :authorized_network, obj['authorizedNetwork'] }, - 'nodeCount' => ->(obj) { return :node_count, obj['nodeCount'] }, - 'memcacheVersion' => ->(obj) { return :memcache_version, obj['memcacheVersion'] }, - 'nodeConfig' => ->(obj) { return :node_config, GoogleInSpec::Memcache::Property::InstanceNodeConfig.new(obj['nodeConfig'], to_s) }, - 'parameters' => ->(obj) { return :parameters, GoogleInSpec::Memcache::Property::InstanceParameters.new(obj['parameters'], to_s) }, - 'region' => ->(obj) { return :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 diff --git a/libraries/google_ml_engine_models.rb b/libraries/google_ml_engine_models.rb index a0c5e4f90..450b80210 100644 --- a/libraries/google_ml_engine_models.rb +++ b/libraries/google_ml_engine_models.rb @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'defaultVersion' => ->(obj) { return :default_version, GoogleInSpec::MLEngine::Property::ModelDefaultVersion.new(obj['defaultVersion'], to_s) }, - 'regions' => ->(obj) { return :regions, obj['regions'] }, - 'onlinePredictionLogging' => ->(obj) { return :online_prediction_logging, obj['onlinePredictionLogging'] }, - 'onlinePredictionConsoleLogging' => ->(obj) { return :online_prediction_console_logging, obj['onlinePredictionConsoleLogging'] }, - 'labels' => ->(obj) { return :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 diff --git a/libraries/google_organizations.rb b/libraries/google_organizations.rb index b85f1c798..b7bd81481 100644 --- a/libraries/google_organizations.rb +++ b/libraries/google_organizations.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'lifecycleState' => ->(obj) { return :lifecycle_state, obj['lifecycleState'] }, - 'creationTime' => ->(obj) { return :creation_time, parse_time_string(obj['creationTime']) }, - 'owner' => ->(obj) { return :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 diff --git a/libraries/google_project_alert_policies.rb b/libraries/google_project_alert_policies.rb index 366086afa..1b4f10994 100644 --- a/libraries/google_project_alert_policies.rb +++ b/libraries/google_project_alert_policies.rb @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :policy_names, obj['name'] }, - 'displayName' => ->(obj) { return :policy_display_names, obj['displayName'] }, - 'combiner' => ->(obj) { return :combiner, obj['combiner'] }, - 'creationRecord' => ->(obj) { return :creation_record, GoogleInSpec::Monitoring::Property::AlertPolicyCreationRecord.new(obj['creationRecord'], to_s) }, - 'enabled' => ->(obj) { return :policy_enabled_state, obj['enabled'] }, - 'conditions' => ->(obj) { return :conditions, GoogleInSpec::Monitoring::Property::AlertPolicyConditionsArray.parse(obj['conditions'], to_s) }, - 'notificationChannels' => ->(obj) { return :notification_channels, obj['notificationChannels'] }, - 'userLabels' => ->(obj) { return :user_labels, obj['userLabels'] }, - 'documentation' => ->(obj) { return :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 diff --git a/libraries/google_project_iam_custom_roles.rb b/libraries/google_project_iam_custom_roles.rb index cf53943ff..797d3e45e 100644 --- a/libraries/google_project_iam_custom_roles.rb +++ b/libraries/google_project_iam_custom_roles.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'title' => ->(obj) { return :title, obj['title'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'includedPermissions' => ->(obj) { return :included_permissions, obj['includedPermissions'] }, - 'stage' => ->(obj) { return :stage, obj['stage'] }, - 'deleted' => ->(obj) { return :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 diff --git a/libraries/google_project_metrics.rb b/libraries/google_project_metrics.rb index 5e850398c..4e6233e4f 100644 --- a/libraries/google_project_metrics.rb +++ b/libraries/google_project_metrics.rb @@ -71,13 +71,13 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :metric_name, obj['name'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'filter' => ->(obj) { return :metric_filter, obj['filter'] }, - 'metricDescriptor' => ->(obj) { return :metric_descriptor, GoogleInSpec::Logging::Property::MetricMetricDescriptor.new(obj['metricDescriptor'], to_s) }, - 'labelExtractors' => ->(obj) { return :label_extractors, obj['labelExtractors'] }, - 'valueExtractor' => ->(obj) { return :value_extractor, obj['valueExtractor'] }, - 'bucketOptions' => ->(obj) { return :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 diff --git a/libraries/google_project_services.rb b/libraries/google_project_services.rb index 0e90a1bf5..5e0d70983 100644 --- a/libraries/google_project_services.rb +++ b/libraries/google_project_services.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'parent' => ->(obj) { return :parent, obj['parent'] }, - 'state' => ->(obj) { return :state, obj['state'] }, - 'disableDependentServices' => ->(obj) { return :disable_dependent_services, obj['disableDependentServices'] }, - 'config' => ->(obj) { return :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 diff --git a/libraries/google_projects.rb b/libraries/google_projects.rb index ab0cc1740..686477a49 100644 --- a/libraries/google_projects.rb +++ b/libraries/google_projects.rb @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'projectNumber' => ->(obj) { return :project_number, obj['projectNumber'] }, - 'lifecycleState' => ->(obj) { return :lifecycle_state, obj['lifecycleState'] }, - 'name' => ->(obj) { return :project_name, obj['name'] }, - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'parent' => ->(obj) { return :parent, GoogleInSpec::ResourceManager::Property::ProjectParent.new(obj['parent'], to_s) }, - 'projectId' => ->(obj) { return :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 diff --git a/libraries/google_pubsub_subscriptions.rb b/libraries/google_pubsub_subscriptions.rb index c8b08152d..aacdd896b 100644 --- a/libraries/google_pubsub_subscriptions.rb +++ b/libraries/google_pubsub_subscriptions.rb @@ -74,18 +74,18 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, name_from_self_link(obj['name']) }, - 'topic' => ->(obj) { return :topic, obj['topic'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'pushConfig' => ->(obj) { return :push_config, GoogleInSpec::Pubsub::Property::SubscriptionPushConfig.new(obj['pushConfig'], to_s) }, - 'ackDeadlineSeconds' => ->(obj) { return :ack_deadline_seconds, obj['ackDeadlineSeconds'] }, - 'messageRetentionDuration' => ->(obj) { return :message_retention_duration, obj['messageRetentionDuration'] }, - 'retainAckedMessages' => ->(obj) { return :retain_acked_messages, obj['retainAckedMessages'] }, - 'expirationPolicy' => ->(obj) { return :expiration_policy, GoogleInSpec::Pubsub::Property::SubscriptionExpirationPolicy.new(obj['expirationPolicy'], to_s) }, - 'filter' => ->(obj) { return :filter, obj['filter'] }, - 'deadLetterPolicy' => ->(obj) { return :dead_letter_policy, GoogleInSpec::Pubsub::Property::SubscriptionDeadLetterPolicy.new(obj['deadLetterPolicy'], to_s) }, - 'retryPolicy' => ->(obj) { return :retry_policy, GoogleInSpec::Pubsub::Property::SubscriptionRetryPolicy.new(obj['retryPolicy'], to_s) }, - 'enableMessageOrdering' => ->(obj) { return :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 diff --git a/libraries/google_pubsub_topics.rb b/libraries/google_pubsub_topics.rb index 3c7538077..eb6c5a079 100644 --- a/libraries/google_pubsub_topics.rb +++ b/libraries/google_pubsub_topics.rb @@ -66,10 +66,10 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, name_from_self_link(obj['name']) }, - 'kmsKeyName' => ->(obj) { return :kms_key_name, obj['kmsKeyName'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'messageStoragePolicy' => ->(obj) { return :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 diff --git a/libraries/google_redis_instances.rb b/libraries/google_redis_instances.rb index 4af94057f..4ab18c3a0 100644 --- a/libraries/google_redis_instances.rb +++ b/libraries/google_redis_instances.rb @@ -83,27 +83,27 @@ def transform(key, value) def transformers { - 'alternativeLocationId' => ->(obj) { return :alternative_location_id, obj['alternativeLocationId'] }, - 'authEnabled' => ->(obj) { return :auth_enabled, obj['authEnabled'] }, - 'authorizedNetwork' => ->(obj) { return :authorized_network, obj['authorizedNetwork'] }, - 'connectMode' => ->(obj) { return :connect_mode, obj['connectMode'] }, - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'currentLocationId' => ->(obj) { return :current_location_id, obj['currentLocationId'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'host' => ->(obj) { return :host, obj['host'] }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'redisConfigs' => ->(obj) { return :redis_configs, obj['redisConfigs'] }, - 'locationId' => ->(obj) { return :location_id, obj['locationId'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'memorySizeGb' => ->(obj) { return :memory_size_gb, obj['memorySizeGb'] }, - 'port' => ->(obj) { return :port, obj['port'] }, - 'persistenceIamIdentity' => ->(obj) { return :persistence_iam_identity, obj['persistenceIamIdentity'] }, - 'redisVersion' => ->(obj) { return :redis_version, obj['redisVersion'] }, - 'reservedIpRange' => ->(obj) { return :reserved_ip_range, obj['reservedIpRange'] }, - 'tier' => ->(obj) { return :tier, obj['tier'] }, - 'transitEncryptionMode' => ->(obj) { return :transit_encryption_mode, obj['transitEncryptionMode'] }, - 'serverCaCerts' => ->(obj) { return :server_ca_certs, GoogleInSpec::Redis::Property::InstanceServerCaCertsArray.parse(obj['serverCaCerts'], to_s) }, - 'region' => ->(obj) { return :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 diff --git a/libraries/google_resourcemanager_folders.rb b/libraries/google_resourcemanager_folders.rb index ff2ffa00e..5f7666550 100644 --- a/libraries/google_resourcemanager_folders.rb +++ b/libraries/google_resourcemanager_folders.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'lifecycleState' => ->(obj) { return :lifecycle_state, obj['lifecycleState'] }, - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'parent' => ->(obj) { return :parent, obj['parent'] }, - 'displayName' => ->(obj) { return :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 diff --git a/libraries/google_runtime_config_configs.rb b/libraries/google_runtime_config_configs.rb index c634e0cce..ab252842d 100644 --- a/libraries/google_runtime_config_configs.rb +++ b/libraries/google_runtime_config_configs.rb @@ -64,8 +64,8 @@ def transform(key, value) def transformers { - 'description' => ->(obj) { return :description, obj['description'] }, - 'name' => ->(obj) { return :name, obj['name'] }, + 'description' => ->(obj) { [:description, obj['description']] }, + 'name' => ->(obj) { [:name, obj['name']] }, } end diff --git a/libraries/google_runtime_config_variables.rb b/libraries/google_runtime_config_variables.rb index a985507b3..9967aaa14 100644 --- a/libraries/google_runtime_config_variables.rb +++ b/libraries/google_runtime_config_variables.rb @@ -66,10 +66,10 @@ def transform(key, value) def transformers { - 'value' => ->(obj) { return :value, obj['value'] }, - 'text' => ->(obj) { return :text, obj['text'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'config' => ->(obj) { return :config, obj['config'] }, + 'value' => ->(obj) { [:value, obj['value']] }, + 'text' => ->(obj) { [:text, obj['text']] }, + 'name' => ->(obj) { [:name, obj['name']] }, + 'config' => ->(obj) { [:config, obj['config']] }, } end diff --git a/libraries/google_service_account_keys.rb b/libraries/google_service_account_keys.rb index 27eb9944f..facedd7f0 100644 --- a/libraries/google_service_account_keys.rb +++ b/libraries/google_service_account_keys.rb @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :key_name, obj['name'] }, - 'privateKeyType' => ->(obj) { return :private_key_type, obj['privateKeyType'] }, - 'keyAlgorithm' => ->(obj) { return :key_algorithm, obj['keyAlgorithm'] }, - 'privateKeyData' => ->(obj) { return :private_key_data, obj['privateKeyData'] }, - 'publicKeyData' => ->(obj) { return :public_key_data, obj['publicKeyData'] }, - 'validAfterTime' => ->(obj) { return :valid_after_time, parse_time_string(obj['validAfterTime']) }, - 'validBeforeTime' => ->(obj) { return :valid_before_time, parse_time_string(obj['validBeforeTime']) }, - 'keyType' => ->(obj) { return :key_type, obj['keyType'] }, - 'serviceAccount' => ->(obj) { return :service_account, obj['serviceAccount'] }, - 'path' => ->(obj) { return :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 diff --git a/libraries/google_service_accounts.rb b/libraries/google_service_accounts.rb index 54e24734c..b793a4e15 100644 --- a/libraries/google_service_accounts.rb +++ b/libraries/google_service_accounts.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :service_account_name, obj['name'] }, - 'projectId' => ->(obj) { return :project_id, obj['projectId'] }, - 'uniqueId' => ->(obj) { return :service_account_id, obj['uniqueId'] }, - 'email' => ->(obj) { return :service_account_email, obj['email'] }, - 'displayName' => ->(obj) { return :service_account_display_name, obj['displayName'] }, - 'oauth2ClientId' => ->(obj) { return :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 diff --git a/libraries/google_sourcerepo_repositories.rb b/libraries/google_sourcerepo_repositories.rb index 3fe360ecb..40c3b4166 100644 --- a/libraries/google_sourcerepo_repositories.rb +++ b/libraries/google_sourcerepo_repositories.rb @@ -66,10 +66,10 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'url' => ->(obj) { return :url, obj['url'] }, - 'size' => ->(obj) { return :size, obj['size'] }, - 'pubsubConfigs' => ->(obj) { return :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 diff --git a/libraries/google_spanner_databases.rb b/libraries/google_spanner_databases.rb index 58a3874b2..d00ebe64d 100644 --- a/libraries/google_spanner_databases.rb +++ b/libraries/google_spanner_databases.rb @@ -64,8 +64,8 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'instance' => ->(obj) { return :instance, obj['instance'] }, + 'name' => ->(obj) { [:name, obj['name']] }, + 'instance' => ->(obj) { [:instance, obj['instance']] }, } end diff --git a/libraries/google_spanner_instances.rb b/libraries/google_spanner_instances.rb index f80abb030..dfb0e67b7 100644 --- a/libraries/google_spanner_instances.rb +++ b/libraries/google_spanner_instances.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'config' => ->(obj) { return :config, obj['config'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'nodeCount' => ->(obj) { return :node_count, obj['nodeCount'] }, - 'labels' => ->(obj) { return :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 diff --git a/libraries/google_sql_database_instances.rb b/libraries/google_sql_database_instances.rb index 0764801b0..59f9c49be 100644 --- a/libraries/google_sql_database_instances.rb +++ b/libraries/google_sql_database_instances.rb @@ -81,25 +81,25 @@ def transform(key, value) def transformers { - 'backendType' => ->(obj) { return :backend_type, obj['backendType'] }, - 'kind' => ->(obj) { return :kind, obj['kind'] }, - 'connectionName' => ->(obj) { return :connection_name, obj['connectionName'] }, - 'databaseVersion' => ->(obj) { return :instance_version, obj['databaseVersion'] }, - 'failoverReplica' => ->(obj) { return :failover_replica, GoogleInSpec::SQL::Property::DatabaseInstanceFailoverReplica.new(obj['failoverReplica'], to_s) }, - 'instanceType' => ->(obj) { return :instance_type, obj['instanceType'] }, - 'ipAddresses' => ->(obj) { return :ip_addresses, GoogleInSpec::SQL::Property::DatabaseInstanceIpAddressesArray.parse(obj['ipAddresses'], to_s) }, - 'ipv6Address' => ->(obj) { return :ipv6_address, obj['ipv6Address'] }, - 'masterInstanceName' => ->(obj) { return :master_instance_name, obj['masterInstanceName'] }, - 'maxDiskSize' => ->(obj) { return :max_disk_size, obj['maxDiskSize'] }, - 'name' => ->(obj) { return :instance_name, obj['name'] }, - 'region' => ->(obj) { return :instance_region, obj['region'] }, - 'replicaConfiguration' => ->(obj) { return :replica_configuration, GoogleInSpec::SQL::Property::DatabaseInstanceReplicaConfiguration.new(obj['replicaConfiguration'], to_s) }, - 'settings' => ->(obj) { return :settings, GoogleInSpec::SQL::Property::DatabaseInstanceSettings.new(obj['settings'], to_s) }, - 'gceZone' => ->(obj) { return :instance_zone, obj['gceZone'] }, - 'state' => ->(obj) { return :instance_state, obj['state'] }, - 'diskEncryptionConfiguration' => ->(obj) { return :disk_encryption_configuration, GoogleInSpec::SQL::Property::DatabaseInstanceDiskEncryptionConfiguration.new(obj['diskEncryptionConfiguration'], to_s) }, - 'diskEncryptionStatus' => ->(obj) { return :disk_encryption_status, GoogleInSpec::SQL::Property::DatabaseInstanceDiskEncryptionStatus.new(obj['diskEncryptionStatus'], to_s) }, - 'serverCaCert' => ->(obj) { return :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 diff --git a/libraries/google_sql_databases.rb b/libraries/google_sql_databases.rb index 0d7b3dfae..35f758179 100644 --- a/libraries/google_sql_databases.rb +++ b/libraries/google_sql_databases.rb @@ -66,10 +66,10 @@ def transform(key, value) def transformers { - 'charset' => ->(obj) { return :charset, obj['charset'] }, - 'collation' => ->(obj) { return :collation, obj['collation'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'instance' => ->(obj) { return :instance, obj['instance'] }, + 'charset' => ->(obj) { [:charset, obj['charset']] }, + 'collation' => ->(obj) { [:collation, obj['collation']] }, + 'name' => ->(obj) { [:name, obj['name']] }, + 'instance' => ->(obj) { [:instance, obj['instance']] }, } end diff --git a/libraries/google_sql_flags.rb b/libraries/google_sql_flags.rb index 5cd59215c..e831bc765 100644 --- a/libraries/google_sql_flags.rb +++ b/libraries/google_sql_flags.rb @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'allowedStringValues' => ->(obj) { return :allowed_string_values, obj['allowedStringValues'] }, - 'appliesTo' => ->(obj) { return :applies_to, obj['appliesTo'] }, - 'maxValue' => ->(obj) { return :max_value, obj['maxValue'] }, - 'minValue' => ->(obj) { return :min_value, obj['minValue'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'requiresRestart' => ->(obj) { return :requires_restart, obj['requiresRestart'] }, - 'type' => ->(obj) { return :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 diff --git a/libraries/google_sql_operations.rb b/libraries/google_sql_operations.rb index fcab5609a..bdc954076 100644 --- a/libraries/google_sql_operations.rb +++ b/libraries/google_sql_operations.rb @@ -67,11 +67,11 @@ def transform(key, value) def transformers { - 'user' => ->(obj) { return :user, obj['user'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'status' => ->(obj) { return :status, obj['status'] }, - 'operationType' => ->(obj) { return :operation_type, obj['operationType'] }, - 'instance' => ->(obj) { return :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 diff --git a/libraries/google_sql_ssl_certs.rb b/libraries/google_sql_ssl_certs.rb index f1d4bf2c0..9c247dc0b 100644 --- a/libraries/google_sql_ssl_certs.rb +++ b/libraries/google_sql_ssl_certs.rb @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'cert' => ->(obj) { return :cert, obj['cert'] }, - 'certSerialNumber' => ->(obj) { return :cert_serial_number, obj['certSerialNumber'] }, - 'commonName' => ->(obj) { return :common_name, obj['commonName'] }, - 'createTime' => ->(obj) { return :create_time, parse_time_string(obj['createTime']) }, - 'expirationTime' => ->(obj) { return :expiration_time, parse_time_string(obj['expirationTime']) }, - 'instance' => ->(obj) { return :instance, obj['instance'] }, - 'sha1Fingerprint' => ->(obj) { return :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 diff --git a/libraries/google_sql_users.rb b/libraries/google_sql_users.rb index 71ddbdb2d..6d7af9a23 100644 --- a/libraries/google_sql_users.rb +++ b/libraries/google_sql_users.rb @@ -66,10 +66,10 @@ def transform(key, value) def transformers { - 'host' => ->(obj) { return :user_host, obj['host'] }, - 'name' => ->(obj) { return :user_name, obj['name'] }, - 'instance' => ->(obj) { return :user_instance, obj['instance'] }, - 'password' => ->(obj) { return :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 diff --git a/libraries/google_storage_bucket_objects.rb b/libraries/google_storage_bucket_objects.rb index 34fa26659..b652cf1a5 100644 --- a/libraries/google_storage_bucket_objects.rb +++ b/libraries/google_storage_bucket_objects.rb @@ -79,23 +79,23 @@ def transform(key, value) def transformers { - 'bucket' => ->(obj) { return :object_bucket, obj['bucket'] }, - 'object' => ->(obj) { return :object, obj['object'] }, - 'contentType' => ->(obj) { return :content_type, obj['contentType'] }, - 'crc32c' => ->(obj) { return :crc32c, obj['crc32c'] }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'generation' => ->(obj) { return :generation, obj['generation'] }, - 'id' => ->(obj) { return :id, obj['id'] }, - 'md5Hash' => ->(obj) { return :md5_hash, obj['md5Hash'] }, - 'mediaLink' => ->(obj) { return :media_link, obj['mediaLink'] }, - 'metageneration' => ->(obj) { return :metageneration, obj['metageneration'] }, - 'name' => ->(obj) { return :object_name, obj['name'] }, - 'size' => ->(obj) { return :size, obj['size'] }, - 'storageClass' => ->(obj) { return :storage_class, obj['storageClass'] }, - 'timeCreated' => ->(obj) { return :object_created_times, parse_time_string(obj['timeCreated']) }, - 'timeDeleted' => ->(obj) { return :time_deleted, parse_time_string(obj['timeDeleted']) }, - 'timeStorageClassUpdated' => ->(obj) { return :time_storage_class_updated, parse_time_string(obj['timeStorageClassUpdated']) }, - 'updated' => ->(obj) { return :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 diff --git a/libraries/google_storage_buckets.rb b/libraries/google_storage_buckets.rb index 5eb9dc9ad..f03f4e8e2 100644 --- a/libraries/google_storage_buckets.rb +++ b/libraries/google_storage_buckets.rb @@ -84,28 +84,28 @@ def transform(key, value) def transformers { - 'acl' => ->(obj) { return :acl, GoogleInSpec::Storage::Property::BucketAclArray.parse(obj['acl'], to_s) }, - 'cors' => ->(obj) { return :cors, GoogleInSpec::Storage::Property::BucketCorsArray.parse(obj['cors'], to_s) }, - 'defaultEventBasedHold' => ->(obj) { return :default_event_based_hold, obj['defaultEventBasedHold'] }, - 'defaultObjectAcl' => ->(obj) { return :default_object_acl, GoogleInSpec::Storage::Property::BucketDefaultObjectAclArray.parse(obj['defaultObjectAcl'], to_s) }, - 'id' => ->(obj) { return :bucket_id, obj['id'] }, - 'lifecycle' => ->(obj) { return :lifecycle, GoogleInSpec::Storage::Property::BucketLifecycle.new(obj['lifecycle'], to_s) }, - 'location' => ->(obj) { return :bucket_location, obj['location'] }, - 'logging' => ->(obj) { return :logging, GoogleInSpec::Storage::Property::BucketLogging.new(obj['logging'], to_s) }, - 'metageneration' => ->(obj) { return :metageneration, obj['metageneration'] }, - 'name' => ->(obj) { return :bucket_name, obj['name'] }, - 'owner' => ->(obj) { return :owner, GoogleInSpec::Storage::Property::BucketOwner.new(obj['owner'], to_s) }, - 'projectNumber' => ->(obj) { return :bucket_project_number, obj['projectNumber'] }, - 'storageClass' => ->(obj) { return :storage_class, obj['storageClass'] }, - 'timeCreated' => ->(obj) { return :time_created, parse_time_string(obj['timeCreated']) }, - 'updated' => ->(obj) { return :updated, parse_time_string(obj['updated']) }, - 'versioning' => ->(obj) { return :versioning, GoogleInSpec::Storage::Property::BucketVersioning.new(obj['versioning'], to_s) }, - 'website' => ->(obj) { return :website, GoogleInSpec::Storage::Property::BucketWebsite.new(obj['website'], to_s) }, - 'labels' => ->(obj) { return :labels, obj['labels'] }, - 'encryption' => ->(obj) { return :encryption, GoogleInSpec::Storage::Property::BucketEncryption.new(obj['encryption'], to_s) }, - 'retentionPolicy' => ->(obj) { return :retention_policy, GoogleInSpec::Storage::Property::BucketRetentionPolicy.new(obj['retentionPolicy'], to_s) }, - 'project' => ->(obj) { return :project, obj['project'] }, - 'predefinedDefaultObjectAcl' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_batch_prediction_jobs.rb b/libraries/google_vertex_ai_batch_prediction_jobs.rb index af413a962..25e16cb1b 100644 --- a/libraries/google_vertex_ai_batch_prediction_jobs.rb +++ b/libraries/google_vertex_ai_batch_prediction_jobs.rb @@ -89,33 +89,33 @@ def transform(key, value) def transformers { - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'modelParameters' => ->(obj) { return :model_parameters, obj['modelParameters'] }, - 'instanceConfig' => ->(obj) { return :instance_config, GoogleInSpec::VertexAI::Property::BatchPredictionJobInstanceConfig.new(obj['instanceConfig'], to_s) }, - 'modelVersionId' => ->(obj) { return :model_version_id, obj['modelVersionId'] }, - 'dedicatedResources' => ->(obj) { return :dedicated_resources, GoogleInSpec::VertexAI::Property::BatchPredictionJobDedicatedResources.new(obj['dedicatedResources'], to_s) }, - 'outputInfo' => ->(obj) { return :output_info, GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputInfo.new(obj['outputInfo'], to_s) }, - 'disableContainerLogging' => ->(obj) { return :disable_container_logging, obj['disableContainerLogging'] }, - 'explanationSpec' => ->(obj) { return :explanation_spec, GoogleInSpec::VertexAI::Property::BatchPredictionJobExplanationSpec.new(obj['explanationSpec'], to_s) }, - 'endTime' => ->(obj) { return :end_time, obj['endTime'] }, - 'generateExplanation' => ->(obj) { return :generate_explanation, obj['generateExplanation'] }, - 'resourcesConsumed' => ->(obj) { return :resources_consumed, GoogleInSpec::VertexAI::Property::BatchPredictionJobResourcesConsumed.new(obj['resourcesConsumed'], to_s) }, - 'error' => ->(obj) { return :error, GoogleInSpec::VertexAI::Property::BatchPredictionJobError.new(obj['error'], to_s) }, - 'inputConfig' => ->(obj) { return :input_config, GoogleInSpec::VertexAI::Property::BatchPredictionJobInputConfig.new(obj['inputConfig'], to_s) }, - 'unmanagedContainerModel' => ->(obj) { return :unmanaged_container_model, GoogleInSpec::VertexAI::Property::BatchPredictionJobUnmanagedContainerModel.new(obj['unmanagedContainerModel'], to_s) }, - 'completionStats' => ->(obj) { return :completion_stats, GoogleInSpec::VertexAI::Property::BatchPredictionJobCompletionStats.new(obj['completionStats'], to_s) }, - 'startTime' => ->(obj) { return :start_time, obj['startTime'] }, - 'manualBatchTuningParameters' => ->(obj) { return :manual_batch_tuning_parameters, GoogleInSpec::VertexAI::Property::BatchPredictionJobManualBatchTuningParameters.new(obj['manualBatchTuningParameters'], to_s) }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::BatchPredictionJobLabels.new(obj['labels'], to_s) }, - 'state' => ->(obj) { return :state, obj['state'] }, - 'encryptionSpec' => ->(obj) { return :encryption_spec, GoogleInSpec::VertexAI::Property::BatchPredictionJobEncryptionSpec.new(obj['encryptionSpec'], to_s) }, - 'partialFailures' => ->(obj) { return :partial_failures, GoogleInSpec::VertexAI::Property::BatchPredictionJobPartialFailuresArray.parse(obj['partialFailures'], to_s) }, - 'model' => ->(obj) { return :model, obj['model'] }, - 'outputConfig' => ->(obj) { return :output_config, GoogleInSpec::VertexAI::Property::BatchPredictionJobOutputConfig.new(obj['outputConfig'], to_s) }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'serviceAccount' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_custom_jobs.rb b/libraries/google_vertex_ai_custom_jobs.rb index d2bdb03b5..09ead2252 100644 --- a/libraries/google_vertex_ai_custom_jobs.rb +++ b/libraries/google_vertex_ai_custom_jobs.rb @@ -74,18 +74,18 @@ def transform(key, value) def transformers { - 'error' => ->(obj) { return :error, GoogleInSpec::VertexAI::Property::CustomJobError.new(obj['error'], to_s) }, - 'webAccessUris' => ->(obj) { return :web_access_uris, GoogleInSpec::VertexAI::Property::CustomJobWebAccessUris.new(obj['webAccessUris'], to_s) }, - 'jobSpec' => ->(obj) { return :job_spec, GoogleInSpec::VertexAI::Property::CustomJobJobSpec.new(obj['jobSpec'], to_s) }, - 'startTime' => ->(obj) { return :start_time, obj['startTime'] }, - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::CustomJobLabels.new(obj['labels'], to_s) }, - 'encryptionSpec' => ->(obj) { return :encryption_spec, GoogleInSpec::VertexAI::Property::CustomJobEncryptionSpec.new(obj['encryptionSpec'], to_s) }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'endTime' => ->(obj) { return :end_time, obj['endTime'] }, - 'state' => ->(obj) { return :state, obj['state'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'name' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_dataset_data_item_annotations.rb b/libraries/google_vertex_ai_dataset_data_item_annotations.rb index e40ec5875..1312a0843 100644 --- a/libraries/google_vertex_ai_dataset_data_item_annotations.rb +++ b/libraries/google_vertex_ai_dataset_data_item_annotations.rb @@ -69,14 +69,14 @@ def transform(key, value) def transformers { - 'payloadSchemaUri' => ->(obj) { return :payload_schema_uri, obj['payloadSchemaUri'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::DatasetDataItemAnnotationLabels.new(obj['labels'], to_s) }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'payload' => ->(obj) { return :payload, obj['payload'] }, - 'annotationSource' => ->(obj) { return :annotation_source, obj['annotationSource'] }, - 'name' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_datasets.rb b/libraries/google_vertex_ai_datasets.rb index 97b383af7..6fa0a9235 100644 --- a/libraries/google_vertex_ai_datasets.rb +++ b/libraries/google_vertex_ai_datasets.rb @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'savedQueries' => ->(obj) { return :saved_queries, GoogleInSpec::VertexAI::Property::DatasetSavedQueriesArray.parse(obj['savedQueries'], to_s) }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'encryptionSpec' => ->(obj) { return :encryption_spec, GoogleInSpec::VertexAI::Property::DatasetEncryptionSpec.new(obj['encryptionSpec'], to_s) }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'metadata' => ->(obj) { return :metadata, obj['metadata'] }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::DatasetLabels.new(obj['labels'], to_s) }, - 'metadataSchemaUri' => ->(obj) { return :metadata_schema_uri, obj['metadataSchemaUri'] }, - 'metadataArtifact' => ->(obj) { return :metadata_artifact, obj['metadataArtifact'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'dataItemCount' => ->(obj) { return :data_item_count, obj['dataItemCount'] }, - 'displayName' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_datasets_data_items.rb b/libraries/google_vertex_ai_datasets_data_items.rb index 9f17ff850..ad294ac4f 100644 --- a/libraries/google_vertex_ai_datasets_data_items.rb +++ b/libraries/google_vertex_ai_datasets_data_items.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'payload' => ->(obj) { return :payload, obj['payload'] }, - 'labels' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_datasets_saved_queries.rb b/libraries/google_vertex_ai_datasets_saved_queries.rb index bdd6146b3..f22b3fd2e 100644 --- a/libraries/google_vertex_ai_datasets_saved_queries.rb +++ b/libraries/google_vertex_ai_datasets_saved_queries.rb @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'annotationSpecCount' => ->(obj) { return :annotation_spec_count, obj['annotationSpecCount'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'supportAutomlTraining' => ->(obj) { return :support_automl_training, obj['supportAutomlTraining'] }, - 'metadata' => ->(obj) { return :metadata, obj['metadata'] }, - 'problemType' => ->(obj) { return :problem_type, obj['problemType'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'annotationFilter' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_endpoints.rb b/libraries/google_vertex_ai_endpoints.rb index c31c6b91a..189af0409 100644 --- a/libraries/google_vertex_ai_endpoints.rb +++ b/libraries/google_vertex_ai_endpoints.rb @@ -76,20 +76,20 @@ def transform(key, value) def transformers { - 'encryptionSpec' => ->(obj) { return :encryption_spec, GoogleInSpec::VertexAI::Property::EndpointEncryptionSpec.new(obj['encryptionSpec'], to_s) }, - 'enablePrivateServiceConnect' => ->(obj) { return :enable_private_service_connect, obj['enablePrivateServiceConnect'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'modelDeploymentMonitoringJob' => ->(obj) { return :model_deployment_monitoring_job, obj['modelDeploymentMonitoringJob'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'deployedModels' => ->(obj) { return :deployed_models, GoogleInSpec::VertexAI::Property::EndpointDeployedModelsArray.parse(obj['deployedModels'], to_s) }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'trafficSplit' => ->(obj) { return :traffic_split, GoogleInSpec::VertexAI::Property::EndpointTrafficSplit.new(obj['trafficSplit'], to_s) }, - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::EndpointLabels.new(obj['labels'], to_s) }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'predictRequestResponseLoggingConfig' => ->(obj) { return :predict_request_response_logging_config, GoogleInSpec::VertexAI::Property::EndpointPredictRequestResponseLoggingConfig.new(obj['predictRequestResponseLoggingConfig'], to_s) }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'name' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_featurestore_entity_type_features.rb b/libraries/google_vertex_ai_featurestore_entity_type_features.rb index 043e99f5c..42869d217 100644 --- a/libraries/google_vertex_ai_featurestore_entity_type_features.rb +++ b/libraries/google_vertex_ai_featurestore_entity_type_features.rb @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'description' => ->(obj) { return :description, obj['description'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'monitoringStatsAnomalies' => ->(obj) { return :monitoring_stats_anomalies, obj['monitoringStatsAnomalies'] }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::FeaturestoreEntityTypeFeatureLabels.new(obj['labels'], to_s) }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'disableMonitoring' => ->(obj) { return :disable_monitoring, obj['disableMonitoring'] }, - 'valueType' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_featurestores.rb b/libraries/google_vertex_ai_featurestores.rb index c9c555ffd..fea7df564 100644 --- a/libraries/google_vertex_ai_featurestores.rb +++ b/libraries/google_vertex_ai_featurestores.rb @@ -71,15 +71,15 @@ def transform(key, value) def transformers { - 'state' => ->(obj) { return :state, obj['state'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'onlineStorageTtlDays' => ->(obj) { return :online_storage_ttl_days, obj['onlineStorageTtlDays'] }, - 'encryptionSpec' => ->(obj) { return :encryption_spec, GoogleInSpec::VertexAI::Property::FeaturestoreEncryptionSpec.new(obj['encryptionSpec'], to_s) }, - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::FeaturestoreLabels.new(obj['labels'], to_s) }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'onlineServingConfig' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_featurestores_entity_types.rb b/libraries/google_vertex_ai_featurestores_entity_types.rb index 044f563fe..e8cdade42 100644 --- a/libraries/google_vertex_ai_featurestores_entity_types.rb +++ b/libraries/google_vertex_ai_featurestores_entity_types.rb @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeLabels.new(obj['labels'], to_s) }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'monitoringConfig' => ->(obj) { return :monitoring_config, GoogleInSpec::VertexAI::Property::FeaturestoresEntityTypeMonitoringConfig.new(obj['monitoringConfig'], to_s) }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'offlineStorageTtlDays' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_hyperparameter_tuning_jobs.rb b/libraries/google_vertex_ai_hyperparameter_tuning_jobs.rb index 3aef9e395..63531262c 100644 --- a/libraries/google_vertex_ai_hyperparameter_tuning_jobs.rb +++ b/libraries/google_vertex_ai_hyperparameter_tuning_jobs.rb @@ -78,22 +78,22 @@ def transform(key, value) def transformers { - 'studySpec' => ->(obj) { return :study_spec, obj['studySpec'] }, - 'trials' => ->(obj) { return :trials, obj['trials'] }, - 'state' => ->(obj) { return :state, obj['state'] }, - 'maxFailedTrialCount' => ->(obj) { return :max_failed_trial_count, obj['maxFailedTrialCount'] }, - 'encryptionSpec' => ->(obj) { return :encryption_spec, obj['encryptionSpec'] }, - 'error' => ->(obj) { return :error, obj['error'] }, - 'endTime' => ->(obj) { return :end_time, obj['endTime'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'startTime' => ->(obj) { return :start_time, obj['startTime'] }, - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::HyperparameterTuningJobLabels.new(obj['labels'], to_s) }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'parallelTrialCount' => ->(obj) { return :parallel_trial_count, obj['parallelTrialCount'] }, - 'trialJobSpec' => ->(obj) { return :trial_job_spec, obj['trialJobSpec'] }, - 'maxTrialCount' => ->(obj) { return :max_trial_count, obj['maxTrialCount'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'name' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_index_endpoints.rb b/libraries/google_vertex_ai_index_endpoints.rb index 0832a49fd..cb13ae6e6 100644 --- a/libraries/google_vertex_ai_index_endpoints.rb +++ b/libraries/google_vertex_ai_index_endpoints.rb @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'deployedIndexes' => ->(obj) { return :deployed_indexes, GoogleInSpec::VertexAI::Property::IndexEndpointDeployedIndexesArray.parse(obj['deployedIndexes'], to_s) }, - 'privateServiceConnectConfig' => ->(obj) { return :private_service_connect_config, GoogleInSpec::VertexAI::Property::IndexEndpointPrivateServiceConnectConfig.new(obj['privateServiceConnectConfig'], to_s) }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'publicEndpointEnabled' => ->(obj) { return :public_endpoint_enabled, obj['publicEndpointEnabled'] }, - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::IndexEndpointLabels.new(obj['labels'], to_s) }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'publicEndpointDomainName' => ->(obj) { return :public_endpoint_domain_name, obj['publicEndpointDomainName'] }, - 'enablePrivateServiceConnect' => ->(obj) { return :enable_private_service_connect, obj['enablePrivateServiceConnect'] }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'description' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_indices.rb b/libraries/google_vertex_ai_indices.rb index 1c9e2504e..279844818 100644 --- a/libraries/google_vertex_ai_indices.rb +++ b/libraries/google_vertex_ai_indices.rb @@ -73,18 +73,18 @@ def transform(key, value) def transformers { - 'description' => ->(obj) { return :description, obj['description'] }, - 'metadata' => ->(obj) { return :metadata, obj['metadata'] }, - 'indexStats' => ->(obj) { return :index_stats, obj['indexStats'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'deployedIndexes' => ->(obj) { return :deployed_indexes, obj['deployedIndexes'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'metadataSchemaUri' => ->(obj) { return :metadata_schema_uri, obj['metadataSchemaUri'] }, - 'indexUpdateMethod' => ->(obj) { return :index_update_method, obj['indexUpdateMethod'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'labels' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_metadata_stores.rb b/libraries/google_vertex_ai_metadata_stores.rb index b4fdb2843..201ffc1ff 100644 --- a/libraries/google_vertex_ai_metadata_stores.rb +++ b/libraries/google_vertex_ai_metadata_stores.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'description' => ->(obj) { return :description, obj['description'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'encryptionSpec' => ->(obj) { return :encryption_spec, GoogleInSpec::VertexAI::Property::MetadataStoreEncryptionSpec.new(obj['encryptionSpec'], to_s) }, - 'state' => ->(obj) { return :state, GoogleInSpec::VertexAI::Property::MetadataStoreState.new(obj['state'], to_s) }, - 'name' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_metadata_stores_artifacts.rb b/libraries/google_vertex_ai_metadata_stores_artifacts.rb index 307e0ff7f..20426c146 100644 --- a/libraries/google_vertex_ai_metadata_stores_artifacts.rb +++ b/libraries/google_vertex_ai_metadata_stores_artifacts.rb @@ -73,18 +73,18 @@ def transform(key, value) def transformers { - 'schemaVersion' => ->(obj) { return :schema_version, obj['schemaVersion'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'state' => ->(obj) { return :state, obj['state'] }, - 'metadata' => ->(obj) { return :metadata, GoogleInSpec::VertexAI::Property::MetadataStoresArtifactMetadata.new(obj['metadata'], to_s) }, - 'uri' => ->(obj) { return :uri, obj['uri'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'schemaTitle' => ->(obj) { return :schema_title, obj['schemaTitle'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'labels' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_metadata_stores_contexts.rb b/libraries/google_vertex_ai_metadata_stores_contexts.rb index 348dd1e3c..a842335c6 100644 --- a/libraries/google_vertex_ai_metadata_stores_contexts.rb +++ b/libraries/google_vertex_ai_metadata_stores_contexts.rb @@ -72,17 +72,17 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'schemaTitle' => ->(obj) { return :schema_title, obj['schemaTitle'] }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'schemaVersion' => ->(obj) { return :schema_version, obj['schemaVersion'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::MetadataStoresContextLabels.new(obj['labels'], to_s) }, - 'metadata' => ->(obj) { return :metadata, GoogleInSpec::VertexAI::Property::MetadataStoresContextMetadata.new(obj['metadata'], to_s) }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'parentContexts' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_metadata_stores_executions.rb b/libraries/google_vertex_ai_metadata_stores_executions.rb index 4a40f784b..f2ca8fbbc 100644 --- a/libraries/google_vertex_ai_metadata_stores_executions.rb +++ b/libraries/google_vertex_ai_metadata_stores_executions.rb @@ -72,17 +72,17 @@ def transform(key, value) def transformers { - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::MetadataStoresExecutionLabels.new(obj['labels'], to_s) }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'schemaVersion' => ->(obj) { return :schema_version, obj['schemaVersion'] }, - 'state' => ->(obj) { return :state, obj['state'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'metadata' => ->(obj) { return :metadata, GoogleInSpec::VertexAI::Property::MetadataStoresExecutionMetadata.new(obj['metadata'], to_s) }, - 'schemaTitle' => ->(obj) { return :schema_title, obj['schemaTitle'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'updateTime' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_metadata_stores_metadata_schemas.rb b/libraries/google_vertex_ai_metadata_stores_metadata_schemas.rb index 88ab5d9b2..b68204daa 100644 --- a/libraries/google_vertex_ai_metadata_stores_metadata_schemas.rb +++ b/libraries/google_vertex_ai_metadata_stores_metadata_schemas.rb @@ -67,12 +67,12 @@ def transform(key, value) def transformers { - 'schemaType' => ->(obj) { return :schema_type, obj['schemaType'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'schemaVersion' => ->(obj) { return :schema_version, obj['schemaVersion'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'schema' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_model_deployment_monitoring_jobs.rb b/libraries/google_vertex_ai_model_deployment_monitoring_jobs.rb index ec5ef7d02..55055686c 100644 --- a/libraries/google_vertex_ai_model_deployment_monitoring_jobs.rb +++ b/libraries/google_vertex_ai_model_deployment_monitoring_jobs.rb @@ -85,29 +85,29 @@ def transform(key, value) def transformers { - 'modelDeploymentMonitoringObjectiveConfigs' => ->(obj) { return :model_deployment_monitoring_objective_configs, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringObjectiveConfigsArray.parse(obj['modelDeploymentMonitoringObjectiveConfigs'], to_s) }, - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLabels.new(obj['labels'], to_s) }, - 'state' => ->(obj) { return :state, obj['state'] }, - 'analysisInstanceSchemaUri' => ->(obj) { return :analysis_instance_schema_uri, obj['analysisInstanceSchemaUri'] }, - 'enableMonitoringPipelineLogs' => ->(obj) { return :enable_monitoring_pipeline_logs, obj['enableMonitoringPipelineLogs'] }, - 'endpoint' => ->(obj) { return :endpoint, obj['endpoint'] }, - 'loggingSamplingStrategy' => ->(obj) { return :logging_sampling_strategy, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLoggingSamplingStrategy.new(obj['loggingSamplingStrategy'], to_s) }, - 'bigqueryTables' => ->(obj) { return :bigquery_tables, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobBigqueryTablesArray.parse(obj['bigqueryTables'], to_s) }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'scheduleState' => ->(obj) { return :schedule_state, obj['scheduleState'] }, - 'error' => ->(obj) { return :error, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobError.new(obj['error'], to_s) }, - 'modelMonitoringAlertConfig' => ->(obj) { return :model_monitoring_alert_config, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelMonitoringAlertConfig.new(obj['modelMonitoringAlertConfig'], to_s) }, - 'latestMonitoringPipelineMetadata' => ->(obj) { return :latest_monitoring_pipeline_metadata, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobLatestMonitoringPipelineMetadata.new(obj['latestMonitoringPipelineMetadata'], to_s) }, - 'samplePredictInstance' => ->(obj) { return :sample_predict_instance, obj['samplePredictInstance'] }, - 'predictInstanceSchemaUri' => ->(obj) { return :predict_instance_schema_uri, obj['predictInstanceSchemaUri'] }, - 'nextScheduleTime' => ->(obj) { return :next_schedule_time, obj['nextScheduleTime'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'logTtl' => ->(obj) { return :log_ttl, obj['logTtl'] }, - 'statsAnomaliesBaseDirectory' => ->(obj) { return :stats_anomalies_base_directory, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobStatsAnomaliesBaseDirectory.new(obj['statsAnomaliesBaseDirectory'], to_s) }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'modelDeploymentMonitoringScheduleConfig' => ->(obj) { return :model_deployment_monitoring_schedule_config, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobModelDeploymentMonitoringScheduleConfig.new(obj['modelDeploymentMonitoringScheduleConfig'], to_s) }, - 'encryptionSpec' => ->(obj) { return :encryption_spec, GoogleInSpec::VertexAI::Property::ModelDeploymentMonitoringJobEncryptionSpec.new(obj['encryptionSpec'], to_s) }, - 'name' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_model_evaluation_slices.rb b/libraries/google_vertex_ai_model_evaluation_slices.rb index abbf80640..396d70e78 100644 --- a/libraries/google_vertex_ai_model_evaluation_slices.rb +++ b/libraries/google_vertex_ai_model_evaluation_slices.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'modelExplanation' => ->(obj) { return :model_explanation, GoogleInSpec::VertexAI::Property::ModelEvaluationSliceModelExplanation.new(obj['modelExplanation'], to_s) }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'metrics' => ->(obj) { return :metrics, obj['metrics'] }, - 'slice' => ->(obj) { return :slice, GoogleInSpec::VertexAI::Property::ModelEvaluationSliceSlice.new(obj['slice'], to_s) }, - 'metricsSchemaUri' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_models.rb b/libraries/google_vertex_ai_models.rb index e0387b328..48f09b955 100644 --- a/libraries/google_vertex_ai_models.rb +++ b/libraries/google_vertex_ai_models.rb @@ -91,35 +91,35 @@ def transform(key, value) def transformers { - 'modelSourceInfo' => ->(obj) { return :model_source_info, GoogleInSpec::VertexAI::Property::ModelModelSourceInfo.new(obj['modelSourceInfo'], to_s) }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'metadata' => ->(obj) { return :metadata, obj['metadata'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'deployedModels' => ->(obj) { return :deployed_models, GoogleInSpec::VertexAI::Property::ModelDeployedModelsArray.parse(obj['deployedModels'], to_s) }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'explanationSpec' => ->(obj) { return :explanation_spec, GoogleInSpec::VertexAI::Property::ModelExplanationSpec.new(obj['explanationSpec'], to_s) }, - 'encryptionSpec' => ->(obj) { return :encryption_spec, GoogleInSpec::VertexAI::Property::ModelEncryptionSpec.new(obj['encryptionSpec'], to_s) }, - 'pipelineJob' => ->(obj) { return :pipeline_job, obj['pipelineJob'] }, - 'predictSchemata' => ->(obj) { return :predict_schemata, GoogleInSpec::VertexAI::Property::ModelPredictSchemata.new(obj['predictSchemata'], to_s) }, - 'versionUpdateTime' => ->(obj) { return :version_update_time, obj['versionUpdateTime'] }, - 'supportedExportFormats' => ->(obj) { return :supported_export_formats, GoogleInSpec::VertexAI::Property::ModelSupportedExportFormatsArray.parse(obj['supportedExportFormats'], to_s) }, - 'originalModelInfo' => ->(obj) { return :original_model_info, GoogleInSpec::VertexAI::Property::ModelOriginalModelInfo.new(obj['originalModelInfo'], to_s) }, - 'metadataArtifact' => ->(obj) { return :metadata_artifact, obj['metadataArtifact'] }, - 'supportedInputStorageFormats' => ->(obj) { return :supported_input_storage_formats, obj['supportedInputStorageFormats'] }, - 'metadataSchemaUri' => ->(obj) { return :metadata_schema_uri, obj['metadataSchemaUri'] }, - 'containerSpec' => ->(obj) { return :container_spec, GoogleInSpec::VertexAI::Property::ModelContainerSpec.new(obj['containerSpec'], to_s) }, - 'versionId' => ->(obj) { return :version_id, obj['versionId'] }, - 'artifactUri' => ->(obj) { return :artifact_uri, obj['artifactUri'] }, - 'trainingPipeline' => ->(obj) { return :training_pipeline, obj['trainingPipeline'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'supportedDeploymentResourcesTypes' => ->(obj) { return :supported_deployment_resources_types, obj['supportedDeploymentResourcesTypes'] }, - 'supportedOutputStorageFormats' => ->(obj) { return :supported_output_storage_formats, obj['supportedOutputStorageFormats'] }, - 'versionAliases' => ->(obj) { return :version_aliases, obj['versionAliases'] }, - 'versionCreateTime' => ->(obj) { return :version_create_time, obj['versionCreateTime'] }, - 'versionDescription' => ->(obj) { return :version_description, obj['versionDescription'] }, - 'labels' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_models_evaluations.rb b/libraries/google_vertex_ai_models_evaluations.rb index 0ff597826..422ba5e4b 100644 --- a/libraries/google_vertex_ai_models_evaluations.rb +++ b/libraries/google_vertex_ai_models_evaluations.rb @@ -73,17 +73,17 @@ def transform(key, value) def transformers { - 'dataItemSchemaUri' => ->(obj) { return :data_item_schema_uri, obj['dataItemSchemaUri'] }, - 'metadata' => ->(obj) { return :metadata, obj['metadata'] }, - 'metricsSchemaUri' => ->(obj) { return :metrics_schema_uri, obj['metricsSchemaUri'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'annotationSchemaUri' => ->(obj) { return :annotation_schema_uri, obj['annotationSchemaUri'] }, - 'metrics' => ->(obj) { return :metrics, obj['metrics'] }, - 'explanationSpecs' => ->(obj) { return :explanation_specs, GoogleInSpec::VertexAI::Property::ModelsEvaluationExplanationSpecsArray.parse(obj['explanationSpecs'], to_s) }, - 'sliceDimensions' => ->(obj) { return :slice_dimensions, obj['sliceDimensions'] }, - 'modelExplanation' => ->(obj) { return :model_explanation, GoogleInSpec::VertexAI::Property::ModelsEvaluationModelExplanation.new(obj['modelExplanation'], to_s) }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'displayName' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_nas_jobs.rb b/libraries/google_vertex_ai_nas_jobs.rb index f80c295fa..dcdfee2d3 100644 --- a/libraries/google_vertex_ai_nas_jobs.rb +++ b/libraries/google_vertex_ai_nas_jobs.rb @@ -75,19 +75,19 @@ def transform(key, value) def transformers { - 'nasJobOutput' => ->(obj) { return :nas_job_output, GoogleInSpec::VertexAI::Property::NasJobNasJobOutput.new(obj['nasJobOutput'], to_s) }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'endTime' => ->(obj) { return :end_time, obj['endTime'] }, - 'error' => ->(obj) { return :error, GoogleInSpec::VertexAI::Property::NasJobError.new(obj['error'], to_s) }, - 'state' => ->(obj) { return :state, obj['state'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'nasJobSpec' => ->(obj) { return :nas_job_spec, GoogleInSpec::VertexAI::Property::NasJobNasJobSpec.new(obj['nasJobSpec'], to_s) }, - 'enableRestrictedImageTraining' => ->(obj) { return :enable_restricted_image_training, obj['enableRestrictedImageTraining'] }, - 'startTime' => ->(obj) { return :start_time, obj['startTime'] }, - 'encryptionSpec' => ->(obj) { return :encryption_spec, GoogleInSpec::VertexAI::Property::NasJobEncryptionSpec.new(obj['encryptionSpec'], to_s) }, - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::NasJobLabels.new(obj['labels'], to_s) }, - 'updateTime' => ->(obj) { return :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 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 67acb6ffa..560dc777d 100644 --- a/libraries/google_vertex_ai_nas_jobs_nas_trial_details.rb +++ b/libraries/google_vertex_ai_nas_jobs_nas_trial_details.rb @@ -65,10 +65,10 @@ def transform(key, value) def transformers { - 'parameters' => ->(obj) { return :parameters, obj['parameters'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'searchTrial' => ->(obj) { return :search_trial, GoogleInSpec::VertexAI::Property::NasJobsNasTrialDetailSearchTrial.new(obj['searchTrial'], to_s) }, - 'trainTrial' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_pipeline_jobs.rb b/libraries/google_vertex_ai_pipeline_jobs.rb index c45188093..292ef914b 100644 --- a/libraries/google_vertex_ai_pipeline_jobs.rb +++ b/libraries/google_vertex_ai_pipeline_jobs.rb @@ -81,25 +81,25 @@ def transform(key, value) def transformers { - 'encryptionSpec' => ->(obj) { return :encryption_spec, GoogleInSpec::VertexAI::Property::PipelineJobEncryptionSpec.new(obj['encryptionSpec'], to_s) }, - 'endTime' => ->(obj) { return :end_time, obj['endTime'] }, - 'error' => ->(obj) { return :error, GoogleInSpec::VertexAI::Property::PipelineJobError.new(obj['error'], to_s) }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'jobDetail' => ->(obj) { return :job_detail, GoogleInSpec::VertexAI::Property::PipelineJobJobDetail.new(obj['jobDetail'], to_s) }, - 'templateMetadata' => ->(obj) { return :template_metadata, GoogleInSpec::VertexAI::Property::PipelineJobTemplateMetadata.new(obj['templateMetadata'], to_s) }, - 'state' => ->(obj) { return :state, obj['state'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'scheduleName' => ->(obj) { return :schedule_name, obj['scheduleName'] }, - 'reservedIpRanges' => ->(obj) { return :reserved_ip_ranges, obj['reservedIpRanges'] }, - 'startTime' => ->(obj) { return :start_time, obj['startTime'] }, - 'serviceAccount' => ->(obj) { return :service_account, obj['serviceAccount'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'templateUri' => ->(obj) { return :template_uri, obj['templateUri'] }, - 'pipelineSpec' => ->(obj) { return :pipeline_spec, GoogleInSpec::VertexAI::Property::PipelineJobPipelineSpec.new(obj['pipelineSpec'], to_s) }, - 'network' => ->(obj) { return :network, obj['network'] }, - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::PipelineJobLabels.new(obj['labels'], to_s) }, - 'runtimeConfig' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_schedules.rb b/libraries/google_vertex_ai_schedules.rb index 0fdddc6a5..257cc0a28 100644 --- a/libraries/google_vertex_ai_schedules.rb +++ b/libraries/google_vertex_ai_schedules.rb @@ -80,24 +80,24 @@ def transform(key, value) def transformers { - 'startedRunCount' => ->(obj) { return :started_run_count, obj['startedRunCount'] }, - 'allowQueueing' => ->(obj) { return :allow_queueing, obj['allowQueueing'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'cron' => ->(obj) { return :cron, obj['cron'] }, - 'lastPauseTime' => ->(obj) { return :last_pause_time, obj['lastPauseTime'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'startTime' => ->(obj) { return :start_time, obj['startTime'] }, - 'maxRunCount' => ->(obj) { return :max_run_count, obj['maxRunCount'] }, - 'nextRunTime' => ->(obj) { return :next_run_time, obj['nextRunTime'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'lastScheduledRunResponse' => ->(obj) { return :last_scheduled_run_response, GoogleInSpec::VertexAI::Property::ScheduleLastScheduledRunResponse.new(obj['lastScheduledRunResponse'], to_s) }, - 'lastResumeTime' => ->(obj) { return :last_resume_time, obj['lastResumeTime'] }, - 'maxConcurrentRunCount' => ->(obj) { return :max_concurrent_run_count, obj['maxConcurrentRunCount'] }, - 'state' => ->(obj) { return :state, obj['state'] }, - 'createPipelineJobRequest' => ->(obj) { return :create_pipeline_job_request, GoogleInSpec::VertexAI::Property::ScheduleCreatePipelineJobRequest.new(obj['createPipelineJobRequest'], to_s) }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'catchUp' => ->(obj) { return :catch_up, obj['catchUp'] }, - 'endTime' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_studies.rb b/libraries/google_vertex_ai_studies.rb index b9571c294..0494594ee 100644 --- a/libraries/google_vertex_ai_studies.rb +++ b/libraries/google_vertex_ai_studies.rb @@ -68,12 +68,12 @@ def transform(key, value) def transformers { - 'studySpec' => ->(obj) { return :study_spec, obj['studySpec'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'state' => ->(obj) { return :state, obj['state'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'inactiveReason' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_studies_trials.rb b/libraries/google_vertex_ai_studies_trials.rb index 529098fdb..eb1e48466 100644 --- a/libraries/google_vertex_ai_studies_trials.rb +++ b/libraries/google_vertex_ai_studies_trials.rb @@ -74,18 +74,18 @@ def transform(key, value) def transformers { - 'measurements' => ->(obj) { return :measurements, GoogleInSpec::VertexAI::Property::StudiesTrialMeasurementsArray.parse(obj['measurements'], to_s) }, - 'startTime' => ->(obj) { return :start_time, obj['startTime'] }, - 'endTime' => ->(obj) { return :end_time, obj['endTime'] }, - 'parameters' => ->(obj) { return :parameters, GoogleInSpec::VertexAI::Property::StudiesTrialParametersArray.parse(obj['parameters'], to_s) }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'infeasibleReason' => ->(obj) { return :infeasible_reason, obj['infeasibleReason'] }, - 'finalMeasurement' => ->(obj) { return :final_measurement, GoogleInSpec::VertexAI::Property::StudiesTrialFinalMeasurement.new(obj['finalMeasurement'], to_s) }, - 'clientId' => ->(obj) { return :client_id, obj['clientId'] }, - 'customJob' => ->(obj) { return :custom_job, obj['customJob'] }, - 'state' => ->(obj) { return :state, obj['state'] }, - 'webAccessUris' => ->(obj) { return :web_access_uris, GoogleInSpec::VertexAI::Property::StudiesTrialWebAccessUris.new(obj['webAccessUris'], to_s) }, - 'id' => ->(obj) { return :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 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 21f6ef862..bc1527c73 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 @@ -72,16 +72,16 @@ def transform(key, value) def transformers { - 'pluginName' => ->(obj) { return :plugin_name, obj['pluginName'] }, - 'pluginData' => ->(obj) { return :plugin_data, obj['pluginData'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'metadata' => ->(obj) { return :metadata, obj['metadata'] }, - 'valueType' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_tensorboard_experiment_runs.rb b/libraries/google_vertex_ai_tensorboard_experiment_runs.rb index 9016e1299..ec8a71d13 100644 --- a/libraries/google_vertex_ai_tensorboard_experiment_runs.rb +++ b/libraries/google_vertex_ai_tensorboard_experiment_runs.rb @@ -69,13 +69,13 @@ def transform(key, value) def transformers { - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'description' => ->(obj) { return :description, obj['description'] }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::TensorboardExperimentRunLabels.new(obj['labels'], to_s) }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'name' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_tensorboards.rb b/libraries/google_vertex_ai_tensorboards.rb index cf82cb55d..f4a078039 100644 --- a/libraries/google_vertex_ai_tensorboards.rb +++ b/libraries/google_vertex_ai_tensorboards.rb @@ -73,17 +73,17 @@ def transform(key, value) def transformers { - 'name' => ->(obj) { return :name, obj['name'] }, - 'isDefault' => ->(obj) { return :is_default, obj['isDefault'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::TensorboardLabels.new(obj['labels'], to_s) }, - 'blobStoragePathPrefix' => ->(obj) { return :blob_storage_path_prefix, obj['blobStoragePathPrefix'] }, - 'etag' => ->(obj) { return :etag, obj['etag'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'runCount' => ->(obj) { return :run_count, obj['runCount'] }, - 'encryptionSpec' => ->(obj) { return :encryption_spec, GoogleInSpec::VertexAI::Property::TensorboardEncryptionSpec.new(obj['encryptionSpec'], to_s) }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'description' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_tensorboards_experiments.rb b/libraries/google_vertex_ai_tensorboards_experiments.rb index b1160bf7a..b5ea7d63b 100644 --- a/libraries/google_vertex_ai_tensorboards_experiments.rb +++ b/libraries/google_vertex_ai_tensorboards_experiments.rb @@ -70,14 +70,14 @@ def transform(key, value) def transformers { - 'description' => ->(obj) { return :description, obj['description'] }, - 'source' => ->(obj) { return :source, obj['source'] }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::TensorboardsExperimentLabels.new(obj['labels'], to_s) }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'etag' => ->(obj) { return :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 diff --git a/libraries/google_vertex_ai_training_pipelines.rb b/libraries/google_vertex_ai_training_pipelines.rb index d8042e622..cb44e1d89 100644 --- a/libraries/google_vertex_ai_training_pipelines.rb +++ b/libraries/google_vertex_ai_training_pipelines.rb @@ -79,23 +79,23 @@ def transform(key, value) def transformers { - 'endTime' => ->(obj) { return :end_time, obj['endTime'] }, - 'error' => ->(obj) { return :error, GoogleInSpec::VertexAI::Property::TrainingPipelineError.new(obj['error'], to_s) }, - 'displayName' => ->(obj) { return :display_name, obj['displayName'] }, - 'name' => ->(obj) { return :name, obj['name'] }, - 'inputDataConfig' => ->(obj) { return :input_data_config, GoogleInSpec::VertexAI::Property::TrainingPipelineInputDataConfig.new(obj['inputDataConfig'], to_s) }, - 'parentModel' => ->(obj) { return :parent_model, obj['parentModel'] }, - 'updateTime' => ->(obj) { return :update_time, obj['updateTime'] }, - 'state' => ->(obj) { return :state, obj['state'] }, - 'labels' => ->(obj) { return :labels, GoogleInSpec::VertexAI::Property::TrainingPipelineLabels.new(obj['labels'], to_s) }, - 'trainingTaskDefinition' => ->(obj) { return :training_task_definition, obj['trainingTaskDefinition'] }, - 'startTime' => ->(obj) { return :start_time, obj['startTime'] }, - 'createTime' => ->(obj) { return :create_time, obj['createTime'] }, - 'trainingTaskMetadata' => ->(obj) { return :training_task_metadata, obj['trainingTaskMetadata'] }, - 'trainingTaskInputs' => ->(obj) { return :training_task_inputs, obj['trainingTaskInputs'] }, - 'modelId' => ->(obj) { return :model_id, obj['modelId'] }, - 'encryptionSpec' => ->(obj) { return :encryption_spec, GoogleInSpec::VertexAI::Property::TrainingPipelineEncryptionSpec.new(obj['encryptionSpec'], to_s) }, - 'modelToUpload' => ->(obj) { return :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 diff --git a/test/integration/build/gcp-mm.tf b/test/integration/build/gcp-mm.tf index 748179b4c..1d2418975 100644 --- a/test/integration/build/gcp-mm.tf +++ b/test/integration/build/gcp-mm.tf @@ -216,6 +216,13 @@ variable "scheduler_job" { type = any } +variable "cloud_composer_v1" { + type = any +} + +variable "apigee_organization_envgroup_attachment" { + type = any +} resource "google_compute_ssl_policy" "custom-ssl-policy" { name = var.ssl_policy["name"] @@ -1552,3 +1559,18 @@ resource "google_vertex_ai_index" "index" { } index_update_method = "STREAM_UPDATE" } + +resource "google_composer_v1_environment" "test" { + name = var.cloud_composer_v1["name"] + region = var.cloud_composer_v1["region"] + config { + software_config { + image_version = var.cloud_composer_v1["image_version"] + } + } +} + +resource "google_apigee_envgroup_attachment" "engroup_attachment" { + envgroup_id = var.apigee_organization_envgroup_attachment.envgroup_id + environment = var.apigee_organization_envgroup_attachment.environment +} diff --git a/test/integration/configuration/mm-attributes.yml b/test/integration/configuration/mm-attributes.yml index db5c85cba..d3a3e98c3 100644 --- a/test/integration/configuration/mm-attributes.yml +++ b/test/integration/configuration/mm-attributes.yml @@ -557,3 +557,12 @@ dlp: name: "dlp-template-inspec" location: "europe-west2" type: "Infotype" + +cloud_composer_v1: + name : "example-composer-env" + region : "us-central1" + image_version : "composer-1.20.12-airflow-2.4.3" + +apigee_organization_envgroup_attachment: + envgroup_id: "organizations/ppradhan/envgroups/test-env-group" + environment: "test-env" diff --git a/test/integration/verify/controls/google_composer_project_location_environment.rb b/test/integration/verify/controls/google_composer_project_location_environment.rb new file mode 100644 index 000000000..661995fe6 --- /dev/null +++ b/test/integration/verify/controls/google_composer_project_location_environment.rb @@ -0,0 +1,39 @@ +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- + +title 'Test GCP google_composer_project_location_environment resource.' + +gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') + +project_location_environment = input('project_location_environment', value: { + "parent": "projects/ppradhan/locations/us-central1", + "name": "projects/ppradhan/locations/us-central1/environments/example-composer-env", + "state": "RUNNING", + }, + description: 'project_location_environment description') + +control 'google_composer_project_location_environment-1.0' do + impact 1.0 + title 'google_composer_project_location_environment resource test' + + describe google_composer_project_location_environment(name: project_location_environment['name']) do + it { should exist } + its('name') { should cmp project_location_environment['name'] } + its('state') { should cmp project_location_environment['state'] } + end + + describe google_composer_project_location_environment(name: "does_not_exist") do + it { should_not exist } + end +end diff --git a/test/integration/verify/controls/google_composer_project_location_environments.rb b/test/integration/verify/controls/google_composer_project_location_environments.rb new file mode 100644 index 000000000..fad86ee6f --- /dev/null +++ b/test/integration/verify/controls/google_composer_project_location_environments.rb @@ -0,0 +1,36 @@ +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- + +title 'Test GCP google_composer_project_location_environments resource.' + +gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') + +project_location_environment = input('project_location_environment', value: { + "parent": "projects/ppradhan/locations/us-central1", + "name": "projects/ppradhan/locations/us-central1/environments/example-composer-env", + "state": "RUNNING", + }, + description: 'project_location_environment description') + +control 'google_composer_project_location_environments-2.0' do + describe google_composer_project_location_environments(parent: project_location_environment['parent']) do + it { should exist } + its('names') { should include(project_location_environment['name']) } + its('states') { should include(project_location_environment['state']) } + end + + describe google_composer_project_location_environments(parent: "projects/ppradhan/locations/us-east2") do + it { should_not exist } + end +end diff --git a/test/integration/verify/controls/google_dataproc_cluster.rb b/test/integration/verify/controls/google_dataproc_cluster.rb index b0d3e0a4c..ec6535e61 100644 --- a/test/integration/verify/controls/google_dataproc_cluster.rb +++ b/test/integration/verify/controls/google_dataproc_cluster.rb @@ -57,6 +57,8 @@ its('config.master_config.machine_type_uri') { should match dataproc_cluster['config']['master_config']['machine_type'] } its('config.worker_config.machine_type_uri') { should match dataproc_cluster['config']['worker_config']['machine_type'] } its('config.software_config.properties') { should include(dataproc_cluster['config']['software_config']['prop_key'] => dataproc_cluster['config']['software_config']['prop_value']) } + its('project_id') { should eq gcp_project_id } + its('cluster_uuid') { should eq "test-uuid-67ff7c8e-558a-45ad-97c7" } end describe google_dataproc_cluster(project: gcp_project_id, region: gcp_location, cluster_name: 'nonexistent') do diff --git a/test/integration/verify/controls/google_dataproc_clusters.rb b/test/integration/verify/controls/google_dataproc_clusters.rb index 37fa4d2c0..05984a7fe 100644 --- a/test/integration/verify/controls/google_dataproc_clusters.rb +++ b/test/integration/verify/controls/google_dataproc_clusters.rb @@ -52,5 +52,7 @@ describe google_dataproc_clusters(project: gcp_project_id, region: gcp_location) do its('count') { should be >= 1 } its('cluster_names') { should include dataproc_cluster['name'] } + its('project_ids') { should include gcp_project_id } + its('cluster_uuids') { should include "test-uuid-67ff7c8e-558a-45ad-97c7" } end end