From 41a27fcbecb1277a2c062df077541cec2f8b36b5 Mon Sep 17 00:00:00 2001 From: Samir Anand Date: Mon, 27 Nov 2023 18:29:52 +0530 Subject: [PATCH] Automatically generated by magic modules for service: apigee and resource: Organizations__apis__revision. This commit includes the following changes: - Singular Resource ERB File - Plural Resource ERB File - Terraform configuration - api.yaml configuration for product apigee and resource Organizations__apis__revision Signed-off-by: Samir Anand --- mmv1/products/apigee/api.yaml | 90 +++++++++++++++++++ mmv1/products/apigee/inspec.yaml | 20 +++++ ...oogle_apigee_organization_api_revision.erb | 10 +++ ...e_organization_api_revision_attributes.erb | 3 + ...ogle_apigee_organization_api_revisions.erb | 5 ++ .../configuration/mm-attributes.yml | 7 ++ 6 files changed, 135 insertions(+) create mode 100644 mmv1/products/apigee/inspec.yaml create mode 100644 mmv1/templates/inspec/examples/google_apigee_organization_api_revision/google_apigee_organization_api_revision.erb create mode 100644 mmv1/templates/inspec/examples/google_apigee_organization_api_revision/google_apigee_organization_api_revision_attributes.erb create mode 100644 mmv1/templates/inspec/examples/google_apigee_organization_api_revision/google_apigee_organization_api_revisions.erb diff --git a/mmv1/products/apigee/api.yaml b/mmv1/products/apigee/api.yaml index 1c0bfcec7..69629de52 100644 --- a/mmv1/products/apigee/api.yaml +++ b/mmv1/products/apigee/api.yaml @@ -498,3 +498,93 @@ objects: 'Creating an environment': 'https://cloud.google.com/apigee/docs/api-platform/get-started/create-environment' api: 'https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.endpointAttachments/create' + + + + - !ruby/object:Api::Resource + name: OrganizationApiRevision + self_link: '{{name}}' + references: !ruby/object:Api::Resource::ReferenceLinks + guides: + 'Official Documentation': + api: 'https://cloud.google.com/apigee/docs' + async: !ruby/object:Api::OpAsync + operation: !ruby/object:Api::OpAsync::Operation + path: 'name' + base_url: '{op_id}' + wait_ms: 1000 + result: !ruby/object:Api::OpAsync::Result + path: 'response' + resource_inside_response: true + status: !ruby/object:Api::OpAsync::Status + path: 'done' + complete: True + allowed: + - True + - False + error: !ruby/object:Api::OpAsync::Error + path: 'error' + message: 'message' + description: |- + Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged. + properties: + + - !ruby/object:Api::Type::Array + name: 'extensions' + description: | + Application specific response metadata. Must be set in the first response for streaming APIs. + item_type: Api::Type::String + - !ruby/object:Api::Type::String + name: 'contentType' + description: | + The HTTP Content-Type header value specifying the content type of the body. + - !ruby/object:Api::Type::String + name: 'data' + description: | + The HTTP request/response body as raw binary. + + + + + - !ruby/object:Api::Resource + name: OrganizationApiRevision + self_link: '{{name}}' + references: !ruby/object:Api::Resource::ReferenceLinks + guides: + 'Official Documentation': + api: 'https://cloud.google.com/apigee/docs' + async: !ruby/object:Api::OpAsync + operation: !ruby/object:Api::OpAsync::Operation + path: 'name' + base_url: '{op_id}' + wait_ms: 1000 + result: !ruby/object:Api::OpAsync::Result + path: 'response' + resource_inside_response: true + status: !ruby/object:Api::OpAsync::Status + path: 'done' + complete: True + allowed: + - True + - False + error: !ruby/object:Api::OpAsync::Error + path: 'error' + message: 'message' + description: |- + Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged. + properties: + + - !ruby/object:Api::Type::Array + name: 'extensions' + description: | + Application specific response metadata. Must be set in the first response for streaming APIs. + item_type: Api::Type::String + - !ruby/object:Api::Type::String + name: 'contentType' + description: | + The HTTP Content-Type header value specifying the content type of the body. + - !ruby/object:Api::Type::String + name: 'data' + description: | + The HTTP request/response body as raw binary. + diff --git a/mmv1/products/apigee/inspec.yaml b/mmv1/products/apigee/inspec.yaml new file mode 100644 index 000000000..17d521125 --- /dev/null +++ b/mmv1/products/apigee/inspec.yaml @@ -0,0 +1,20 @@ +# Copyright 2017 Google Inc. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- !ruby/object:Provider::Inspec::Config +overrides: !ruby/object:Overrides::ResourceOverrides + OrganizationApiRevision: !ruby/object:Overrides::Inspec::ResourceOverride + singular_only: true + + singular_only: true + diff --git a/mmv1/templates/inspec/examples/google_apigee_organization_api_revision/google_apigee_organization_api_revision.erb b/mmv1/templates/inspec/examples/google_apigee_organization_api_revision/google_apigee_organization_api_revision.erb new file mode 100644 index 000000000..3afc41b34 --- /dev/null +++ b/mmv1/templates/inspec/examples/google_apigee_organization_api_revision/google_apigee_organization_api_revision.erb @@ -0,0 +1,10 @@ +<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%> +<% organization_api_revision = grab_attributes(pwd)['organization_api_revision'] -%> +describe google_apigee_organization_api_revision(clusterName: <%= doc_generation ? "' #{organization_api_revision['clusterName']}'":"organization_api_revision['clusterName']" -%>, projectId: <%= doc_generation ? "' #{organization_api_revision['projectId']}'":"organization_api_revision['projectId']" -%>, region: <%= doc_generation ? "' #{organization_api_revision['region']}'":"organization_api_revision['region']" -%>) do + it { should exist } + +end + +describe google_apigee_organization_api_revision(clusterName: <%= doc_generation ? "' #{organization_api_revision['clusterName']}'":"organization_api_revision['clusterName']" -%>, projectId: <%= doc_generation ? "' #{organization_api_revision['projectId']}'":"organization_api_revision['projectId']" -%>, region: <%= doc_generation ? "' #{organization_api_revision['region']}'":"organization_api_revision['region']" -%>) do + it { should_not exist } +end \ No newline at end of file diff --git a/mmv1/templates/inspec/examples/google_apigee_organization_api_revision/google_apigee_organization_api_revision_attributes.erb b/mmv1/templates/inspec/examples/google_apigee_organization_api_revision/google_apigee_organization_api_revision_attributes.erb new file mode 100644 index 000000000..f2fc3d7d2 --- /dev/null +++ b/mmv1/templates/inspec/examples/google_apigee_organization_api_revision/google_apigee_organization_api_revision_attributes.erb @@ -0,0 +1,3 @@ +gcp_project_id = input(:gcp_project_id, value: '<%= external_attribute(pwd, 'gcp_project_id') -%>', description: 'The GCP project identifier.') + + organization_api_revision = input('organization_api_revision', value: <%= JSON.pretty_generate(grab_attributes(pwd)['organization_api_revision']) -%>, description: 'organization_api_revision description') \ No newline at end of file diff --git a/mmv1/templates/inspec/examples/google_apigee_organization_api_revision/google_apigee_organization_api_revisions.erb b/mmv1/templates/inspec/examples/google_apigee_organization_api_revision/google_apigee_organization_api_revisions.erb new file mode 100644 index 000000000..c3c656ee2 --- /dev/null +++ b/mmv1/templates/inspec/examples/google_apigee_organization_api_revision/google_apigee_organization_api_revisions.erb @@ -0,0 +1,5 @@ +<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%> + <% organization_api_revision = grab_attributes(pwd)['organization_api_revision'] -%> + describe google_apigee_organization_api_revisions(projectId: <%= doc_generation ? "' #{organization_api_revision['projectId']}'":"organization_api_revision['projectId']" -%>, region: <%= doc_generation ? "' #{organization_api_revision['region']}'":"organization_api_revision['region']" -%>) do + it { should exist } + end \ No newline at end of file diff --git a/mmv1/templates/inspec/tests/integration/configuration/mm-attributes.yml b/mmv1/templates/inspec/tests/integration/configuration/mm-attributes.yml index f56a9288a..4806b7516 100644 --- a/mmv1/templates/inspec/tests/integration/configuration/mm-attributes.yml +++ b/mmv1/templates/inspec/tests/integration/configuration/mm-attributes.yml @@ -880,3 +880,10 @@ tensorboard_experiment_run_time_series_resource: update_time : "value_updatetime" create_time : "value_createtime" value_type : "value_valuetype" + +organization_api_revision: + cluster_name : "value_clustername" + project_id : "value_projectid" + region : "value_region" +organization_api_revision: + name : "value_name" \ No newline at end of file