Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions google-cloud-storage-control-v2/.owlbot-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@
"lib/google/cloud/storage/control/v2/storage_control/rest/client.rb",
"lib/google/cloud/storage/control/v2/storage_control/rest/service_stub.rb",
"lib/google/cloud/storage/control/v2/version.rb",
"lib/google/iam/v1.rb",
"lib/google/iam/v1/iam_policy.rb",
"lib/google/iam/v1/iam_policy/client.rb",
"lib/google/iam/v1/iam_policy/credentials.rb",
"lib/google/iam/v1/iam_policy/rest.rb",
"lib/google/iam/v1/iam_policy/rest/client.rb",
"lib/google/iam/v1/iam_policy/rest/service_stub.rb",
"lib/google/iam/v1/rest.rb",
"lib/google/storage/control/v2/storage_control_pb.rb",
"lib/google/storage/control/v2/storage_control_services_pb.rb",
"proto_docs/README.md",
Expand All @@ -55,15 +47,12 @@
"proto_docs/google/storage/control/v2/storage_control.rb",
"proto_docs/google/type/expr.rb",
"snippets/Gemfile",
"snippets/iam_policy/get_iam_policy.rb",
"snippets/iam_policy/set_iam_policy.rb",
"snippets/iam_policy/test_iam_permissions.rb",
"snippets/snippet_metadata_google.iam.v1.json",
"snippets/snippet_metadata_google.storage.control.v2.json",
"snippets/storage_control/create_anywhere_cache.rb",
"snippets/storage_control/create_folder.rb",
"snippets/storage_control/create_managed_folder.rb",
"snippets/storage_control/delete_folder.rb",
"snippets/storage_control/delete_folder_recursive.rb",
"snippets/storage_control/delete_managed_folder.rb",
"snippets/storage_control/disable_anywhere_cache.rb",
"snippets/storage_control/get_anywhere_cache.rb",
Expand All @@ -90,8 +79,6 @@
"test/google/cloud/storage/control/v2/storage_control_paths_test.rb",
"test/google/cloud/storage/control/v2/storage_control_rest_test.rb",
"test/google/cloud/storage/control/v2/storage_control_test.rb",
"test/google/iam/v1/iam_policy_rest_test.rb",
"test/google/iam/v1/iam_policy_test.rb",
"test/helper.rb"
],
"static": [
Expand Down
14 changes: 7 additions & 7 deletions google-cloud-storage-control-v2/AUTHENTICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,23 @@ whenever possible.
To configure a credentials file for an individual client initialization:

```ruby
require "google/iam/v1"
require "google/cloud/storage/control/v2"

client = ::Google::Iam::V1::IAMPolicy::Client.new do |config|
client = ::Google::Cloud::Storage::Control::V2::StorageControl::Client.new do |config|
config.credentials = "path/to/credentialfile.json"
end
```

To configure a credentials file globally for all clients:

```ruby
require "google/iam/v1"
require "google/cloud/storage/control/v2"

::Google::Iam::V1::IAMPolicy::Client.configure do |config|
::Google::Cloud::Storage::Control::V2::StorageControl::Client.configure do |config|
config.credentials = "path/to/credentialfile.json"
end

client = ::Google::Iam::V1::IAMPolicy::Client.new
client = ::Google::Cloud::Storage::Control::V2::StorageControl::Client.new
```

### Environment Variables
Expand All @@ -96,11 +96,11 @@ checks for credentials are:
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file

```ruby
require "google/iam/v1"
require "google/cloud/storage/control/v2"

ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json"

client = ::Google::Iam::V1::IAMPolicy::Client.new
client = ::Google::Cloud::Storage::Control::V2::StorageControl::Client.new
```

### Local ADC file
Expand Down
12 changes: 6 additions & 6 deletions google-cloud-storage-control-v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ In order to use this library, you first need to go through the following steps:
## Quick Start

```ruby
require "google/iam/v1"
require "google/cloud/storage/control/v2"

client = ::Google::Iam::V1::IAMPolicy::Client.new
request = ::Google::Iam::V1::SetIamPolicyRequest.new # (request fields as keyword arguments...)
response = client.set_iam_policy request
client = ::Google::Cloud::Storage::Control::V2::StorageControl::Client.new
request = ::Google::Cloud::Storage::Control::V2::CreateFolderRequest.new # (request fields as keyword arguments...)
response = client.create_folder request
```

View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-storage-control-v2/latest)
Expand Down Expand Up @@ -72,10 +72,10 @@ You can customize logging by modifying the `logger` configuration when
constructing a client object. For example:

