-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Gemini for Google Cloud provider
- Loading branch information
1 parent
075e151
commit 67544d1
Showing
5 changed files
with
241 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# Copyright 2024 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. | ||
|
||
--- | ||
name: CodeRepositoryIndex | ||
description: The resource for managing Code Repository Indexes for Gemini Code Assist. | ||
base_url: projects/{{project}}/locations/{{location}}/codeRepositoryIndexes | ||
self_link: projects/{{project}}/locations/{{location}}/codeRepositoryIndexes/{{code_repository_index_id}} | ||
create_url: projects/{{project}}/locations/{{location}}/codeRepositoryIndexes?codeRepositoryIndexId={{code_repository_index_id}} | ||
id_format: projects/{{project}}/locations/{{location}}/codeRepositoryIndexes/{{code_repository_index_id}} | ||
import_format: | ||
- projects/{{project}}/locations/{{location}}/codeRepositoryIndexes/{{code_repository_index_id}} | ||
examples: | ||
- name: "geminifor_google_cloud_code_repository_index_basic" | ||
primary_resource_id: "example" | ||
vars: | ||
cri_id: "example-coderepositoryindex-id" | ||
autogen_async: true | ||
async: | ||
operation: | ||
timeouts: | ||
insert_minutes: 20 | ||
update_minutes: 20 | ||
delete_minutes: 20 | ||
path: name | ||
base_url: '{{op_id}}' | ||
wait_ms: 1000 | ||
actions: | ||
- create | ||
- delete | ||
- update | ||
type: OpAsync | ||
result: | ||
resource_inside_response: true | ||
path: response | ||
error: | ||
path: error | ||
message: message | ||
include_project: false | ||
parameters: | ||
- name: location | ||
type: String | ||
description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. | ||
immutable: true | ||
url_param_only: true | ||
required: true | ||
- name: codeRepositoryIndexId | ||
type: String | ||
description: Required. Id of the requesting object | ||
immutable: true | ||
url_param_only: true | ||
required: true | ||
properties: | ||
- name: updateTime | ||
type: String | ||
description: Output only. Update time stamp | ||
output: true | ||
- name: state | ||
type: String | ||
description: |- | ||
Output only. Code Repository Index instance State | ||
Possible values: | ||
STATE_UNSPECIFIED | ||
CREATING | ||
ACTIVE | ||
DELETING | ||
SUSPENDED | ||
output: true | ||
- name: labels | ||
type: KeyValueLabels | ||
description: Optional. Labels as key value pairs | ||
- name: kmsKey | ||
type: String | ||
description: |- | ||
Optional. Immutable. Customer-managed encryption key name, in the format | ||
projects/*/locations/*/keyRings/*/cryptoKeys/*. | ||
immutable: true | ||
- name: name | ||
type: String | ||
description: Immutable. Identifier. name of resource | ||
output: true | ||
immutable: true | ||
- name: createTime | ||
type: String | ||
description: Output only. Create time stamp | ||
output: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# Copyright 2024 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. | ||
|
||
--- | ||
name: RepositoryGroup | ||
description: The resource for managing Repository Groups for Gemini Code Assist. | ||
base_url: projects/{{project}}/locations/{{location}}/codeRepositoryIndexes/{{coderepositoryindex}}/repositoryGroups | ||
self_link: projects/{{project}}/locations/{{location}}/codeRepositoryIndexes/{{coderepositoryindex}}/repositoryGroups/{{repository_group_id}} | ||
create_url: projects/{{project}}/locations/{{location}}/codeRepositoryIndexes/{{coderepositoryindex}}/repositoryGroups?repositoryGroupId={{repository_group_id}} | ||
id_format: projects/{{project}}/locations/{{location}}/codeRepositoryIndexes/{{coderepositoryindex}}/repositoryGroups/{{repository_group_id}} | ||
import_format: | ||
- projects/{{project}}/locations/{{location}}/codeRepositoryIndexes/{{coderepositoryindex}}/repositoryGroups/{{repository_group_id}} | ||
examples: | ||
- name: "geminifor_google_cloud_repository_group_basic" | ||
primary_resource_id: "example" | ||
vars: | ||
repository_resource: "projects/example-location/locations/us-central1/connections/example-connection/gitRepositoryLinks/example-repo" | ||
repository_group_id: "example-repository-group-id" | ||
cri_id: "example-code-repository-index-id" | ||
autogen_async: true | ||
async: | ||
operation: | ||
timeouts: | ||
insert_minutes: 20 | ||
update_minutes: 20 | ||
delete_minutes: 20 | ||
path: name | ||
base_url: '{{op_id}}' | ||
wait_ms: 1000 | ||
actions: | ||
- create | ||
- delete | ||
- update | ||
type: OpAsync | ||
result: | ||
resource_inside_response: true | ||
path: response | ||
error: | ||
path: error | ||
message: message | ||
include_project: false | ||
parameters: | ||
- name: location | ||
type: String | ||
description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. | ||
immutable: true | ||
url_param_only: true | ||
required: true | ||
- name: coderepositoryindex | ||
type: String | ||
description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. | ||
immutable: true | ||
url_param_only: true | ||
required: true | ||
- name: repositoryGroupId | ||
type: String | ||
description: Required. Id of the requesting object | ||
immutable: true | ||
url_param_only: true | ||
required: true | ||
properties: | ||
- name: repositories | ||
type: Array | ||
description: Required. List of repositories to group | ||
required: true | ||
item_type: | ||
type: NestedObject | ||
properties: | ||
- name: resource | ||
type: String | ||
description: |- | ||
Required. The DeveloperConnect repository full resource name, relative resource name | ||
or resource URL to be indexed. | ||
required: true | ||
- name: branchPattern | ||
type: String | ||
description: |- | ||
Required. The Git branch pattern used for indexing in RE2 syntax. | ||
See https://github.com/google/re2/wiki/syntax for syntax. | ||
required: true | ||
- name: name | ||
type: String | ||
description: Immutable. Identifier. name of resource | ||
output: true | ||
immutable: true | ||
- name: createTime | ||
type: String | ||
description: Output only. Create time stamp | ||
output: true | ||
- name: updateTime | ||
type: String | ||
description: Output only. Update time stamp | ||
output: true | ||
- name: labels | ||
type: KeyValueLabels | ||
description: Optional. Labels as key value pairs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright 2024 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. | ||
|
||
--- | ||
name: GeminiforGoogleCloud | ||
display_name: Gemini for Google Cloud | ||
scopes: | ||
- https://www.googleapis.com/auth/cloud-platform | ||
versions: | ||
- base_url: https://cloudaicompanion.googleapis.com/v1/ | ||
name: ga |
4 changes: 4 additions & 0 deletions
4
mmv1/templates/terraform/examples/geminifor_google_cloud_code_repository_index_basic.tf.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
resource "google_geminifor_google_cloud_code_repository_index" "example_cri" { | ||
location = "us-central1" | ||
code_repository_index_id = "{{index $.Vars "cri_id"}}" | ||
} |
14 changes: 14 additions & 0 deletions
14
mmv1/templates/terraform/examples/geminifor_google_cloud_repository_group_basic.tf.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
resource "google_geminifor_google_cloud_repository_group" "example_repository_group" { | ||
location = "us-central1" | ||
coderepositoryindex = google_geminifor_google_cloud_code_repository_index.example_cri.code_repository_index_id | ||
repository_group_id = "{{index $.Vars "repository_group_id"}}" | ||
repositories { | ||
resource = "{{index $.Vars "repository_resource"}}" | ||
branch_pattern = "main" | ||
} | ||
} | ||
|
||
resource "google_geminifor_google_cloud_code_repository_index" "example_cri" { | ||
code_repository_index_id = "{{index $.Vars "cri_id"}}" | ||
location = "us-central1" | ||
} |