google-cloud-talent 0.1.0

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 (71) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +9 -0
  3. data/LICENSE +201 -0
  4. data/README.md +69 -0
  5. data/lib/google/cloud/talent.rb +456 -0
  6. data/lib/google/cloud/talent/v4beta1.rb +484 -0
  7. data/lib/google/cloud/talent/v4beta1/batch_pb.rb +21 -0
  8. data/lib/google/cloud/talent/v4beta1/common_pb.rb +264 -0
  9. data/lib/google/cloud/talent/v4beta1/company_pb.rb +39 -0
  10. data/lib/google/cloud/talent/v4beta1/company_service_client.rb +479 -0
  11. data/lib/google/cloud/talent/v4beta1/company_service_client_config.json +51 -0
  12. data/lib/google/cloud/talent/v4beta1/company_service_pb.rb +53 -0
  13. data/lib/google/cloud/talent/v4beta1/company_service_services_pb.rb +56 -0
  14. data/lib/google/cloud/talent/v4beta1/completion_client.rb +303 -0
  15. data/lib/google/cloud/talent/v4beta1/completion_client_config.json +31 -0
  16. data/lib/google/cloud/talent/v4beta1/completion_service_pb.rb +53 -0
  17. data/lib/google/cloud/talent/v4beta1/completion_service_services_pb.rb +48 -0
  18. data/lib/google/cloud/talent/v4beta1/credentials.rb +42 -0
  19. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/common.rb +890 -0
  20. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/company.rb +125 -0
  21. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/company_service.rb +130 -0
  22. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/completion_service.rb +153 -0
  23. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/event.rb +252 -0
  24. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/event_service.rb +34 -0
  25. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/filters.rb +853 -0
  26. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/histogram.rb +56 -0
  27. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/job.rb +409 -0
  28. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/job_service.rb +732 -0
  29. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/profile.rb +1125 -0
  30. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/profile_service.rb +392 -0
  31. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/resume_service.rb +98 -0
  32. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/tenant.rb +68 -0
  33. data/lib/google/cloud/talent/v4beta1/doc/google/cloud/talent/v4beta1/tenant_service.rb +119 -0
  34. data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/duration.rb +91 -0
  35. data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/empty.rb +29 -0
  36. data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/field_mask.rb +230 -0
  37. data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/timestamp.rb +109 -0
  38. data/lib/google/cloud/talent/v4beta1/doc/google/protobuf/wrappers.rb +34 -0
  39. data/lib/google/cloud/talent/v4beta1/doc/google/type/date.rb +39 -0
  40. data/lib/google/cloud/talent/v4beta1/doc/google/type/latlng.rb +65 -0
  41. data/lib/google/cloud/talent/v4beta1/doc/google/type/money.rb +36 -0
  42. data/lib/google/cloud/talent/v4beta1/doc/google/type/postal_address.rb +126 -0
  43. data/lib/google/cloud/talent/v4beta1/doc/google/type/timeofday.rb +38 -0
  44. data/lib/google/cloud/talent/v4beta1/event_pb.rb +75 -0
  45. data/lib/google/cloud/talent/v4beta1/event_service_client.rb +239 -0
  46. data/lib/google/cloud/talent/v4beta1/event_service_client_config.json +31 -0
  47. data/lib/google/cloud/talent/v4beta1/event_service_pb.rb +24 -0
  48. data/lib/google/cloud/talent/v4beta1/event_service_services_pb.rb +53 -0
  49. data/lib/google/cloud/talent/v4beta1/filters_pb.rb +182 -0
  50. data/lib/google/cloud/talent/v4beta1/helpers.rb +90 -0
  51. data/lib/google/cloud/talent/v4beta1/histogram_pb.rb +28 -0
  52. data/lib/google/cloud/talent/v4beta1/job_pb.rb +69 -0
  53. data/lib/google/cloud/talent/v4beta1/job_service_client.rb +1295 -0
  54. data/lib/google/cloud/talent/v4beta1/job_service_client_config.json +66 -0
  55. data/lib/google/cloud/talent/v4beta1/job_service_pb.rb +142 -0
  56. data/lib/google/cloud/talent/v4beta1/job_service_services_pb.rb +88 -0
  57. data/lib/google/cloud/talent/v4beta1/profile_pb.rb +249 -0
  58. data/lib/google/cloud/talent/v4beta1/profile_service_client.rb +757 -0
  59. data/lib/google/cloud/talent/v4beta1/profile_service_client_config.json +56 -0
  60. data/lib/google/cloud/talent/v4beta1/profile_service_pb.rb +81 -0
  61. data/lib/google/cloud/talent/v4beta1/profile_service_services_pb.rb +65 -0
  62. data/lib/google/cloud/talent/v4beta1/resume_service_client.rb +296 -0
  63. data/lib/google/cloud/talent/v4beta1/resume_service_client_config.json +31 -0
  64. data/lib/google/cloud/talent/v4beta1/resume_service_pb.rb +37 -0
  65. data/lib/google/cloud/talent/v4beta1/resume_service_services_pb.rb +75 -0
  66. data/lib/google/cloud/talent/v4beta1/tenant_pb.rb +31 -0
  67. data/lib/google/cloud/talent/v4beta1/tenant_service_client.rb +466 -0
  68. data/lib/google/cloud/talent/v4beta1/tenant_service_client_config.json +51 -0
  69. data/lib/google/cloud/talent/v4beta1/tenant_service_pb.rb +52 -0
  70. data/lib/google/cloud/talent/v4beta1/tenant_service_services_pb.rb +55 -0
  71. metadata +197 -0
