google-cloud-api_keys-v2 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,88 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/api/apikeys/v2/apikeys.proto for package 'Google.Cloud.ApiKeys.V2'
3
+ # Original file comments:
4
+ # Copyright 2022 Google LLC
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/api/apikeys/v2/apikeys_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module ApiKeys
25
+ module V2
26
+ module ApiKeys
27
+ # Manages the API keys associated with projects.
28
+ class Service
29
+
30
+ include ::GRPC::GenericService
31
+
32
+ self.marshal_class_method = :encode
33
+ self.unmarshal_class_method = :decode
34
+ self.service_name = 'google.api.apikeys.v2.ApiKeys'
35
+
36
+ # Creates a new API key.
37
+ #
38
+ # NOTE: Key is a global resource; hence the only supported value for
39
+ # location is `global`.
40
+ rpc :CreateKey, ::Google::Cloud::ApiKeys::V2::CreateKeyRequest, ::Google::Longrunning::Operation
41
+ # Lists the API keys owned by a project. The key string of the API key
42
+ # isn't included in the response.
43
+ #
44
+ # NOTE: Key is a global resource; hence the only supported value for
45
+ # location is `global`.
46
+ rpc :ListKeys, ::Google::Cloud::ApiKeys::V2::ListKeysRequest, ::Google::Cloud::ApiKeys::V2::ListKeysResponse
47
+ # Gets the metadata for an API key. The key string of the API key
48
+ # isn't included in the response.
49
+ #
50
+ # NOTE: Key is a global resource; hence the only supported value for
51
+ # location is `global`.
52
+ rpc :GetKey, ::Google::Cloud::ApiKeys::V2::GetKeyRequest, ::Google::Cloud::ApiKeys::V2::Key
53
+ # Get the key string for an API key.
54
+ #
55
+ # NOTE: Key is a global resource; hence the only supported value for
56
+ # location is `global`.
57
+ rpc :GetKeyString, ::Google::Cloud::ApiKeys::V2::GetKeyStringRequest, ::Google::Cloud::ApiKeys::V2::GetKeyStringResponse
58
+ # Patches the modifiable fields of an API key.
59
+ # The key string of the API key isn't included in the response.
60
+ #
61
+ # NOTE: Key is a global resource; hence the only supported value for
62
+ # location is `global`.
63
+ rpc :UpdateKey, ::Google::Cloud::ApiKeys::V2::UpdateKeyRequest, ::Google::Longrunning::Operation
64
+ # Deletes an API key. Deleted key can be retrieved within 30 days of
65
+ # deletion. Afterward, key will be purged from the project.
66
+ #
67
+ # NOTE: Key is a global resource; hence the only supported value for
68
+ # location is `global`.
69
+ rpc :DeleteKey, ::Google::Cloud::ApiKeys::V2::DeleteKeyRequest, ::Google::Longrunning::Operation
70
+ # Undeletes an API key which was deleted within 30 days.
71
+ #
72
+ # NOTE: Key is a global resource; hence the only supported value for
73
+ # location is `global`.
74
+ rpc :UndeleteKey, ::Google::Cloud::ApiKeys::V2::UndeleteKeyRequest, ::Google::Longrunning::Operation
75
+ # Find the parent project and resource name of the API
76
+ # key that matches the key string in the request. If the API key has been
77
+ # purged, resource name will not be set.
78
+ # The service account must have the `apikeys.keys.lookup` permission
79
+ # on the parent project.
80
+ rpc :LookupKey, ::Google::Cloud::ApiKeys::V2::LookupKeyRequest, ::Google::Cloud::ApiKeys::V2::LookupKeyResponse
81
+ end
82
+
83
+ Stub = Service.rpc_stub_class
84
+ end
85
+ end
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,71 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/api/apikeys/v2/resources.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/field_behavior_pb'
7
+ require 'google/api/resource_pb'
8
+ require 'google/protobuf/timestamp_pb'
9
+
10
+ Google::Protobuf::DescriptorPool.generated_pool.build do
11
+ add_file("google/api/apikeys/v2/resources.proto", :syntax => :proto3) do
12
+ add_message "google.api.apikeys.v2.Key" do
13
+ optional :name, :string, 1
14
+ optional :uid, :string, 5
15
+ optional :display_name, :string, 2
16
+ optional :key_string, :string, 3
17
+ optional :create_time, :message, 4, "google.protobuf.Timestamp"
18
+ optional :update_time, :message, 6, "google.protobuf.Timestamp"
19
+ optional :delete_time, :message, 7, "google.protobuf.Timestamp"
20
+ map :annotations, :string, :string, 8
21
+ optional :restrictions, :message, 9, "google.api.apikeys.v2.Restrictions"
22
+ optional :etag, :string, 11
23
+ end
24
+ add_message "google.api.apikeys.v2.Restrictions" do
25
+ repeated :api_targets, :message, 5, "google.api.apikeys.v2.ApiTarget"
26
+ oneof :client_restrictions do
27
+ optional :browser_key_restrictions, :message, 1, "google.api.apikeys.v2.BrowserKeyRestrictions"
28
+ optional :server_key_restrictions, :message, 2, "google.api.apikeys.v2.ServerKeyRestrictions"
29
+ optional :android_key_restrictions, :message, 3, "google.api.apikeys.v2.AndroidKeyRestrictions"
30
+ optional :ios_key_restrictions, :message, 4, "google.api.apikeys.v2.IosKeyRestrictions"
31
+ end
32
+ end
33
+ add_message "google.api.apikeys.v2.BrowserKeyRestrictions" do
34
+ repeated :allowed_referrers, :string, 1
35
+ end
36
+ add_message "google.api.apikeys.v2.ServerKeyRestrictions" do
37
+ repeated :allowed_ips, :string, 1
38
+ end
39
+ add_message "google.api.apikeys.v2.AndroidKeyRestrictions" do
40
+ repeated :allowed_applications, :message, 1, "google.api.apikeys.v2.AndroidApplication"
41
+ end
42
+ add_message "google.api.apikeys.v2.AndroidApplication" do
43
+ optional :sha1_fingerprint, :string, 1
44
+ optional :package_name, :string, 2
45
+ end
46
+ add_message "google.api.apikeys.v2.IosKeyRestrictions" do
47
+ repeated :allowed_bundle_ids, :string, 1
48
+ end
49
+ add_message "google.api.apikeys.v2.ApiTarget" do
50
+ optional :service, :string, 1
51
+ repeated :methods, :string, 2
52
+ end
53
+ end
54
+ end
55
+
56
+ module Google
57
+ module Cloud
58
+ module ApiKeys
59
+ module V2
60
+ Key = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.apikeys.v2.Key").msgclass
61
+ Restrictions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.apikeys.v2.Restrictions").msgclass
62
+ BrowserKeyRestrictions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.apikeys.v2.BrowserKeyRestrictions").msgclass
63
+ ServerKeyRestrictions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.apikeys.v2.ServerKeyRestrictions").msgclass
64
+ AndroidKeyRestrictions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.apikeys.v2.AndroidKeyRestrictions").msgclass
65
+ AndroidApplication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.apikeys.v2.AndroidApplication").msgclass
66
+ IosKeyRestrictions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.apikeys.v2.IosKeyRestrictions").msgclass
67
+ ApiTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.apikeys.v2.ApiTarget").msgclass
68
+ end
69
+ end
70
+ end
71
+ end