google-cloud-app_engine-v1 0.3.1 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +15 -33
  4. data/README.md +1 -1
  5. data/lib/google/appengine/v1/app_yaml_pb.rb +2 -2
  6. data/lib/google/appengine/v1/appengine_pb.rb +2 -2
  7. data/lib/google/appengine/v1/application_pb.rb +2 -2
  8. data/lib/google/appengine/v1/audit_data_pb.rb +2 -2
  9. data/lib/google/appengine/v1/certificate_pb.rb +2 -2
  10. data/lib/google/appengine/v1/deploy_pb.rb +2 -2
  11. data/lib/google/appengine/v1/deployed_files_pb.rb +1 -1
  12. data/lib/google/appengine/v1/domain_mapping_pb.rb +1 -1
  13. data/lib/google/appengine/v1/domain_pb.rb +1 -1
  14. data/lib/google/appengine/v1/firewall_pb.rb +1 -1
  15. data/lib/google/appengine/v1/instance_pb.rb +2 -2
  16. data/lib/google/appengine/v1/location_pb.rb +2 -2
  17. data/lib/google/appengine/v1/network_settings_pb.rb +1 -1
  18. data/lib/google/appengine/v1/operation_pb.rb +2 -2
  19. data/lib/google/appengine/v1/service_pb.rb +2 -2
  20. data/lib/google/appengine/v1/version_pb.rb +2 -2
  21. data/lib/google/cloud/app_engine/v1/applications/client.rb +139 -50
  22. data/lib/google/cloud/app_engine/v1/applications/operations.rb +149 -37
  23. data/lib/google/cloud/app_engine/v1/authorized_certificates/client.rb +151 -57
  24. data/lib/google/cloud/app_engine/v1/authorized_domains/client.rb +59 -41
  25. data/lib/google/cloud/app_engine/v1/domain_mappings/client.rb +173 -57
  26. data/lib/google/cloud/app_engine/v1/domain_mappings/operations.rb +149 -37
  27. data/lib/google/cloud/app_engine/v1/firewall/client.rb +174 -61
  28. data/lib/google/cloud/app_engine/v1/instances/client.rb +143 -53
  29. data/lib/google/cloud/app_engine/v1/instances/operations.rb +149 -37
  30. data/lib/google/cloud/app_engine/v1/services/client.rb +143 -53
  31. data/lib/google/cloud/app_engine/v1/services/operations.rb +149 -37
  32. data/lib/google/cloud/app_engine/v1/version.rb +1 -1
  33. data/lib/google/cloud/app_engine/v1/versions/client.rb +173 -57
  34. data/lib/google/cloud/app_engine/v1/versions/operations.rb +149 -37
  35. data/proto_docs/google/api/field_behavior.rb +7 -1
  36. data/proto_docs/google/api/resource.rb +10 -71
  37. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ff03459e1e233dfc69a2afa998542e5c39cf3cfa0c2853b12f8edbca1b3bc61
4
- data.tar.gz: adffa394e977745cf07e2523ebfd2a365fa061fbb6b19d1ecdb062a21c49d85e
3
+ metadata.gz: fefac945f018b8973c41d6a33d014b2d4c3b5ab316efc95494f1c51acc81d695
4
+ data.tar.gz: 8da3f96faf3966b2c9552cfb8005f6046d9ddf5c0ddb75e64f9602b7a428409c
5
5
  SHA512:
