From 6c6bb1ddfca31577775dfa252805ab53afcf7f96 Mon Sep 17 00:00:00 2001 From: Samir <85890442+sa-progress@users.noreply.github.com> Date: Wed, 10 Jul 2024 17:24:47 +0530 Subject: [PATCH 1/3] Automatically generated by magic modules for service: metastore_v1 and resource: Projects__locations__service. This commit includes the following changes: - Singular Resource - Plural Resource - Documentation updates - Terraform configuration - Integration tests Signed-off-by: Samir <85890442+sa-progress@users.noreply.github.com> --- ...proc_metastore_project_location_service.md | 293 ++++++++++++++++++ ...roc_metastore_project_location_services.md | 94 ++++++ ...rojectlocationservice_encryption_config.rb | 34 ++ ...ctlocationservice_hive_metastore_config.rb | 50 +++ ...ive_metastore_config_auxiliary_versions.rb | 34 ++ ..._hive_metastore_config_config_overrides.rb | 34 ++ ...e_hive_metastore_config_kerberos_config.rb | 41 +++ ...metastore_config_kerberos_config_keytab.rb | 34 ++ .../property/projectlocationservice_labels.rb | 34 ++ ...ojectlocationservice_maintenance_window.rb | 37 +++ ...ectlocationservice_metadata_integration.rb | 40 +++ ...etadata_integration_data_catalog_config.rb | 34 ++ ...ce_metadata_integration_dataplex_config.rb | 35 +++ ...egration_dataplex_config_lake_resources.rb | 34 ++ ...ionservice_metadata_management_activity.rb | 39 +++ ...ta_management_activity_metadata_exports.rb | 54 ++++ ...e_metadata_management_activity_restores.rb | 60 ++++ .../projectlocationservice_network_config.rb | 38 +++ ...ocationservice_network_config_consumers.rb | 48 +++ .../projectlocationservice_scaling_config.rb | 42 +++ ...rvice_scaling_config_autoscaling_config.rb | 41 +++ ..._config_autoscaling_config_limit_config.rb | 37 +++ ...projectlocationservice_scheduled_backup.rb | 50 +++ ...nservice_scheduled_backup_latest_backup.rb | 43 +++ ...projectlocationservice_telemetry_config.rb | 34 ++ ...proc_metastore_project_location_service.rb | 124 ++++++++ ...roc_metastore_project_location_services.rb | 125 ++++++++ ...proc_metastore_project_location_service.rb | 58 ++++ ...roc_metastore_project_location_services.rb | 41 +++ 29 files changed, 1662 insertions(+) create mode 100644 docs/resources/google_dataproc_metastore_project_location_service.md create mode 100644 docs/resources/google_dataproc_metastore_project_location_services.md create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_encryption_config.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_auxiliary_versions.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_config_overrides.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config_keytab.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_labels.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_maintenance_window.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_data_catalog_config.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config_lake_resources.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_metadata_exports.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_restores.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_network_config.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_network_config_consumers.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config_limit_config.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_scheduled_backup.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_scheduled_backup_latest_backup.rb create mode 100644 libraries/google/dataprocmetastore/property/projectlocationservice_telemetry_config.rb create mode 100644 libraries/google_dataproc_metastore_project_location_service.rb create mode 100644 libraries/google_dataproc_metastore_project_location_services.rb create mode 100644 test/integration/verify/controls/google_dataproc_metastore_project_location_service.rb create mode 100644 test/integration/verify/controls/google_dataproc_metastore_project_location_services.rb diff --git a/docs/resources/google_dataproc_metastore_project_location_service.md b/docs/resources/google_dataproc_metastore_project_location_service.md new file mode 100644 index 00000000..213ce6c5 --- /dev/null +++ b/docs/resources/google_dataproc_metastore_project_location_service.md @@ -0,0 +1,293 @@ ++++ + +title = "google_dataproc_metastore_project_location_service Resource" +platform = "gcp" +draft = false +gh_repo = "inspec-gcp" + + +[menu.inspec] + +title = "google_dataproc_metastore_project_location_service" +identifier = "inspec/resources/gcp/google_dataproc_metastore_project_location_service Resource" +parent = "inspec/resources/gcp" ++++ + +Use the `google_dataproc_metastore_project_location_service` InSpec audit resource to test the properties of a test a Google ProjectLocationService. + +## Installation +{{% inspec_gcp_install %}} + +## Syntax +A `google_dataproc_metastore_project_location_service` is used to test a Google ProjectLocationService resource + +## Examples +``` +describe google_dataproc_metastore_project_location_service(name: ' value_name') do + it { should exist } + its('name') { should cmp 'value_name' } + its('create_time') { should cmp 'value_createtime' } + its('update_time') { should cmp 'value_updatetime' } + its('network') { should cmp 'value_network' } + its('endpoint_uri') { should cmp 'value_endpointuri' } + its('state') { should cmp 'value_state' } + its('state_message') { should cmp 'value_statemessage' } + its('artifact_gcs_uri') { should cmp 'value_artifactgcsuri' } + its('tier') { should cmp 'value_tier' } + its('uid') { should cmp 'value_uid' } + its('release_channel') { should cmp 'value_releasechannel' } + its('database_type') { should cmp 'value_databasetype' } + +end + +describe google_dataproc_metastore_project_location_service(name: "does_not_exit") do + it { should_not exist } +end +``` + +## Parameters +Properties that can be accessed from the `google_dataproc_metastore_project_location_service` resource: + +## Properties +Properties that can be accessed from the `google_dataproc_metastore_project_location_service` resource: + + + * `hive_metastore_config`: Specifies configuration information specific to running Hive metastore software as the metastore service. + + * `version`: Immutable. The Hive metastore schema version. + + * `config_overrides`: A mapping of Hive metastore configuration key-value pairs to apply to the Hive metastore (configured in hive-site.xml). The mappings override system defaults (some keys cannot be overridden). These overrides are also applied to auxiliary versions and can be further customized in the auxiliary version's AuxiliaryVersionConfig. + + * `additional_properties`: + + * `kerberos_config`: Configuration information for a Kerberos principal. + + * `keytab`: A securely stored value. + + * `cloud_secret`: The relative resource name of a Secret Manager secret version, in the following form:projects/{project_number}/secrets/{secret_id}/versions/{version_id}. + + * `principal`: A Kerberos principal that exists in the both the keytab the KDC to authenticate as. A typical principal is of the form primary/instance@REALM, but there is no exact format. + + * `krb5_config_gcs_uri`: A Cloud Storage URI that specifies the path to a krb5.conf file. It is of the form gs://{bucket_name}/path/to/krb5.conf, although the file does not need to be named krb5.conf explicitly. + + * `endpoint_protocol`: The protocol to use for the metastore service endpoint. If unspecified, defaults to THRIFT. + Possible values: + * ENDPOINT_PROTOCOL_UNSPECIFIED + * THRIFT + * GRPC + + * `auxiliary_versions`: A mapping of Hive metastore version to the auxiliary version configuration. When specified, a secondary Hive metastore service is created along with the primary service. All auxiliary versions must be less than the service's primary version. The key is the auxiliary service name and it must match the regular expression a-z?. This means that the first character must be a lowercase letter, and all the following characters must be hyphens, lowercase letters, or digits, except the last character, which cannot be a hyphen. + + * `additional_properties`: Configuration information for the auxiliary service versions. + + * `name`: Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}. + + * `create_time`: Output only. The time when the metastore service was created. + + * `update_time`: Output only. The time when the metastore service was last updated. + + * `labels`: User-defined labels for the metastore service. + + * `additional_properties`: + + * `network`: Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:projects/{project_number}/global/networks/{network_id}. + + * `endpoint_uri`: Output only. The URI of the endpoint used to access the metastore service. + + * `port`: The TCP port at which the metastore service is reached. Default: 9083. + + * `state`: Output only. The current state of the metastore service. + Possible values: + * STATE_UNSPECIFIED + * CREATING + * ACTIVE + * SUSPENDING + * SUSPENDED + * UPDATING + * DELETING + * ERROR + * MIGRATING + + * `state_message`: Output only. Additional information about the current state of the metastore service, if available. + + * `artifact_gcs_uri`: Output only. A Cloud Storage URI (starting with gs://) that specifies where artifacts related to the metastore service are stored. + + * `tier`: The tier of the service. + Possible values: + * TIER_UNSPECIFIED + * DEVELOPER + * ENTERPRISE + + * `metadata_integration`: Specifies how metastore metadata should be integrated with external services. + + * `data_catalog_config`: Specifies how metastore metadata should be integrated with the Data Catalog service. + + * `enabled`: Optional. Defines whether the metastore metadata should be synced to Data Catalog. The default value is to disable syncing metastore metadata to Data Catalog. + + * `dataplex_config`: Specifies how metastore metadata should be integrated with the Dataplex service. + + * `lake_resources`: A reference to the Lake resources that this metastore service is attached to. The key is the lake resource name. Example: projects/{project_number}/locations/{location_id}/lakes/{lake_id}. + + * `additional_properties`: Represents a Lake resource + + * `maintenance_window`: Maintenance window. This specifies when Dataproc Metastore may perform system maintenance operation to the service. + + * `hour_of_day`: The hour of day (0-23) when the window starts. + + * `day_of_week`: The day of week, when the window starts. + Possible values: + * DAY_OF_WEEK_UNSPECIFIED + * MONDAY + * TUESDAY + * WEDNESDAY + * THURSDAY + * FRIDAY + * SATURDAY + * SUNDAY + + * `uid`: Output only. The globally unique resource identifier of the metastore service. + + * `metadata_management_activity`: The metadata management activities of the metastore service. + + * `metadata_exports`: Output only. The latest metadata exports of the metastore service. + + * `destination_gcs_uri`: Output only. A Cloud Storage URI of a folder that metadata are exported to, in the form of gs:////, where is automatically generated. + + * `start_time`: Output only. The time when the export started. + + * `end_time`: Output only. The time when the export ended. + + * `state`: Output only. The current state of the export. + Possible values: + * STATE_UNSPECIFIED + * RUNNING + * SUCCEEDED + * FAILED + * CANCELLED + + * `database_dump_type`: Output only. The type of the database dump. + Possible values: + * TYPE_UNSPECIFIED + * MYSQL + * AVRO + + * `restores`: Output only. The latest restores of the metastore service. + + * `start_time`: Output only. The time when the restore started. + + * `end_time`: Output only. The time when the restore ended. + + * `state`: Output only. The current state of the restore. + Possible values: + * STATE_UNSPECIFIED + * RUNNING + * SUCCEEDED + * FAILED + * CANCELLED + + * `backup`: Output only. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}. + + * `type`: Output only. The type of restore. + Possible values: + * RESTORE_TYPE_UNSPECIFIED + * FULL + * METADATA_ONLY + + * `details`: Output only. The restore details containing the revision of the service to be restored to, in format of JSON. + + * `backup_location`: Optional. A Cloud Storage URI specifying where the backup artifacts are stored, in the format gs:///. + + * `release_channel`: Immutable. The release channel of the service. If unspecified, defaults to STABLE. + Possible values: + * RELEASE_CHANNEL_UNSPECIFIED + * CANARY + * STABLE + + * `encryption_config`: Encryption settings for the service. + + * `kms_key`: The fully qualified customer provided Cloud KMS key name to use for customer data encryption, in the following format:projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}. + + * `network_config`: Network configuration for the Dataproc Metastore service. + + * `consumers`: Immutable. The consumer-side network configuration for the Dataproc Metastore instance. + + * `subnetwork`: Immutable. The subnetwork of the customer project from which an IP address is reserved and used as the Dataproc Metastore service's endpoint. It is accessible to hosts in the subnet and to all hosts in a subnet in the same region and same network. There must be at least one IP address available in the subnet's primary range. The subnet is specified in the following form:projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id} + + * `endpoint_uri`: Output only. The URI of the endpoint used to access the metastore service. + + * `endpoint_location`: Output only. The location of the endpoint URI. Format: projects/{project}/locations/{location}. + + * `custom_routes_enabled`: Enables custom routes to be imported and exported for the Dataproc Metastore service's peered VPC network. + + * `database_type`: Immutable. The database type that the Metastore service stores its data. + Possible values: + * DATABASE_TYPE_UNSPECIFIED + * MYSQL + * SPANNER + + * `telemetry_config`: Telemetry Configuration for the Dataproc Metastore service. + + * `log_format`: The output format of the Dataproc Metastore service's logs. + Possible values: + * LOG_FORMAT_UNSPECIFIED + * LEGACY + * JSON + + * `scaling_config`: Represents the scaling configuration of a metastore service. + + * `instance_size`: An enum of readable instance sizes, with each instance size mapping to a float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1)) + Possible values: + * INSTANCE_SIZE_UNSPECIFIED + * EXTRA_SMALL + * SMALL + * MEDIUM + * LARGE + * EXTRA_LARGE + + * `scaling_factor`: Scaling factor, increments of 0.1 for values less than 1.0, and increments of 1.0 for values greater than 1.0. + + * `autoscaling_config`: Represents the autoscaling configuration of a metastore service. + + * `autoscaling_factor`: Output only. The scaling factor of a service with autoscaling enabled. + + * `autoscaling_enabled`: Optional. Whether or not autoscaling is enabled for this service. + + * `limit_config`: Represents the autoscaling limit configuration of a metastore service. + + * `max_scaling_factor`: Optional. The highest scaling factor that the service should be autoscaled to. + + * `min_scaling_factor`: Optional. The lowest scaling factor that the service should be autoscaled to. + + * `scheduled_backup`: This specifies the configuration of scheduled backup. + + * `enabled`: Optional. Defines whether the scheduled backup is enabled. The default value is false. + + * `cron_schedule`: Optional. The scheduled interval in Cron format, see https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is not enabled. Must be specified to enable scheduled backups. + + * `time_zone`: Optional. Specifies the time zone to be used when interpreting cron_schedule. Must be a time zone name from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g. America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is UTC. + + * `next_scheduled_time`: Output only. The time when the next backups execution is scheduled to start. + + * `backup_location`: Optional. A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing backup files will be stored below it. + + * `latest_backup`: The details of the latest scheduled backup. + + * `backup_id`: Output only. The ID of an in-progress scheduled backup. Empty if no backup is in progress. + + * `start_time`: Output only. The time when the backup was started. + + * `state`: Output only. The current state of the backup. + Possible values: + * STATE_UNSPECIFIED + * IN_PROGRESS + * SUCCEEDED + * FAILED + + * `duration`: Output only. The duration of the backup completion. + + * `deletion_protection`: Optional. Indicates if the dataproc metastore should be protected against accidental deletions. + + +## GCP Permissions + +Ensure the [Dataproc Metastore API](https://console.cloud.google.com/apis/library/metastore.googleapis.com) is enabled for the current project. diff --git a/docs/resources/google_dataproc_metastore_project_location_services.md b/docs/resources/google_dataproc_metastore_project_location_services.md new file mode 100644 index 00000000..5a3e5be6 --- /dev/null +++ b/docs/resources/google_dataproc_metastore_project_location_services.md @@ -0,0 +1,94 @@ ++++ + +title = "google_dataproc_metastore_project_location_services Resource" +platform = "gcp" +draft = false +gh_repo = "inspec-gcp" + + +[menu.inspec] + +title = "google_dataproc_metastore_project_location_services" +identifier = "inspec/resources/gcp/google_dataproc_metastore_project_location_services Resource" +parent = "inspec/resources/gcp" ++++ + +Use the `google_dataproc_metastore_project_location_services` InSpec audit resource to test the properties of a test a Google ProjectLocationService. + +## Installation +{{% inspec_gcp_install %}} + +## Syntax +A `google_dataproc_metastore_project_location_services` is used to test a Google ProjectLocationService resource + +## Examples +``` + describe google_dataproc_metastore_project_location_services(parent: ' value_parent') do + it { should exist } + end +``` + +## Parameters +Properties that can be accessed from the `google_dataproc_metastore_project_location_services` resource: + +See [google_dataproc_metastore_project_location_service.md](google_dataproc_metastore_project_location_service.md) for more detailed information +* `hive_metastore_configs`: an array of `google_dataproc_metastore_project_location_service` hive_metastore_config +* `names`: an array of `google_dataproc_metastore_project_location_service` name +* `create_times`: an array of `google_dataproc_metastore_project_location_service` create_time +* `update_times`: an array of `google_dataproc_metastore_project_location_service` update_time +* `labels`: an array of `google_dataproc_metastore_project_location_service` labels +* `networks`: an array of `google_dataproc_metastore_project_location_service` network +* `endpoint_uris`: an array of `google_dataproc_metastore_project_location_service` endpoint_uri +* `ports`: an array of `google_dataproc_metastore_project_location_service` port +* `states`: an array of `google_dataproc_metastore_project_location_service` state +* `state_messages`: an array of `google_dataproc_metastore_project_location_service` state_message +* `artifact_gcs_uris`: an array of `google_dataproc_metastore_project_location_service` artifact_gcs_uri +* `tiers`: an array of `google_dataproc_metastore_project_location_service` tier +* `metadata_integrations`: an array of `google_dataproc_metastore_project_location_service` metadata_integration +* `maintenance_windows`: an array of `google_dataproc_metastore_project_location_service` maintenance_window +* `uids`: an array of `google_dataproc_metastore_project_location_service` uid +* `metadata_management_activities`: an array of `google_dataproc_metastore_project_location_service` metadata_management_activity +* `release_channels`: an array of `google_dataproc_metastore_project_location_service` release_channel +* `encryption_configs`: an array of `google_dataproc_metastore_project_location_service` encryption_config +* `network_configs`: an array of `google_dataproc_metastore_project_location_service` network_config +* `database_types`: an array of `google_dataproc_metastore_project_location_service` database_type +* `telemetry_configs`: an array of `google_dataproc_metastore_project_location_service` telemetry_config +* `scaling_configs`: an array of `google_dataproc_metastore_project_location_service` scaling_config +* `scheduled_backups`: an array of `google_dataproc_metastore_project_location_service` scheduled_backup +* `deletion_protections`: an array of `google_dataproc_metastore_project_location_service` deletion_protection +## Properties +Properties that can be accessed from the `google_dataproc_metastore_project_location_services` resource: + +See [google_dataproc_metastore_project_location_service.md](google_dataproc_metastore_project_location_service.md) for more detailed information +* `hive_metastore_configs`: an array of `google_dataproc_metastore_project_location_service` hive_metastore_config +* `names`: an array of `google_dataproc_metastore_project_location_service` name +* `create_times`: an array of `google_dataproc_metastore_project_location_service` create_time +* `update_times`: an array of `google_dataproc_metastore_project_location_service` update_time +* `labels`: an array of `google_dataproc_metastore_project_location_service` labels +* `networks`: an array of `google_dataproc_metastore_project_location_service` network +* `endpoint_uris`: an array of `google_dataproc_metastore_project_location_service` endpoint_uri +* `ports`: an array of `google_dataproc_metastore_project_location_service` port +* `states`: an array of `google_dataproc_metastore_project_location_service` state +* `state_messages`: an array of `google_dataproc_metastore_project_location_service` state_message +* `artifact_gcs_uris`: an array of `google_dataproc_metastore_project_location_service` artifact_gcs_uri +* `tiers`: an array of `google_dataproc_metastore_project_location_service` tier +* `metadata_integrations`: an array of `google_dataproc_metastore_project_location_service` metadata_integration +* `maintenance_windows`: an array of `google_dataproc_metastore_project_location_service` maintenance_window +* `uids`: an array of `google_dataproc_metastore_project_location_service` uid +* `metadata_management_activities`: an array of `google_dataproc_metastore_project_location_service` metadata_management_activity +* `release_channels`: an array of `google_dataproc_metastore_project_location_service` release_channel +* `encryption_configs`: an array of `google_dataproc_metastore_project_location_service` encryption_config +* `network_configs`: an array of `google_dataproc_metastore_project_location_service` network_config +* `database_types`: an array of `google_dataproc_metastore_project_location_service` database_type +* `telemetry_configs`: an array of `google_dataproc_metastore_project_location_service` telemetry_config +* `scaling_configs`: an array of `google_dataproc_metastore_project_location_service` scaling_config +* `scheduled_backups`: an array of `google_dataproc_metastore_project_location_service` scheduled_backup +* `deletion_protections`: an array of `google_dataproc_metastore_project_location_service` deletion_protection + +## 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 [Dataproc Metastore API](https://console.cloud.google.com/apis/library/metastore.googleapis.com) is enabled for the current project. diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_encryption_config.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_encryption_config.rb new file mode 100644 index 00000000..d6a8dbe1 --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_encryption_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 DataprocMetastore + module Property + class ProjectLocationServiceEncryptionConfig + attr_reader :kms_key + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @kms_key = args['kmsKey'] + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceEncryptionConfig" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config.rb new file mode 100644 index 00000000..3f82c5d3 --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config.rb @@ -0,0 +1,50 @@ +# 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/dataprocmetastore/property/projectlocationservice_hive_metastore_config_auxiliary_versions' +require 'google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_config_overrides' +require 'google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config' +require 'google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config_keytab' +module GoogleInSpec + module DataprocMetastore + module Property + class ProjectLocationServiceHiveMetastoreConfig + attr_reader :version + + attr_reader :config_overrides + + attr_reader :kerberos_config + + attr_reader :endpoint_protocol + + attr_reader :auxiliary_versions + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @version = args['version'] + @config_overrides = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceHiveMetastoreConfigConfigOverrides.new(args['configOverrides'], to_s) + @kerberos_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceHiveMetastoreConfigKerberosConfig.new(args['kerberosConfig'], to_s) + @endpoint_protocol = args['endpointProtocol'] + @auxiliary_versions = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceHiveMetastoreConfigAuxiliaryVersions.new(args['auxiliaryVersions'], to_s) + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceHiveMetastoreConfig" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_auxiliary_versions.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_auxiliary_versions.rb new file mode 100644 index 00000000..e078178a --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_auxiliary_versions.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 DataprocMetastore + module Property + class ProjectLocationServiceHiveMetastoreConfigAuxiliaryVersions + 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} ProjectLocationServiceHiveMetastoreConfigAuxiliaryVersions" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_config_overrides.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_config_overrides.rb new file mode 100644 index 00000000..a33ec4b8 --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_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 DataprocMetastore + module Property + class ProjectLocationServiceHiveMetastoreConfigConfigOverrides + 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} ProjectLocationServiceHiveMetastoreConfigConfigOverrides" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config.rb new file mode 100644 index 00000000..579dab22 --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config.rb @@ -0,0 +1,41 @@ +# 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/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config_keytab' +module GoogleInSpec + module DataprocMetastore + module Property + class ProjectLocationServiceHiveMetastoreConfigKerberosConfig + attr_reader :keytab + + attr_reader :principal + + attr_reader :krb5_config_gcs_uri + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @keytab = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceHiveMetastoreConfigKerberosConfigKeytab.new(args['keytab'], to_s) + @principal = args['principal'] + @krb5_config_gcs_uri = args['krb5ConfigGcsUri'] + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceHiveMetastoreConfigKerberosConfig" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config_keytab.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config_keytab.rb new file mode 100644 index 00000000..3f72e92a --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config_keytab.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 DataprocMetastore + module Property + class ProjectLocationServiceHiveMetastoreConfigKerberosConfigKeytab + attr_reader :cloud_secret + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @cloud_secret = args['cloudSecret'] + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceHiveMetastoreConfigKerberosConfigKeytab" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_labels.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_labels.rb new file mode 100644 index 00000000..0b43a854 --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_labels.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 DataprocMetastore + module Property + class ProjectLocationServiceLabels + 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} ProjectLocationServiceLabels" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_maintenance_window.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_maintenance_window.rb new file mode 100644 index 00000000..2d4095cf --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_maintenance_window.rb @@ -0,0 +1,37 @@ +# 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 DataprocMetastore + module Property + class ProjectLocationServiceMaintenanceWindow + attr_reader :hour_of_day + + attr_reader :day_of_week + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @hour_of_day = args['hourOfDay'] + @day_of_week = args['dayOfWeek'] + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceMaintenanceWindow" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration.rb new file mode 100644 index 00000000..d7e0c97c --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration.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. +# +# ---------------------------------------------------------------------------- +require 'google/dataprocmetastore/property/projectlocationservice_metadata_integration_data_catalog_config' +require 'google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config' +require 'google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config_lake_resources' +module GoogleInSpec + module DataprocMetastore + module Property + class ProjectLocationServiceMetadataIntegration + attr_reader :data_catalog_config + + attr_reader :dataplex_config + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @data_catalog_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMetadataIntegrationDataCatalogConfig.new(args['dataCatalogConfig'], to_s) + @dataplex_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMetadataIntegrationDataplexConfig.new(args['dataplexConfig'], to_s) + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceMetadataIntegration" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_data_catalog_config.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_data_catalog_config.rb new file mode 100644 index 00000000..211de3cf --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_data_catalog_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 DataprocMetastore + module Property + class ProjectLocationServiceMetadataIntegrationDataCatalogConfig + attr_reader :enabled + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @enabled = args['enabled'] + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceMetadataIntegrationDataCatalogConfig" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config.rb new file mode 100644 index 00000000..b312ef63 --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_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/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config_lake_resources' +module GoogleInSpec + module DataprocMetastore + module Property + class ProjectLocationServiceMetadataIntegrationDataplexConfig + attr_reader :lake_resources + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @lake_resources = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMetadataIntegrationDataplexConfigLakeResources.new(args['lakeResources'], to_s) + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceMetadataIntegrationDataplexConfig" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config_lake_resources.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config_lake_resources.rb new file mode 100644 index 00000000..bf5de10e --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config_lake_resources.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 DataprocMetastore + module Property + class ProjectLocationServiceMetadataIntegrationDataplexConfigLakeResources + 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} ProjectLocationServiceMetadataIntegrationDataplexConfigLakeResources" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity.rb new file mode 100644 index 00000000..79726dd5 --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity.rb @@ -0,0 +1,39 @@ +# 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/dataprocmetastore/property/projectlocationservice_metadata_management_activity_metadata_exports' +require 'google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_restores' +module GoogleInSpec + module DataprocMetastore + module Property + class ProjectLocationServiceMetadataManagementActivity + attr_reader :metadata_exports + + attr_reader :restores + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @metadata_exports = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMetadataManagementActivityMetadataExportsArray.parse(args['metadataExports'], to_s) + @restores = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMetadataManagementActivityRestoresArray.parse(args['restores'], to_s) + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceMetadataManagementActivity" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_metadata_exports.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_metadata_exports.rb new file mode 100644 index 00000000..1d1cdf89 --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_metadata_exports.rb @@ -0,0 +1,54 @@ +# 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 DataprocMetastore + module Property + class ProjectLocationServiceMetadataManagementActivityMetadataExports + attr_reader :destination_gcs_uri + + attr_reader :start_time + + attr_reader :end_time + + attr_reader :state + + attr_reader :database_dump_type + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @destination_gcs_uri = args['destinationGcsUri'] + @start_time = args['startTime'] + @end_time = args['endTime'] + @state = args['state'] + @database_dump_type = args['databaseDumpType'] + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceMetadataManagementActivityMetadataExports" + end + end + + class ProjectLocationServiceMetadataManagementActivityMetadataExportsArray + def self.parse(value, parent_identifier) + return if value.nil? + return ProjectLocationServiceMetadataManagementActivityMetadataExports.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ProjectLocationServiceMetadataManagementActivityMetadataExports.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_restores.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_restores.rb new file mode 100644 index 00000000..72173d61 --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_restores.rb @@ -0,0 +1,60 @@ +# 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 DataprocMetastore + module Property + class ProjectLocationServiceMetadataManagementActivityRestores + attr_reader :start_time + + attr_reader :end_time + + attr_reader :state + + attr_reader :backup + + attr_reader :type + + attr_reader :details + + attr_reader :backup_location + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @start_time = args['startTime'] + @end_time = args['endTime'] + @state = args['state'] + @backup = args['backup'] + @type = args['type'] + @details = args['details'] + @backup_location = args['backupLocation'] + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceMetadataManagementActivityRestores" + end + end + + class ProjectLocationServiceMetadataManagementActivityRestoresArray + def self.parse(value, parent_identifier) + return if value.nil? + return ProjectLocationServiceMetadataManagementActivityRestores.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ProjectLocationServiceMetadataManagementActivityRestores.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_network_config.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_network_config.rb new file mode 100644 index 00000000..d7aa24e6 --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_network_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/dataprocmetastore/property/projectlocationservice_network_config_consumers' +module GoogleInSpec + module DataprocMetastore + module Property + class ProjectLocationServiceNetworkConfig + attr_reader :consumers + + attr_reader :custom_routes_enabled + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @consumers = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceNetworkConfigConsumersArray.parse(args['consumers'], to_s) + @custom_routes_enabled = args['customRoutesEnabled'] + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceNetworkConfig" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_network_config_consumers.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_network_config_consumers.rb new file mode 100644 index 00000000..ac17b504 --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_network_config_consumers.rb @@ -0,0 +1,48 @@ +# 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 DataprocMetastore + module Property + class ProjectLocationServiceNetworkConfigConsumers + attr_reader :subnetwork + + attr_reader :endpoint_uri + + attr_reader :endpoint_location + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @subnetwork = args['subnetwork'] + @endpoint_uri = args['endpointUri'] + @endpoint_location = args['endpointLocation'] + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceNetworkConfigConsumers" + end + end + + class ProjectLocationServiceNetworkConfigConsumersArray + def self.parse(value, parent_identifier) + return if value.nil? + return ProjectLocationServiceNetworkConfigConsumers.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ProjectLocationServiceNetworkConfigConsumers.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config.rb new file mode 100644 index 00000000..be37584e --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config.rb @@ -0,0 +1,42 @@ +# 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/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config' +require 'google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config_limit_config' +module GoogleInSpec + module DataprocMetastore + module Property + class ProjectLocationServiceScalingConfig + attr_reader :instance_size + + attr_reader :scaling_factor + + attr_reader :autoscaling_config + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @instance_size = args['instanceSize'] + @scaling_factor = args['scalingFactor'] + @autoscaling_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceScalingConfigAutoscalingConfig.new(args['autoscalingConfig'], to_s) + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceScalingConfig" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config.rb new file mode 100644 index 00000000..7c790b24 --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config.rb @@ -0,0 +1,41 @@ +# 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/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config_limit_config' +module GoogleInSpec + module DataprocMetastore + module Property + class ProjectLocationServiceScalingConfigAutoscalingConfig + attr_reader :autoscaling_factor + + attr_reader :autoscaling_enabled + + attr_reader :limit_config + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @autoscaling_factor = args['autoscalingFactor'] + @autoscaling_enabled = args['autoscalingEnabled'] + @limit_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceScalingConfigAutoscalingConfigLimitConfig.new(args['limitConfig'], to_s) + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceScalingConfigAutoscalingConfig" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config_limit_config.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config_limit_config.rb new file mode 100644 index 00000000..8df61525 --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config_limit_config.rb @@ -0,0 +1,37 @@ +# 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 DataprocMetastore + module Property + class ProjectLocationServiceScalingConfigAutoscalingConfigLimitConfig + attr_reader :max_scaling_factor + + attr_reader :min_scaling_factor + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @max_scaling_factor = args['maxScalingFactor'] + @min_scaling_factor = args['minScalingFactor'] + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceScalingConfigAutoscalingConfigLimitConfig" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_scheduled_backup.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_scheduled_backup.rb new file mode 100644 index 00000000..90f53467 --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_scheduled_backup.rb @@ -0,0 +1,50 @@ +# 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/dataprocmetastore/property/projectlocationservice_scheduled_backup_latest_backup' +module GoogleInSpec + module DataprocMetastore + module Property + class ProjectLocationServiceScheduledBackup + attr_reader :enabled + + attr_reader :cron_schedule + + attr_reader :time_zone + + attr_reader :next_scheduled_time + + attr_reader :backup_location + + attr_reader :latest_backup + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @enabled = args['enabled'] + @cron_schedule = args['cronSchedule'] + @time_zone = args['timeZone'] + @next_scheduled_time = args['nextScheduledTime'] + @backup_location = args['backupLocation'] + @latest_backup = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceScheduledBackupLatestBackup.new(args['latestBackup'], to_s) + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceScheduledBackup" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_scheduled_backup_latest_backup.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_scheduled_backup_latest_backup.rb new file mode 100644 index 00000000..4d8b4a0d --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_scheduled_backup_latest_backup.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 DataprocMetastore + module Property + class ProjectLocationServiceScheduledBackupLatestBackup + attr_reader :backup_id + + attr_reader :start_time + + attr_reader :state + + attr_reader :duration + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @backup_id = args['backupId'] + @start_time = args['startTime'] + @state = args['state'] + @duration = args['duration'] + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceScheduledBackupLatestBackup" + end + end + end + end +end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_telemetry_config.rb b/libraries/google/dataprocmetastore/property/projectlocationservice_telemetry_config.rb new file mode 100644 index 00000000..6cac63f9 --- /dev/null +++ b/libraries/google/dataprocmetastore/property/projectlocationservice_telemetry_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 DataprocMetastore + module Property + class ProjectLocationServiceTelemetryConfig + attr_reader :log_format + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @log_format = args['logFormat'] + end + + def to_s + "#{@parent_identifier} ProjectLocationServiceTelemetryConfig" + end + end + end + end +end diff --git a/libraries/google_dataproc_metastore_project_location_service.rb b/libraries/google_dataproc_metastore_project_location_service.rb new file mode 100644 index 00000000..0f987a4f --- /dev/null +++ b/libraries/google_dataproc_metastore_project_location_service.rb @@ -0,0 +1,124 @@ +# 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/dataprocmetastore/property/projectlocationservice_encryption_config' +require 'google/dataprocmetastore/property/projectlocationservice_hive_metastore_config' +require 'google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_auxiliary_versions' +require 'google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_config_overrides' +require 'google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config' +require 'google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config_keytab' +require 'google/dataprocmetastore/property/projectlocationservice_labels' +require 'google/dataprocmetastore/property/projectlocationservice_maintenance_window' +require 'google/dataprocmetastore/property/projectlocationservice_metadata_integration' +require 'google/dataprocmetastore/property/projectlocationservice_metadata_integration_data_catalog_config' +require 'google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config' +require 'google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config_lake_resources' +require 'google/dataprocmetastore/property/projectlocationservice_metadata_management_activity' +require 'google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_metadata_exports' +require 'google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_restores' +require 'google/dataprocmetastore/property/projectlocationservice_network_config' +require 'google/dataprocmetastore/property/projectlocationservice_network_config_consumers' +require 'google/dataprocmetastore/property/projectlocationservice_scaling_config' +require 'google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config' +require 'google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config_limit_config' +require 'google/dataprocmetastore/property/projectlocationservice_scheduled_backup' +require 'google/dataprocmetastore/property/projectlocationservice_scheduled_backup_latest_backup' +require 'google/dataprocmetastore/property/projectlocationservice_telemetry_config' + +# A provider to manage Dataproc metastore resources. +class DataprocMetastoreProjectLocationService < GcpResourceBase + name 'google_dataproc_metastore_project_location_service' + desc 'ProjectLocationService' + supports platform: 'gcp' + + attr_reader :params + attr_reader :hive_metastore_config + attr_reader :name + attr_reader :create_time + attr_reader :update_time + attr_reader :labels + attr_reader :network + attr_reader :endpoint_uri + attr_reader :port + attr_reader :state + attr_reader :state_message + attr_reader :artifact_gcs_uri + attr_reader :tier + attr_reader :metadata_integration + attr_reader :maintenance_window + attr_reader :uid + attr_reader :metadata_management_activity + attr_reader :release_channel + attr_reader :encryption_config + attr_reader :network_config + attr_reader :database_type + attr_reader :telemetry_config + attr_reader :scaling_config + attr_reader :scheduled_backup + attr_reader :deletion_protection + + 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 + @hive_metastore_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceHiveMetastoreConfig.new(@fetched['hiveMetastoreConfig'], to_s) + @name = @fetched['name'] + @create_time = @fetched['createTime'] + @update_time = @fetched['updateTime'] + @labels = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceLabels.new(@fetched['labels'], to_s) + @network = @fetched['network'] + @endpoint_uri = @fetched['endpointUri'] + @port = @fetched['port'] + @state = @fetched['state'] + @state_message = @fetched['stateMessage'] + @artifact_gcs_uri = @fetched['artifactGcsUri'] + @tier = @fetched['tier'] + @metadata_integration = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMetadataIntegration.new(@fetched['metadataIntegration'], to_s) + @maintenance_window = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMaintenanceWindow.new(@fetched['maintenanceWindow'], to_s) + @uid = @fetched['uid'] + @metadata_management_activity = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMetadataManagementActivity.new(@fetched['metadataManagementActivity'], to_s) + @release_channel = @fetched['releaseChannel'] + @encryption_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceEncryptionConfig.new(@fetched['encryptionConfig'], to_s) + @network_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceNetworkConfig.new(@fetched['networkConfig'], to_s) + @database_type = @fetched['databaseType'] + @telemetry_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceTelemetryConfig.new(@fetched['telemetryConfig'], to_s) + @scaling_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceScalingConfig.new(@fetched['scalingConfig'], to_s) + @scheduled_backup = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceScheduledBackup.new(@fetched['scheduledBackup'], to_s) + @deletion_protection = @fetched['deletionProtection'] + end + + def exists? + !@fetched.nil? + end + + def to_s + "ProjectLocationService #{@params[:]}" + end + + private + + def product_url(_ = nil) + 'https://metastore.googleapis.com/v1beta/' + end + + def resource_base_url + '{{+name}}' + end +end diff --git a/libraries/google_dataproc_metastore_project_location_services.rb b/libraries/google_dataproc_metastore_project_location_services.rb new file mode 100644 index 00000000..2dedef15 --- /dev/null +++ b/libraries/google_dataproc_metastore_project_location_services.rb @@ -0,0 +1,125 @@ +# 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' +class DataprocMetastoreProjectLocationServices < GcpResourceBase + name 'google_dataproc_metastore_project_location_services' + desc 'ProjectLocationService plural resource' + supports platform: 'gcp' + + attr_reader :table + + filter_table_config = FilterTable.create + + filter_table_config.add(:hive_metastore_configs, field: :hive_metastore_config) + filter_table_config.add(:names, field: :name) + 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(:networks, field: :network) + filter_table_config.add(:endpoint_uris, field: :endpoint_uri) + filter_table_config.add(:ports, field: :port) + filter_table_config.add(:states, field: :state) + filter_table_config.add(:state_messages, field: :state_message) + filter_table_config.add(:artifact_gcs_uris, field: :artifact_gcs_uri) + filter_table_config.add(:tiers, field: :tier) + filter_table_config.add(:metadata_integrations, field: :metadata_integration) + filter_table_config.add(:maintenance_windows, field: :maintenance_window) + filter_table_config.add(:uids, field: :uid) + filter_table_config.add(:metadata_management_activities, field: :metadata_management_activity) + filter_table_config.add(:release_channels, field: :release_channel) + filter_table_config.add(:encryption_configs, field: :encryption_config) + filter_table_config.add(:network_configs, field: :network_config) + filter_table_config.add(:database_types, field: :database_type) + filter_table_config.add(:telemetry_configs, field: :telemetry_config) + filter_table_config.add(:scaling_configs, field: :scaling_config) + filter_table_config.add(:scheduled_backups, field: :scheduled_backup) + filter_table_config.add(:deletion_protections, field: :deletion_protection) + + filter_table_config.connect(self, :table) + + def initialize(params = {}) + super(params.merge({ use_http_transport: true })) + @params = params + @table = fetch_wrapped_resource('projectLocationServices') + end + + def fetch_wrapped_resource(wrap_path) + # fetch_resource returns an array of responses (to handle pagination) + result = @connection.fetch_all(product_url, resource_base_url, @params, 'Get') + return if result.nil? + + # Conversion of string -> object hash to symbol -> object hash that InSpec needs + converted = [] + result.each do |response| + next if response.nil? || !response.key?(wrap_path) + response[wrap_path].each do |hash| + hash_with_symbols = {} + hash.each_key do |key| + name, value = transform(key, hash) + hash_with_symbols[name] = value + end + converted.push(hash_with_symbols) + end + end + + converted + end + + def transform(key, value) + return transformers[key].call(value) if transformers.key?(key) + + [key.to_sym, value] + end + + def transformers + { + 'hiveMetastoreConfig' => ->(obj) { [:hive_metastore_config, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceHiveMetastoreConfig.new(obj['hiveMetastoreConfig'], to_s)] }, + 'name' => ->(obj) { [:name, obj['name']] }, + 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, + 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, + 'labels' => ->(obj) { [:labels, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceLabels.new(obj['labels'], to_s)] }, + 'network' => ->(obj) { [:network, obj['network']] }, + 'endpointUri' => ->(obj) { [:endpoint_uri, obj['endpointUri']] }, + 'port' => ->(obj) { [:port, obj['port']] }, + 'state' => ->(obj) { [:state, obj['state']] }, + 'stateMessage' => ->(obj) { [:state_message, obj['stateMessage']] }, + 'artifactGcsUri' => ->(obj) { [:artifact_gcs_uri, obj['artifactGcsUri']] }, + 'tier' => ->(obj) { [:tier, obj['tier']] }, + 'metadataIntegration' => ->(obj) { [:metadata_integration, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMetadataIntegration.new(obj['metadataIntegration'], to_s)] }, + 'maintenanceWindow' => ->(obj) { [:maintenance_window, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMaintenanceWindow.new(obj['maintenanceWindow'], to_s)] }, + 'uid' => ->(obj) { [:uid, obj['uid']] }, + 'metadataManagementActivity' => ->(obj) { [:metadata_management_activity, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMetadataManagementActivity.new(obj['metadataManagementActivity'], to_s)] }, + 'releaseChannel' => ->(obj) { [:release_channel, obj['releaseChannel']] }, + 'encryptionConfig' => ->(obj) { [:encryption_config, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceEncryptionConfig.new(obj['encryptionConfig'], to_s)] }, + 'networkConfig' => ->(obj) { [:network_config, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceNetworkConfig.new(obj['networkConfig'], to_s)] }, + 'databaseType' => ->(obj) { [:database_type, obj['databaseType']] }, + 'telemetryConfig' => ->(obj) { [:telemetry_config, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceTelemetryConfig.new(obj['telemetryConfig'], to_s)] }, + 'scalingConfig' => ->(obj) { [:scaling_config, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceScalingConfig.new(obj['scalingConfig'], to_s)] }, + 'scheduledBackup' => ->(obj) { [:scheduled_backup, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceScheduledBackup.new(obj['scheduledBackup'], to_s)] }, + 'deletionProtection' => ->(obj) { [:deletion_protection, obj['deletionProtection']] }, + } + end + + private + + def product_url(_ = nil) + 'https://metastore.googleapis.com/v1beta/' + end + + def resource_base_url + '{{+parent}}/services' + end +end diff --git a/test/integration/verify/controls/google_dataproc_metastore_project_location_service.rb b/test/integration/verify/controls/google_dataproc_metastore_project_location_service.rb new file mode 100644 index 00000000..dc20121a --- /dev/null +++ b/test/integration/verify/controls/google_dataproc_metastore_project_location_service.rb @@ -0,0 +1,58 @@ +# ---------------------------------------------------------------------------- +# +# *** 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_dataproc_metastore_project_location_service resource.' + +gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') + + project_location_service = input('project_location_service', value: { + "name": "value_name", + "parent": "value_parent", + "create_time": "value_createtime", + "update_time": "value_updatetime", + "network": "value_network", + "endpoint_uri": "value_endpointuri", + "state": "value_state", + "state_message": "value_statemessage", + "artifact_gcs_uri": "value_artifactgcsuri", + "tier": "value_tier", + "uid": "value_uid", + "release_channel": "value_releasechannel", + "database_type": "value_databasetype" +}, description: 'project_location_service description') +control 'google_dataproc_metastore_project_location_service-1.0' do + impact 1.0 + title 'google_dataproc_metastore_project_location_service resource test' + + describe google_dataproc_metastore_project_location_service(name: project_location_service['name']) do + it { should exist } + its('name') { should cmp project_location_service['name'] } + its('create_time') { should cmp project_location_service['create_time'] } + its('update_time') { should cmp project_location_service['update_time'] } + its('network') { should cmp project_location_service['network'] } + its('endpoint_uri') { should cmp project_location_service['endpoint_uri'] } + its('state') { should cmp project_location_service['state'] } + its('state_message') { should cmp project_location_service['state_message'] } + its('artifact_gcs_uri') { should cmp project_location_service['artifact_gcs_uri'] } + its('tier') { should cmp project_location_service['tier'] } + its('uid') { should cmp project_location_service['uid'] } + its('release_channel') { should cmp project_location_service['release_channel'] } + its('database_type') { should cmp project_location_service['database_type'] } + + end + + describe google_dataproc_metastore_project_location_service(name: "does_not_exit") do + it { should_not exist } + end +end diff --git a/test/integration/verify/controls/google_dataproc_metastore_project_location_services.rb b/test/integration/verify/controls/google_dataproc_metastore_project_location_services.rb new file mode 100644 index 00000000..08f543b1 --- /dev/null +++ b/test/integration/verify/controls/google_dataproc_metastore_project_location_services.rb @@ -0,0 +1,41 @@ +# ---------------------------------------------------------------------------- +# +# *** 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_dataproc_metastore_project_location_services resource.' + +gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') + + project_location_service = input('project_location_service', value: { + "name": "value_name", + "parent": "value_parent", + "create_time": "value_createtime", + "update_time": "value_updatetime", + "network": "value_network", + "endpoint_uri": "value_endpointuri", + "state": "value_state", + "state_message": "value_statemessage", + "artifact_gcs_uri": "value_artifactgcsuri", + "tier": "value_tier", + "uid": "value_uid", + "release_channel": "value_releasechannel", + "database_type": "value_databasetype" +}, description: 'project_location_service description') +control 'google_dataproc_metastore_project_location_services-1.0' do + impact 1.0 + title 'google_dataproc_metastore_project_location_services resource test' + + describe google_dataproc_metastore_project_location_services(parent: project_location_service['parent']) do + it { should exist } + end +end From 312d5117e1e980aa672e651c2d49aede934eab0c Mon Sep 17 00:00:00 2001 From: balasubramanian-s Date: Thu, 11 Jul 2024 17:03:45 +0530 Subject: [PATCH 2/3] rename filenames Signed-off-by: balasubramanian-s --- ...roc_metastore_project_location_services.md | 94 ------------- ...d => google_dataproc_metastore_service.md} | 18 +-- .../google_dataproc_metastore_services.md | 94 +++++++++++++ ...config.rb => service_encryption_config.rb} | 4 +- ...ig.rb => service_hive_metastore_config.rb} | 18 +-- ...ve_metastore_config_auxiliary_versions.rb} | 4 +- ...hive_metastore_config_config_overrides.rb} | 4 +- ..._hive_metastore_config_kerberos_config.rb} | 8 +- ...etastore_config_kerberos_config_keytab.rb} | 4 +- ...ionservice_labels.rb => service_labels.rb} | 4 +- ...indow.rb => service_maintenance_window.rb} | 4 +- ...ion.rb => service_metadata_integration.rb} | 14 +- ...tadata_integration_data_catalog_config.rb} | 4 +- ...e_metadata_integration_dataplex_config.rb} | 8 +- ...gration_dataplex_config_lake_resources.rb} | 4 +- ...> service_metadata_management_activity.rb} | 12 +- ...a_management_activity_metadata_exports.rb} | 10 +- ..._metadata_management_activity_restores.rb} | 10 +- ...rk_config.rb => service_network_config.rb} | 8 +- ...rb => service_network_config_consumers.rb} | 10 +- ...ng_config.rb => service_scaling_config.rb} | 10 +- ...vice_scaling_config_autoscaling_config.rb} | 8 +- ...config_autoscaling_config_limit_config.rb} | 4 +- ..._backup.rb => service_scheduled_backup.rb} | 8 +- ...service_scheduled_backup_latest_backup.rb} | 4 +- ..._config.rb => service_telemetry_config.rb} | 4 +- ...proc_metastore_project_location_service.rb | 124 ------------------ .../google_dataproc_metastore_service.rb | 124 ++++++++++++++++++ ... => google_dataproc_metastore_services.rb} | 28 ++-- ...b => google_dataproc_metastore_service.rb} | 10 +- ... => google_dataproc_metastore_services.rb} | 8 +- 31 files changed, 334 insertions(+), 334 deletions(-) delete mode 100644 docs/resources/google_dataproc_metastore_project_location_services.md rename docs/resources/{google_dataproc_metastore_project_location_service.md => google_dataproc_metastore_service.md} (94%) create mode 100644 docs/resources/google_dataproc_metastore_services.md rename libraries/google/dataprocmetastore/property/{projectlocationservice_encryption_config.rb => service_encryption_config.rb} (88%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_hive_metastore_config.rb => service_hive_metastore_config.rb} (60%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_hive_metastore_config_config_overrides.rb => service_hive_metastore_config_auxiliary_versions.rb} (86%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_hive_metastore_config_auxiliary_versions.rb => service_hive_metastore_config_config_overrides.rb} (85%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_hive_metastore_config_kerberos_config.rb => service_hive_metastore_config_kerberos_config.rb} (71%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_hive_metastore_config_kerberos_config_keytab.rb => service_hive_metastore_config_kerberos_config_keytab.rb} (84%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_labels.rb => service_labels.rb} (90%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_maintenance_window.rb => service_maintenance_window.rb} (89%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_metadata_integration.rb => service_metadata_integration.rb} (61%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_metadata_integration_data_catalog_config.rb => service_metadata_integration_data_catalog_config.rb} (85%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_metadata_integration_dataplex_config.rb => service_metadata_integration_dataplex_config.rb} (71%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_metadata_integration_dataplex_config_lake_resources.rb => service_metadata_integration_dataplex_config_lake_resources.rb} (84%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_metadata_management_activity.rb => service_metadata_management_activity.rb} (65%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_metadata_management_activity_metadata_exports.rb => service_metadata_management_activity_metadata_exports.rb} (73%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_metadata_management_activity_restores.rb => service_metadata_management_activity_restores.rb} (75%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_network_config.rb => service_network_config.rb} (78%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_network_config_consumers.rb => service_network_config_consumers.rb} (74%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_scaling_config.rb => service_scaling_config.rb} (72%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_scaling_config_autoscaling_config.rb => service_scaling_config_autoscaling_config.rb} (76%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_scaling_config_autoscaling_config_limit_config.rb => service_scaling_config_autoscaling_config_limit_config.rb} (86%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_scheduled_backup.rb => service_scheduled_backup.rb} (81%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_scheduled_backup_latest_backup.rb => service_scheduled_backup_latest_backup.rb} (88%) rename libraries/google/dataprocmetastore/property/{projectlocationservice_telemetry_config.rb => service_telemetry_config.rb} (88%) delete mode 100644 libraries/google_dataproc_metastore_project_location_service.rb create mode 100644 libraries/google_dataproc_metastore_service.rb rename libraries/{google_dataproc_metastore_project_location_services.rb => google_dataproc_metastore_services.rb} (78%) rename test/integration/verify/controls/{google_dataproc_metastore_project_location_service.rb => google_dataproc_metastore_service.rb} (84%) rename test/integration/verify/controls/{google_dataproc_metastore_project_location_services.rb => google_dataproc_metastore_services.rb} (79%) diff --git a/docs/resources/google_dataproc_metastore_project_location_services.md b/docs/resources/google_dataproc_metastore_project_location_services.md deleted file mode 100644 index 5a3e5be6..00000000 --- a/docs/resources/google_dataproc_metastore_project_location_services.md +++ /dev/null @@ -1,94 +0,0 @@ -+++ - -title = "google_dataproc_metastore_project_location_services Resource" -platform = "gcp" -draft = false -gh_repo = "inspec-gcp" - - -[menu.inspec] - -title = "google_dataproc_metastore_project_location_services" -identifier = "inspec/resources/gcp/google_dataproc_metastore_project_location_services Resource" -parent = "inspec/resources/gcp" -+++ - -Use the `google_dataproc_metastore_project_location_services` InSpec audit resource to test the properties of a test a Google ProjectLocationService. - -## Installation -{{% inspec_gcp_install %}} - -## Syntax -A `google_dataproc_metastore_project_location_services` is used to test a Google ProjectLocationService resource - -## Examples -``` - describe google_dataproc_metastore_project_location_services(parent: ' value_parent') do - it { should exist } - end -``` - -## Parameters -Properties that can be accessed from the `google_dataproc_metastore_project_location_services` resource: - -See [google_dataproc_metastore_project_location_service.md](google_dataproc_metastore_project_location_service.md) for more detailed information -* `hive_metastore_configs`: an array of `google_dataproc_metastore_project_location_service` hive_metastore_config -* `names`: an array of `google_dataproc_metastore_project_location_service` name -* `create_times`: an array of `google_dataproc_metastore_project_location_service` create_time -* `update_times`: an array of `google_dataproc_metastore_project_location_service` update_time -* `labels`: an array of `google_dataproc_metastore_project_location_service` labels -* `networks`: an array of `google_dataproc_metastore_project_location_service` network -* `endpoint_uris`: an array of `google_dataproc_metastore_project_location_service` endpoint_uri -* `ports`: an array of `google_dataproc_metastore_project_location_service` port -* `states`: an array of `google_dataproc_metastore_project_location_service` state -* `state_messages`: an array of `google_dataproc_metastore_project_location_service` state_message -* `artifact_gcs_uris`: an array of `google_dataproc_metastore_project_location_service` artifact_gcs_uri -* `tiers`: an array of `google_dataproc_metastore_project_location_service` tier -* `metadata_integrations`: an array of `google_dataproc_metastore_project_location_service` metadata_integration -* `maintenance_windows`: an array of `google_dataproc_metastore_project_location_service` maintenance_window -* `uids`: an array of `google_dataproc_metastore_project_location_service` uid -* `metadata_management_activities`: an array of `google_dataproc_metastore_project_location_service` metadata_management_activity -* `release_channels`: an array of `google_dataproc_metastore_project_location_service` release_channel -* `encryption_configs`: an array of `google_dataproc_metastore_project_location_service` encryption_config -* `network_configs`: an array of `google_dataproc_metastore_project_location_service` network_config -* `database_types`: an array of `google_dataproc_metastore_project_location_service` database_type -* `telemetry_configs`: an array of `google_dataproc_metastore_project_location_service` telemetry_config -* `scaling_configs`: an array of `google_dataproc_metastore_project_location_service` scaling_config -* `scheduled_backups`: an array of `google_dataproc_metastore_project_location_service` scheduled_backup -* `deletion_protections`: an array of `google_dataproc_metastore_project_location_service` deletion_protection -## Properties -Properties that can be accessed from the `google_dataproc_metastore_project_location_services` resource: - -See [google_dataproc_metastore_project_location_service.md](google_dataproc_metastore_project_location_service.md) for more detailed information -* `hive_metastore_configs`: an array of `google_dataproc_metastore_project_location_service` hive_metastore_config -* `names`: an array of `google_dataproc_metastore_project_location_service` name -* `create_times`: an array of `google_dataproc_metastore_project_location_service` create_time -* `update_times`: an array of `google_dataproc_metastore_project_location_service` update_time -* `labels`: an array of `google_dataproc_metastore_project_location_service` labels -* `networks`: an array of `google_dataproc_metastore_project_location_service` network -* `endpoint_uris`: an array of `google_dataproc_metastore_project_location_service` endpoint_uri -* `ports`: an array of `google_dataproc_metastore_project_location_service` port -* `states`: an array of `google_dataproc_metastore_project_location_service` state -* `state_messages`: an array of `google_dataproc_metastore_project_location_service` state_message -* `artifact_gcs_uris`: an array of `google_dataproc_metastore_project_location_service` artifact_gcs_uri -* `tiers`: an array of `google_dataproc_metastore_project_location_service` tier -* `metadata_integrations`: an array of `google_dataproc_metastore_project_location_service` metadata_integration -* `maintenance_windows`: an array of `google_dataproc_metastore_project_location_service` maintenance_window -* `uids`: an array of `google_dataproc_metastore_project_location_service` uid -* `metadata_management_activities`: an array of `google_dataproc_metastore_project_location_service` metadata_management_activity -* `release_channels`: an array of `google_dataproc_metastore_project_location_service` release_channel -* `encryption_configs`: an array of `google_dataproc_metastore_project_location_service` encryption_config -* `network_configs`: an array of `google_dataproc_metastore_project_location_service` network_config -* `database_types`: an array of `google_dataproc_metastore_project_location_service` database_type -* `telemetry_configs`: an array of `google_dataproc_metastore_project_location_service` telemetry_config -* `scaling_configs`: an array of `google_dataproc_metastore_project_location_service` scaling_config -* `scheduled_backups`: an array of `google_dataproc_metastore_project_location_service` scheduled_backup -* `deletion_protections`: an array of `google_dataproc_metastore_project_location_service` deletion_protection - -## 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 [Dataproc Metastore API](https://console.cloud.google.com/apis/library/metastore.googleapis.com) is enabled for the current project. diff --git a/docs/resources/google_dataproc_metastore_project_location_service.md b/docs/resources/google_dataproc_metastore_service.md similarity index 94% rename from docs/resources/google_dataproc_metastore_project_location_service.md rename to docs/resources/google_dataproc_metastore_service.md index 213ce6c5..b580f7f3 100644 --- a/docs/resources/google_dataproc_metastore_project_location_service.md +++ b/docs/resources/google_dataproc_metastore_service.md @@ -1,6 +1,6 @@ +++ -title = "google_dataproc_metastore_project_location_service Resource" +title = "google_dataproc_metastore_service Resource" platform = "gcp" draft = false gh_repo = "inspec-gcp" @@ -8,22 +8,22 @@ gh_repo = "inspec-gcp" [menu.inspec] -title = "google_dataproc_metastore_project_location_service" -identifier = "inspec/resources/gcp/google_dataproc_metastore_project_location_service Resource" +title = "google_dataproc_metastore_service" +identifier = "inspec/resources/gcp/google_dataproc_metastore_service Resource" parent = "inspec/resources/gcp" +++ -Use the `google_dataproc_metastore_project_location_service` InSpec audit resource to test the properties of a test a Google ProjectLocationService. +Use the `google_dataproc_metastore_service` InSpec audit resource to test the properties of a test a Google Service. ## Installation {{% inspec_gcp_install %}} ## Syntax -A `google_dataproc_metastore_project_location_service` is used to test a Google ProjectLocationService resource +A `google_dataproc_metastore_service` is used to test a Google Service resource ## Examples ``` -describe google_dataproc_metastore_project_location_service(name: ' value_name') do +describe google_dataproc_metastore_service(name: ' value_name') do it { should exist } its('name') { should cmp 'value_name' } its('create_time') { should cmp 'value_createtime' } @@ -40,16 +40,16 @@ describe google_dataproc_metastore_project_location_service(name: ' value_name') end -describe google_dataproc_metastore_project_location_service(name: "does_not_exit") do +describe google_dataproc_metastore_service(name: "does_not_exit") do it { should_not exist } end ``` ## Parameters -Properties that can be accessed from the `google_dataproc_metastore_project_location_service` resource: +Properties that can be accessed from the `google_dataproc_metastore_service` resource: ## Properties -Properties that can be accessed from the `google_dataproc_metastore_project_location_service` resource: +Properties that can be accessed from the `google_dataproc_metastore_service` resource: * `hive_metastore_config`: Specifies configuration information specific to running Hive metastore software as the metastore service. diff --git a/docs/resources/google_dataproc_metastore_services.md b/docs/resources/google_dataproc_metastore_services.md new file mode 100644 index 00000000..fe0a6bce --- /dev/null +++ b/docs/resources/google_dataproc_metastore_services.md @@ -0,0 +1,94 @@ ++++ + +title = "google_dataproc_metastore_services Resource" +platform = "gcp" +draft = false +gh_repo = "inspec-gcp" + + +[menu.inspec] + +title = "google_dataproc_metastore_services" +identifier = "inspec/resources/gcp/google_dataproc_metastore_services Resource" +parent = "inspec/resources/gcp" ++++ + +Use the `google_dataproc_metastore_services` InSpec audit resource to test the properties of a test a Google Service. + +## Installation +{{% inspec_gcp_install %}} + +## Syntax +A `google_dataproc_metastore_services` is used to test a Google Service resource + +## Examples +``` + describe google_dataproc_metastore_services(parent: ' value_parent') do + it { should exist } + end +``` + +## Parameters +Properties that can be accessed from the `google_dataproc_metastore_services` resource: + +See [google_dataproc_metastore_service.md](google_dataproc_metastore_service.md) for more detailed information +* `hive_metastore_configs`: an array of `google_dataproc_metastore_service` hive_metastore_config +* `names`: an array of `google_dataproc_metastore_service` name +* `create_times`: an array of `google_dataproc_metastore_service` create_time +* `update_times`: an array of `google_dataproc_metastore_service` update_time +* `labels`: an array of `google_dataproc_metastore_service` labels +* `networks`: an array of `google_dataproc_metastore_service` network +* `endpoint_uris`: an array of `google_dataproc_metastore_service` endpoint_uri +* `ports`: an array of `google_dataproc_metastore_service` port +* `states`: an array of `google_dataproc_metastore_service` state +* `state_messages`: an array of `google_dataproc_metastore_service` state_message +* `artifact_gcs_uris`: an array of `google_dataproc_metastore_service` artifact_gcs_uri +* `tiers`: an array of `google_dataproc_metastore_service` tier +* `metadata_integrations`: an array of `google_dataproc_metastore_service` metadata_integration +* `maintenance_windows`: an array of `google_dataproc_metastore_service` maintenance_window +* `uids`: an array of `google_dataproc_metastore_service` uid +* `metadata_management_activities`: an array of `google_dataproc_metastore_service` metadata_management_activity +* `release_channels`: an array of `google_dataproc_metastore_service` release_channel +* `encryption_configs`: an array of `google_dataproc_metastore_service` encryption_config +* `network_configs`: an array of `google_dataproc_metastore_service` network_config +* `database_types`: an array of `google_dataproc_metastore_service` database_type +* `telemetry_configs`: an array of `google_dataproc_metastore_service` telemetry_config +* `scaling_configs`: an array of `google_dataproc_metastore_service` scaling_config +* `scheduled_backups`: an array of `google_dataproc_metastore_service` scheduled_backup +* `deletion_protections`: an array of `google_dataproc_metastore_service` deletion_protection +## Properties +Properties that can be accessed from the `google_dataproc_metastore_services` resource: + +See [google_dataproc_metastore_service.md](google_dataproc_metastore_service.md) for more detailed information +* `hive_metastore_configs`: an array of `google_dataproc_metastore_service` hive_metastore_config +* `names`: an array of `google_dataproc_metastore_service` name +* `create_times`: an array of `google_dataproc_metastore_service` create_time +* `update_times`: an array of `google_dataproc_metastore_service` update_time +* `labels`: an array of `google_dataproc_metastore_service` labels +* `networks`: an array of `google_dataproc_metastore_service` network +* `endpoint_uris`: an array of `google_dataproc_metastore_service` endpoint_uri +* `ports`: an array of `google_dataproc_metastore_service` port +* `states`: an array of `google_dataproc_metastore_service` state +* `state_messages`: an array of `google_dataproc_metastore_service` state_message +* `artifact_gcs_uris`: an array of `google_dataproc_metastore_service` artifact_gcs_uri +* `tiers`: an array of `google_dataproc_metastore_service` tier +* `metadata_integrations`: an array of `google_dataproc_metastore_service` metadata_integration +* `maintenance_windows`: an array of `google_dataproc_metastore_service` maintenance_window +* `uids`: an array of `google_dataproc_metastore_service` uid +* `metadata_management_activities`: an array of `google_dataproc_metastore_service` metadata_management_activity +* `release_channels`: an array of `google_dataproc_metastore_service` release_channel +* `encryption_configs`: an array of `google_dataproc_metastore_service` encryption_config +* `network_configs`: an array of `google_dataproc_metastore_service` network_config +* `database_types`: an array of `google_dataproc_metastore_service` database_type +* `telemetry_configs`: an array of `google_dataproc_metastore_service` telemetry_config +* `scaling_configs`: an array of `google_dataproc_metastore_service` scaling_config +* `scheduled_backups`: an array of `google_dataproc_metastore_service` scheduled_backup +* `deletion_protections`: an array of `google_dataproc_metastore_service` deletion_protection + +## 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 [Dataproc Metastore API](https://console.cloud.google.com/apis/library/metastore.googleapis.com) is enabled for the current project. diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_encryption_config.rb b/libraries/google/dataprocmetastore/property/service_encryption_config.rb similarity index 88% rename from libraries/google/dataprocmetastore/property/projectlocationservice_encryption_config.rb rename to libraries/google/dataprocmetastore/property/service_encryption_config.rb index d6a8dbe1..d9bac098 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_encryption_config.rb +++ b/libraries/google/dataprocmetastore/property/service_encryption_config.rb @@ -16,7 +16,7 @@ module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceEncryptionConfig + class ServiceEncryptionConfig attr_reader :kms_key def initialize(args = nil, parent_identifier = nil) @@ -26,7 +26,7 @@ def initialize(args = nil, parent_identifier = nil) end def to_s - "#{@parent_identifier} ProjectLocationServiceEncryptionConfig" + "#{@parent_identifier} ServiceEncryptionConfig" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config.rb b/libraries/google/dataprocmetastore/property/service_hive_metastore_config.rb similarity index 60% rename from libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config.rb rename to libraries/google/dataprocmetastore/property/service_hive_metastore_config.rb index 3f82c5d3..5f193045 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config.rb +++ b/libraries/google/dataprocmetastore/property/service_hive_metastore_config.rb @@ -13,14 +13,14 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_auxiliary_versions' -require 'google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_config_overrides' -require 'google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config' -require 'google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config_keytab' +require 'google/dataprocmetastore/property/service_hive_metastore_config_auxiliary_versions' +require 'google/dataprocmetastore/property/service_hive_metastore_config_config_overrides' +require 'google/dataprocmetastore/property/service_hive_metastore_config_kerberos_config' +require 'google/dataprocmetastore/property/service_hive_metastore_config_kerberos_config_keytab' module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceHiveMetastoreConfig + class ServiceHiveMetastoreConfig attr_reader :version attr_reader :config_overrides @@ -35,14 +35,14 @@ def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @version = args['version'] - @config_overrides = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceHiveMetastoreConfigConfigOverrides.new(args['configOverrides'], to_s) - @kerberos_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceHiveMetastoreConfigKerberosConfig.new(args['kerberosConfig'], to_s) + @config_overrides = GoogleInSpec::DataprocMetastore::Property::ServiceHiveMetastoreConfigConfigOverrides.new(args['configOverrides'], to_s) + @kerberos_config = GoogleInSpec::DataprocMetastore::Property::ServiceHiveMetastoreConfigKerberosConfig.new(args['kerberosConfig'], to_s) @endpoint_protocol = args['endpointProtocol'] - @auxiliary_versions = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceHiveMetastoreConfigAuxiliaryVersions.new(args['auxiliaryVersions'], to_s) + @auxiliary_versions = GoogleInSpec::DataprocMetastore::Property::ServiceHiveMetastoreConfigAuxiliaryVersions.new(args['auxiliaryVersions'], to_s) end def to_s - "#{@parent_identifier} ProjectLocationServiceHiveMetastoreConfig" + "#{@parent_identifier} ServiceHiveMetastoreConfig" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_config_overrides.rb b/libraries/google/dataprocmetastore/property/service_hive_metastore_config_auxiliary_versions.rb similarity index 86% rename from libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_config_overrides.rb rename to libraries/google/dataprocmetastore/property/service_hive_metastore_config_auxiliary_versions.rb index a33ec4b8..aa432531 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_config_overrides.rb +++ b/libraries/google/dataprocmetastore/property/service_hive_metastore_config_auxiliary_versions.rb @@ -16,7 +16,7 @@ module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceHiveMetastoreConfigConfigOverrides + class ServiceHiveMetastoreConfigAuxiliaryVersions attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) @@ -26,7 +26,7 @@ def initialize(args = nil, parent_identifier = nil) end def to_s - "#{@parent_identifier} ProjectLocationServiceHiveMetastoreConfigConfigOverrides" + "#{@parent_identifier} ServiceHiveMetastoreConfigAuxiliaryVersions" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_auxiliary_versions.rb b/libraries/google/dataprocmetastore/property/service_hive_metastore_config_config_overrides.rb similarity index 85% rename from libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_auxiliary_versions.rb rename to libraries/google/dataprocmetastore/property/service_hive_metastore_config_config_overrides.rb index e078178a..d29722b1 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_auxiliary_versions.rb +++ b/libraries/google/dataprocmetastore/property/service_hive_metastore_config_config_overrides.rb @@ -16,7 +16,7 @@ module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceHiveMetastoreConfigAuxiliaryVersions + class ServiceHiveMetastoreConfigConfigOverrides attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) @@ -26,7 +26,7 @@ def initialize(args = nil, parent_identifier = nil) end def to_s - "#{@parent_identifier} ProjectLocationServiceHiveMetastoreConfigAuxiliaryVersions" + "#{@parent_identifier} ServiceHiveMetastoreConfigConfigOverrides" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config.rb b/libraries/google/dataprocmetastore/property/service_hive_metastore_config_kerberos_config.rb similarity index 71% rename from libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config.rb rename to libraries/google/dataprocmetastore/property/service_hive_metastore_config_kerberos_config.rb index 579dab22..67f29ea1 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config.rb +++ b/libraries/google/dataprocmetastore/property/service_hive_metastore_config_kerberos_config.rb @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config_keytab' +require 'google/dataprocmetastore/property/service_hive_metastore_config_kerberos_config_keytab' module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceHiveMetastoreConfigKerberosConfig + class ServiceHiveMetastoreConfigKerberosConfig attr_reader :keytab attr_reader :principal @@ -27,13 +27,13 @@ class ProjectLocationServiceHiveMetastoreConfigKerberosConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @keytab = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceHiveMetastoreConfigKerberosConfigKeytab.new(args['keytab'], to_s) + @keytab = GoogleInSpec::DataprocMetastore::Property::ServiceHiveMetastoreConfigKerberosConfigKeytab.new(args['keytab'], to_s) @principal = args['principal'] @krb5_config_gcs_uri = args['krb5ConfigGcsUri'] end def to_s - "#{@parent_identifier} ProjectLocationServiceHiveMetastoreConfigKerberosConfig" + "#{@parent_identifier} ServiceHiveMetastoreConfigKerberosConfig" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config_keytab.rb b/libraries/google/dataprocmetastore/property/service_hive_metastore_config_kerberos_config_keytab.rb similarity index 84% rename from libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config_keytab.rb rename to libraries/google/dataprocmetastore/property/service_hive_metastore_config_kerberos_config_keytab.rb index 3f72e92a..e6ec076c 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config_keytab.rb +++ b/libraries/google/dataprocmetastore/property/service_hive_metastore_config_kerberos_config_keytab.rb @@ -16,7 +16,7 @@ module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceHiveMetastoreConfigKerberosConfigKeytab + class ServiceHiveMetastoreConfigKerberosConfigKeytab attr_reader :cloud_secret def initialize(args = nil, parent_identifier = nil) @@ -26,7 +26,7 @@ def initialize(args = nil, parent_identifier = nil) end def to_s - "#{@parent_identifier} ProjectLocationServiceHiveMetastoreConfigKerberosConfigKeytab" + "#{@parent_identifier} ServiceHiveMetastoreConfigKerberosConfigKeytab" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_labels.rb b/libraries/google/dataprocmetastore/property/service_labels.rb similarity index 90% rename from libraries/google/dataprocmetastore/property/projectlocationservice_labels.rb rename to libraries/google/dataprocmetastore/property/service_labels.rb index 0b43a854..2bfd7e44 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_labels.rb +++ b/libraries/google/dataprocmetastore/property/service_labels.rb @@ -16,7 +16,7 @@ module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceLabels + class ServiceLabels attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) @@ -26,7 +26,7 @@ def initialize(args = nil, parent_identifier = nil) end def to_s - "#{@parent_identifier} ProjectLocationServiceLabels" + "#{@parent_identifier} ServiceLabels" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_maintenance_window.rb b/libraries/google/dataprocmetastore/property/service_maintenance_window.rb similarity index 89% rename from libraries/google/dataprocmetastore/property/projectlocationservice_maintenance_window.rb rename to libraries/google/dataprocmetastore/property/service_maintenance_window.rb index 2d4095cf..4bc66f8c 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_maintenance_window.rb +++ b/libraries/google/dataprocmetastore/property/service_maintenance_window.rb @@ -16,7 +16,7 @@ module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceMaintenanceWindow + class ServiceMaintenanceWindow attr_reader :hour_of_day attr_reader :day_of_week @@ -29,7 +29,7 @@ def initialize(args = nil, parent_identifier = nil) end def to_s - "#{@parent_identifier} ProjectLocationServiceMaintenanceWindow" + "#{@parent_identifier} ServiceMaintenanceWindow" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration.rb b/libraries/google/dataprocmetastore/property/service_metadata_integration.rb similarity index 61% rename from libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration.rb rename to libraries/google/dataprocmetastore/property/service_metadata_integration.rb index d7e0c97c..4e77c385 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration.rb +++ b/libraries/google/dataprocmetastore/property/service_metadata_integration.rb @@ -13,13 +13,13 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataprocmetastore/property/projectlocationservice_metadata_integration_data_catalog_config' -require 'google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config' -require 'google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config_lake_resources' +require 'google/dataprocmetastore/property/service_metadata_integration_data_catalog_config' +require 'google/dataprocmetastore/property/service_metadata_integration_dataplex_config' +require 'google/dataprocmetastore/property/service_metadata_integration_dataplex_config_lake_resources' module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceMetadataIntegration + class ServiceMetadataIntegration attr_reader :data_catalog_config attr_reader :dataplex_config @@ -27,12 +27,12 @@ class ProjectLocationServiceMetadataIntegration def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @data_catalog_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMetadataIntegrationDataCatalogConfig.new(args['dataCatalogConfig'], to_s) - @dataplex_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMetadataIntegrationDataplexConfig.new(args['dataplexConfig'], to_s) + @data_catalog_config = GoogleInSpec::DataprocMetastore::Property::ServiceMetadataIntegrationDataCatalogConfig.new(args['dataCatalogConfig'], to_s) + @dataplex_config = GoogleInSpec::DataprocMetastore::Property::ServiceMetadataIntegrationDataplexConfig.new(args['dataplexConfig'], to_s) end def to_s - "#{@parent_identifier} ProjectLocationServiceMetadataIntegration" + "#{@parent_identifier} ServiceMetadataIntegration" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_data_catalog_config.rb b/libraries/google/dataprocmetastore/property/service_metadata_integration_data_catalog_config.rb similarity index 85% rename from libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_data_catalog_config.rb rename to libraries/google/dataprocmetastore/property/service_metadata_integration_data_catalog_config.rb index 211de3cf..4375e7f2 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_data_catalog_config.rb +++ b/libraries/google/dataprocmetastore/property/service_metadata_integration_data_catalog_config.rb @@ -16,7 +16,7 @@ module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceMetadataIntegrationDataCatalogConfig + class ServiceMetadataIntegrationDataCatalogConfig attr_reader :enabled def initialize(args = nil, parent_identifier = nil) @@ -26,7 +26,7 @@ def initialize(args = nil, parent_identifier = nil) end def to_s - "#{@parent_identifier} ProjectLocationServiceMetadataIntegrationDataCatalogConfig" + "#{@parent_identifier} ServiceMetadataIntegrationDataCatalogConfig" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config.rb b/libraries/google/dataprocmetastore/property/service_metadata_integration_dataplex_config.rb similarity index 71% rename from libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config.rb rename to libraries/google/dataprocmetastore/property/service_metadata_integration_dataplex_config.rb index b312ef63..a968d9fb 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config.rb +++ b/libraries/google/dataprocmetastore/property/service_metadata_integration_dataplex_config.rb @@ -13,21 +13,21 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config_lake_resources' +require 'google/dataprocmetastore/property/service_metadata_integration_dataplex_config_lake_resources' module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceMetadataIntegrationDataplexConfig + class ServiceMetadataIntegrationDataplexConfig attr_reader :lake_resources def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @lake_resources = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMetadataIntegrationDataplexConfigLakeResources.new(args['lakeResources'], to_s) + @lake_resources = GoogleInSpec::DataprocMetastore::Property::ServiceMetadataIntegrationDataplexConfigLakeResources.new(args['lakeResources'], to_s) end def to_s - "#{@parent_identifier} ProjectLocationServiceMetadataIntegrationDataplexConfig" + "#{@parent_identifier} ServiceMetadataIntegrationDataplexConfig" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config_lake_resources.rb b/libraries/google/dataprocmetastore/property/service_metadata_integration_dataplex_config_lake_resources.rb similarity index 84% rename from libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config_lake_resources.rb rename to libraries/google/dataprocmetastore/property/service_metadata_integration_dataplex_config_lake_resources.rb index bf5de10e..a3e34a6b 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config_lake_resources.rb +++ b/libraries/google/dataprocmetastore/property/service_metadata_integration_dataplex_config_lake_resources.rb @@ -16,7 +16,7 @@ module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceMetadataIntegrationDataplexConfigLakeResources + class ServiceMetadataIntegrationDataplexConfigLakeResources attr_reader :additional_properties def initialize(args = nil, parent_identifier = nil) @@ -26,7 +26,7 @@ def initialize(args = nil, parent_identifier = nil) end def to_s - "#{@parent_identifier} ProjectLocationServiceMetadataIntegrationDataplexConfigLakeResources" + "#{@parent_identifier} ServiceMetadataIntegrationDataplexConfigLakeResources" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity.rb b/libraries/google/dataprocmetastore/property/service_metadata_management_activity.rb similarity index 65% rename from libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity.rb rename to libraries/google/dataprocmetastore/property/service_metadata_management_activity.rb index 79726dd5..9cfae8b7 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity.rb +++ b/libraries/google/dataprocmetastore/property/service_metadata_management_activity.rb @@ -13,12 +13,12 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_metadata_exports' -require 'google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_restores' +require 'google/dataprocmetastore/property/service_metadata_management_activity_metadata_exports' +require 'google/dataprocmetastore/property/service_metadata_management_activity_restores' module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceMetadataManagementActivity + class ServiceMetadataManagementActivity attr_reader :metadata_exports attr_reader :restores @@ -26,12 +26,12 @@ class ProjectLocationServiceMetadataManagementActivity def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @metadata_exports = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMetadataManagementActivityMetadataExportsArray.parse(args['metadataExports'], to_s) - @restores = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMetadataManagementActivityRestoresArray.parse(args['restores'], to_s) + @metadata_exports = GoogleInSpec::DataprocMetastore::Property::ServiceMetadataManagementActivityMetadataExportsArray.parse(args['metadataExports'], to_s) + @restores = GoogleInSpec::DataprocMetastore::Property::ServiceMetadataManagementActivityRestoresArray.parse(args['restores'], to_s) end def to_s - "#{@parent_identifier} ProjectLocationServiceMetadataManagementActivity" + "#{@parent_identifier} ServiceMetadataManagementActivity" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_metadata_exports.rb b/libraries/google/dataprocmetastore/property/service_metadata_management_activity_metadata_exports.rb similarity index 73% rename from libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_metadata_exports.rb rename to libraries/google/dataprocmetastore/property/service_metadata_management_activity_metadata_exports.rb index 1d1cdf89..d0507e1e 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_metadata_exports.rb +++ b/libraries/google/dataprocmetastore/property/service_metadata_management_activity_metadata_exports.rb @@ -16,7 +16,7 @@ module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceMetadataManagementActivityMetadataExports + class ServiceMetadataManagementActivityMetadataExports attr_reader :destination_gcs_uri attr_reader :start_time @@ -38,15 +38,15 @@ def initialize(args = nil, parent_identifier = nil) end def to_s - "#{@parent_identifier} ProjectLocationServiceMetadataManagementActivityMetadataExports" + "#{@parent_identifier} ServiceMetadataManagementActivityMetadataExports" end end - class ProjectLocationServiceMetadataManagementActivityMetadataExportsArray + class ServiceMetadataManagementActivityMetadataExportsArray def self.parse(value, parent_identifier) return if value.nil? - return ProjectLocationServiceMetadataManagementActivityMetadataExports.new(value, parent_identifier) unless value.is_a?(::Array) - value.map { |v| ProjectLocationServiceMetadataManagementActivityMetadataExports.new(v, parent_identifier) } + return ServiceMetadataManagementActivityMetadataExports.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ServiceMetadataManagementActivityMetadataExports.new(v, parent_identifier) } end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_restores.rb b/libraries/google/dataprocmetastore/property/service_metadata_management_activity_restores.rb similarity index 75% rename from libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_restores.rb rename to libraries/google/dataprocmetastore/property/service_metadata_management_activity_restores.rb index 72173d61..2ee8b70a 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_restores.rb +++ b/libraries/google/dataprocmetastore/property/service_metadata_management_activity_restores.rb @@ -16,7 +16,7 @@ module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceMetadataManagementActivityRestores + class ServiceMetadataManagementActivityRestores attr_reader :start_time attr_reader :end_time @@ -44,15 +44,15 @@ def initialize(args = nil, parent_identifier = nil) end def to_s - "#{@parent_identifier} ProjectLocationServiceMetadataManagementActivityRestores" + "#{@parent_identifier} ServiceMetadataManagementActivityRestores" end end - class ProjectLocationServiceMetadataManagementActivityRestoresArray + class ServiceMetadataManagementActivityRestoresArray def self.parse(value, parent_identifier) return if value.nil? - return ProjectLocationServiceMetadataManagementActivityRestores.new(value, parent_identifier) unless value.is_a?(::Array) - value.map { |v| ProjectLocationServiceMetadataManagementActivityRestores.new(v, parent_identifier) } + return ServiceMetadataManagementActivityRestores.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ServiceMetadataManagementActivityRestores.new(v, parent_identifier) } end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_network_config.rb b/libraries/google/dataprocmetastore/property/service_network_config.rb similarity index 78% rename from libraries/google/dataprocmetastore/property/projectlocationservice_network_config.rb rename to libraries/google/dataprocmetastore/property/service_network_config.rb index d7aa24e6..d6462085 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_network_config.rb +++ b/libraries/google/dataprocmetastore/property/service_network_config.rb @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataprocmetastore/property/projectlocationservice_network_config_consumers' +require 'google/dataprocmetastore/property/service_network_config_consumers' module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceNetworkConfig + class ServiceNetworkConfig attr_reader :consumers attr_reader :custom_routes_enabled @@ -25,12 +25,12 @@ class ProjectLocationServiceNetworkConfig def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @consumers = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceNetworkConfigConsumersArray.parse(args['consumers'], to_s) + @consumers = GoogleInSpec::DataprocMetastore::Property::ServiceNetworkConfigConsumersArray.parse(args['consumers'], to_s) @custom_routes_enabled = args['customRoutesEnabled'] end def to_s - "#{@parent_identifier} ProjectLocationServiceNetworkConfig" + "#{@parent_identifier} ServiceNetworkConfig" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_network_config_consumers.rb b/libraries/google/dataprocmetastore/property/service_network_config_consumers.rb similarity index 74% rename from libraries/google/dataprocmetastore/property/projectlocationservice_network_config_consumers.rb rename to libraries/google/dataprocmetastore/property/service_network_config_consumers.rb index ac17b504..79e27184 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_network_config_consumers.rb +++ b/libraries/google/dataprocmetastore/property/service_network_config_consumers.rb @@ -16,7 +16,7 @@ module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceNetworkConfigConsumers + class ServiceNetworkConfigConsumers attr_reader :subnetwork attr_reader :endpoint_uri @@ -32,15 +32,15 @@ def initialize(args = nil, parent_identifier = nil) end def to_s - "#{@parent_identifier} ProjectLocationServiceNetworkConfigConsumers" + "#{@parent_identifier} ServiceNetworkConfigConsumers" end end - class ProjectLocationServiceNetworkConfigConsumersArray + class ServiceNetworkConfigConsumersArray def self.parse(value, parent_identifier) return if value.nil? - return ProjectLocationServiceNetworkConfigConsumers.new(value, parent_identifier) unless value.is_a?(::Array) - value.map { |v| ProjectLocationServiceNetworkConfigConsumers.new(v, parent_identifier) } + return ServiceNetworkConfigConsumers.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| ServiceNetworkConfigConsumers.new(v, parent_identifier) } end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config.rb b/libraries/google/dataprocmetastore/property/service_scaling_config.rb similarity index 72% rename from libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config.rb rename to libraries/google/dataprocmetastore/property/service_scaling_config.rb index be37584e..c5911bb2 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config.rb +++ b/libraries/google/dataprocmetastore/property/service_scaling_config.rb @@ -13,12 +13,12 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config' -require 'google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config_limit_config' +require 'google/dataprocmetastore/property/service_scaling_config_autoscaling_config' +require 'google/dataprocmetastore/property/service_scaling_config_autoscaling_config_limit_config' module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceScalingConfig + class ServiceScalingConfig attr_reader :instance_size attr_reader :scaling_factor @@ -30,11 +30,11 @@ def initialize(args = nil, parent_identifier = nil) @parent_identifier = parent_identifier @instance_size = args['instanceSize'] @scaling_factor = args['scalingFactor'] - @autoscaling_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceScalingConfigAutoscalingConfig.new(args['autoscalingConfig'], to_s) + @autoscaling_config = GoogleInSpec::DataprocMetastore::Property::ServiceScalingConfigAutoscalingConfig.new(args['autoscalingConfig'], to_s) end def to_s - "#{@parent_identifier} ProjectLocationServiceScalingConfig" + "#{@parent_identifier} ServiceScalingConfig" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config.rb b/libraries/google/dataprocmetastore/property/service_scaling_config_autoscaling_config.rb similarity index 76% rename from libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config.rb rename to libraries/google/dataprocmetastore/property/service_scaling_config_autoscaling_config.rb index 7c790b24..2cfdb111 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config.rb +++ b/libraries/google/dataprocmetastore/property/service_scaling_config_autoscaling_config.rb @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config_limit_config' +require 'google/dataprocmetastore/property/service_scaling_config_autoscaling_config_limit_config' module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceScalingConfigAutoscalingConfig + class ServiceScalingConfigAutoscalingConfig attr_reader :autoscaling_factor attr_reader :autoscaling_enabled @@ -29,11 +29,11 @@ def initialize(args = nil, parent_identifier = nil) @parent_identifier = parent_identifier @autoscaling_factor = args['autoscalingFactor'] @autoscaling_enabled = args['autoscalingEnabled'] - @limit_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceScalingConfigAutoscalingConfigLimitConfig.new(args['limitConfig'], to_s) + @limit_config = GoogleInSpec::DataprocMetastore::Property::ServiceScalingConfigAutoscalingConfigLimitConfig.new(args['limitConfig'], to_s) end def to_s - "#{@parent_identifier} ProjectLocationServiceScalingConfigAutoscalingConfig" + "#{@parent_identifier} ServiceScalingConfigAutoscalingConfig" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config_limit_config.rb b/libraries/google/dataprocmetastore/property/service_scaling_config_autoscaling_config_limit_config.rb similarity index 86% rename from libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config_limit_config.rb rename to libraries/google/dataprocmetastore/property/service_scaling_config_autoscaling_config_limit_config.rb index 8df61525..45d983b1 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config_limit_config.rb +++ b/libraries/google/dataprocmetastore/property/service_scaling_config_autoscaling_config_limit_config.rb @@ -16,7 +16,7 @@ module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceScalingConfigAutoscalingConfigLimitConfig + class ServiceScalingConfigAutoscalingConfigLimitConfig attr_reader :max_scaling_factor attr_reader :min_scaling_factor @@ -29,7 +29,7 @@ def initialize(args = nil, parent_identifier = nil) end def to_s - "#{@parent_identifier} ProjectLocationServiceScalingConfigAutoscalingConfigLimitConfig" + "#{@parent_identifier} ServiceScalingConfigAutoscalingConfigLimitConfig" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_scheduled_backup.rb b/libraries/google/dataprocmetastore/property/service_scheduled_backup.rb similarity index 81% rename from libraries/google/dataprocmetastore/property/projectlocationservice_scheduled_backup.rb rename to libraries/google/dataprocmetastore/property/service_scheduled_backup.rb index 90f53467..f397fa9d 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_scheduled_backup.rb +++ b/libraries/google/dataprocmetastore/property/service_scheduled_backup.rb @@ -13,11 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- -require 'google/dataprocmetastore/property/projectlocationservice_scheduled_backup_latest_backup' +require 'google/dataprocmetastore/property/service_scheduled_backup_latest_backup' module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceScheduledBackup + class ServiceScheduledBackup attr_reader :enabled attr_reader :cron_schedule @@ -38,11 +38,11 @@ def initialize(args = nil, parent_identifier = nil) @time_zone = args['timeZone'] @next_scheduled_time = args['nextScheduledTime'] @backup_location = args['backupLocation'] - @latest_backup = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceScheduledBackupLatestBackup.new(args['latestBackup'], to_s) + @latest_backup = GoogleInSpec::DataprocMetastore::Property::ServiceScheduledBackupLatestBackup.new(args['latestBackup'], to_s) end def to_s - "#{@parent_identifier} ProjectLocationServiceScheduledBackup" + "#{@parent_identifier} ServiceScheduledBackup" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_scheduled_backup_latest_backup.rb b/libraries/google/dataprocmetastore/property/service_scheduled_backup_latest_backup.rb similarity index 88% rename from libraries/google/dataprocmetastore/property/projectlocationservice_scheduled_backup_latest_backup.rb rename to libraries/google/dataprocmetastore/property/service_scheduled_backup_latest_backup.rb index 4d8b4a0d..f87afef1 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_scheduled_backup_latest_backup.rb +++ b/libraries/google/dataprocmetastore/property/service_scheduled_backup_latest_backup.rb @@ -16,7 +16,7 @@ module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceScheduledBackupLatestBackup + class ServiceScheduledBackupLatestBackup attr_reader :backup_id attr_reader :start_time @@ -35,7 +35,7 @@ def initialize(args = nil, parent_identifier = nil) end def to_s - "#{@parent_identifier} ProjectLocationServiceScheduledBackupLatestBackup" + "#{@parent_identifier} ServiceScheduledBackupLatestBackup" end end end diff --git a/libraries/google/dataprocmetastore/property/projectlocationservice_telemetry_config.rb b/libraries/google/dataprocmetastore/property/service_telemetry_config.rb similarity index 88% rename from libraries/google/dataprocmetastore/property/projectlocationservice_telemetry_config.rb rename to libraries/google/dataprocmetastore/property/service_telemetry_config.rb index 6cac63f9..d488f8aa 100644 --- a/libraries/google/dataprocmetastore/property/projectlocationservice_telemetry_config.rb +++ b/libraries/google/dataprocmetastore/property/service_telemetry_config.rb @@ -16,7 +16,7 @@ module GoogleInSpec module DataprocMetastore module Property - class ProjectLocationServiceTelemetryConfig + class ServiceTelemetryConfig attr_reader :log_format def initialize(args = nil, parent_identifier = nil) @@ -26,7 +26,7 @@ def initialize(args = nil, parent_identifier = nil) end def to_s - "#{@parent_identifier} ProjectLocationServiceTelemetryConfig" + "#{@parent_identifier} ServiceTelemetryConfig" end end end diff --git a/libraries/google_dataproc_metastore_project_location_service.rb b/libraries/google_dataproc_metastore_project_location_service.rb deleted file mode 100644 index 0f987a4f..00000000 --- a/libraries/google_dataproc_metastore_project_location_service.rb +++ /dev/null @@ -1,124 +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/dataprocmetastore/property/projectlocationservice_encryption_config' -require 'google/dataprocmetastore/property/projectlocationservice_hive_metastore_config' -require 'google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_auxiliary_versions' -require 'google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_config_overrides' -require 'google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config' -require 'google/dataprocmetastore/property/projectlocationservice_hive_metastore_config_kerberos_config_keytab' -require 'google/dataprocmetastore/property/projectlocationservice_labels' -require 'google/dataprocmetastore/property/projectlocationservice_maintenance_window' -require 'google/dataprocmetastore/property/projectlocationservice_metadata_integration' -require 'google/dataprocmetastore/property/projectlocationservice_metadata_integration_data_catalog_config' -require 'google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config' -require 'google/dataprocmetastore/property/projectlocationservice_metadata_integration_dataplex_config_lake_resources' -require 'google/dataprocmetastore/property/projectlocationservice_metadata_management_activity' -require 'google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_metadata_exports' -require 'google/dataprocmetastore/property/projectlocationservice_metadata_management_activity_restores' -require 'google/dataprocmetastore/property/projectlocationservice_network_config' -require 'google/dataprocmetastore/property/projectlocationservice_network_config_consumers' -require 'google/dataprocmetastore/property/projectlocationservice_scaling_config' -require 'google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config' -require 'google/dataprocmetastore/property/projectlocationservice_scaling_config_autoscaling_config_limit_config' -require 'google/dataprocmetastore/property/projectlocationservice_scheduled_backup' -require 'google/dataprocmetastore/property/projectlocationservice_scheduled_backup_latest_backup' -require 'google/dataprocmetastore/property/projectlocationservice_telemetry_config' - -# A provider to manage Dataproc metastore resources. -class DataprocMetastoreProjectLocationService < GcpResourceBase - name 'google_dataproc_metastore_project_location_service' - desc 'ProjectLocationService' - supports platform: 'gcp' - - attr_reader :params - attr_reader :hive_metastore_config - attr_reader :name - attr_reader :create_time - attr_reader :update_time - attr_reader :labels - attr_reader :network - attr_reader :endpoint_uri - attr_reader :port - attr_reader :state - attr_reader :state_message - attr_reader :artifact_gcs_uri - attr_reader :tier - attr_reader :metadata_integration - attr_reader :maintenance_window - attr_reader :uid - attr_reader :metadata_management_activity - attr_reader :release_channel - attr_reader :encryption_config - attr_reader :network_config - attr_reader :database_type - attr_reader :telemetry_config - attr_reader :scaling_config - attr_reader :scheduled_backup - attr_reader :deletion_protection - - 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 - @hive_metastore_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceHiveMetastoreConfig.new(@fetched['hiveMetastoreConfig'], to_s) - @name = @fetched['name'] - @create_time = @fetched['createTime'] - @update_time = @fetched['updateTime'] - @labels = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceLabels.new(@fetched['labels'], to_s) - @network = @fetched['network'] - @endpoint_uri = @fetched['endpointUri'] - @port = @fetched['port'] - @state = @fetched['state'] - @state_message = @fetched['stateMessage'] - @artifact_gcs_uri = @fetched['artifactGcsUri'] - @tier = @fetched['tier'] - @metadata_integration = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMetadataIntegration.new(@fetched['metadataIntegration'], to_s) - @maintenance_window = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMaintenanceWindow.new(@fetched['maintenanceWindow'], to_s) - @uid = @fetched['uid'] - @metadata_management_activity = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMetadataManagementActivity.new(@fetched['metadataManagementActivity'], to_s) - @release_channel = @fetched['releaseChannel'] - @encryption_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceEncryptionConfig.new(@fetched['encryptionConfig'], to_s) - @network_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceNetworkConfig.new(@fetched['networkConfig'], to_s) - @database_type = @fetched['databaseType'] - @telemetry_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceTelemetryConfig.new(@fetched['telemetryConfig'], to_s) - @scaling_config = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceScalingConfig.new(@fetched['scalingConfig'], to_s) - @scheduled_backup = GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceScheduledBackup.new(@fetched['scheduledBackup'], to_s) - @deletion_protection = @fetched['deletionProtection'] - end - - def exists? - !@fetched.nil? - end - - def to_s - "ProjectLocationService #{@params[:]}" - end - - private - - def product_url(_ = nil) - 'https://metastore.googleapis.com/v1beta/' - end - - def resource_base_url - '{{+name}}' - end -end diff --git a/libraries/google_dataproc_metastore_service.rb b/libraries/google_dataproc_metastore_service.rb new file mode 100644 index 00000000..41c36306 --- /dev/null +++ b/libraries/google_dataproc_metastore_service.rb @@ -0,0 +1,124 @@ +# 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/dataprocmetastore/property/service_encryption_config' +require 'google/dataprocmetastore/property/service_hive_metastore_config' +require 'google/dataprocmetastore/property/service_hive_metastore_config_auxiliary_versions' +require 'google/dataprocmetastore/property/service_hive_metastore_config_config_overrides' +require 'google/dataprocmetastore/property/service_hive_metastore_config_kerberos_config' +require 'google/dataprocmetastore/property/service_hive_metastore_config_kerberos_config_keytab' +require 'google/dataprocmetastore/property/service_labels' +require 'google/dataprocmetastore/property/service_maintenance_window' +require 'google/dataprocmetastore/property/service_metadata_integration' +require 'google/dataprocmetastore/property/service_metadata_integration_data_catalog_config' +require 'google/dataprocmetastore/property/service_metadata_integration_dataplex_config' +require 'google/dataprocmetastore/property/service_metadata_integration_dataplex_config_lake_resources' +require 'google/dataprocmetastore/property/service_metadata_management_activity' +require 'google/dataprocmetastore/property/service_metadata_management_activity_metadata_exports' +require 'google/dataprocmetastore/property/service_metadata_management_activity_restores' +require 'google/dataprocmetastore/property/service_network_config' +require 'google/dataprocmetastore/property/service_network_config_consumers' +require 'google/dataprocmetastore/property/service_scaling_config' +require 'google/dataprocmetastore/property/service_scaling_config_autoscaling_config' +require 'google/dataprocmetastore/property/service_scaling_config_autoscaling_config_limit_config' +require 'google/dataprocmetastore/property/service_scheduled_backup' +require 'google/dataprocmetastore/property/service_scheduled_backup_latest_backup' +require 'google/dataprocmetastore/property/service_telemetry_config' + +# A provider to manage Dataproc metastore resources. +class DataprocMetastoreService < GcpResourceBase + name 'google_dataproc_metastore_service' + desc 'Service' + supports platform: 'gcp' + + attr_reader :params + attr_reader :hive_metastore_config + attr_reader :name + attr_reader :create_time + attr_reader :update_time + attr_reader :labels + attr_reader :network + attr_reader :endpoint_uri + attr_reader :port + attr_reader :state + attr_reader :state_message + attr_reader :artifact_gcs_uri + attr_reader :tier + attr_reader :metadata_integration + attr_reader :maintenance_window + attr_reader :uid + attr_reader :metadata_management_activity + attr_reader :release_channel + attr_reader :encryption_config + attr_reader :network_config + attr_reader :database_type + attr_reader :telemetry_config + attr_reader :scaling_config + attr_reader :scheduled_backup + attr_reader :deletion_protection + + 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 + @hive_metastore_config = GoogleInSpec::DataprocMetastore::Property::ServiceHiveMetastoreConfig.new(@fetched['hiveMetastoreConfig'], to_s) + @name = @fetched['name'] + @create_time = @fetched['createTime'] + @update_time = @fetched['updateTime'] + @labels = GoogleInSpec::DataprocMetastore::Property::ServiceLabels.new(@fetched['labels'], to_s) + @network = @fetched['network'] + @endpoint_uri = @fetched['endpointUri'] + @port = @fetched['port'] + @state = @fetched['state'] + @state_message = @fetched['stateMessage'] + @artifact_gcs_uri = @fetched['artifactGcsUri'] + @tier = @fetched['tier'] + @metadata_integration = GoogleInSpec::DataprocMetastore::Property::ServiceMetadataIntegration.new(@fetched['metadataIntegration'], to_s) + @maintenance_window = GoogleInSpec::DataprocMetastore::Property::ServiceMaintenanceWindow.new(@fetched['maintenanceWindow'], to_s) + @uid = @fetched['uid'] + @metadata_management_activity = GoogleInSpec::DataprocMetastore::Property::ServiceMetadataManagementActivity.new(@fetched['metadataManagementActivity'], to_s) + @release_channel = @fetched['releaseChannel'] + @encryption_config = GoogleInSpec::DataprocMetastore::Property::ServiceEncryptionConfig.new(@fetched['encryptionConfig'], to_s) + @network_config = GoogleInSpec::DataprocMetastore::Property::ServiceNetworkConfig.new(@fetched['networkConfig'], to_s) + @database_type = @fetched['databaseType'] + @telemetry_config = GoogleInSpec::DataprocMetastore::Property::ServiceTelemetryConfig.new(@fetched['telemetryConfig'], to_s) + @scaling_config = GoogleInSpec::DataprocMetastore::Property::ServiceScalingConfig.new(@fetched['scalingConfig'], to_s) + @scheduled_backup = GoogleInSpec::DataprocMetastore::Property::ServiceScheduledBackup.new(@fetched['scheduledBackup'], to_s) + @deletion_protection = @fetched['deletionProtection'] + end + + def exists? + !@fetched.nil? + end + + def to_s + "Service #{@params[:name]}" + end + + private + + def product_url(_ = nil) + 'https://metastore.googleapis.com/v1beta/' + end + + def resource_base_url + '{{name}}' + end +end diff --git a/libraries/google_dataproc_metastore_project_location_services.rb b/libraries/google_dataproc_metastore_services.rb similarity index 78% rename from libraries/google_dataproc_metastore_project_location_services.rb rename to libraries/google_dataproc_metastore_services.rb index 2dedef15..fd8904cc 100644 --- a/libraries/google_dataproc_metastore_project_location_services.rb +++ b/libraries/google_dataproc_metastore_services.rb @@ -14,9 +14,9 @@ # # ---------------------------------------------------------------------------- require 'gcp_backend' -class DataprocMetastoreProjectLocationServices < GcpResourceBase - name 'google_dataproc_metastore_project_location_services' - desc 'ProjectLocationService plural resource' +class DataprocMetastoreServices < GcpResourceBase + name 'google_dataproc_metastore_services' + desc 'Service plural resource' supports platform: 'gcp' attr_reader :table @@ -86,11 +86,11 @@ def transform(key, value) def transformers { - 'hiveMetastoreConfig' => ->(obj) { [:hive_metastore_config, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceHiveMetastoreConfig.new(obj['hiveMetastoreConfig'], to_s)] }, + 'hiveMetastoreConfig' => ->(obj) { [:hive_metastore_config, GoogleInSpec::DataprocMetastore::Property::ServiceHiveMetastoreConfig.new(obj['hiveMetastoreConfig'], to_s)] }, 'name' => ->(obj) { [:name, obj['name']] }, 'createTime' => ->(obj) { [:create_time, obj['createTime']] }, 'updateTime' => ->(obj) { [:update_time, obj['updateTime']] }, - 'labels' => ->(obj) { [:labels, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceLabels.new(obj['labels'], to_s)] }, + 'labels' => ->(obj) { [:labels, GoogleInSpec::DataprocMetastore::Property::ServiceLabels.new(obj['labels'], to_s)] }, 'network' => ->(obj) { [:network, obj['network']] }, 'endpointUri' => ->(obj) { [:endpoint_uri, obj['endpointUri']] }, 'port' => ->(obj) { [:port, obj['port']] }, @@ -98,17 +98,17 @@ def transformers 'stateMessage' => ->(obj) { [:state_message, obj['stateMessage']] }, 'artifactGcsUri' => ->(obj) { [:artifact_gcs_uri, obj['artifactGcsUri']] }, 'tier' => ->(obj) { [:tier, obj['tier']] }, - 'metadataIntegration' => ->(obj) { [:metadata_integration, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMetadataIntegration.new(obj['metadataIntegration'], to_s)] }, - 'maintenanceWindow' => ->(obj) { [:maintenance_window, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMaintenanceWindow.new(obj['maintenanceWindow'], to_s)] }, + 'metadataIntegration' => ->(obj) { [:metadata_integration, GoogleInSpec::DataprocMetastore::Property::ServiceMetadataIntegration.new(obj['metadataIntegration'], to_s)] }, + 'maintenanceWindow' => ->(obj) { [:maintenance_window, GoogleInSpec::DataprocMetastore::Property::ServiceMaintenanceWindow.new(obj['maintenanceWindow'], to_s)] }, 'uid' => ->(obj) { [:uid, obj['uid']] }, - 'metadataManagementActivity' => ->(obj) { [:metadata_management_activity, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceMetadataManagementActivity.new(obj['metadataManagementActivity'], to_s)] }, + 'metadataManagementActivity' => ->(obj) { [:metadata_management_activity, GoogleInSpec::DataprocMetastore::Property::ServiceMetadataManagementActivity.new(obj['metadataManagementActivity'], to_s)] }, 'releaseChannel' => ->(obj) { [:release_channel, obj['releaseChannel']] }, - 'encryptionConfig' => ->(obj) { [:encryption_config, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceEncryptionConfig.new(obj['encryptionConfig'], to_s)] }, - 'networkConfig' => ->(obj) { [:network_config, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceNetworkConfig.new(obj['networkConfig'], to_s)] }, + 'encryptionConfig' => ->(obj) { [:encryption_config, GoogleInSpec::DataprocMetastore::Property::ServiceEncryptionConfig.new(obj['encryptionConfig'], to_s)] }, + 'networkConfig' => ->(obj) { [:network_config, GoogleInSpec::DataprocMetastore::Property::ServiceNetworkConfig.new(obj['networkConfig'], to_s)] }, 'databaseType' => ->(obj) { [:database_type, obj['databaseType']] }, - 'telemetryConfig' => ->(obj) { [:telemetry_config, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceTelemetryConfig.new(obj['telemetryConfig'], to_s)] }, - 'scalingConfig' => ->(obj) { [:scaling_config, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceScalingConfig.new(obj['scalingConfig'], to_s)] }, - 'scheduledBackup' => ->(obj) { [:scheduled_backup, GoogleInSpec::DataprocMetastore::Property::ProjectLocationServiceScheduledBackup.new(obj['scheduledBackup'], to_s)] }, + 'telemetryConfig' => ->(obj) { [:telemetry_config, GoogleInSpec::DataprocMetastore::Property::ServiceTelemetryConfig.new(obj['telemetryConfig'], to_s)] }, + 'scalingConfig' => ->(obj) { [:scaling_config, GoogleInSpec::DataprocMetastore::Property::ServiceScalingConfig.new(obj['scalingConfig'], to_s)] }, + 'scheduledBackup' => ->(obj) { [:scheduled_backup, GoogleInSpec::DataprocMetastore::Property::ServiceScheduledBackup.new(obj['scheduledBackup'], to_s)] }, 'deletionProtection' => ->(obj) { [:deletion_protection, obj['deletionProtection']] }, } end @@ -120,6 +120,6 @@ def product_url(_ = nil) end def resource_base_url - '{{+parent}}/services' + '{{parent}}/services' end end diff --git a/test/integration/verify/controls/google_dataproc_metastore_project_location_service.rb b/test/integration/verify/controls/google_dataproc_metastore_service.rb similarity index 84% rename from test/integration/verify/controls/google_dataproc_metastore_project_location_service.rb rename to test/integration/verify/controls/google_dataproc_metastore_service.rb index dc20121a..ec6827c2 100644 --- a/test/integration/verify/controls/google_dataproc_metastore_project_location_service.rb +++ b/test/integration/verify/controls/google_dataproc_metastore_service.rb @@ -12,7 +12,7 @@ # # ---------------------------------------------------------------------------- -title 'Test GCP google_dataproc_metastore_project_location_service resource.' +title 'Test GCP google_dataproc_metastore_service resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') @@ -31,11 +31,11 @@ "release_channel": "value_releasechannel", "database_type": "value_databasetype" }, description: 'project_location_service description') -control 'google_dataproc_metastore_project_location_service-1.0' do +control 'google_dataproc_metastore_service-1.0' do impact 1.0 - title 'google_dataproc_metastore_project_location_service resource test' + title 'google_dataproc_metastore_service resource test' - describe google_dataproc_metastore_project_location_service(name: project_location_service['name']) do + describe google_dataproc_metastore_service(name: project_location_service['name']) do it { should exist } its('name') { should cmp project_location_service['name'] } its('create_time') { should cmp project_location_service['create_time'] } @@ -52,7 +52,7 @@ end - describe google_dataproc_metastore_project_location_service(name: "does_not_exit") do + describe google_dataproc_metastore_service(name: "does_not_exit") do it { should_not exist } end end diff --git a/test/integration/verify/controls/google_dataproc_metastore_project_location_services.rb b/test/integration/verify/controls/google_dataproc_metastore_services.rb similarity index 79% rename from test/integration/verify/controls/google_dataproc_metastore_project_location_services.rb rename to test/integration/verify/controls/google_dataproc_metastore_services.rb index 08f543b1..8e5f4e74 100644 --- a/test/integration/verify/controls/google_dataproc_metastore_project_location_services.rb +++ b/test/integration/verify/controls/google_dataproc_metastore_services.rb @@ -12,7 +12,7 @@ # # ---------------------------------------------------------------------------- -title 'Test GCP google_dataproc_metastore_project_location_services resource.' +title 'Test GCP google_dataproc_metastore_services resource.' gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') @@ -31,11 +31,11 @@ "release_channel": "value_releasechannel", "database_type": "value_databasetype" }, description: 'project_location_service description') -control 'google_dataproc_metastore_project_location_services-1.0' do +control 'google_dataproc_metastore_services-1.0' do impact 1.0 - title 'google_dataproc_metastore_project_location_services resource test' + title 'google_dataproc_metastore_services resource test' - describe google_dataproc_metastore_project_location_services(parent: project_location_service['parent']) do + describe google_dataproc_metastore_services(parent: project_location_service['parent']) do it { should exist } end end From d46f320addf4a8fbe4239e4f87a19f37675b940a Mon Sep 17 00:00:00 2001 From: balasubramanian-s Date: Thu, 11 Jul 2024 17:30:56 +0530 Subject: [PATCH 3/3] add tf scripts & update testcases Signed-off-by: balasubramanian-s --- README.md | 1 + .../google_dataproc_metastore_service.md | 7 ++-- .../google_dataproc_metastore_services.md | 14 ++++++- .../google_dataproc_metastore_services.rb | 2 +- test/integration/build/gcp-mm.tf | 23 +++++++++++ .../configuration/mm-attributes.yml | 7 ++++ .../google_dataproc_metastore_service.rb | 27 ++++++------- .../google_dataproc_metastore_services.rb | 40 ++++++++++++------- 8 files changed, 87 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 13a06807..d12632e4 100644 --- a/README.md +++ b/README.md @@ -300,6 +300,7 @@ The following resources are available in the InSpec GCP Profile | [google_dlp_inspect_template](docs/resources/google_dlp_inspect_template.md) | [google_dlp_inspect_templates](docs/resources/google_dlp_inspect_templates.md) | | [google_dlp_job_trigger](docs/resources/google_dlp_job_trigger.md) | [google_dlp_job_triggers](docs/resources/google_dlp_job_triggers.md) | | [google_dlp_job](docs/resources/google_dlp_job.md) | [google_dlp_jobs](docs/resources/google_dlp_jobs.md) | +| [google_dataproc_metastore_service](docs/resources/google_dataproc_metastore_service.md) | [google_dataproc_metastore_services](docs/resources/google_dataproc_metastore_services.md) | | [google_dlp_stored_info_type](docs/resources/google_dlp_stored_info_types.md) | [google_dlp_stored_info_types](docs/resources/google_dlp_stored_info_types.md) | | [google_filestore_instance](docs/resources/google_filestore_instance.md) | [google_filestore_instances](docs/resources/google_filestore_instances.md) | | [google_iam_organization_custom_role](docs/resources/google_iam_organization_custom_role.md) | [google_iam_organization_custom_roles](docs/resources/google_iam_organization_custom_roles.md) | diff --git a/docs/resources/google_dataproc_metastore_service.md b/docs/resources/google_dataproc_metastore_service.md index b580f7f3..4f1005fd 100644 --- a/docs/resources/google_dataproc_metastore_service.md +++ b/docs/resources/google_dataproc_metastore_service.md @@ -23,7 +23,7 @@ A `google_dataproc_metastore_service` is used to test a Google Service resource ## Examples ``` -describe google_dataproc_metastore_service(name: ' value_name') do +describe google_dataproc_metastore_service(name: 'value_name') do it { should exist } its('name') { should cmp 'value_name' } its('create_time') { should cmp 'value_createtime' } @@ -37,7 +37,6 @@ describe google_dataproc_metastore_service(name: ' value_name') do its('uid') { should cmp 'value_uid' } its('release_channel') { should cmp 'value_releasechannel' } its('database_type') { should cmp 'value_databasetype' } - end describe google_dataproc_metastore_service(name: "does_not_exit") do @@ -58,7 +57,7 @@ Properties that can be accessed from the `google_dataproc_metastore_service` res * `config_overrides`: A mapping of Hive metastore configuration key-value pairs to apply to the Hive metastore (configured in hive-site.xml). The mappings override system defaults (some keys cannot be overridden). These overrides are also applied to auxiliary versions and can be further customized in the auxiliary version's AuxiliaryVersionConfig. - * `additional_properties`: + * `additional_properties`: * `kerberos_config`: Configuration information for a Kerberos principal. @@ -88,7 +87,7 @@ Properties that can be accessed from the `google_dataproc_metastore_service` res * `labels`: User-defined labels for the metastore service. - * `additional_properties`: + * `additional_properties`: * `network`: Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:projects/{project_number}/global/networks/{network_id}. diff --git a/docs/resources/google_dataproc_metastore_services.md b/docs/resources/google_dataproc_metastore_services.md index fe0a6bce..988121b0 100644 --- a/docs/resources/google_dataproc_metastore_services.md +++ b/docs/resources/google_dataproc_metastore_services.md @@ -23,8 +23,20 @@ A `google_dataproc_metastore_services` is used to test a Google Service resource ## Examples ``` - describe google_dataproc_metastore_services(parent: ' value_parent') do + describe google_dataproc_metastore_services(parent: ' value_parent') do it { should exist } + its('names') { should include 'value_name' } + its('create_times') { should include 'value_createtime' } + its('update_times') { should include 'value_updatetime' } + its('networks') { should include 'value_network' } + its('endpoint_uris') { should include 'value_endpointuri' } + its('states') { should include 'value_state' } + its('state_messages') { should include 'value_statemessage' } + its('artifact_gcs_uris') { should include 'value_artifactgcsuri' } + its('tiers') { should include 'value_tier' } + its('uids') { should include 'value_uid' } + its('release_channels') { should include 'value_releasechannel' } + its('database_types') { should include 'value_databasetype' } end ``` diff --git a/libraries/google_dataproc_metastore_services.rb b/libraries/google_dataproc_metastore_services.rb index fd8904cc..9dfddb2a 100644 --- a/libraries/google_dataproc_metastore_services.rb +++ b/libraries/google_dataproc_metastore_services.rb @@ -53,7 +53,7 @@ class DataprocMetastoreServices < GcpResourceBase def initialize(params = {}) super(params.merge({ use_http_transport: true })) @params = params - @table = fetch_wrapped_resource('projectLocationServices') + @table = fetch_wrapped_resource('services') end def fetch_wrapped_resource(wrap_path) diff --git a/test/integration/build/gcp-mm.tf b/test/integration/build/gcp-mm.tf index ad64f575..c1005a91 100644 --- a/test/integration/build/gcp-mm.tf +++ b/test/integration/build/gcp-mm.tf @@ -257,6 +257,9 @@ variable "compute_target_vpn_gateway" { variable "bigtable_instance_cluster" { type = any } +variable "dataproc_metastore_service" { + type = any +} resource "google_compute_ssl_policy" "custom-ssl-policy" { name = var.ssl_policy["name"] @@ -2172,3 +2175,23 @@ resource "google_bigtable_instance" "inspec-test" { my-label = var.bigtable_instance_cluster.name } } +resource "google_dataproc_metastore_service" "default" { + project = var.gcp_project_id + service_id = var.dataproc_metastore_service.name + location = var.dataproc_metastore_service.location + port = var.dataproc_metastore_service.port + tier = var.dataproc_metastore_service.tier + + maintenance_window { + hour_of_day = 2 + day_of_week = "SUNDAY" + } + + hive_metastore_config { + version = var.dataproc_metastore_service.hive_config_version + } + + labels = { + env = "inspec" + } +} diff --git a/test/integration/configuration/mm-attributes.yml b/test/integration/configuration/mm-attributes.yml index b2584d21..385f942c 100644 --- a/test/integration/configuration/mm-attributes.yml +++ b/test/integration/configuration/mm-attributes.yml @@ -720,3 +720,10 @@ bigtable_instance_cluster: name: "inspec-test" cluster: "inspec-test-c1" storage_type: "SSD" + +dataproc_metastore_service: + name: "metastore-srv" + location: "us-central1" + port: 9080 + tier: "DEVELOPER" + hive_config_version: "2.3.6" diff --git a/test/integration/verify/controls/google_dataproc_metastore_service.rb b/test/integration/verify/controls/google_dataproc_metastore_service.rb index ec6827c2..15c57d50 100644 --- a/test/integration/verify/controls/google_dataproc_metastore_service.rb +++ b/test/integration/verify/controls/google_dataproc_metastore_service.rb @@ -17,19 +17,19 @@ gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') project_location_service = input('project_location_service', value: { - "name": "value_name", - "parent": "value_parent", - "create_time": "value_createtime", - "update_time": "value_updatetime", - "network": "value_network", - "endpoint_uri": "value_endpointuri", - "state": "value_state", - "state_message": "value_statemessage", - "artifact_gcs_uri": "value_artifactgcsuri", - "tier": "value_tier", - "uid": "value_uid", - "release_channel": "value_releasechannel", - "database_type": "value_databasetype" + "name": "projects/ppradhan/locations/us-central1/services/metastore-srv", + "parent": "projects/ppradhan/locations/us-central1", + "create_time": "2024-07-11T10:37:41.096165514Z", + "update_time": "2024-07-11T11:17:30.112145404Z", + "network": "projects/ppradhan/global/networks/default", + "endpoint_uri": "thrift://10.104.64.28:9080", + "state": "ACTIVE", + "state_message": "The service is ready to use", + "artifact_gcs_uri": "gs://gcs-bucket-metastore-srv-2a1c2d78-1aab-4f1b-b6cd-388796854ab8", + "tier": "DEVELOPER", + "uid": "2a1c2d78-1aab-4f1b-b6cd-388796854ab8", + "release_channel": "STABLE", + "database_type": "MYSQL" }, description: 'project_location_service description') control 'google_dataproc_metastore_service-1.0' do impact 1.0 @@ -49,7 +49,6 @@ its('uid') { should cmp project_location_service['uid'] } its('release_channel') { should cmp project_location_service['release_channel'] } its('database_type') { should cmp project_location_service['database_type'] } - end describe google_dataproc_metastore_service(name: "does_not_exit") do diff --git a/test/integration/verify/controls/google_dataproc_metastore_services.rb b/test/integration/verify/controls/google_dataproc_metastore_services.rb index 8e5f4e74..db5c463c 100644 --- a/test/integration/verify/controls/google_dataproc_metastore_services.rb +++ b/test/integration/verify/controls/google_dataproc_metastore_services.rb @@ -17,25 +17,37 @@ gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') project_location_service = input('project_location_service', value: { - "name": "value_name", - "parent": "value_parent", - "create_time": "value_createtime", - "update_time": "value_updatetime", - "network": "value_network", - "endpoint_uri": "value_endpointuri", - "state": "value_state", - "state_message": "value_statemessage", - "artifact_gcs_uri": "value_artifactgcsuri", - "tier": "value_tier", - "uid": "value_uid", - "release_channel": "value_releasechannel", - "database_type": "value_databasetype" + "name": "projects/ppradhan/locations/us-central1/services/metastore-srv", + "parent": "projects/ppradhan/locations/us-central1", + "create_time": "2024-07-11T10:37:41.096165514Z", + "update_time": "2024-07-11T11:17:30.112145404Z", + "network": "projects/ppradhan/global/networks/default", + "endpoint_uri": "thrift://10.104.64.28:9080", + "state": "ACTIVE", + "state_message": "The service is ready to use", + "artifact_gcs_uri": "gs://gcs-bucket-metastore-srv-2a1c2d78-1aab-4f1b-b6cd-388796854ab8", + "tier": "DEVELOPER", + "uid": "2a1c2d78-1aab-4f1b-b6cd-388796854ab8", + "release_channel": "STABLE", + "database_type": "MYSQL" }, description: 'project_location_service description') control 'google_dataproc_metastore_services-1.0' do impact 1.0 title 'google_dataproc_metastore_services resource test' - describe google_dataproc_metastore_services(parent: project_location_service['parent']) do + describe google_dataproc_metastore_services(parent: project_location_service['parent']) do it { should exist } + its('names') { should include project_location_service['name'] } + its('create_times') { should include project_location_service['create_time'] } + its('update_times') { should include project_location_service['update_time'] } + its('networks') { should include project_location_service['network'] } + its('endpoint_uris') { should include project_location_service['endpoint_uri'] } + its('states') { should include project_location_service['state'] } + its('state_messages') { should include project_location_service['state_message'] } + its('artifact_gcs_uris') { should include project_location_service['artifact_gcs_uri'] } + its('tiers') { should include project_location_service['tier'] } + its('uids') { should include project_location_service['uid'] } + its('release_channels') { should include project_location_service['release_channel'] } + its('database_types') { should include project_location_service['database_type'] } end end