@@ -0,0 +1,21 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/talent/v4beta1/batch.proto
3
+
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/annotations_pb'
8
+ require 'google/cloud/talent/v4beta1/job_pb'
9
+ require 'google/protobuf/timestamp_pb'
10
+ require 'google/rpc/status_pb'
11
+ Google::Protobuf::DescriptorPool.generated_pool.build do
12
+ end
13
+
14
+ module Google
15
+ module Cloud
16
+ module Talent
17
+ module V4beta1
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,264 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/talent/v4beta1/common.proto
3
+
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/annotations_pb'
8
+ require 'google/protobuf/timestamp_pb'
9
+ require 'google/protobuf/wrappers_pb'
10
+ require 'google/type/latlng_pb'
11
+ require 'google/type/money_pb'
12
+ require 'google/type/postal_address_pb'
13
+ Google::Protobuf::DescriptorPool.generated_pool.build do
14
+ add_message "google.cloud.talent.v4beta1.TimestampRange" do
15
+ optional :start_time, :message, 1, "google.protobuf.Timestamp"
16
+ optional :end_time, :message, 2, "google.protobuf.Timestamp"
17
+ end
18
+ add_message "google.cloud.talent.v4beta1.Location" do
19
+ optional :location_type, :enum, 1, "google.cloud.talent.v4beta1.Location.LocationType"
20
+ optional :postal_address, :message, 2, "google.type.PostalAddress"
21
+ optional :lat_lng, :message, 3, "google.type.LatLng"
22
+ optional :radius_miles, :double, 4
23
+ end
24
+ add_enum "google.cloud.talent.v4beta1.Location.LocationType" do
25
+ value :LOCATION_TYPE_UNSPECIFIED, 0
26
+ value :COUNTRY, 1
27
+ value :ADMINISTRATIVE_AREA, 2
28
+ value :SUB_ADMINISTRATIVE_AREA, 3
29
+ value :LOCALITY, 4
30
+ value :POSTAL_CODE, 5
31
+ value :SUB_LOCALITY, 6
32
+ value :SUB_LOCALITY_1, 7
33
+ value :SUB_LOCALITY_2, 8
34
+ value :NEIGHBORHOOD, 9
35
+ value :STREET_ADDRESS, 10
36
+ end
37
+ add_message "google.cloud.talent.v4beta1.RequestMetadata" do
38
+ optional :domain, :string, 1
39
+ optional :session_id, :string, 2
40
+ optional :user_id, :string, 3
41
+ optional :allow_missing_ids, :bool, 4
42
+ optional :device_info, :message, 5, "google.cloud.talent.v4beta1.DeviceInfo"
43
+ end
44
+ add_message "google.cloud.talent.v4beta1.ResponseMetadata" do
45
+ optional :request_id, :string, 1
46
+ end
47
+ add_message "google.cloud.talent.v4beta1.DeviceInfo" do
48
+ optional :device_type, :enum, 1, "google.cloud.talent.v4beta1.DeviceInfo.DeviceType"
49
+ optional :id, :string, 2
50
+ end
51
+ add_enum "google.cloud.talent.v4beta1.DeviceInfo.DeviceType" do
52
+ value :DEVICE_TYPE_UNSPECIFIED, 0
53
+ value :WEB, 1
54
+ value :MOBILE_WEB, 2
55
+ value :ANDROID, 3
56
+ value :IOS, 4
57
+ value :BOT, 5
58
+ value :OTHER, 6
59
+ end
60
+ add_message "google.cloud.talent.v4beta1.CustomAttribute" do
61
+ repeated :string_values, :string, 1
62
+ repeated :long_values, :int64, 2
63
+ optional :filterable, :bool, 3
64
+ end
65
+ add_message "google.cloud.talent.v4beta1.SpellingCorrection" do
66
+ optional :corrected, :bool, 1
67
+ optional :corrected_text, :string, 2
68
+ optional :corrected_html, :string, 3
69
+ end
70
+ add_message "google.cloud.talent.v4beta1.CompensationInfo" do
71
+ repeated :entries, :message, 1, "google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry"
72
+ optional :annualized_base_compensation_range, :message, 2, "google.cloud.talent.v4beta1.CompensationInfo.CompensationRange"
73
+ optional :annualized_total_compensation_range, :message, 3, "google.cloud.talent.v4beta1.CompensationInfo.CompensationRange"
74
+ end
75
+ add_message "google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry" do
76
+ optional :type, :enum, 1, "google.cloud.talent.v4beta1.CompensationInfo.CompensationType"
77
+ optional :unit, :enum, 2, "google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit"
78
+ optional :description, :string, 5
79
+ optional :expected_units_per_year, :message, 6, "google.protobuf.DoubleValue"
80
+ oneof :compensation_amount do
81
+ optional :amount, :message, 3, "google.type.Money"
82
+ optional :range, :message, 4, "google.cloud.talent.v4beta1.CompensationInfo.CompensationRange"
83
+ end
84
+ end
85
+ add_message "google.cloud.talent.v4beta1.CompensationInfo.CompensationRange" do
86
+ optional :max_compensation, :message, 2, "google.type.Money"
87
+ optional :min_compensation, :message, 1, "google.type.Money"
88
+ end
89
+ add_enum "google.cloud.talent.v4beta1.CompensationInfo.CompensationType" do
90
+ value :COMPENSATION_TYPE_UNSPECIFIED, 0
91
+ value :BASE, 1
92
+ value :BONUS, 2
93
+ value :SIGNING_BONUS, 3
94
+ value :EQUITY, 4
95
+ value :PROFIT_SHARING, 5
96
+ value :COMMISSIONS, 6
97
+ value :TIPS, 7
98
+ value :OTHER_COMPENSATION_TYPE, 8
99
+ end
100
+ add_enum "google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit" do
101
+ value :COMPENSATION_UNIT_UNSPECIFIED, 0
102
+ value :HOURLY, 1
103
+ value :DAILY, 2
104
+ value :WEEKLY, 3
105
+ value :MONTHLY, 4
106
+ value :YEARLY, 5
107
+ value :ONE_TIME, 6
108
+ value :OTHER_COMPENSATION_UNIT, 7
109
+ end
110
+ add_enum "google.cloud.talent.v4beta1.CompanySize" do
111
+ value :COMPANY_SIZE_UNSPECIFIED, 0
112
+ value :MINI, 1
113
+ value :SMALL, 2
114
+ value :SMEDIUM, 3
115
+ value :MEDIUM, 4
116
+ value :BIG, 5
117
+ value :BIGGER, 6
118
+ value :GIANT, 7
119
+ end
120
+ add_enum "google.cloud.talent.v4beta1.JobBenefit" do
121
+ value :JOB_BENEFIT_UNSPECIFIED, 0
122
+ value :CHILD_CARE, 1
123
+ value :DENTAL, 2
124
+ value :DOMESTIC_PARTNER, 3
125
+ value :FLEXIBLE_HOURS, 4
126
+ value :MEDICAL, 5
127
+ value :LIFE_INSURANCE, 6
128
+ value :PARENTAL_LEAVE, 7
129
+ value :RETIREMENT_PLAN, 8
130
+ value :SICK_DAYS, 9
131
+ value :VACATION, 10
132
+ value :VISION, 11
133
+ end
134
+ add_enum "google.cloud.talent.v4beta1.DegreeType" do
135
+ value :DEGREE_TYPE_UNSPECIFIED, 0
136
+ value :PRIMARY_EDUCATION, 1
137
+ value :LOWER_SECONDARY_EDUCATION, 2
138
+ value :UPPER_SECONDARY_EDUCATION, 3
139
+ value :ADULT_REMEDIAL_EDUCATION, 4
140
+ value :ASSOCIATES_OR_EQUIVALENT, 5
141
+ value :BACHELORS_OR_EQUIVALENT, 6
142
+ value :MASTERS_OR_EQUIVALENT, 7
143
+ value :DOCTORAL_OR_EQUIVALENT, 8
144
+ end
145
+ add_enum "google.cloud.talent.v4beta1.EmploymentType" do
146
+ value :EMPLOYMENT_TYPE_UNSPECIFIED, 0
147
+ value :FULL_TIME, 1
148
+ value :PART_TIME, 2
149
+ value :CONTRACTOR, 3
150
+ value :CONTRACT_TO_HIRE, 4
151
+ value :TEMPORARY, 5
152
+ value :INTERN, 6
153
+ value :VOLUNTEER, 7
154
+ value :PER_DIEM, 8
155
+ value :FLY_IN_FLY_OUT, 9
156
+ value :OTHER_EMPLOYMENT_TYPE, 10
157
+ end
158
+ add_enum "google.cloud.talent.v4beta1.JobLevel" do
159
+ value :JOB_LEVEL_UNSPECIFIED, 0
160
+ value :ENTRY_LEVEL, 1
161
+ value :EXPERIENCED, 2
162
+ value :MANAGER, 3
163
+ value :DIRECTOR, 4
164
+ value :EXECUTIVE, 5
165
+ end
166
+ add_enum "google.cloud.talent.v4beta1.JobCategory" do
167
+ value :JOB_CATEGORY_UNSPECIFIED, 0
168
+ value :ACCOUNTING_AND_FINANCE, 1
169
+ value :ADMINISTRATIVE_AND_OFFICE, 2
170
+ value :ADVERTISING_AND_MARKETING, 3
171
+ value :ANIMAL_CARE, 4
172
+ value :ART_FASHION_AND_DESIGN, 5
173
+ value :BUSINESS_OPERATIONS, 6
174
+ value :CLEANING_AND_FACILITIES, 7
175
+ value :COMPUTER_AND_IT, 8
176
+ value :CONSTRUCTION, 9
177
+ value :CUSTOMER_SERVICE, 10
178
+ value :EDUCATION, 11
179
+ value :ENTERTAINMENT_AND_TRAVEL, 12
180
+ value :FARMING_AND_OUTDOORS, 13
181
+ value :HEALTHCARE, 14
182
+ value :HUMAN_RESOURCES, 15
183
+ value :INSTALLATION_MAINTENANCE_AND_REPAIR, 16
184
+ value :LEGAL, 17
185
+ value :MANAGEMENT, 18
186
+ value :MANUFACTURING_AND_WAREHOUSE, 19
187
+ value :MEDIA_COMMUNICATIONS_AND_WRITING, 20
188
+ value :OIL_GAS_AND_MINING, 21
189
+ value :PERSONAL_CARE_AND_SERVICES, 22
190
+ value :PROTECTIVE_SERVICES, 23
191
+ value :REAL_ESTATE, 24
192
+ value :RESTAURANT_AND_HOSPITALITY, 25
193
+ value :SALES_AND_RETAIL, 26
194
+ value :SCIENCE_AND_ENGINEERING, 27
195
+ value :SOCIAL_SERVICES_AND_NON_PROFIT, 28
196
+ value :SPORTS_FITNESS_AND_RECREATION, 29
197
+ value :TRANSPORTATION_AND_LOGISTICS, 30
198
+ end
199
+ add_enum "google.cloud.talent.v4beta1.PostingRegion" do
200
+ value :POSTING_REGION_UNSPECIFIED, 0
201
+ value :ADMINISTRATIVE_AREA, 1
202
+ value :NATION, 2
203
+ value :TELECOMMUTE, 3
204
+ end
205
+ add_enum "google.cloud.talent.v4beta1.Visibility" do
206
+ value :VISIBILITY_UNSPECIFIED, 0
207
+ value :ACCOUNT_ONLY, 1
208
+ value :SHARED_WITH_GOOGLE, 2
209
+ value :SHARED_WITH_PUBLIC, 3
210
+ end
211
+ add_enum "google.cloud.talent.v4beta1.ContactInfoUsage" do
212
+ value :CONTACT_INFO_USAGE_UNSPECIFIED, 0
213
+ value :PERSONAL, 1
214
+ value :WORK, 2
215
+ value :SCHOOL, 3
216
+ end
217
+ add_enum "google.cloud.talent.v4beta1.HtmlSanitization" do
218
+ value :HTML_SANITIZATION_UNSPECIFIED, 0
219
+ value :HTML_SANITIZATION_DISABLED, 1
220
+ value :SIMPLE_FORMATTING_ONLY, 2
221
+ end
222
+ add_enum "google.cloud.talent.v4beta1.CommuteMethod" do
223
+ value :COMMUTE_METHOD_UNSPECIFIED, 0
224
+ value :DRIVING, 1
225
+ value :TRANSIT, 2
226
+ value :WALKING, 3
227
+ value :CYCLING, 4
228
+ value :TRANSIT_ACCESSIBLE, 5
229
+ end
230
+ end
231
+
232
+ module Google
233
+ module Cloud
234
+ module Talent
235
+ module V4beta1
236
+ TimestampRange = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.TimestampRange").msgclass
237
+ Location = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Location").msgclass
238
+ Location::LocationType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Location.LocationType").enummodule
239
+ RequestMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.RequestMetadata").msgclass
240
+ ResponseMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.ResponseMetadata").msgclass
241
+ DeviceInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.DeviceInfo").msgclass
242
+ DeviceInfo::DeviceType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.DeviceInfo.DeviceType").enummodule
243
+ CustomAttribute = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CustomAttribute").msgclass
244
+ SpellingCorrection = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.SpellingCorrection").msgclass
245
+ CompensationInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationInfo").msgclass
246
+ CompensationInfo::CompensationEntry = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry").msgclass
247
+ CompensationInfo::CompensationRange = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationInfo.CompensationRange").msgclass
248
+ CompensationInfo::CompensationType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationInfo.CompensationType").enummodule
249
+ CompensationInfo::CompensationUnit = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit").enummodule
250
+ CompanySize = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CompanySize").enummodule
251
+ JobBenefit = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobBenefit").enummodule
252
+ DegreeType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.DegreeType").enummodule
253
+ EmploymentType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.EmploymentType").enummodule
254
+ JobLevel = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobLevel").enummodule
255
+ JobCategory = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.JobCategory").enummodule
256
+ PostingRegion = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.PostingRegion").enummodule
257
+ Visibility = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Visibility").enummodule
258
+ ContactInfoUsage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.ContactInfoUsage").enummodule
259
+ HtmlSanitization = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.HtmlSanitization").enummodule
260
+ CommuteMethod = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.CommuteMethod").enummodule
261
+ end
262
+ end
263
+ end
264
+ end
@@ -0,0 +1,39 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/talent/v4beta1/company.proto
3
+
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/annotations_pb'
8
+ require 'google/cloud/talent/v4beta1/common_pb'
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_message "google.cloud.talent.v4beta1.Company" do
11
+ optional :name, :string, 1
12
+ optional :display_name, :string, 2
13
+ optional :external_id, :string, 3
14
+ optional :size, :enum, 4, "google.cloud.talent.v4beta1.CompanySize"
15
+ optional :headquarters_address, :string, 5
16
+ optional :hiring_agency, :bool, 6
17
+ optional :eeo_text, :string, 7
18
+ optional :website_uri, :string, 8
19
+ optional :career_site_uri, :string, 9
20
+ optional :image_uri, :string, 10
21
+ repeated :keyword_searchable_job_custom_attributes, :string, 11
22
+ optional :derived_info, :message, 12, "google.cloud.talent.v4beta1.Company.DerivedInfo"
23
+ optional :suspended, :bool, 13
24
+ end
25
+ add_message "google.cloud.talent.v4beta1.Company.DerivedInfo" do
26
+ optional :headquarters_location, :message, 1, "google.cloud.talent.v4beta1.Location"
27
+ end
28
+ end
29
+
30
+ module Google
31
+ module Cloud
32
+ module Talent
33
+ module V4beta1
34
+ Company = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Company").msgclass
35
+ Company::DerivedInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.talent.v4beta1.Company.DerivedInfo").msgclass
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,479 @@
1
+ # Copyright 2019 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # https://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+ # EDITING INSTRUCTIONS
16
+ # This file was generated from the file
17
+ # https://github.com/googleapis/googleapis/blob/master/google/cloud/talent/v4beta1/company_service.proto,
18
+ # and updates to that file get reflected here through a refresh process.
19
+ # For the short term, the refresh process will only be runnable by Google
20
+ # engineers.
21
+
22
+
23
+ require "json"
24
+ require "pathname"
25
+
26
+ require "google/gax"
27
+
28
+ require "google/cloud/talent/v4beta1/company_service_pb"
29
+ require "google/cloud/talent/v4beta1/credentials"
30
+
31
+ module Google
32
+ module Cloud
33
+ module Talent
34
+ module V4beta1
35
+ # A service that handles company management, including CRUD and enumeration.
36
+ #
37
+ # @!attribute [r] company_service_stub
38
+ # @return [Google::Cloud::Talent::V4beta1::CompanyService::Stub]
39
+ class CompanyServiceClient
40
+ # @private
41
+ attr_reader :company_service_stub
42
+
43
+ # The default address of the service.
44
+ SERVICE_ADDRESS = "jobs.googleapis.com".freeze
45
+
46
+ # The default port of the service.
47
+ DEFAULT_SERVICE_PORT = 443
48
+
49
+ # The default set of gRPC interceptors.
50
+ GRPC_INTERCEPTORS = []
51
+
52
+ DEFAULT_TIMEOUT = 30
53
+
54
+ PAGE_DESCRIPTORS = {
55
+ "list_companies" => Google::Gax::PageDescriptor.new(
56
+ "page_token",
57
+ "next_page_token",
58
+ "companies")
59
+ }.freeze
60
+
61
+ private_constant :PAGE_DESCRIPTORS
62
+
63
+ # The scopes needed to make gRPC calls to all of the methods defined in
64
+ # this service.
65
+ ALL_SCOPES = [
66
+ "https://www.googleapis.com/auth/cloud-platform",
67
+ "https://www.googleapis.com/auth/jobs"
68
+ ].freeze
69
+
70
+
71
+ PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
72
+ "projects/{project}"
73
+ )
74
+
75
+ private_constant :PROJECT_PATH_TEMPLATE
76
+
77
+ COMPANY_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
78
+ "projects/{project}/companies/{company}"
79
+ )
80
+
81
+ private_constant :COMPANY_PATH_TEMPLATE
82
+
83
+ # Returns a fully-qualified project resource name string.
84
+ # @param project [String]
85
+ # @return [String]
86
+ def self.project_path project
87
+ PROJECT_PATH_TEMPLATE.render(
88
+ :"project" => project
89
+ )
90
+ end
91
+
92
+ # Returns a fully-qualified company resource name string.
93
+ # @param project [String]
94
+ # @param company [String]
95
+ # @return [String]
96
+ def self.company_path project, company
97
+ COMPANY_PATH_TEMPLATE.render(
98
+ :"project" => project,
99
+ :"company" => company
100
+ )
101
+ end
102
+
103
+ # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
104
+ # Provides the means for authenticating requests made by the client. This parameter can
105
+ # be many types.
106
+ # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
107
+ # authenticating requests made by this client.
108
+ # A `String` will be treated as the path to the keyfile to be used for the construction of
109
+ # credentials for this client.
110
+ # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
111
+ # credentials for this client.
112
+ # A `GRPC::Core::Channel` will be used to make calls through.
113
+ # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
114
+ # should already be composed with a `GRPC::Core::CallCredentials` object.
115
+ # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
116
+ # metadata for requests, generally, to give OAuth credentials.
117
+ # @param scopes [Array<String>]
118
+ # The OAuth scopes for this service. This parameter is ignored if
119
+ # an updater_proc is supplied.
120
+ # @param client_config [Hash]
121
+ # A Hash for call options for each method. See
122
+ # Google::Gax#construct_settings for the structure of
123
+ # this data. Falls back to the default config if not specified
124
+ # or the specified config is missing data points.
125
+ # @param timeout [Numeric]
126
+ # The default timeout, in seconds, for calls made through this client.
127
+ # @param metadata [Hash]
128
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
129
+ # @param exception_transformer [Proc]
130
+ # An optional proc that intercepts any exceptions raised during an API call to inject
131
+ # custom error handling.
132
+ def initialize \
133
+ credentials: nil,
134
+ scopes: ALL_SCOPES,
135
+ client_config: {},
136
+ timeout: DEFAULT_TIMEOUT,
137
+ metadata: nil,
138
+ exception_transformer: nil,
139
+ lib_name: nil,
140
+ lib_version: ""
141
+ # These require statements are intentionally placed here to initialize
142
+ # the gRPC module only when it's required.
143
+ # See https://github.com/googleapis/toolkit/issues/446
144
+ require "google/gax/grpc"
145
+ require "google/cloud/talent/v4beta1/company_service_services_pb"
146
+
147
+ credentials ||= Google::Cloud::Talent::V4beta1::Credentials.default
148
+
149
+ if credentials.is_a?(String) || credentials.is_a?(Hash)
150
+ updater_proc = Google::Cloud::Talent::V4beta1::Credentials.new(credentials).updater_proc
151
+ end
152
+ if credentials.is_a?(GRPC::Core::Channel)
153
+ channel = credentials
154
+ end
155
+ if credentials.is_a?(GRPC::Core::ChannelCredentials)
156
+ chan_creds = credentials
157
+ end
158
+ if credentials.is_a?(Proc)
159
+ updater_proc = credentials
160
+ end
161
+ if credentials.is_a?(Google::Auth::Credentials)
162
+ updater_proc = credentials.updater_proc
163
+ end
164
+
165
+ package_version = Gem.loaded_specs['google-cloud-talent'].version.version
166
+
167
+ google_api_client = "gl-ruby/#{RUBY_VERSION}"
168
+ google_api_client << " #{lib_name}/#{lib_version}" if lib_name
169
+ google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
170
+ google_api_client << " grpc/#{GRPC::VERSION}"
171
+ google_api_client.freeze
172
+
173
+ headers = { :"x-goog-api-client" => google_api_client }
174
+ headers.merge!(metadata) unless metadata.nil?
175
+ client_config_file = Pathname.new(__dir__).join(
176
+ "company_service_client_config.json"
177
+ )
178
+ defaults = client_config_file.open do |f|
179
+ Google::Gax.construct_settings(
180
+ "google.cloud.talent.v4beta1.CompanyService",
181
+ JSON.parse(f.read),
182
+ client_config,
183
+ Google::Gax::Grpc::STATUS_CODE_NAMES,
184
+ timeout,
185
+ page_descriptors: PAGE_DESCRIPTORS,
186
+ errors: Google::Gax::Grpc::API_ERRORS,
187
+ metadata: headers
188
+ )
189
+ end
190
+
191
+ # Allow overriding the service path/port in subclasses.
192
+ service_path = self.class::SERVICE_ADDRESS
193
+ port = self.class::DEFAULT_SERVICE_PORT
194
+ interceptors = self.class::GRPC_INTERCEPTORS
195
+ @company_service_stub = Google::Gax::Grpc.create_stub(
196
+ service_path,
197
+ port,
198
+ chan_creds: chan_creds,
199
+ channel: channel,
200
+ updater_proc: updater_proc,
201
+ scopes: scopes,
202
+ interceptors: interceptors,
203
+ &Google::Cloud::Talent::V4beta1::CompanyService::Stub.method(:new)
204
+ )
205
+
206
+ @create_company = Google::Gax.create_api_call(
207
+ @company_service_stub.method(:create_company),
208
+ defaults["create_company"],
209
+ exception_transformer: exception_transformer
210
+ )
211
+ @get_company = Google::Gax.create_api_call(
212
+ @company_service_stub.method(:get_company),
213
+ defaults["get_company"],
214
+ exception_transformer: exception_transformer
215
+ )
216
+ @update_company = Google::Gax.create_api_call(
217
+ @company_service_stub.method(:update_company),
218
+ defaults["update_company"],
219
+ exception_transformer: exception_transformer
220
+ )
221
+ @delete_company = Google::Gax.create_api_call(
222
+ @company_service_stub.method(:delete_company),
223
+ defaults["delete_company"],
224
+ exception_transformer: exception_transformer
225
+ )
226
+ @list_companies = Google::Gax.create_api_call(
227
+ @company_service_stub.method(:list_companies),
228
+ defaults["list_companies"],
229
+ exception_transformer: exception_transformer
230
+ )
231
+ end
232
+
233
+ # Service calls
234
+
235
+ # Creates a new company entity.
236
+ #
237
+ # @param parent [String]
238
+ # Required.
239
+ #
240
+ # Resource name of the project under which the company is created.
241
+ #
242
+ # The format is "projects/{project_id}", for example,
243
+ # "projects/api-test-project".
244
+ # @param company [Google::Cloud::Talent::V4beta1::Company | Hash]
245
+ # Required.
246
+ #
247
+ # The company to be created.
248
+ # A hash of the same form as `Google::Cloud::Talent::V4beta1::Company`
249
+ # can also be provided.
250
+ # @param options [Google::Gax::CallOptions]
251
+ # Overrides the default settings for this call, e.g, timeout,
252
+ # retries, etc.
253
+ # @yield [result, operation] Access the result along with the RPC operation
254
+ # @yieldparam result [Google::Cloud::Talent::V4beta1::Company]
255
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
256
+ # @return [Google::Cloud::Talent::V4beta1::Company]
257
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
258
+ # @example
259
+ # require "google/cloud/talent"
260
+ #
261
+ # company_service_client = Google::Cloud::Talent::CompanyService.new(version: :v4beta1)
262
+ # formatted_parent = Google::Cloud::Talent::V4beta1::CompanyServiceClient.project_path("[PROJECT]")
263
+ #
264
+ # # TODO: Initialize `company`:
265
+ # company = {}
266
+ # response = company_service_client.create_company(formatted_parent, company)
267
+
268
+ def create_company \
269
+ parent,
270
+ company,
271
+ options: nil,
272
+ &block
273
+ req = {
274
+ parent: parent,
275
+ company: company
276
+ }.delete_if { |_, v| v.nil? }
277
+ req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::CreateCompanyRequest)
278
+ @create_company.call(req, options, &block)
279
+ end
280
+
281
+ # Retrieves specified company.
282
+ #
283
+ # @param name [String]
284
+ # Required.
285
+ #
286
+ # The resource name of the company to be retrieved.
287
+ #
288
+ # The format is "projects/{project_id}/companies/{company_id}", for example,
289
+ # "projects/api-test-project/companies/foo".
290
+ # @param options [Google::Gax::CallOptions]
291
+ # Overrides the default settings for this call, e.g, timeout,
292
+ # retries, etc.
293
+ # @yield [result, operation] Access the result along with the RPC operation
294
+ # @yieldparam result [Google::Cloud::Talent::V4beta1::Company]
295
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
296
+ # @return [Google::Cloud::Talent::V4beta1::Company]
297
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
298
+ # @example
299
+ # require "google/cloud/talent"
300
+ #
301
+ # company_service_client = Google::Cloud::Talent::CompanyService.new(version: :v4beta1)
302
+ # formatted_name = Google::Cloud::Talent::V4beta1::CompanyServiceClient.company_path("[PROJECT]", "[COMPANY]")
303
+ # response = company_service_client.get_company(formatted_name)
304
+
305
+ def get_company \
306
+ name,
307
+ options: nil,
308
+ &block
309
+ req = {
310
+ name: name
311
+ }.delete_if { |_, v| v.nil? }
312
+ req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::GetCompanyRequest)
313
+ @get_company.call(req, options, &block)
314
+ end
315
+
316
+ # Updates specified company.
317
+ #
318
+ # @param company [Google::Cloud::Talent::V4beta1::Company | Hash]
319
+ # Required.
320
+ #
321
+ # The company resource to replace the current resource in the system.
322
+ # A hash of the same form as `Google::Cloud::Talent::V4beta1::Company`
323
+ # can also be provided.
324
+ # @param update_mask [Google::Protobuf::FieldMask | Hash]
325
+ # Optional but strongly recommended for the best service
326
+ # experience.
327
+ #
328
+ # If
329
+ # {Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#update_mask update_mask}
330
+ # is provided, only the specified fields in
331
+ # {Google::Cloud::Talent::V4beta1::UpdateCompanyRequest#company company} are
332
+ # updated. Otherwise all the fields are updated.
333
+ #
334
+ # A field mask to specify the company fields to be updated. Only
335
+ # top level fields of {Google::Cloud::Talent::V4beta1::Company Company} are
336
+ # supported.
337
+ # A hash of the same form as `Google::Protobuf::FieldMask`
338
+ # can also be provided.
339
+ # @param options [Google::Gax::CallOptions]
340
+ # Overrides the default settings for this call, e.g, timeout,
341
+ # retries, etc.
342
+ # @yield [result, operation] Access the result along with the RPC operation
343
+ # @yieldparam result [Google::Cloud::Talent::V4beta1::Company]
344
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
345
+ # @return [Google::Cloud::Talent::V4beta1::Company]
346
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
347
+ # @example
348
+ # require "google/cloud/talent"
349
+ #
350
+ # company_service_client = Google::Cloud::Talent::CompanyService.new(version: :v4beta1)
351
+ #
352
+ # # TODO: Initialize `company`:
353
+ # company = {}
354
+ # response = company_service_client.update_company(company)
355
+
356
+ def update_company \
357
+ company,
358
+ update_mask: nil,
359
+ options: nil,
360
+ &block
361
+ req = {
362
+ company: company,
363
+ update_mask: update_mask
364
+ }.delete_if { |_, v| v.nil? }
365
+ req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::UpdateCompanyRequest)
366
+ @update_company.call(req, options, &block)
367
+ end
368
+
369
+ # Deletes specified company.
370
+ # Prerequisite: The company has no jobs associated with it.
371
+ #
372
+ # @param name [String]
373
+ # Required.
374
+ #
375
+ # The resource name of the company to be deleted.
376
+ #
377
+ # The format is "projects/{project_id}/companies/{company_id}", for example,
378
+ # "projects/api-test-project/companies/foo".
379
+ # @param options [Google::Gax::CallOptions]
380
+ # Overrides the default settings for this call, e.g, timeout,
381
+ # retries, etc.
382
+ # @yield [result, operation] Access the result along with the RPC operation
383
+ # @yieldparam result []
384
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
385
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
386
+ # @example
387
+ # require "google/cloud/talent"
388
+ #
389
+ # company_service_client = Google::Cloud::Talent::CompanyService.new(version: :v4beta1)
390
+ # formatted_name = Google::Cloud::Talent::V4beta1::CompanyServiceClient.company_path("[PROJECT]", "[COMPANY]")
391
+ # company_service_client.delete_company(formatted_name)
392
+
393
+ def delete_company \
394
+ name,
395
+ options: nil,
396
+ &block
397
+ req = {
398
+ name: name
399
+ }.delete_if { |_, v| v.nil? }
400
+ req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::DeleteCompanyRequest)
401
+ @delete_company.call(req, options, &block)
402
+ nil
403
+ end
404
+
405
+ # Lists all companies associated with the project.
406
+ #
407
+ # @param parent [String]
408
+ # Required.
409
+ #
410
+ # Resource name of the project under which the company is created.
411
+ #
412
+ # The format is "projects/{project_id}", for example,
413
+ # "projects/api-test-project".
414
+ # @param page_size [Integer]
415
+ # The maximum number of resources contained in the underlying API
416
+ # response. If page streaming is performed per-resource, this
417
+ # parameter does not affect the return value. If page streaming is
418
+ # performed per-page, this determines the maximum number of
419
+ # resources in a page.
420
+ # @param require_open_jobs [true, false]
421
+ # Optional.
422
+ #
423
+ # Set to true if the companies requested must have open jobs.
424
+ #
425
+ # Defaults to false.
426
+ #
427
+ # If true, at most
428
+ # {Google::Cloud::Talent::V4beta1::ListCompaniesRequest#page_size page_size} of
429
+ # companies are fetched, among which only those with open jobs are returned.
430
+ # @param options [Google::Gax::CallOptions]
431
+ # Overrides the default settings for this call, e.g, timeout,
432
+ # retries, etc.
433
+ # @yield [result, operation] Access the result along with the RPC operation
434
+ # @yieldparam result [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::Company>]
435
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
436
+ # @return [Google::Gax::PagedEnumerable<Google::Cloud::Talent::V4beta1::Company>]
437
+ # An enumerable of Google::Cloud::Talent::V4beta1::Company instances.
438
+ # See Google::Gax::PagedEnumerable documentation for other
439
+ # operations such as per-page iteration or access to the response
440
+ # object.
441
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
442
+ # @example
443
+ # require "google/cloud/talent"
444
+ #
445
+ # company_service_client = Google::Cloud::Talent::CompanyService.new(version: :v4beta1)
446
+ # formatted_parent = Google::Cloud::Talent::V4beta1::CompanyServiceClient.project_path("[PROJECT]")
447
+ #
448
+ # # Iterate over all results.
449
+ # company_service_client.list_companies(formatted_parent).each do |element|
450
+ # # Process element.
451
+ # end
452
+ #
453
+ # # Or iterate over results one page at a time.
454
+ # company_service_client.list_companies(formatted_parent).each_page do |page|
455
+ # # Process each page at a time.
456
+ # page.each do |element|
457
+ # # Process element.
458
+ # end
459
+ # end
460
+
461
+ def list_companies \
462
+ parent,
463
+ page_size: nil,
464
+ require_open_jobs: nil,
465
+ options: nil,
466
+ &block
467
+ req = {
468
+ parent: parent,
469
+ page_size: page_size,
470
+ require_open_jobs: require_open_jobs
471
+ }.delete_if { |_, v| v.nil? }
472
+ req = Google::Gax::to_proto(req, Google::Cloud::Talent::V4beta1::ListCompaniesRequest)
473
+ @list_companies.call(req, options, &block)
474
+ end
475
+ end
476
+ end
477
+ end
478
+ end
479
+ end