6
- metadata.gz: 732d8092cc86504839b099122bf981f31adb811331573b6eb230f86ad8062487983f00f900bdfa3db24e00e8dc20545c0d58fe098f77068d748e8ea9adc8bbfa
7
- data.tar.gz: fd6667d890ce2c619a4bbbe9bbe11477d18d3c7720968940799271e169dd9e663cbddd64ed10c451f088a0f8001f0805a6e1ead70a2ce48970381c8ea2ca6e52
6
+ metadata.gz: 23c1c31e15dbc6927655511295679ff2a0cf6a91cbdcdba9b3f5651a9408e0df145f696125c187bbf12ebc7f852fb8e526fd7fedabc458ddb7ef14ef1cf07ae2
7
+ data.tar.gz: 165416d2bd3c0706c2b9e5de8d886f9514aa33cee2e719ee6336a24ce1a3e049d8df12ab3f71cd0ac11167be501042ecaeb8f8ca01515483794d1524b7ea3e2f
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=App Engine Admin V1 API
2
+ --title="App Engine Admin V1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-app_engine-v1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::AppEngine::V1::Applications::Credentials}):
68
68
 
69
- 1. `APP_ENGINE_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `APP_ENGINE_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `APP_ENGINE_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `APP_ENGINE_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/app_engine/v1"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::AppEngine::V1::Applications::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/app_engine/v1"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config|
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/app_engine/v1"
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/app_engine/v1"
34
34
 
35
35
  client = ::Google::Cloud::AppEngine::V1::Applications::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::AppEngine::V1::GetApplicationRequest.new # (request fields as keyword arguments...)
37
37
  response = client.get_application request
