google-cloud-vm_migration-v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,216 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module VMMigration
23
+ module V1
24
+ module VMMigration
25
+ # Path helper methods for the VmMigration API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified CloneJob resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cloneJobs/{clone_job}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param source [String]
37
+ # @param migrating_vm [String]
38
+ # @param clone_job [String]
39
+ #
40
+ # @return [::String]
41
+ def clone_job_path project:, location:, source:, migrating_vm:, clone_job:
42
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
43
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
44
+ raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
45
+ raise ::ArgumentError, "migrating_vm cannot contain /" if migrating_vm.to_s.include? "/"
46
+
47
+ "projects/#{project}/locations/#{location}/sources/#{source}/migratingVms/#{migrating_vm}/cloneJobs/#{clone_job}"
48
+ end
49
+
50
+ ##
51
+ # Create a fully-qualified CutoverJob resource string.
52
+ #
53
+ # The resource will be in the following format:
54
+ #
55
+ # `projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job}`
56
+ #
57
+ # @param project [String]
58
+ # @param location [String]
59
+ # @param source [String]
60
+ # @param migrating_vm [String]
61
+ # @param cutover_job [String]
62
+ #
63
+ # @return [::String]
64
+ def cutover_job_path project:, location:, source:, migrating_vm:, cutover_job:
65
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
66
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
67
+ raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
68
+ raise ::ArgumentError, "migrating_vm cannot contain /" if migrating_vm.to_s.include? "/"
69
+
70
+ "projects/#{project}/locations/#{location}/sources/#{source}/migratingVms/#{migrating_vm}/cutoverJobs/#{cutover_job}"
71
+ end
72
+
73
+ ##
74
+ # Create a fully-qualified DatacenterConnector resource string.
75
+ #
76
+ # The resource will be in the following format:
77
+ #
78
+ # `projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector}`
79
+ #
80
+ # @param project [String]
81
+ # @param location [String]
82
+ # @param source [String]
83
+ # @param datacenter_connector [String]
84
+ #
85
+ # @return [::String]
86
+ def datacenter_connector_path project:, location:, source:, datacenter_connector:
87
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
88
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
89
+ raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
90
+
91
+ "projects/#{project}/locations/#{location}/sources/#{source}/datacenterConnectors/#{datacenter_connector}"
92
+ end
93
+
94
+ ##
95
+ # Create a fully-qualified Group resource string.
96
+ #
97
+ # The resource will be in the following format:
98
+ #
99
+ # `projects/{project}/locations/{location}/groups/{group}`
100
+ #
101
+ # @param project [String]
102
+ # @param location [String]
103
+ # @param group [String]
104
+ #
105
+ # @return [::String]
106
+ def group_path project:, location:, group:
107
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
108
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
109
+
110
+ "projects/#{project}/locations/#{location}/groups/#{group}"
111
+ end
112
+
113
+ ##
114
+ # Create a fully-qualified Location resource string.
115
+ #
116
+ # The resource will be in the following format:
117
+ #
118
+ # `projects/{project}/locations/{location}`
119
+ #
120
+ # @param project [String]
121
+ # @param location [String]
122
+ #
123
+ # @return [::String]
124
+ def location_path project:, location:
125
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
126
+
127
+ "projects/#{project}/locations/#{location}"
128
+ end
129
+
130
+ ##
131
+ # Create a fully-qualified MigratingVm resource string.
132
+ #
133
+ # The resource will be in the following format:
134
+ #
135
+ # `projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}`
136
+ #
137
+ # @param project [String]
138
+ # @param location [String]
139
+ # @param source [String]
140
+ # @param migrating_vm [String]
141
+ #
142
+ # @return [::String]
143
+ def migrating_vm_path project:, location:, source:, migrating_vm:
144
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
145
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
146
+ raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
147
+
148
+ "projects/#{project}/locations/#{location}/sources/#{source}/migratingVms/#{migrating_vm}"
149
+ end
150
+
151
+ ##
152
+ # Create a fully-qualified Source resource string.
153
+ #
154
+ # The resource will be in the following format:
155
+ #
156
+ # `projects/{project}/locations/{location}/sources/{source}`
157
+ #
158
+ # @param project [String]
159
+ # @param location [String]
160
+ # @param source [String]
161
+ #
162
+ # @return [::String]
163
+ def source_path project:, location:, source:
164
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
165
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
166
+
167
+ "projects/#{project}/locations/#{location}/sources/#{source}"
168
+ end
169
+
170
+ ##
171
+ # Create a fully-qualified TargetProject resource string.
172
+ #
173
+ # The resource will be in the following format:
174
+ #
175
+ # `projects/{project}/locations/{location}/targetProjects/{target_project}`
176
+ #
177
+ # @param project [String]
178
+ # @param location [String]
179
+ # @param target_project [String]
180
+ #
181
+ # @return [::String]
182
+ def target_project_path project:, location:, target_project:
183
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
184
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
185
+
186
+ "projects/#{project}/locations/#{location}/targetProjects/#{target_project}"
187
+ end
188
+
189
+ ##
190
+ # Create a fully-qualified UtilizationReport resource string.
191
+ #
192
+ # The resource will be in the following format:
193
+ #
194
+ # `projects/{project}/locations/{location}/sources/{source}/utilizationReports/{utilization_report}`
195
+ #
196
+ # @param project [String]
197
+ # @param location [String]
198
+ # @param source [String]
199
+ # @param utilization_report [String]
200
+ #
201
+ # @return [::String]
202
+ def utilization_report_path project:, location:, source:, utilization_report:
203
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
204
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
205
+ raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
206
+
207
+ "projects/#{project}/locations/#{location}/sources/#{source}/utilizationReports/#{utilization_report}"
208
+ end
209
+
210
+ extend self
211
+ end
212
+ end
213
+ end
214
+ end
215
+ end
216
+ end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/vm_migration/v1/version"
24
+
25
+ require "google/cloud/vm_migration/v1/vm_migration/credentials"
26
+ require "google/cloud/vm_migration/v1/vm_migration/paths"
27
+ require "google/cloud/vm_migration/v1/vm_migration/operations"
28
+ require "google/cloud/vm_migration/v1/vm_migration/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module VMMigration
33
+ module V1
34
+ ##
35
+ # VM Migration Service
36
+ #
37
+ # To load this service and instantiate a client:
38
+ #
39
+ # require "google/cloud/vm_migration/v1/vm_migration"
40
+ # client = ::Google::Cloud::VMMigration::V1::VMMigration::Client.new
41
+ #
42
+ module VMMigration
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+
49
+ helper_path = ::File.join __dir__, "vm_migration", "helpers.rb"
50
+ require "google/cloud/vm_migration/v1/vm_migration/helpers" if ::File.file? helper_path
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/vm_migration/v1/vm_migration"
20
+ require "google/cloud/vm_migration/v1/version"
21
+
22
+ module Google
23
+ module Cloud
24
+ module VMMigration
25
+ ##
26
+ # To load this package, including all its services, and instantiate a client:
27
+ #
28
+ # require "google/cloud/vm_migration/v1"
29
+ # client = ::Google::Cloud::VMMigration::V1::VMMigration::Client.new
30
+ #
31
+ module V1
32
+ end
33
+ end
34
+ end
35
+ end
36
+
37
+ helper_path = ::File.join __dir__, "v1", "_helpers.rb"
38
+ require "google/cloud/vm_migration/v1/_helpers" if ::File.file? helper_path