# ----------------------------------------------------------------------------
#
#     ***     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_vertex_ai_model resource.'

gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.')

  model = input('model', value: {
  "name": "value_name",
  "region": "value_region",
  "parent": "value_parent",
  "update_time": "value_updatetime",
  "etag": "value_etag",
  "description": "value_description",
  "create_time": "value_createtime",
  "pipeline_job": "value_pipelinejob",
  "version_update_time": "value_versionupdatetime",
  "metadata_artifact": "value_metadataartifact",
  "metadata_schema_uri": "value_metadataschemauri",
  "version_id": "value_versionid",
  "artifact_uri": "value_artifacturi",
  "training_pipeline": "value_trainingpipeline",
  "display_name": "value_displayname",
  "version_create_time": "value_versioncreatetime",
  "version_description": "value_versiondescription"
}, description: 'model description')
control 'google_vertex_ai_model-1.0' do
  impact 1.0
  title 'google_vertex_ai_model resource test'

  describe google_vertex_ai_model(name: "projects/#{gcp_project_id}/locations/#{model['region']}/models/#{model['name']}", region: model['region']) do
  	it { should exist }
  	its('name') { should cmp model['name'] }
  	its('update_time') { should cmp model['update_time'] }
  	its('etag') { should cmp model['etag'] }
  	its('description') { should cmp model['description'] }
  	its('create_time') { should cmp model['create_time'] }
  	its('pipeline_job') { should cmp model['pipeline_job'] }
  	its('version_update_time') { should cmp model['version_update_time'] }
  	its('metadata_artifact') { should cmp model['metadata_artifact'] }
  	its('metadata_schema_uri') { should cmp model['metadata_schema_uri'] }
  	its('version_id') { should cmp model['version_id'] }
  	its('artifact_uri') { should cmp model['artifact_uri'] }
  	its('training_pipeline') { should cmp model['training_pipeline'] }
  	its('display_name') { should cmp model['display_name'] }
  	its('version_create_time') { should cmp model['version_create_time'] }
  	its('version_description') { should cmp model['version_description'] }

  end

  describe google_vertex_ai_model(name: "does_not_exit", region: model['region']) do
  	it { should_not exist }
  end
end