38
38
  ```
39
39
 
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/appengine/v1/app_yaml.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/protobuf/duration_pb'
7
5
  require 'google/api/annotations_pb'
6
+ require 'google/protobuf'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/appengine/v1/app_yaml.proto", :syntax => :proto3) do
10
10
  add_message "google.appengine.v1.ApiConfigHandler" do
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/appengine/v1/appengine.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/appengine/v1/application_pb'
7
5
  require 'google/appengine/v1/certificate_pb'
8
6
  require 'google/appengine/v1/domain_pb'
@@ -16,6 +14,8 @@ require 'google/longrunning/operations_pb'
16
14
  require 'google/protobuf/empty_pb'
17
15
  require 'google/protobuf/field_mask_pb'
18
16
  require 'google/api/client_pb'
17
+ require 'google/protobuf'
18
+
19
19
  Google::Protobuf::DescriptorPool.generated_pool.build do
20
20
  add_file("google/appengine/v1/appengine.proto", :syntax => :proto3) do
21
21
  add_message "google.appengine.v1.GetApplicationRequest" do
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/appengine/v1/application.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/protobuf/duration_pb'
7
5
  require 'google/api/annotations_pb'
6
+ require 'google/protobuf'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/appengine/v1/application.proto", :syntax => :proto3) do
10
10
  add_message "google.appengine.v1.Application" do
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/appengine/v1/audit_data.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/appengine/v1/appengine_pb'
7
5
  require 'google/api/annotations_pb'
6
+ require 'google/protobuf'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/appengine/v1/audit_data.proto", :syntax => :proto3) do
10
10
  add_message "google.appengine.v1.AuditData" do
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/appengine/v1/certificate.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/protobuf/timestamp_pb'
7
5
  require 'google/api/annotations_pb'
6
+ require 'google/protobuf'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/appengine/v1/certificate.proto", :syntax => :proto3) do
10
10
  add_message "google.appengine.v1.AuthorizedCertificate" do
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/appengine/v1/deploy.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/protobuf/duration_pb'
7
5
  require 'google/api/annotations_pb'
6
+ require 'google/protobuf'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/appengine/v1/deploy.proto", :syntax => :proto3) do
10
10
  add_message "google.appengine.v1.Deployment" do
@@ -1,9 +1,9 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/appengine/v1/deployed_files.proto
3
3
 
4
+ require 'google/api/annotations_pb'
4
5
  require 'google/protobuf'
5
6
 
6
- require 'google/api/annotations_pb'
7
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
8
  add_file("google/appengine/v1/deployed_files.proto", :syntax => :proto3) do
9
9
  end
@@ -1,9 +1,9 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/appengine/v1/domain_mapping.proto
3
3
 
4
+ require 'google/api/annotations_pb'
4
5
  require 'google/protobuf'
5
6
 
6
- require 'google/api/annotations_pb'
7
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
8
  add_file("google/appengine/v1/domain_mapping.proto", :syntax => :proto3) do
9
9
  add_message "google.appengine.v1.DomainMapping" do
@@ -1,9 +1,9 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/appengine/v1/domain.proto
3
3
 
4
+ require 'google/api/annotations_pb'
4
5
  require 'google/protobuf'
5
6
 
6
- require 'google/api/annotations_pb'
7
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
8
  add_file("google/appengine/v1/domain.proto", :syntax => :proto3) do
9
9
  add_message "google.appengine.v1.AuthorizedDomain" do
@@ -1,9 +1,9 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/appengine/v1/firewall.proto
3
3
 
4
+ require 'google/api/annotations_pb'
4
5
  require 'google/protobuf'
5
6
 
6
- require 'google/api/annotations_pb'
7
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
8
  add_file("google/appengine/v1/firewall.proto", :syntax => :proto3) do
9
9
  add_message "google.appengine.v1.FirewallRule" do
@@ -1,12 +1,12 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/appengine/v1/instance.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/api/resource_pb'
8
6
  require 'google/protobuf/timestamp_pb'
9
7
  require 'google/api/annotations_pb'
8
+ require 'google/protobuf'
9
+
10
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
11
  add_file("google/appengine/v1/instance.proto", :syntax => :proto3) do
12
12
  add_message "google.appengine.v1.Instance" do
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/appengine/v1/location.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/api/annotations_pb'
6
+ require 'google/protobuf'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/appengine/v1/location.proto", :syntax => :proto3) do
10
10
  add_message "google.appengine.v1.LocationMetadata" do
@@ -1,9 +1,9 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/appengine/v1/network_settings.proto
3
3
 
4
+ require 'google/api/annotations_pb'
4
5
  require 'google/protobuf'
5
6
 
6
- require 'google/api/annotations_pb'
7
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
8
  add_file("google/appengine/v1/network_settings.proto", :syntax => :proto3) do
9
9
  add_message "google.appengine.v1.NetworkSettings" do
@@ -1,11 +1,11 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/appengine/v1/operation.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/protobuf/duration_pb'
7
5
  require 'google/protobuf/timestamp_pb'
8
6
  require 'google/api/annotations_pb'
7
+ require 'google/protobuf'
8
+
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_file("google/appengine/v1/operation.proto", :syntax => :proto3) do
11
11
  add_message "google.appengine.v1.OperationMetadataV1" do
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/appengine/v1/service.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/appengine/v1/network_settings_pb'
7
5
  require 'google/api/annotations_pb'
6
+ require 'google/protobuf'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/appengine/v1/service.proto", :syntax => :proto3) do
10
10
  add_message "google.appengine.v1.Service" do
@@ -1,14 +1,14 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/appengine/v1/version.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/appengine/v1/app_yaml_pb'
7
5
  require 'google/appengine/v1/deploy_pb'
8
6
  require 'google/appengine/v1/network_settings_pb'
9
7
  require 'google/protobuf/duration_pb'
10
8
  require 'google/protobuf/timestamp_pb'
11
9
  require 'google/api/annotations_pb'
10
+ require 'google/protobuf'
11
+
12
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
13
13
  add_file("google/appengine/v1/version.proto", :syntax => :proto3) do
14
14
  add_message "google.appengine.v1.Version" do
@@ -39,13 +39,12 @@ module Google
39
39
  # See {::Google::Cloud::AppEngine::V1::Applications::Client::Configuration}
40
40
  # for a description of the configuration fields.
41
41
  #
42
- # ## Example
42
+ # @example
43
43
  #
44
- # To modify the configuration for all Applications clients:
45
- #
46
- # ::Google::Cloud::AppEngine::V1::Applications::Client.configure do |config|
47
- # config.timeout = 10.0
48
- # end
44
+ # # Modify the configuration for all Applications clients
45
+ # ::Google::Cloud::AppEngine::V1::Applications::Client.configure do |config|
46
+ # config.timeout = 10.0
47
+ # end
49
48
  #
50
49
  # @yield [config] Configure the Client client.
51
50
  # @yieldparam config [Client::Configuration]
@@ -92,19 +91,15 @@ module Google
92
91
  ##
93
92
  # Create a new Applications client object.
94
93
  #
95
- # ## Examples
96
- #
97
- # To create a new Applications client with the default
98
- # configuration:
99
- #
100
- # client = ::Google::Cloud::AppEngine::V1::Applications::Client.new
94
+ # @example
101
95
  #
102
- # To create a new Applications client with a custom
103
- # configuration:
96
+ # # Create a client using the default configuration
97
+ # client = ::Google::Cloud::AppEngine::V1::Applications::Client.new
104
98
  #
105
- # client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config|
106
- # config.timeout = 10.0
107
- # end
99
+ # # Create a client using a custom configuration
100
+ # client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config|
101
+ # config.timeout = 10.0
102
+ # end
108
103
  #
109
104
  # @yield [config] Configure the Applications client.
110
105
  # @yieldparam config [Client::Configuration]
@@ -124,14 +119,13 @@ module Google
124
119
 
125
120
  # Create credentials
126
121
  credentials = @config.credentials
127
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
122
+ # Use self-signed JWT if the endpoint is unchanged from default,
128
123
  # but only if the default endpoint does not have a region prefix.
129
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
130
- @config.endpoint == Client.configure.endpoint &&
124
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
131
125
  !@config.endpoint.split(".").first.include?("-")
132
126
  credentials ||= Credentials.default scope: @config.scope,
133
127
  enable_self_signed_jwt: enable_self_signed_jwt
134
- if credentials.is_a?(String) || credentials.is_a?(Hash)
128
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
135
129
  credentials = Credentials.new credentials, scope: @config.scope
136
130
  end
137
131
  @quota_project_id = @config.quota_project
@@ -139,6 +133,7 @@ module Google
139
133
 
140
134
  @operations_client = Operations.new do |config|
141
135
  config.credentials = credentials
136
+ config.quota_project = @quota_project_id
142
137
  config.endpoint = @config.endpoint
143
138
  end
144
139
 
@@ -189,6 +184,21 @@ module Google
189
184
  #
190
185
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
191
186
  #
187
+ # @example Basic example
188
+ # require "google/cloud/app_engine/v1"
189
+ #
190
+ # # Create a client object. The client can be reused for multiple calls.
191
+ # client = Google::Cloud::AppEngine::V1::Applications::Client.new
192
+ #
193
+ # # Create a request. To set request fields, pass in keyword arguments.
194
+ # request = Google::Cloud::AppEngine::V1::GetApplicationRequest.new
195
+ #
196
+ # # Call the get_application method.
197
+ # result = client.get_application request
198
+ #
199
+ # # The returned object is of type Google::Cloud::AppEngine::V1::Application.
200
+ # p result
201
+ #
192
202
  def get_application request, options = nil
193
203
  raise ::ArgumentError, "request must be provided" if request.nil?
194
204
 
@@ -206,16 +216,20 @@ module Google
206
216
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
207
217
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
208
218
 
209
- header_params = {
210
- "name" => request.name
211
- }
219
+ header_params = {}
220
+ if request.name
221
+ header_params["name"] = request.name
222
+ end
223
+
212
224
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
213
225
  metadata[:"x-goog-request-params"] ||= request_params_header
214
226
 
215
227
  options.apply_defaults timeout: @config.rpcs.get_application.timeout,
216
228
  metadata: metadata,
217
229
  retry_policy: @config.rpcs.get_application.retry_policy
218
- options.apply_defaults metadata: @config.metadata,
230
+
231
+ options.apply_defaults timeout: @config.timeout,
232
+ metadata: @config.metadata,
219
233
  retry_policy: @config.retry_policy
220
234
 
221
235
  @applications_stub.call_rpc :get_application, request, options: options do |response, operation|
@@ -261,6 +275,28 @@ module Google
261
275
  #
262
276
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
263
277
  #
278
+ # @example Basic example
279
+ # require "google/cloud/app_engine/v1"
280
+ #
281
+ # # Create a client object. The client can be reused for multiple calls.
282
+ # client = Google::Cloud::AppEngine::V1::Applications::Client.new
283
+ #
284
+ # # Create a request. To set request fields, pass in keyword arguments.
285
+ # request = Google::Cloud::AppEngine::V1::CreateApplicationRequest.new
286
+ #
287
+ # # Call the create_application method.
288
+ # result = client.create_application request
289
+ #
290
+ # # The returned object is of type Gapic::Operation. You can use this
291
+ # # object to check the status of an operation, cancel it, or wait
292
+ # # for results. Here is how to block until completion:
293
+ # result.wait_until_done! timeout: 60
294
+ # if result.response?
295
+ # p result.response
296
+ # else
297
+ # puts "Error!"
298
+ # end
299
+ #
264
300
  def create_application request, options = nil
265
301
  raise ::ArgumentError, "request must be provided" if request.nil?
266
302
 
@@ -281,7 +317,9 @@ module Google
281
317
  options.apply_defaults timeout: @config.rpcs.create_application.timeout,
282
318
  metadata: metadata,
283
319
  retry_policy: @config.rpcs.create_application.retry_policy
284
- options.apply_defaults metadata: @config.metadata,
320
+
321
+ options.apply_defaults timeout: @config.timeout,
322
+ metadata: @config.metadata,
285
323
  retry_policy: @config.retry_policy
286
324
 
287
325
  @applications_stub.call_rpc :create_application, request, options: options do |response, operation|
@@ -330,6 +368,28 @@ module Google
330
368
  #
331
369
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
332
370
  #
371
+ # @example Basic example
372
+ # require "google/cloud/app_engine/v1"
373
+ #
374
+ # # Create a client object. The client can be reused for multiple calls.
375
+ # client = Google::Cloud::AppEngine::V1::Applications::Client.new
376
+ #
377
+ # # Create a request. To set request fields, pass in keyword arguments.
378
+ # request = Google::Cloud::AppEngine::V1::UpdateApplicationRequest.new
379
+ #
380
+ # # Call the update_application method.
381
+ # result = client.update_application request
382
+ #
383
+ # # The returned object is of type Gapic::Operation. You can use this
384
+ # # object to check the status of an operation, cancel it, or wait
385
+ # # for results. Here is how to block until completion:
386
+ # result.wait_until_done! timeout: 60
387
+ # if result.response?
388
+ # p result.response
389
+ # else
390
+ # puts "Error!"
391
+ # end
392
+ #
333
393
  def update_application request, options = nil
334
394
  raise ::ArgumentError, "request must be provided" if request.nil?
335
395
 
@@ -347,16 +407,20 @@ module Google
347
407
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
348
408
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
349
409
 
350
- header_params = {
351
- "name" => request.name
352
- }
410
+ header_params = {}
411
+ if request.name
412
+ header_params["name"] = request.name
413
+ end
414
+
353
415
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
354
416
  metadata[:"x-goog-request-params"] ||= request_params_header
355
417
 
356
418
  options.apply_defaults timeout: @config.rpcs.update_application.timeout,
357
419
  metadata: metadata,
358
420
  retry_policy: @config.rpcs.update_application.retry_policy
359
- options.apply_defaults metadata: @config.metadata,
421
+
422
+ options.apply_defaults timeout: @config.timeout,
423
+ metadata: @config.metadata,
360
424
  retry_policy: @config.retry_policy
361
425
 
362
426
  @applications_stub.call_rpc :update_application, request, options: options do |response, operation|
@@ -406,6 +470,28 @@ module Google
406
470
  #
407
471
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
408
472
  #
473
+ # @example Basic example
474
+ # require "google/cloud/app_engine/v1"
475
+ #
476
+ # # Create a client object. The client can be reused for multiple calls.
477
+ # client = Google::Cloud::AppEngine::V1::Applications::Client.new
478
+ #
479
+ # # Create a request. To set request fields, pass in keyword arguments.
480
+ # request = Google::Cloud::AppEngine::V1::RepairApplicationRequest.new
481
+ #
482
+ # # Call the repair_application method.
483
+ # result = client.repair_application request
484
+ #
485
+ # # The returned object is of type Gapic::Operation. You can use this
486
+ # # object to check the status of an operation, cancel it, or wait
487
+ # # for results. Here is how to block until completion:
488
+ # result.wait_until_done! timeout: 60
489
+ # if result.response?
490
+ # p result.response
491
+ # else
492
+ # puts "Error!"
493
+ # end
494
+ #
409
495
  def repair_application request, options = nil
410
496
  raise ::ArgumentError, "request must be provided" if request.nil?
411
497
 
@@ -423,16 +509,20 @@ module Google
423
509
  gapic_version: ::Google::Cloud::AppEngine::V1::VERSION
424
510
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
425
511
 
426
- header_params = {
427
- "name" => request.name
428
- }
512
+ header_params = {}
513
+ if request.name
514
+ header_params["name"] = request.name
515
+ end
516
+
429
517
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
430
518
  metadata[:"x-goog-request-params"] ||= request_params_header
431
519
 
432
520
  options.apply_defaults timeout: @config.rpcs.repair_application.timeout,
433
521
  metadata: metadata,
434
522
  retry_policy: @config.rpcs.repair_application.retry_policy
435
- options.apply_defaults metadata: @config.metadata,
523
+
524
+ options.apply_defaults timeout: @config.timeout,
525
+ metadata: @config.metadata,
436
526
  retry_policy: @config.retry_policy
437
527
 
438
528
  @applications_stub.call_rpc :repair_application, request, options: options do |response, operation|
@@ -457,22 +547,21 @@ module Google
457
547
  # Configuration can be applied globally to all clients, or to a single client
458
548
  # on construction.
459
549
  #
460
- # # Examples
461
- #
462
- # To modify the global config, setting the timeout for get_application
463
- # to 20 seconds, and all remaining timeouts to 10 seconds:
464
- #
465
- # ::Google::Cloud::AppEngine::V1::Applications::Client.configure do |config|
466
- # config.timeout = 10.0
467
- # config.rpcs.get_application.timeout = 20.0
468
- # end
469
- #
470
- # To apply the above configuration only to a new client:
471
- #
472
- # client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config|
473
- # config.timeout = 10.0
474
- # config.rpcs.get_application.timeout = 20.0
475
- # end
550
+ # @example
551
+ #
552
+ # # Modify the global config, setting the timeout for
553
+ # # get_application to 20 seconds,
554
+ # # and all remaining timeouts to 10 seconds.
555
+ # ::Google::Cloud::AppEngine::V1::Applications::Client.configure do |config|
556
+ # config.timeout = 10.0
557
+ # config.rpcs.get_application.timeout = 20.0
558
+ # end
559
+ #
560
+ # # Apply the above configuration only to a new client.
561
+ # client = ::Google::Cloud::AppEngine::V1::Applications::Client.new do |config|
562
+ # config.timeout = 10.0
563
+ # config.rpcs.get_application.timeout = 20.0
564
+ # end
476
565
  #
477
566
  # @!attribute [rw] endpoint
478
567
  # The hostname or hostname:port of the service endpoint.