google-apis-apphub_v1alpha 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.
@@ -0,0 +1,1651 @@
1
+ # Copyright 2020 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
+ # http://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
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module ApphubV1alpha
24
+
25
+ # Application defines the governance boundary for App Hub Entities that perform
26
+ # a logical end-to-end business function. App Hub supports application level IAM
27
+ # permission to align with governance requirements.
28
+ class Application
29
+ include Google::Apis::Core::Hashable
30
+
31
+ # Consumer provided attributes.
32
+ # Corresponds to the JSON property `attributes`
33
+ # @return [Google::Apis::ApphubV1alpha::Attributes]
34
+ attr_accessor :attributes
35
+
36
+ # Output only. Create time.
37
+ # Corresponds to the JSON property `createTime`
38
+ # @return [String]
39
+ attr_accessor :create_time
40
+
41
+ # Optional. User-defined description of an Application.
42
+ # Corresponds to the JSON property `description`
43
+ # @return [String]
44
+ attr_accessor :description
45
+
46
+ # Optional. User-defined name for the Application.
47
+ # Corresponds to the JSON property `displayName`
48
+ # @return [String]
49
+ attr_accessor :display_name
50
+
51
+ # Identifier. The resource name of an Application. Format: "projects/`host-
52
+ # project-id`/locations/`location`/applications/`application-id`"
53
+ # Corresponds to the JSON property `name`
54
+ # @return [String]
55
+ attr_accessor :name
56
+
57
+ # Scope of an application.
58
+ # Corresponds to the JSON property `scope`
59
+ # @return [Google::Apis::ApphubV1alpha::Scope]
60
+ attr_accessor :scope
61
+
62
+ # Output only. Application state.
63
+ # Corresponds to the JSON property `state`
64
+ # @return [String]
65
+ attr_accessor :state
66
+
67
+ # Output only. A universally unique identifier (in UUID4 format) for the `
68
+ # Application`.
69
+ # Corresponds to the JSON property `uid`
70
+ # @return [String]
71
+ attr_accessor :uid
72
+
73
+ # Output only. Update time.
74
+ # Corresponds to the JSON property `updateTime`
75
+ # @return [String]
76
+ attr_accessor :update_time
77
+
78
+ def initialize(**args)
79
+ update!(**args)
80
+ end
81
+
82
+ # Update properties of this object
83
+ def update!(**args)
84
+ @attributes = args[:attributes] if args.key?(:attributes)
85
+ @create_time = args[:create_time] if args.key?(:create_time)
86
+ @description = args[:description] if args.key?(:description)
87
+ @display_name = args[:display_name] if args.key?(:display_name)
88
+ @name = args[:name] if args.key?(:name)
89
+ @scope = args[:scope] if args.key?(:scope)
90
+ @state = args[:state] if args.key?(:state)
91
+ @uid = args[:uid] if args.key?(:uid)
92
+ @update_time = args[:update_time] if args.key?(:update_time)
93
+ end
94
+ end
95
+
96
+ # Consumer provided attributes.
97
+ class Attributes
98
+ include Google::Apis::Core::Hashable
99
+
100
+ # Optional. Business team that ensures user needs are met and value is delivered
101
+ # Corresponds to the JSON property `businessOwners`
102
+ # @return [Array<Google::Apis::ApphubV1alpha::ContactInfo>]
103
+ attr_accessor :business_owners
104
+
105
+ # Criticality of the Application, Service, or Workload
106
+ # Corresponds to the JSON property `criticality`
107
+ # @return [Google::Apis::ApphubV1alpha::Criticality]
108
+ attr_accessor :criticality
109
+
110
+ # Optional. Developer team that owns development and coding.
111
+ # Corresponds to the JSON property `developerOwners`
112
+ # @return [Array<Google::Apis::ApphubV1alpha::ContactInfo>]
113
+ attr_accessor :developer_owners
114
+
115
+ # Environment of the Application, Service, or Workload
116
+ # Corresponds to the JSON property `environment`
117
+ # @return [Google::Apis::ApphubV1alpha::Environment]
118
+ attr_accessor :environment
119
+
120
+ # Optional. Operator team that ensures runtime and operations.
121
+ # Corresponds to the JSON property `operatorOwners`
122
+ # @return [Array<Google::Apis::ApphubV1alpha::ContactInfo>]
123
+ attr_accessor :operator_owners
124
+
125
+ def initialize(**args)
126
+ update!(**args)
127
+ end
128
+
129
+ # Update properties of this object
130
+ def update!(**args)
131
+ @business_owners = args[:business_owners] if args.key?(:business_owners)
132
+ @criticality = args[:criticality] if args.key?(:criticality)
133
+ @developer_owners = args[:developer_owners] if args.key?(:developer_owners)
134
+ @environment = args[:environment] if args.key?(:environment)
135
+ @operator_owners = args[:operator_owners] if args.key?(:operator_owners)
136
+ end
137
+ end
138
+
139
+ # Specifies the audit configuration for a service. The configuration determines
140
+ # which permission types are logged, and what identities, if any, are exempted
141
+ # from logging. An AuditConfig must have one or more AuditLogConfigs. If there
142
+ # are AuditConfigs for both `allServices` and a specific service, the union of
143
+ # the two AuditConfigs is used for that service: the log_types specified in each
144
+ # AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
145
+ # exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
146
+ # service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
147
+ # exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
148
+ # ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
149
+ # "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
150
+ # , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
151
+ # this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
152
+ # exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com`
153
+ # from DATA_WRITE logging.
154
+ class AuditConfig
155
+ include Google::Apis::Core::Hashable
156
+
157
+ # The configuration for logging of each type of permission.
158
+ # Corresponds to the JSON property `auditLogConfigs`
159
+ # @return [Array<Google::Apis::ApphubV1alpha::AuditLogConfig>]
160
+ attr_accessor :audit_log_configs
161
+
162
+ # Specifies a service that will be enabled for audit logging. For example, `
163
+ # storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
164
+ # value that covers all services.
165
+ # Corresponds to the JSON property `service`
166
+ # @return [String]
167
+ attr_accessor :service
168
+
169
+ def initialize(**args)
170
+ update!(**args)
171
+ end
172
+
173
+ # Update properties of this object
174
+ def update!(**args)
175
+ @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
176
+ @service = args[:service] if args.key?(:service)
177
+ end
178
+ end
179
+
180
+ # Provides the configuration for logging a type of permissions. Example: ` "
181
+ # audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
182
+ # jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
183
+ # DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
184
+ # DATA_READ logging.
185
+ class AuditLogConfig
186
+ include Google::Apis::Core::Hashable
187
+
188
+ # Specifies the identities that do not cause logging for this type of permission.
189
+ # Follows the same format of Binding.members.
190
+ # Corresponds to the JSON property `exemptedMembers`
191
+ # @return [Array<String>]
192
+ attr_accessor :exempted_members
193
+
194
+ # The log type that this config enables.
195
+ # Corresponds to the JSON property `logType`
196
+ # @return [String]
197
+ attr_accessor :log_type
198
+
199
+ def initialize(**args)
200
+ update!(**args)
201
+ end
202
+
203
+ # Update properties of this object
204
+ def update!(**args)
205
+ @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
206
+ @log_type = args[:log_type] if args.key?(:log_type)
207
+ end
208
+ end
209
+
210
+ # Associates `members`, or principals, with a `role`.
211
+ class Binding
212
+ include Google::Apis::Core::Hashable
213
+
214
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
215
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
216
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
217
+ # "Summary size limit" description: "Determines if a summary is less than 100
218
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
219
+ # Requestor is owner" description: "Determines if requestor is the document
220
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
221
+ # Logic): title: "Public documents" description: "Determine whether the document
222
+ # should be publicly visible" expression: "document.type != 'private' &&
223
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
224
+ # string" description: "Create a notification string with a timestamp."
225
+ # expression: "'New message received at ' + string(document.create_time)" The
226
+ # exact variables and functions that may be referenced within an expression are
227
+ # determined by the service that evaluates it. See the service documentation for
228
+ # additional information.
229
+ # Corresponds to the JSON property `condition`
230
+ # @return [Google::Apis::ApphubV1alpha::Expr]
231
+ attr_accessor :condition
232
+
233
+ # Specifies the principals requesting access for a Google Cloud resource. `
234
+ # members` can have the following values: * `allUsers`: A special identifier
235
+ # that represents anyone who is on the internet; with or without a Google
236
+ # account. * `allAuthenticatedUsers`: A special identifier that represents
237
+ # anyone who is authenticated with a Google account or a service account. Does
238
+ # not include identities that come from external identity providers (IdPs)
239
+ # through identity federation. * `user:`emailid``: An email address that
240
+ # represents a specific Google account. For example, `alice@example.com` . * `
241
+ # serviceAccount:`emailid``: An email address that represents a Google service
242
+ # account. For example, `my-other-app@appspot.gserviceaccount.com`. * `
243
+ # serviceAccount:`projectid`.svc.id.goog[`namespace`/`kubernetes-sa`]`: An
244
+ # identifier for a [Kubernetes service account](https://cloud.google.com/
245
+ # kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-
246
+ # project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:`emailid``: An
247
+ # email address that represents a Google group. For example, `admins@example.com`
248
+ # . * `domain:`domain``: The G Suite domain (primary) that represents all the
249
+ # users of that domain. For example, `google.com` or `example.com`. * `principal:
250
+ # //iam.googleapis.com/locations/global/workforcePools/`pool_id`/subject/`
251
+ # subject_attribute_value``: A single identity in a workforce identity pool. * `
252
+ # principalSet://iam.googleapis.com/locations/global/workforcePools/`pool_id`/
253
+ # group/`group_id``: All workforce identities in a group. * `principalSet://iam.
254
+ # googleapis.com/locations/global/workforcePools/`pool_id`/attribute.`
255
+ # attribute_name`/`attribute_value``: All workforce identities with a specific
256
+ # attribute value. * `principalSet://iam.googleapis.com/locations/global/
257
+ # workforcePools/`pool_id`/*`: All identities in a workforce identity pool. * `
258
+ # principal://iam.googleapis.com/projects/`project_number`/locations/global/
259
+ # workloadIdentityPools/`pool_id`/subject/`subject_attribute_value``: A single
260
+ # identity in a workload identity pool. * `principalSet://iam.googleapis.com/
261
+ # projects/`project_number`/locations/global/workloadIdentityPools/`pool_id`/
262
+ # group/`group_id``: A workload identity pool group. * `principalSet://iam.
263
+ # googleapis.com/projects/`project_number`/locations/global/
264
+ # workloadIdentityPools/`pool_id`/attribute.`attribute_name`/`attribute_value``:
265
+ # All identities in a workload identity pool with a certain attribute. * `
266
+ # principalSet://iam.googleapis.com/projects/`project_number`/locations/global/
267
+ # workloadIdentityPools/`pool_id`/*`: All identities in a workload identity pool.
268
+ # * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique
269
+ # identifier) representing a user that has been recently deleted. For example, `
270
+ # alice@example.com?uid=123456789012345678901`. If the user is recovered, this
271
+ # value reverts to `user:`emailid`` and the recovered user retains the role in
272
+ # the binding. * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email
273
+ # address (plus unique identifier) representing a service account that has been
274
+ # recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=
275
+ # 123456789012345678901`. If the service account is undeleted, this value
276
+ # reverts to `serviceAccount:`emailid`` and the undeleted service account
277
+ # retains the role in the binding. * `deleted:group:`emailid`?uid=`uniqueid``:
278
+ # An email address (plus unique identifier) representing a Google group that has
279
+ # been recently deleted. For example, `admins@example.com?uid=
280
+ # 123456789012345678901`. If the group is recovered, this value reverts to `
281
+ # group:`emailid`` and the recovered group retains the role in the binding. * `
282
+ # deleted:principal://iam.googleapis.com/locations/global/workforcePools/`
283
+ # pool_id`/subject/`subject_attribute_value``: Deleted single identity in a
284
+ # workforce identity pool. For example, `deleted:principal://iam.googleapis.com/
285
+ # locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
286
+ # Corresponds to the JSON property `members`
287
+ # @return [Array<String>]
288
+ attr_accessor :members
289
+
290
+ # Role that is assigned to the list of `members`, or principals. For example, `
291
+ # roles/viewer`, `roles/editor`, or `roles/owner`.
292
+ # Corresponds to the JSON property `role`
293
+ # @return [String]
294
+ attr_accessor :role
295
+
296
+ def initialize(**args)
297
+ update!(**args)
298
+ end
299
+
300
+ # Update properties of this object
301
+ def update!(**args)
302
+ @condition = args[:condition] if args.key?(:condition)
303
+ @members = args[:members] if args.key?(:members)
304
+ @role = args[:role] if args.key?(:role)
305
+ end
306
+ end
307
+
308
+ # The request message for Operations.CancelOperation.
309
+ class CancelOperationRequest
310
+ include Google::Apis::Core::Hashable
311
+
312
+ def initialize(**args)
313
+ update!(**args)
314
+ end
315
+
316
+ # Update properties of this object
317
+ def update!(**args)
318
+ end
319
+ end
320
+
321
+ # Separate message to accommodate custom formats across IRC and Slack.
322
+ class Channel
323
+ include Google::Apis::Core::Hashable
324
+
325
+ # Required. URI of the channel.
326
+ # Corresponds to the JSON property `uri`
327
+ # @return [String]
328
+ attr_accessor :uri
329
+
330
+ def initialize(**args)
331
+ update!(**args)
332
+ end
333
+
334
+ # Update properties of this object
335
+ def update!(**args)
336
+ @uri = args[:uri] if args.key?(:uri)
337
+ end
338
+ end
339
+
340
+ # Contact information of stakeholders.
341
+ class ContactInfo
342
+ include Google::Apis::Core::Hashable
343
+
344
+ # Separate message to accommodate custom formats across IRC and Slack.
345
+ # Corresponds to the JSON property `channel`
346
+ # @return [Google::Apis::ApphubV1alpha::Channel]
347
+ attr_accessor :channel
348
+
349
+ # Optional. Contact's name.
350
+ # Corresponds to the JSON property `displayName`
351
+ # @return [String]
352
+ attr_accessor :display_name
353
+
354
+ # Required. Email address of the contacts.
355
+ # Corresponds to the JSON property `email`
356
+ # @return [String]
357
+ attr_accessor :email
358
+
359
+ def initialize(**args)
360
+ update!(**args)
361
+ end
362
+
363
+ # Update properties of this object
364
+ def update!(**args)
365
+ @channel = args[:channel] if args.key?(:channel)
366
+ @display_name = args[:display_name] if args.key?(:display_name)
367
+ @email = args[:email] if args.key?(:email)
368
+ end
369
+ end
370
+
371
+ # Criticality of the Application, Service, or Workload
372
+ class Criticality
373
+ include Google::Apis::Core::Hashable
374
+
375
+ # Required. Criticality level.
376
+ # Corresponds to the JSON property `level`
377
+ # @return [String]
378
+ attr_accessor :level
379
+
380
+ # Required. Indicates mission-critical Application, Service, or Workload.
381
+ # Corresponds to the JSON property `missionCritical`
382
+ # @return [Boolean]
383
+ attr_accessor :mission_critical
384
+ alias_method :mission_critical?, :mission_critical
385
+
386
+ def initialize(**args)
387
+ update!(**args)
388
+ end
389
+
390
+ # Update properties of this object
391
+ def update!(**args)
392
+ @level = args[:level] if args.key?(:level)
393
+ @mission_critical = args[:mission_critical] if args.key?(:mission_critical)
394
+ end
395
+ end
396
+
397
+ # Request for DetachServiceProjectAttachment.
398
+ class DetachServiceProjectAttachmentRequest
399
+ include Google::Apis::Core::Hashable
400
+
401
+ def initialize(**args)
402
+ update!(**args)
403
+ end
404
+
405
+ # Update properties of this object
406
+ def update!(**args)
407
+ end
408
+ end
409
+
410
+ # Response for DetachServiceProjectAttachment.
411
+ class DetachServiceProjectAttachmentResponse
412
+ include Google::Apis::Core::Hashable
413
+
414
+ def initialize(**args)
415
+ update!(**args)
416
+ end
417
+
418
+ # Update properties of this object
419
+ def update!(**args)
420
+ end
421
+ end
422
+
423
+ # DiscoveredService is a network/api interface that exposes some functionality
424
+ # to clients for consumption over the network. A discovered service can be
425
+ # registered to a App Hub service.
426
+ class DiscoveredService
427
+ include Google::Apis::Core::Hashable
428
+
429
+ # Identifier. The resource name of the discovered service. Format: "projects/`
430
+ # host-project-id`/locations/`location`/discoveredServices/`uuid`""
431
+ # Corresponds to the JSON property `name`
432
+ # @return [String]
433
+ attr_accessor :name
434
+
435
+ # Properties of an underlying cloud resource that can comprise a Service.
436
+ # Corresponds to the JSON property `serviceProperties`
437
+ # @return [Google::Apis::ApphubV1alpha::ServiceProperties]
438
+ attr_accessor :service_properties
439
+
440
+ # Reference to an underlying networking resource that can comprise a Service.
441
+ # Corresponds to the JSON property `serviceReference`
442
+ # @return [Google::Apis::ApphubV1alpha::ServiceReference]
443
+ attr_accessor :service_reference
444
+
445
+ def initialize(**args)
446
+ update!(**args)
447
+ end
448
+
449
+ # Update properties of this object
450
+ def update!(**args)
451
+ @name = args[:name] if args.key?(:name)
452
+ @service_properties = args[:service_properties] if args.key?(:service_properties)
453
+ @service_reference = args[:service_reference] if args.key?(:service_reference)
454
+ end
455
+ end
456
+
457
+ # DiscoveredWorkload is a binary deployment (such as managed instance groups (
458
+ # MIGs) and GKE deployments) that performs the smallest logical subset of
459
+ # business functionality. A discovered workload can be registered to an App Hub
460
+ # Workload.
461
+ class DiscoveredWorkload
462
+ include Google::Apis::Core::Hashable
463
+
464
+ # Identifier. The resource name of the discovered workload. Format: "projects/`
465
+ # host-project-id`/locations/`location`/discoveredWorkloads/`uuid`"
466
+ # Corresponds to the JSON property `name`
467
+ # @return [String]
468
+ attr_accessor :name
469
+
470
+ # Properties of an underlying compute resource represented by the Workload.
471
+ # Corresponds to the JSON property `workloadProperties`
472
+ # @return [Google::Apis::ApphubV1alpha::WorkloadProperties]
473
+ attr_accessor :workload_properties
474
+
475
+ # Reference of an underlying compute resource represented by the Workload.
476
+ # Corresponds to the JSON property `workloadReference`
477
+ # @return [Google::Apis::ApphubV1alpha::WorkloadReference]
478
+ attr_accessor :workload_reference
479
+
480
+ def initialize(**args)
481
+ update!(**args)
482
+ end
483
+
484
+ # Update properties of this object
485
+ def update!(**args)
486
+ @name = args[:name] if args.key?(:name)
487
+ @workload_properties = args[:workload_properties] if args.key?(:workload_properties)
488
+ @workload_reference = args[:workload_reference] if args.key?(:workload_reference)
489
+ end
490
+ end
491
+
492
+ # A generic empty message that you can re-use to avoid defining duplicated empty
493
+ # messages in your APIs. A typical example is to use it as the request or the
494
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
495
+ # protobuf.Empty) returns (google.protobuf.Empty); `
496
+ class Empty
497
+ include Google::Apis::Core::Hashable
498
+
499
+ def initialize(**args)
500
+ update!(**args)
501
+ end
502
+
503
+ # Update properties of this object
504
+ def update!(**args)
505
+ end
506
+ end
507
+
508
+ # Environment of the Application, Service, or Workload
509
+ class Environment
510
+ include Google::Apis::Core::Hashable
511
+
512
+ # Required. Environment name.
513
+ # Corresponds to the JSON property `environment`
514
+ # @return [String]
515
+ attr_accessor :environment
516
+
517
+ def initialize(**args)
518
+ update!(**args)
519
+ end
520
+
521
+ # Update properties of this object
522
+ def update!(**args)
523
+ @environment = args[:environment] if args.key?(:environment)
524
+ end
525
+ end
526
+
527
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
528
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
529
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
530
+ # "Summary size limit" description: "Determines if a summary is less than 100
531
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
532
+ # Requestor is owner" description: "Determines if requestor is the document
533
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
534
+ # Logic): title: "Public documents" description: "Determine whether the document
535
+ # should be publicly visible" expression: "document.type != 'private' &&
536
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
537
+ # string" description: "Create a notification string with a timestamp."
538
+ # expression: "'New message received at ' + string(document.create_time)" The
539
+ # exact variables and functions that may be referenced within an expression are
540
+ # determined by the service that evaluates it. See the service documentation for
541
+ # additional information.
542
+ class Expr
543
+ include Google::Apis::Core::Hashable
544
+
545
+ # Optional. Description of the expression. This is a longer text which describes
546
+ # the expression, e.g. when hovered over it in a UI.
547
+ # Corresponds to the JSON property `description`
548
+ # @return [String]
549
+ attr_accessor :description
550
+
551
+ # Textual representation of an expression in Common Expression Language syntax.
552
+ # Corresponds to the JSON property `expression`
553
+ # @return [String]
554
+ attr_accessor :expression
555
+
556
+ # Optional. String indicating the location of the expression for error reporting,
557
+ # e.g. a file name and a position in the file.
558
+ # Corresponds to the JSON property `location`
559
+ # @return [String]
560
+ attr_accessor :location
561
+
562
+ # Optional. Title for the expression, i.e. a short string describing its purpose.
563
+ # This can be used e.g. in UIs which allow to enter the expression.
564
+ # Corresponds to the JSON property `title`
565
+ # @return [String]
566
+ attr_accessor :title
567
+
568
+ def initialize(**args)
569
+ update!(**args)
570
+ end
571
+
572
+ # Update properties of this object
573
+ def update!(**args)
574
+ @description = args[:description] if args.key?(:description)
575
+ @expression = args[:expression] if args.key?(:expression)
576
+ @location = args[:location] if args.key?(:location)
577
+ @title = args[:title] if args.key?(:title)
578
+ end
579
+ end
580
+
581
+ # Response for FindUnregisteredServices.
582
+ class FindUnregisteredServicesResponse
583
+ include Google::Apis::Core::Hashable
584
+
585
+ # List of discovered services.
586
+ # Corresponds to the JSON property `discoveredServices`
587
+ # @return [Array<Google::Apis::ApphubV1alpha::DiscoveredService>]
588
+ attr_accessor :discovered_services
589
+
590
+ # A token identifying a page of results the server should return.
591
+ # Corresponds to the JSON property `nextPageToken`
592
+ # @return [String]
593
+ attr_accessor :next_page_token
594
+
595
+ # Locations that could not be reached.
596
+ # Corresponds to the JSON property `unreachable`
597
+ # @return [Array<String>]
598
+ attr_accessor :unreachable
599
+
600
+ def initialize(**args)
601
+ update!(**args)
602
+ end
603
+
604
+ # Update properties of this object
605
+ def update!(**args)
606
+ @discovered_services = args[:discovered_services] if args.key?(:discovered_services)
607
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
608
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
609
+ end
610
+ end
611
+
612
+ # Response for FindUnregisteredWorkloads.
613
+ class FindUnregisteredWorkloadsResponse
614
+ include Google::Apis::Core::Hashable
615
+
616
+ # List of discovered workloads.
617
+ # Corresponds to the JSON property `discoveredWorkloads`
618
+ # @return [Array<Google::Apis::ApphubV1alpha::DiscoveredWorkload>]
619
+ attr_accessor :discovered_workloads
620
+
621
+ # A token identifying a page of results the server should return.
622
+ # Corresponds to the JSON property `nextPageToken`
623
+ # @return [String]
624
+ attr_accessor :next_page_token
625
+
626
+ # Locations that could not be reached.
627
+ # Corresponds to the JSON property `unreachable`
628
+ # @return [Array<String>]
629
+ attr_accessor :unreachable
630
+
631
+ def initialize(**args)
632
+ update!(**args)
633
+ end
634
+
635
+ # Update properties of this object
636
+ def update!(**args)
637
+ @discovered_workloads = args[:discovered_workloads] if args.key?(:discovered_workloads)
638
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
639
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
640
+ end
641
+ end
642
+
643
+ # Response for ListApplications.
644
+ class ListApplicationsResponse
645
+ include Google::Apis::Core::Hashable
646
+
647
+ # List of Applications.
648
+ # Corresponds to the JSON property `applications`
649
+ # @return [Array<Google::Apis::ApphubV1alpha::Application>]
650
+ attr_accessor :applications
651
+
652
+ # A token identifying a page of results the server should return.
653
+ # Corresponds to the JSON property `nextPageToken`
654
+ # @return [String]
655
+ attr_accessor :next_page_token
656
+
657
+ # Locations that could not be reached.
658
+ # Corresponds to the JSON property `unreachable`
659
+ # @return [Array<String>]
660
+ attr_accessor :unreachable
661
+
662
+ def initialize(**args)
663
+ update!(**args)
664
+ end
665
+
666
+ # Update properties of this object
667
+ def update!(**args)
668
+ @applications = args[:applications] if args.key?(:applications)
669
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
670
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
671
+ end
672
+ end
673
+
674
+ # Response for ListDiscoveredServices.
675
+ class ListDiscoveredServicesResponse
676
+ include Google::Apis::Core::Hashable
677
+
678
+ # List of discovered services.
679
+ # Corresponds to the JSON property `discoveredServices`
680
+ # @return [Array<Google::Apis::ApphubV1alpha::DiscoveredService>]
681
+ attr_accessor :discovered_services
682
+
683
+ # A token identifying a page of results the server should return.
684
+ # Corresponds to the JSON property `nextPageToken`
685
+ # @return [String]
686
+ attr_accessor :next_page_token
687
+
688
+ # Locations that could not be reached.
689
+ # Corresponds to the JSON property `unreachable`
690
+ # @return [Array<String>]
691
+ attr_accessor :unreachable
692
+
693
+ def initialize(**args)
694
+ update!(**args)
695
+ end
696
+
697
+ # Update properties of this object
698
+ def update!(**args)
699
+ @discovered_services = args[:discovered_services] if args.key?(:discovered_services)
700
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
701
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
702
+ end
703
+ end
704
+
705
+ # Response for ListDiscoveredWorkloads.
706
+ class ListDiscoveredWorkloadsResponse
707
+ include Google::Apis::Core::Hashable
708
+
709
+ # List of discovered workloads.
710
+ # Corresponds to the JSON property `discoveredWorkloads`
711
+ # @return [Array<Google::Apis::ApphubV1alpha::DiscoveredWorkload>]
712
+ attr_accessor :discovered_workloads
713
+
714
+ # A token identifying a page of results the server should return.
715
+ # Corresponds to the JSON property `nextPageToken`
716
+ # @return [String]
717
+ attr_accessor :next_page_token
718
+
719
+ # Locations that could not be reached.
720
+ # Corresponds to the JSON property `unreachable`
721
+ # @return [Array<String>]
722
+ attr_accessor :unreachable
723
+
724
+ def initialize(**args)
725
+ update!(**args)
726
+ end
727
+
728
+ # Update properties of this object
729
+ def update!(**args)
730
+ @discovered_workloads = args[:discovered_workloads] if args.key?(:discovered_workloads)
731
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
732
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
733
+ end
734
+ end
735
+
736
+ # The response message for Locations.ListLocations.
737
+ class ListLocationsResponse
738
+ include Google::Apis::Core::Hashable
739
+
740
+ # A list of locations that matches the specified filter in the request.
741
+ # Corresponds to the JSON property `locations`
742
+ # @return [Array<Google::Apis::ApphubV1alpha::Location>]
743
+ attr_accessor :locations
744
+
745
+ # The standard List next-page token.
746
+ # Corresponds to the JSON property `nextPageToken`
747
+ # @return [String]
748
+ attr_accessor :next_page_token
749
+
750
+ def initialize(**args)
751
+ update!(**args)
752
+ end
753
+
754
+ # Update properties of this object
755
+ def update!(**args)
756
+ @locations = args[:locations] if args.key?(:locations)
757
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
758
+ end
759
+ end
760
+
761
+ # The response message for Operations.ListOperations.
762
+ class ListOperationsResponse
763
+ include Google::Apis::Core::Hashable
764
+
765
+ # The standard List next-page token.
766
+ # Corresponds to the JSON property `nextPageToken`
767
+ # @return [String]
768
+ attr_accessor :next_page_token
769
+
770
+ # A list of operations that matches the specified filter in the request.
771
+ # Corresponds to the JSON property `operations`
772
+ # @return [Array<Google::Apis::ApphubV1alpha::Operation>]
773
+ attr_accessor :operations
774
+
775
+ def initialize(**args)
776
+ update!(**args)
777
+ end
778
+
779
+ # Update properties of this object
780
+ def update!(**args)
781
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
782
+ @operations = args[:operations] if args.key?(:operations)
783
+ end
784
+ end
785
+
786
+ # Response for ListServiceProjectAttachments.
787
+ class ListServiceProjectAttachmentsResponse
788
+ include Google::Apis::Core::Hashable
789
+
790
+ # A token identifying a page of results the server should return.
791
+ # Corresponds to the JSON property `nextPageToken`
792
+ # @return [String]
793
+ attr_accessor :next_page_token
794
+
795
+ # List of service project attachments.
796
+ # Corresponds to the JSON property `serviceProjectAttachments`
797
+ # @return [Array<Google::Apis::ApphubV1alpha::ServiceProjectAttachment>]
798
+ attr_accessor :service_project_attachments
799
+
800
+ # Locations that could not be reached.
801
+ # Corresponds to the JSON property `unreachable`
802
+ # @return [Array<String>]
803
+ attr_accessor :unreachable
804
+
805
+ def initialize(**args)
806
+ update!(**args)
807
+ end
808
+
809
+ # Update properties of this object
810
+ def update!(**args)
811
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
812
+ @service_project_attachments = args[:service_project_attachments] if args.key?(:service_project_attachments)
813
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
814
+ end
815
+ end
816
+
817
+ # Response for ListServices.
818
+ class ListServicesResponse
819
+ include Google::Apis::Core::Hashable
820
+
821
+ # A token identifying a page of results the server should return.
822
+ # Corresponds to the JSON property `nextPageToken`
823
+ # @return [String]
824
+ attr_accessor :next_page_token
825
+
826
+ # List of Services.
827
+ # Corresponds to the JSON property `services`
828
+ # @return [Array<Google::Apis::ApphubV1alpha::Service>]
829
+ attr_accessor :services
830
+
831
+ # Locations that could not be reached.
832
+ # Corresponds to the JSON property `unreachable`
833
+ # @return [Array<String>]
834
+ attr_accessor :unreachable
835
+
836
+ def initialize(**args)
837
+ update!(**args)
838
+ end
839
+
840
+ # Update properties of this object
841
+ def update!(**args)
842
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
843
+ @services = args[:services] if args.key?(:services)
844
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
845
+ end
846
+ end
847
+
848
+ # Response for ListWorkloads.
849
+ class ListWorkloadsResponse
850
+ include Google::Apis::Core::Hashable
851
+
852
+ # A token identifying a page of results the server should return.
853
+ # Corresponds to the JSON property `nextPageToken`
854
+ # @return [String]
855
+ attr_accessor :next_page_token
856
+
857
+ # Locations that could not be reached.
858
+ # Corresponds to the JSON property `unreachable`
859
+ # @return [Array<String>]
860
+ attr_accessor :unreachable
861
+
862
+ # List of Workloads.
863
+ # Corresponds to the JSON property `workloads`
864
+ # @return [Array<Google::Apis::ApphubV1alpha::Workload>]
865
+ attr_accessor :workloads
866
+
867
+ def initialize(**args)
868
+ update!(**args)
869
+ end
870
+
871
+ # Update properties of this object
872
+ def update!(**args)
873
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
874
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
875
+ @workloads = args[:workloads] if args.key?(:workloads)
876
+ end
877
+ end
878
+
879
+ # A resource that represents a Google Cloud location.
880
+ class Location
881
+ include Google::Apis::Core::Hashable
882
+
883
+ # The friendly name for this location, typically a nearby city name. For example,
884
+ # "Tokyo".
885
+ # Corresponds to the JSON property `displayName`
886
+ # @return [String]
887
+ attr_accessor :display_name
888
+
889
+ # Cross-service attributes for the location. For example `"cloud.googleapis.com/
890
+ # region": "us-east1"`
891
+ # Corresponds to the JSON property `labels`
892
+ # @return [Hash<String,String>]
893
+ attr_accessor :labels
894
+
895
+ # The canonical id for this location. For example: `"us-east1"`.
896
+ # Corresponds to the JSON property `locationId`
897
+ # @return [String]
898
+ attr_accessor :location_id
899
+
900
+ # Service-specific metadata. For example the available capacity at the given
901
+ # location.
902
+ # Corresponds to the JSON property `metadata`
903
+ # @return [Hash<String,Object>]
904
+ attr_accessor :metadata
905
+
906
+ # Resource name for the location, which may vary between implementations. For
907
+ # example: `"projects/example-project/locations/us-east1"`
908
+ # Corresponds to the JSON property `name`
909
+ # @return [String]
910
+ attr_accessor :name
911
+
912
+ def initialize(**args)
913
+ update!(**args)
914
+ end
915
+
916
+ # Update properties of this object
917
+ def update!(**args)
918
+ @display_name = args[:display_name] if args.key?(:display_name)
919
+ @labels = args[:labels] if args.key?(:labels)
920
+ @location_id = args[:location_id] if args.key?(:location_id)
921
+ @metadata = args[:metadata] if args.key?(:metadata)
922
+ @name = args[:name] if args.key?(:name)
923
+ end
924
+ end
925
+
926
+ # Response for LookupServiceProjectAttachment.
927
+ class LookupServiceProjectAttachmentResponse
928
+ include Google::Apis::Core::Hashable
929
+
930
+ # ServiceProjectAttachment represents an attachment from a service project to a
931
+ # host project. Service projects contain the underlying cloud infrastructure
932
+ # resources, and expose these resources to the host project through a
933
+ # ServiceProjectAttachment. With the attachments, the host project can provide
934
+ # an aggregated view of resources across all service projects.
935
+ # Corresponds to the JSON property `serviceProjectAttachment`
936
+ # @return [Google::Apis::ApphubV1alpha::ServiceProjectAttachment]
937
+ attr_accessor :service_project_attachment
938
+
939
+ def initialize(**args)
940
+ update!(**args)
941
+ end
942
+
943
+ # Update properties of this object
944
+ def update!(**args)
945
+ @service_project_attachment = args[:service_project_attachment] if args.key?(:service_project_attachment)
946
+ end
947
+ end
948
+
949
+ # This resource represents a long-running operation that is the result of a
950
+ # network API call.
951
+ class Operation
952
+ include Google::Apis::Core::Hashable
953
+
954
+ # If the value is `false`, it means the operation is still in progress. If `true`
955
+ # , the operation is completed, and either `error` or `response` is available.
956
+ # Corresponds to the JSON property `done`
957
+ # @return [Boolean]
958
+ attr_accessor :done
959
+ alias_method :done?, :done
960
+
961
+ # The `Status` type defines a logical error model that is suitable for different
962
+ # programming environments, including REST APIs and RPC APIs. It is used by [
963
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
964
+ # data: error code, error message, and error details. You can find out more
965
+ # about this error model and how to work with it in the [API Design Guide](https:
966
+ # //cloud.google.com/apis/design/errors).
967
+ # Corresponds to the JSON property `error`
968
+ # @return [Google::Apis::ApphubV1alpha::Status]
969
+ attr_accessor :error
970
+
971
+ # Service-specific metadata associated with the operation. It typically contains
972
+ # progress information and common metadata such as create time. Some services
973
+ # might not provide such metadata. Any method that returns a long-running
974
+ # operation should document the metadata type, if any.
975
+ # Corresponds to the JSON property `metadata`
976
+ # @return [Hash<String,Object>]
977
+ attr_accessor :metadata
978
+
979
+ # The server-assigned name, which is only unique within the same service that
980
+ # originally returns it. If you use the default HTTP mapping, the `name` should
981
+ # be a resource name ending with `operations/`unique_id``.
982
+ # Corresponds to the JSON property `name`
983
+ # @return [String]
984
+ attr_accessor :name
985
+
986
+ # The normal, successful response of the operation. If the original method
987
+ # returns no data on success, such as `Delete`, the response is `google.protobuf.
988
+ # Empty`. If the original method is standard `Get`/`Create`/`Update`, the
989
+ # response should be the resource. For other methods, the response should have
990
+ # the type `XxxResponse`, where `Xxx` is the original method name. For example,
991
+ # if the original method name is `TakeSnapshot()`, the inferred response type is
992
+ # `TakeSnapshotResponse`.
993
+ # Corresponds to the JSON property `response`
994
+ # @return [Hash<String,Object>]
995
+ attr_accessor :response
996
+
997
+ def initialize(**args)
998
+ update!(**args)
999
+ end
1000
+
1001
+ # Update properties of this object
1002
+ def update!(**args)
1003
+ @done = args[:done] if args.key?(:done)
1004
+ @error = args[:error] if args.key?(:error)
1005
+ @metadata = args[:metadata] if args.key?(:metadata)
1006
+ @name = args[:name] if args.key?(:name)
1007
+ @response = args[:response] if args.key?(:response)
1008
+ end
1009
+ end
1010
+
1011
+ # Represents the metadata of the long-running operation.
1012
+ class OperationMetadata
1013
+ include Google::Apis::Core::Hashable
1014
+
1015
+ # Output only. API version used to start the operation.
1016
+ # Corresponds to the JSON property `apiVersion`
1017
+ # @return [String]
1018
+ attr_accessor :api_version
1019
+
1020
+ # Output only. The time the operation was created.
1021
+ # Corresponds to the JSON property `createTime`
1022
+ # @return [String]
1023
+ attr_accessor :create_time
1024
+
1025
+ # Output only. The time the operation finished running.
1026
+ # Corresponds to the JSON property `endTime`
1027
+ # @return [String]
1028
+ attr_accessor :end_time
1029
+
1030
+ # Output only. Identifies whether the user has requested cancellation of the
1031
+ # operation. Operations that have been cancelled successfully have Operation.
1032
+ # error value with a google.rpc.Status.code of 1, corresponding to `Code.
1033
+ # CANCELLED`.
1034
+ # Corresponds to the JSON property `requestedCancellation`
1035
+ # @return [Boolean]
1036
+ attr_accessor :requested_cancellation
1037
+ alias_method :requested_cancellation?, :requested_cancellation
1038
+
1039
+ # Output only. Human-readable status of the operation, if any.
1040
+ # Corresponds to the JSON property `statusMessage`
1041
+ # @return [String]
1042
+ attr_accessor :status_message
1043
+
1044
+ # Output only. Server-defined resource path for the target of the operation.
1045
+ # Corresponds to the JSON property `target`
1046
+ # @return [String]
1047
+ attr_accessor :target
1048
+
1049
+ # Output only. Name of the verb executed by the operation.
1050
+ # Corresponds to the JSON property `verb`
1051
+ # @return [String]
1052
+ attr_accessor :verb
1053
+
1054
+ def initialize(**args)
1055
+ update!(**args)
1056
+ end
1057
+
1058
+ # Update properties of this object
1059
+ def update!(**args)
1060
+ @api_version = args[:api_version] if args.key?(:api_version)
1061
+ @create_time = args[:create_time] if args.key?(:create_time)
1062
+ @end_time = args[:end_time] if args.key?(:end_time)
1063
+ @requested_cancellation = args[:requested_cancellation] if args.key?(:requested_cancellation)
1064
+ @status_message = args[:status_message] if args.key?(:status_message)
1065
+ @target = args[:target] if args.key?(:target)
1066
+ @verb = args[:verb] if args.key?(:verb)
1067
+ end
1068
+ end
1069
+
1070
+ # An Identity and Access Management (IAM) policy, which specifies access
1071
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
1072
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
1073
+ # Principals can be user accounts, service accounts, Google groups, and domains (
1074
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
1075
+ # an IAM predefined role or a user-created custom role. For some types of Google
1076
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
1077
+ # logical expression that allows access to a resource only if the expression
1078
+ # evaluates to `true`. A condition can add constraints based on attributes of
1079
+ # the request, the resource, or both. To learn which resources support
1080
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
1081
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
1082
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
1083
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
1084
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
1085
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
1086
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
1087
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
1088
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
1089
+ # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
1090
+ # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
1091
+ # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
1092
+ # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
1093
+ # title: expirable access description: Does not grant access after Sep 2020
1094
+ # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
1095
+ # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
1096
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
1097
+ class Policy
1098
+ include Google::Apis::Core::Hashable
1099
+
1100
+ # Specifies cloud audit logging configuration for this policy.
1101
+ # Corresponds to the JSON property `auditConfigs`
1102
+ # @return [Array<Google::Apis::ApphubV1alpha::AuditConfig>]
1103
+ attr_accessor :audit_configs
1104
+
1105
+ # Associates a list of `members`, or principals, with a `role`. Optionally, may
1106
+ # specify a `condition` that determines how and when the `bindings` are applied.
1107
+ # Each of the `bindings` must contain at least one principal. The `bindings` in
1108
+ # a `Policy` can refer to up to 1,500 principals; up to 250 of these principals
1109
+ # can be Google groups. Each occurrence of a principal counts towards these
1110
+ # limits. For example, if the `bindings` grant 50 different roles to `user:alice@
1111
+ # example.com`, and not to any other principal, then you can add another 1,450
1112
+ # principals to the `bindings` in the `Policy`.
1113
+ # Corresponds to the JSON property `bindings`
1114
+ # @return [Array<Google::Apis::ApphubV1alpha::Binding>]
1115
+ attr_accessor :bindings
1116
+
1117
+ # `etag` is used for optimistic concurrency control as a way to help prevent
1118
+ # simultaneous updates of a policy from overwriting each other. It is strongly
1119
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
1120
+ # to perform policy updates in order to avoid race conditions: An `etag` is
1121
+ # returned in the response to `getIamPolicy`, and systems are expected to put
1122
+ # that etag in the request to `setIamPolicy` to ensure that their change will be
1123
+ # applied to the same version of the policy. **Important:** If you use IAM
1124
+ # Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
1125
+ # If you omit this field, then IAM allows you to overwrite a version `3` policy
1126
+ # with a version `1` policy, and all of the conditions in the version `3` policy
1127
+ # are lost.
1128
+ # Corresponds to the JSON property `etag`
1129
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1130
+ # @return [String]
1131
+ attr_accessor :etag
1132
+
1133
+ # Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
1134
+ # Requests that specify an invalid value are rejected. Any operation that
1135
+ # affects conditional role bindings must specify version `3`. This requirement
1136
+ # applies to the following operations: * Getting a policy that includes a
1137
+ # conditional role binding * Adding a conditional role binding to a policy *
1138
+ # Changing a conditional role binding in a policy * Removing any role binding,
1139
+ # with or without a condition, from a policy that includes conditions **
1140
+ # Important:** If you use IAM Conditions, you must include the `etag` field
1141
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
1142
+ # to overwrite a version `3` policy with a version `1` policy, and all of the
1143
+ # conditions in the version `3` policy are lost. If a policy does not include
1144
+ # any conditions, operations on that policy may specify any valid version or
1145
+ # leave the field unset. To learn which resources support conditions in their
1146
+ # IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
1147
+ # conditions/resource-policies).
1148
+ # Corresponds to the JSON property `version`
1149
+ # @return [Fixnum]
1150
+ attr_accessor :version
1151
+
1152
+ def initialize(**args)
1153
+ update!(**args)
1154
+ end
1155
+
1156
+ # Update properties of this object
1157
+ def update!(**args)
1158
+ @audit_configs = args[:audit_configs] if args.key?(:audit_configs)
1159
+ @bindings = args[:bindings] if args.key?(:bindings)
1160
+ @etag = args[:etag] if args.key?(:etag)
1161
+ @version = args[:version] if args.key?(:version)
1162
+ end
1163
+ end
1164
+
1165
+ # Scope of an application.
1166
+ class Scope
1167
+ include Google::Apis::Core::Hashable
1168
+
1169
+ # Required. Scope Type.
1170
+ # Corresponds to the JSON property `type`
1171
+ # @return [String]
1172
+ attr_accessor :type
1173
+
1174
+ def initialize(**args)
1175
+ update!(**args)
1176
+ end
1177
+
1178
+ # Update properties of this object
1179
+ def update!(**args)
1180
+ @type = args[:type] if args.key?(:type)
1181
+ end
1182
+ end
1183
+
1184
+ # Service is an App Hub data model that contains a discovered service, which
1185
+ # represents a network/api interface that exposes some functionality to clients
1186
+ # for consumption over the network.
1187
+ class Service
1188
+ include Google::Apis::Core::Hashable
1189
+
1190
+ # Consumer provided attributes.
1191
+ # Corresponds to the JSON property `attributes`
1192
+ # @return [Google::Apis::ApphubV1alpha::Attributes]
1193
+ attr_accessor :attributes
1194
+
1195
+ # Output only. Create time.
1196
+ # Corresponds to the JSON property `createTime`
1197
+ # @return [String]
1198
+ attr_accessor :create_time
1199
+
1200
+ # Optional. User-defined description of a Service.
1201
+ # Corresponds to the JSON property `description`
1202
+ # @return [String]
1203
+ attr_accessor :description
1204
+
1205
+ # Required. Immutable. The resource name of the original discovered service.
1206
+ # Corresponds to the JSON property `discoveredService`
1207
+ # @return [String]
1208
+ attr_accessor :discovered_service
1209
+
1210
+ # Optional. User-defined name for the Service.
1211
+ # Corresponds to the JSON property `displayName`
1212
+ # @return [String]
1213
+ attr_accessor :display_name
1214
+
1215
+ # Identifier. The resource name of a Service. Format: "projects/`host-project-id`
1216
+ # /locations/`location`/applications/`application-id`/services/`service-id`"
1217
+ # Corresponds to the JSON property `name`
1218
+ # @return [String]
1219
+ attr_accessor :name
1220
+
1221
+ # Properties of an underlying cloud resource that can comprise a Service.
1222
+ # Corresponds to the JSON property `serviceProperties`
1223
+ # @return [Google::Apis::ApphubV1alpha::ServiceProperties]
1224
+ attr_accessor :service_properties
1225
+
1226
+ # Reference to an underlying networking resource that can comprise a Service.
1227
+ # Corresponds to the JSON property `serviceReference`
1228
+ # @return [Google::Apis::ApphubV1alpha::ServiceReference]
1229
+ attr_accessor :service_reference
1230
+
1231
+ # Output only. Service state.
1232
+ # Corresponds to the JSON property `state`
1233
+ # @return [String]
1234
+ attr_accessor :state
1235
+
1236
+ # Output only. A universally unique identifier (UUID) for the `Service` in the
1237
+ # UUID4 format.
1238
+ # Corresponds to the JSON property `uid`
1239
+ # @return [String]
1240
+ attr_accessor :uid
1241
+
1242
+ # Output only. Update time.
1243
+ # Corresponds to the JSON property `updateTime`
1244
+ # @return [String]
1245
+ attr_accessor :update_time
1246
+
1247
+ def initialize(**args)
1248
+ update!(**args)
1249
+ end
1250
+
1251
+ # Update properties of this object
1252
+ def update!(**args)
1253
+ @attributes = args[:attributes] if args.key?(:attributes)
1254
+ @create_time = args[:create_time] if args.key?(:create_time)
1255
+ @description = args[:description] if args.key?(:description)
1256
+ @discovered_service = args[:discovered_service] if args.key?(:discovered_service)
1257
+ @display_name = args[:display_name] if args.key?(:display_name)
1258
+ @name = args[:name] if args.key?(:name)
1259
+ @service_properties = args[:service_properties] if args.key?(:service_properties)
1260
+ @service_reference = args[:service_reference] if args.key?(:service_reference)
1261
+ @state = args[:state] if args.key?(:state)
1262
+ @uid = args[:uid] if args.key?(:uid)
1263
+ @update_time = args[:update_time] if args.key?(:update_time)
1264
+ end
1265
+ end
1266
+
1267
+ # ServiceProjectAttachment represents an attachment from a service project to a
1268
+ # host project. Service projects contain the underlying cloud infrastructure
1269
+ # resources, and expose these resources to the host project through a
1270
+ # ServiceProjectAttachment. With the attachments, the host project can provide
1271
+ # an aggregated view of resources across all service projects.
1272
+ class ServiceProjectAttachment
1273
+ include Google::Apis::Core::Hashable
1274
+
1275
+ # Output only. Create time.
1276
+ # Corresponds to the JSON property `createTime`
1277
+ # @return [String]
1278
+ attr_accessor :create_time
1279
+
1280
+ # Identifier. The resource name of a ServiceProjectAttachment. Format: "projects/
1281
+ # `host-project-id`/locations/global/serviceProjectAttachments/`service-project-
1282
+ # id`."
1283
+ # Corresponds to the JSON property `name`
1284
+ # @return [String]
1285
+ attr_accessor :name
1286
+
1287
+ # Required. Immutable. Service project name in the format: "projects/abc" or "
1288
+ # projects/123". As input, project name with either project id or number are
1289
+ # accepted. As output, this field will contain project number.
1290
+ # Corresponds to the JSON property `serviceProject`
1291
+ # @return [String]
1292
+ attr_accessor :service_project
1293
+
1294
+ # Output only. ServiceProjectAttachment state.
1295
+ # Corresponds to the JSON property `state`
1296
+ # @return [String]
1297
+ attr_accessor :state
1298
+
1299
+ # Output only. A globally unique identifier (in UUID4 format) for the `
1300
+ # ServiceProjectAttachment`.
1301
+ # Corresponds to the JSON property `uid`
1302
+ # @return [String]
1303
+ attr_accessor :uid
1304
+
1305
+ def initialize(**args)
1306
+ update!(**args)
1307
+ end
1308
+
1309
+ # Update properties of this object
1310
+ def update!(**args)
1311
+ @create_time = args[:create_time] if args.key?(:create_time)
1312
+ @name = args[:name] if args.key?(:name)
1313
+ @service_project = args[:service_project] if args.key?(:service_project)
1314
+ @state = args[:state] if args.key?(:state)
1315
+ @uid = args[:uid] if args.key?(:uid)
1316
+ end
1317
+ end
1318
+
1319
+ # Properties of an underlying cloud resource that can comprise a Service.
1320
+ class ServiceProperties
1321
+ include Google::Apis::Core::Hashable
1322
+
1323
+ # Output only. The service project identifier that the underlying cloud resource
1324
+ # resides in.
1325
+ # Corresponds to the JSON property `gcpProject`
1326
+ # @return [String]
1327
+ attr_accessor :gcp_project
1328
+
1329
+ # Output only. The location that the underlying resource resides in, for example,
1330
+ # us-west1.
1331
+ # Corresponds to the JSON property `location`
1332
+ # @return [String]
1333
+ attr_accessor :location
1334
+
1335
+ # Output only. The location that the underlying resource resides in if it is
1336
+ # zonal, for example, us-west1-a).
1337
+ # Corresponds to the JSON property `zone`
1338
+ # @return [String]
1339
+ attr_accessor :zone
1340
+
1341
+ def initialize(**args)
1342
+ update!(**args)
1343
+ end
1344
+
1345
+ # Update properties of this object
1346
+ def update!(**args)
1347
+ @gcp_project = args[:gcp_project] if args.key?(:gcp_project)
1348
+ @location = args[:location] if args.key?(:location)
1349
+ @zone = args[:zone] if args.key?(:zone)
1350
+ end
1351
+ end
1352
+
1353
+ # Reference to an underlying networking resource that can comprise a Service.
1354
+ class ServiceReference
1355
+ include Google::Apis::Core::Hashable
1356
+
1357
+ # Output only. Additional path under the resource URI (demultiplexing one
1358
+ # resource URI into multiple entries). Smallest unit a policy can be attached to.
1359
+ # Examples: URL Map path entry.
1360
+ # Corresponds to the JSON property `path`
1361
+ # @return [String]
1362
+ attr_accessor :path
1363
+
1364
+ # Output only. The underlying resource URI (For example, URI of Forwarding Rule,
1365
+ # URL Map, and Backend Service).
1366
+ # Corresponds to the JSON property `uri`
1367
+ # @return [String]
1368
+ attr_accessor :uri
1369
+
1370
+ def initialize(**args)
1371
+ update!(**args)
1372
+ end
1373
+
1374
+ # Update properties of this object
1375
+ def update!(**args)
1376
+ @path = args[:path] if args.key?(:path)
1377
+ @uri = args[:uri] if args.key?(:uri)
1378
+ end
1379
+ end
1380
+
1381
+ # Request message for `SetIamPolicy` method.
1382
+ class SetIamPolicyRequest
1383
+ include Google::Apis::Core::Hashable
1384
+
1385
+ # An Identity and Access Management (IAM) policy, which specifies access
1386
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
1387
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
1388
+ # Principals can be user accounts, service accounts, Google groups, and domains (
1389
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
1390
+ # an IAM predefined role or a user-created custom role. For some types of Google
1391
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
1392
+ # logical expression that allows access to a resource only if the expression
1393
+ # evaluates to `true`. A condition can add constraints based on attributes of
1394
+ # the request, the resource, or both. To learn which resources support
1395
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
1396
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
1397
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
1398
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
1399
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
1400
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
1401
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
1402
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
1403
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
1404
+ # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
1405
+ # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
1406
+ # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
1407
+ # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
1408
+ # title: expirable access description: Does not grant access after Sep 2020
1409
+ # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
1410
+ # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
1411
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
1412
+ # Corresponds to the JSON property `policy`
1413
+ # @return [Google::Apis::ApphubV1alpha::Policy]
1414
+ attr_accessor :policy
1415
+
1416
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
1417
+ # the fields in the mask will be modified. If no mask is provided, the following
1418
+ # default mask is used: `paths: "bindings, etag"`
1419
+ # Corresponds to the JSON property `updateMask`
1420
+ # @return [String]
1421
+ attr_accessor :update_mask
1422
+
1423
+ def initialize(**args)
1424
+ update!(**args)
1425
+ end
1426
+
1427
+ # Update properties of this object
1428
+ def update!(**args)
1429
+ @policy = args[:policy] if args.key?(:policy)
1430
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
1431
+ end
1432
+ end
1433
+
1434
+ # The `Status` type defines a logical error model that is suitable for different
1435
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1436
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1437
+ # data: error code, error message, and error details. You can find out more
1438
+ # about this error model and how to work with it in the [API Design Guide](https:
1439
+ # //cloud.google.com/apis/design/errors).
1440
+ class Status
1441
+ include Google::Apis::Core::Hashable
1442
+
1443
+ # The status code, which should be an enum value of google.rpc.Code.
1444
+ # Corresponds to the JSON property `code`
1445
+ # @return [Fixnum]
1446
+ attr_accessor :code
1447
+
1448
+ # A list of messages that carry the error details. There is a common set of
1449
+ # message types for APIs to use.
1450
+ # Corresponds to the JSON property `details`
1451
+ # @return [Array<Hash<String,Object>>]
1452
+ attr_accessor :details
1453
+
1454
+ # A developer-facing error message, which should be in English. Any user-facing
1455
+ # error message should be localized and sent in the google.rpc.Status.details
1456
+ # field, or localized by the client.
1457
+ # Corresponds to the JSON property `message`
1458
+ # @return [String]
1459
+ attr_accessor :message
1460
+
1461
+ def initialize(**args)
1462
+ update!(**args)
1463
+ end
1464
+
1465
+ # Update properties of this object
1466
+ def update!(**args)
1467
+ @code = args[:code] if args.key?(:code)
1468
+ @details = args[:details] if args.key?(:details)
1469
+ @message = args[:message] if args.key?(:message)
1470
+ end
1471
+ end
1472
+
1473
+ # Request message for `TestIamPermissions` method.
1474
+ class TestIamPermissionsRequest
1475
+ include Google::Apis::Core::Hashable
1476
+
1477
+ # The set of permissions to check for the `resource`. Permissions with wildcards
1478
+ # (such as `*` or `storage.*`) are not allowed. For more information see [IAM
1479
+ # Overview](https://cloud.google.com/iam/docs/overview#permissions).
1480
+ # Corresponds to the JSON property `permissions`
1481
+ # @return [Array<String>]
1482
+ attr_accessor :permissions
1483
+
1484
+ def initialize(**args)
1485
+ update!(**args)
1486
+ end
1487
+
1488
+ # Update properties of this object
1489
+ def update!(**args)
1490
+ @permissions = args[:permissions] if args.key?(:permissions)
1491
+ end
1492
+ end
1493
+
1494
+ # Response message for `TestIamPermissions` method.
1495
+ class TestIamPermissionsResponse
1496
+ include Google::Apis::Core::Hashable
1497
+
1498
+ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1499
+ # Corresponds to the JSON property `permissions`
1500
+ # @return [Array<String>]
1501
+ attr_accessor :permissions
1502
+
1503
+ def initialize(**args)
1504
+ update!(**args)
1505
+ end
1506
+
1507
+ # Update properties of this object
1508
+ def update!(**args)
1509
+ @permissions = args[:permissions] if args.key?(:permissions)
1510
+ end
1511
+ end
1512
+
1513
+ # Workload is an App Hub data model that contains a discovered workload, which
1514
+ # represents a binary deployment (such as managed instance groups (MIGs) and GKE
1515
+ # deployments) that performs the smallest logical subset of business
1516
+ # functionality.
1517
+ class Workload
1518
+ include Google::Apis::Core::Hashable
1519
+
1520
+ # Consumer provided attributes.
1521
+ # Corresponds to the JSON property `attributes`
1522
+ # @return [Google::Apis::ApphubV1alpha::Attributes]
1523
+ attr_accessor :attributes
1524
+
1525
+ # Output only. Create time.
1526
+ # Corresponds to the JSON property `createTime`
1527
+ # @return [String]
1528
+ attr_accessor :create_time
1529
+
1530
+ # Optional. User-defined description of a Workload.
1531
+ # Corresponds to the JSON property `description`
1532
+ # @return [String]
1533
+ attr_accessor :description
1534
+
1535
+ # Required. Immutable. The resource name of the original discovered workload.
1536
+ # Corresponds to the JSON property `discoveredWorkload`
1537
+ # @return [String]
1538
+ attr_accessor :discovered_workload
1539
+
1540
+ # Optional. User-defined name for the Workload.
1541
+ # Corresponds to the JSON property `displayName`
1542
+ # @return [String]
1543
+ attr_accessor :display_name
1544
+
1545
+ # Identifier. The resource name of the Workload. Format: "projects/`host-project-
1546
+ # id`/locations/`location`/applications/`application-id`/workloads/`workload-id`"
1547
+ # Corresponds to the JSON property `name`
1548
+ # @return [String]
1549
+ attr_accessor :name
1550
+
1551
+ # Output only. Workload state.
1552
+ # Corresponds to the JSON property `state`
1553
+ # @return [String]
1554
+ attr_accessor :state
1555
+
1556
+ # Output only. A universally unique identifier (UUID) for the `Workload` in the
1557
+ # UUID4 format.
1558
+ # Corresponds to the JSON property `uid`
1559
+ # @return [String]
1560
+ attr_accessor :uid
1561
+
1562
+ # Output only. Update time.
1563
+ # Corresponds to the JSON property `updateTime`
1564
+ # @return [String]
1565
+ attr_accessor :update_time
1566
+
1567
+ # Properties of an underlying compute resource represented by the Workload.
1568
+ # Corresponds to the JSON property `workloadProperties`
1569
+ # @return [Google::Apis::ApphubV1alpha::WorkloadProperties]
1570
+ attr_accessor :workload_properties
1571
+
1572
+ # Reference of an underlying compute resource represented by the Workload.
1573
+ # Corresponds to the JSON property `workloadReference`
1574
+ # @return [Google::Apis::ApphubV1alpha::WorkloadReference]
1575
+ attr_accessor :workload_reference
1576
+
1577
+ def initialize(**args)
1578
+ update!(**args)
1579
+ end
1580
+
1581
+ # Update properties of this object
1582
+ def update!(**args)
1583
+ @attributes = args[:attributes] if args.key?(:attributes)
1584
+ @create_time = args[:create_time] if args.key?(:create_time)
1585
+ @description = args[:description] if args.key?(:description)
1586
+ @discovered_workload = args[:discovered_workload] if args.key?(:discovered_workload)
1587
+ @display_name = args[:display_name] if args.key?(:display_name)
1588
+ @name = args[:name] if args.key?(:name)
1589
+ @state = args[:state] if args.key?(:state)
1590
+ @uid = args[:uid] if args.key?(:uid)
1591
+ @update_time = args[:update_time] if args.key?(:update_time)
1592
+ @workload_properties = args[:workload_properties] if args.key?(:workload_properties)
1593
+ @workload_reference = args[:workload_reference] if args.key?(:workload_reference)
1594
+ end
1595
+ end
1596
+
1597
+ # Properties of an underlying compute resource represented by the Workload.
1598
+ class WorkloadProperties
1599
+ include Google::Apis::Core::Hashable
1600
+
1601
+ # Output only. The service project identifier that the underlying cloud resource
1602
+ # resides in. Empty for non cloud resources.
1603
+ # Corresponds to the JSON property `gcpProject`
1604
+ # @return [String]
1605
+ attr_accessor :gcp_project
1606
+
1607
+ # Output only. The location that the underlying compute resource resides in (e.g
1608
+ # us-west1).
1609
+ # Corresponds to the JSON property `location`
1610
+ # @return [String]
1611
+ attr_accessor :location
1612
+
1613
+ # Output only. The location that the underlying compute resource resides in if
1614
+ # it is zonal (e.g us-west1-a).
1615
+ # Corresponds to the JSON property `zone`
1616
+ # @return [String]
1617
+ attr_accessor :zone
1618
+
1619
+ def initialize(**args)
1620
+ update!(**args)
1621
+ end
1622
+
1623
+ # Update properties of this object
1624
+ def update!(**args)
1625
+ @gcp_project = args[:gcp_project] if args.key?(:gcp_project)
1626
+ @location = args[:location] if args.key?(:location)
1627
+ @zone = args[:zone] if args.key?(:zone)
1628
+ end
1629
+ end
1630
+
1631
+ # Reference of an underlying compute resource represented by the Workload.
1632
+ class WorkloadReference
1633
+ include Google::Apis::Core::Hashable
1634
+
1635
+ # Output only. The underlying compute resource uri.
1636
+ # Corresponds to the JSON property `uri`
1637
+ # @return [String]
1638
+ attr_accessor :uri
1639
+
1640
+ def initialize(**args)
1641
+ update!(**args)
1642
+ end
1643
+
1644
+ # Update properties of this object
1645
+ def update!(**args)
1646
+ @uri = args[:uri] if args.key?(:uri)
1647
+ end
1648
+ end
1649
+ end
1650
+ end
1651
+ end