```ruby
require "google/iam/v1"
require "google/cloud/storage/control/v2"
require "logger"

client = ::Google::Iam::V1::IAMPolicy::Client.new do |config|
client = ::Google::Cloud::Storage::Control::V2::StorageControl::Client.new do |config|
config.logger = Logger.new "my-app.log"
end
```
Expand Down
4 changes: 2 additions & 2 deletions google-cloud-storage-control-v2/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ task :acceptance, :project, :keyfile do |t, args|
if project.nil? || keyfile.nil?
fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance"
end
require "google/iam/v1/iam_policy/credentials"
::Google::Iam::V1::IAMPolicy::Credentials.env_vars.each do |path|
require "google/cloud/storage/control/v2/storage_control/credentials"
::Google::Cloud::Storage::Control::V2::StorageControl::Credentials.env_vars.each do |path|
ENV[path] = nil
end
ENV["GOOGLE_CLOUD_PROJECT"] = project
Expand Down
132 changes: 126 additions & 6 deletions google-cloud-storage-control-v2/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,144 @@
"schema": "1.0",
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
"language": "ruby",
"protoPackage": "google.iam.v1",
"libraryPackage": "::Google::Iam::V1",
"protoPackage": "google.storage.control.v2",
"libraryPackage": "::Google::Cloud::Storage::Control::V2",
"services": {
"IAMPolicy": {
"StorageControl": {
"clients": {
"grpc": {
"libraryClient": "::Google::Iam::V1::IAMPolicy::Client",
"libraryClient": "::Google::Cloud::Storage::Control::V2::StorageControl::Client",
"rpcs": {
"SetIamPolicy": {
"CreateFolder": {
"methods": [
"set_iam_policy"
"create_folder"
]
},
"DeleteFolder": {
"methods": [
"delete_folder"
]
},
"GetFolder": {
"methods": [
"get_folder"
]
},
"ListFolders": {
"methods": [
"list_folders"
]
},
"RenameFolder": {
"methods": [
"rename_folder"
]
},
"DeleteFolderRecursive": {
"methods": [
"delete_folder_recursive"
]
},
"GetStorageLayout": {
"methods": [
"get_storage_layout"
]
},
"CreateManagedFolder": {
"methods": [
"create_managed_folder"
]
},
"DeleteManagedFolder": {
"methods": [
"delete_managed_folder"
]
},
"GetManagedFolder": {
"methods": [
"get_managed_folder"
]
},
"ListManagedFolders": {
"methods": [
"list_managed_folders"
]
},
"CreateAnywhereCache": {
"methods": [
"create_anywhere_cache"
]
},
"UpdateAnywhereCache": {
"methods": [
"update_anywhere_cache"
]
},
"DisableAnywhereCache": {
"methods": [
"disable_anywhere_cache"
]
},
"PauseAnywhereCache": {
"methods": [
"pause_anywhere_cache"
]
},
"ResumeAnywhereCache": {
"methods": [
"resume_anywhere_cache"
]
},
"GetAnywhereCache": {
"methods": [
"get_anywhere_cache"
]
},
"ListAnywhereCaches": {
"methods": [
"list_anywhere_caches"
]
},
"GetProjectIntelligenceConfig": {
"methods": [
"get_project_intelligence_config"
]
},
"UpdateProjectIntelligenceConfig": {
"methods": [
"update_project_intelligence_config"
]
},
"GetFolderIntelligenceConfig": {
"methods": [
"get_folder_intelligence_config"
]
},
"UpdateFolderIntelligenceConfig": {
"methods": [
"update_folder_intelligence_config"
]
},
"GetOrganizationIntelligenceConfig": {
"methods": [
"get_organization_intelligence_config"
]
},
"UpdateOrganizationIntelligenceConfig": {
"methods": [
"update_organization_intelligence_config"
]
},
"GetIamPolicy": {
"methods": [
"get_iam_policy"
]
},
"SetIamPolicy": {
"methods": [
"set_iam_policy"
]
},
"TestIamPermissions": {
"methods": [
"test_iam_permissions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@

# This gem does not autoload during Bundler.require. To load this gem,
# issue explicit require statements for the packages desired, e.g.:
# require "google/iam/v1"
# require "google/cloud/storage/control/v2"
Loading
Loading