google-analytics-data-v1alpha 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f35e825d5c952314987ebc573bc42c593da6d4fcef5d92f214bbd1b38c072e3
4
- data.tar.gz: 3ea3956052db10fd5f8847df581c4c608eb004094c8c7e4937d34b08e09a0247
3
+ metadata.gz: 5e13b1aba1492a99bdbca9844b8ac1e2b199afb970711e06fcdc7ca70fe2def1
4
+ data.tar.gz: fb9df83e9d524a47d1995bc22b7c0813713ac44f1adecb7169b045a489b8ac92
5
5
  SHA512:
6
- metadata.gz: e8af6266cc1c1d6c60eb17d8ca1655b19bf4c83f86fe4c44943cc9c97ad42baa7fa1db868400851ef8cac6b5c479fc2f6449a06ed4dc70a6c7f81590313e9199
7
- data.tar.gz: 6a9229c5a63f5307d31dfaa92991c498b2a9ce45d93ef383e1711cfcbd208c3b642811c653dc514b69e65957f038eae4e33cea31d1bc8fce335be97c27e0f00c
6
+ metadata.gz: cff0bfd6011cb6a3e8df55833e882f9d0653eb4ee61657b734ce3e90ede76169428f38c9af8ead57c6c42a87668c4c61deaa9bf87efe1989f98974000583db38
7
+ data.tar.gz: 27beadc602765008f63f2bcd4b8d5f3abf49c4846d8c02d4b4f16c3820b087be276aed162dcd73ed5acb108196d8f5dee97cd2cd8d6e76f3f2c68d3bf7d5b194
@@ -23,7 +23,6 @@ require "gapic/config/method"
23
23
  require "google/analytics/data/v1alpha/version"
24
24
 
25
25
  require "google/analytics/data/v1alpha/analytics_data/credentials"
26
- require "google/analytics/data/v1alpha/analytics_data/paths"
27
26
  require "google/analytics/data/v1alpha/analytics_data/client"
28
27
 
29
28
  module Google
@@ -30,8 +30,6 @@ module Google
30
30
  # Google Analytics reporting data service.
31
31
  #
32
32
  class Client
33
- include Paths
34
-
35
33
  # @private
36
34
  attr_reader :analytics_data_stub
37
35
 
@@ -507,45 +505,37 @@ module Google
507
505
  # Used to explore the dimensions and metrics. Dimensions and metrics will be
508
506
  # mostly added over time, but renames and deletions may occur.
509
507
  #
510
- # @overload get_metadata(request, options = nil)
511
- # Pass arguments to `get_metadata` via a request object, either of type
512
- # {::Google::Analytics::Data::V1alpha::GetMetadataRequest} or an equivalent Hash.
508
+ # This method returns Universal Metadata. Universal Metadata are dimensions
509
+ # and metrics applicable to any property such as `country` and `totalUsers`.
510
+ #
511
+ # @overload get_universal_metadata(request, options = nil)
512
+ # Pass arguments to `get_universal_metadata` via a request object, either of type
513
+ # {::Google::Analytics::Data::V1alpha::GetUniversalMetadataRequest} or an equivalent Hash.
513
514
  #
514
- # @param request [::Google::Analytics::Data::V1alpha::GetMetadataRequest, ::Hash]
515
+ # @param request [::Google::Analytics::Data::V1alpha::GetUniversalMetadataRequest, ::Hash]
515
516
  # A request object representing the call parameters. Required. To specify no
516
517
  # parameters, or to keep all the default parameter values, pass an empty Hash.
517
518
  # @param options [::Gapic::CallOptions, ::Hash]
518
519
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
519
520
  #
520
- # @overload get_metadata(name: nil)
521
- # Pass arguments to `get_metadata` via keyword arguments. Note that at
522
- # least one keyword argument is required. To specify no parameters, or to keep all
523
- # the default parameter values, pass an empty Hash as a request object (see above).
524
- #
525
- # @param name [::String]
526
- # Required. The name of the metadata to retrieve. Either has the form
527
- # 'metadata' or 'properties/\\{property}/metadata'. This name field is
528
- # specified in the URL path and not URL parameters. Property is a numeric
529
- # Google Analytics App + Web Property Id.
530
- #
531
521
  # @yield [response, operation] Access the result along with the RPC operation
532
- # @yieldparam response [::Google::Analytics::Data::V1alpha::Metadata]
522
+ # @yieldparam response [::Google::Analytics::Data::V1alpha::UniversalMetadata]
533
523
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
534
524
  #
535
- # @return [::Google::Analytics::Data::V1alpha::Metadata]
525
+ # @return [::Google::Analytics::Data::V1alpha::UniversalMetadata]
536
526
  #
537
527
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
538
528
  #
539
- def get_metadata request, options = nil
529
+ def get_universal_metadata request, options = nil
540
530
  raise ::ArgumentError, "request must be provided" if request.nil?
541
531
 
542
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1alpha::GetMetadataRequest
532
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1alpha::GetUniversalMetadataRequest
543
533
 
544
534
  # Converts hash and nil to an options object
545
535
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
546
536
 
547
537
  # Customize the options with defaults
548
- metadata = @config.rpcs.get_metadata.metadata.to_h
538
+ metadata = @config.rpcs.get_universal_metadata.metadata.to_h
549
539
 
550
540
  # Set x-goog-api-client and x-goog-user-project headers
551
541
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -553,19 +543,13 @@ module Google
553
543
  gapic_version: ::Google::Analytics::Data::V1alpha::VERSION
554
544
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
555
545
 
556
- header_params = {
557
- "name" => request.name
558
- }
559
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
560
- metadata[:"x-goog-request-params"] ||= request_params_header
561
-
562
- options.apply_defaults timeout: @config.rpcs.get_metadata.timeout,
546
+ options.apply_defaults timeout: @config.rpcs.get_universal_metadata.timeout,
563
547
  metadata: metadata,
564
- retry_policy: @config.rpcs.get_metadata.retry_policy
548
+ retry_policy: @config.rpcs.get_universal_metadata.retry_policy
565
549
  options.apply_defaults metadata: @config.metadata,
566
550
  retry_policy: @config.retry_policy
567
551
 
568
- @analytics_data_stub.call_rpc :get_metadata, request, options: options do |response, operation|
552
+ @analytics_data_stub.call_rpc :get_universal_metadata, request, options: options do |response, operation|
569
553
  yield response, operation if block_given?
570
554
  return response
571
555
  end
@@ -730,10 +714,10 @@ module Google
730
714
  #
731
715
  attr_reader :batch_run_pivot_reports
732
716
  ##
733
- # RPC-specific configuration for `get_metadata`
717
+ # RPC-specific configuration for `get_universal_metadata`
734
718
  # @return [::Gapic::Config::Method]
735
719
  #
736
- attr_reader :get_metadata
720
+ attr_reader :get_universal_metadata
737
721
 
738
722
  # @private
739
723
  def initialize parent_rpcs = nil
@@ -745,8 +729,8 @@ module Google
745
729
  @batch_run_reports = ::Gapic::Config::Method.new batch_run_reports_config
746
730
  batch_run_pivot_reports_config = parent_rpcs&.batch_run_pivot_reports if parent_rpcs&.respond_to? :batch_run_pivot_reports
747
731
  @batch_run_pivot_reports = ::Gapic::Config::Method.new batch_run_pivot_reports_config
748
- get_metadata_config = parent_rpcs&.get_metadata if parent_rpcs&.respond_to? :get_metadata
749
- @get_metadata = ::Gapic::Config::Method.new get_metadata_config
732
+ get_universal_metadata_config = parent_rpcs&.get_universal_metadata if parent_rpcs&.respond_to? :get_universal_metadata
733
+ @get_universal_metadata = ::Gapic::Config::Method.new get_universal_metadata_config
750
734
 
751
735
  yield self if block_given?
752
736
  end
@@ -7,14 +7,8 @@ require 'google/analytics/data/v1alpha/data_pb'
7
7
  require 'google/api/annotations_pb'
8
8
  require 'google/api/client_pb'
9
9
  require 'google/api/field_behavior_pb'
10
- require 'google/api/resource_pb'
11
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
11
  add_file("google/analytics/data/v1alpha/analytics_data_api.proto", :syntax => :proto3) do
13
- add_message "google.analytics.data.v1alpha.Metadata" do
14
- optional :name, :string, 3
15
- repeated :dimensions, :message, 1, "google.analytics.data.v1alpha.DimensionMetadata"
16
- repeated :metrics, :message, 2, "google.analytics.data.v1alpha.MetricMetadata"
17
- end
18
12
  add_message "google.analytics.data.v1alpha.RunReportRequest" do
19
13
  optional :entity, :message, 1, "google.analytics.data.v1alpha.Entity"
20
14
  repeated :dimensions, :message, 2, "google.analytics.data.v1alpha.Dimension"
@@ -38,6 +32,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
38
32
  repeated :totals, :message, 8, "google.analytics.data.v1alpha.Row"
39
33
  repeated :maximums, :message, 9, "google.analytics.data.v1alpha.Row"
40
34
  repeated :minimums, :message, 10, "google.analytics.data.v1alpha.Row"
35
+ optional :row_count, :int32, 12
41
36
  optional :metadata, :message, 6, "google.analytics.data.v1alpha.ResponseMetaData"
42
37
  optional :property_quota, :message, 7, "google.analytics.data.v1alpha.PropertyQuota"
43
38
  end
@@ -77,8 +72,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
77
72
  add_message "google.analytics.data.v1alpha.BatchRunPivotReportsResponse" do
78
73
  repeated :pivot_reports, :message, 1, "google.analytics.data.v1alpha.RunPivotReportResponse"
79
74
  end
80
- add_message "google.analytics.data.v1alpha.GetMetadataRequest" do
81
- optional :name, :string, 1
75
+ add_message "google.analytics.data.v1alpha.GetUniversalMetadataRequest" do
76
+ end
77
+ add_message "google.analytics.data.v1alpha.UniversalMetadata" do
78
+ repeated :dimensions, :message, 1, "google.analytics.data.v1alpha.DimensionMetadata"
79
+ repeated :metrics, :message, 2, "google.analytics.data.v1alpha.MetricMetadata"
82
80
  end
83
81
  end
84
82
  end
@@ -87,7 +85,6 @@ module Google
87
85
  module Analytics
88
86
  module Data
89
87
  module V1alpha
90
- Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.Metadata").msgclass
91
88
  RunReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.RunReportRequest").msgclass
92
89
  RunReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.RunReportResponse").msgclass
93
90
  RunPivotReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.RunPivotReportRequest").msgclass
@@ -96,7 +93,8 @@ module Google
96
93
  BatchRunReportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.BatchRunReportsResponse").msgclass
97
94
  BatchRunPivotReportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.BatchRunPivotReportsRequest").msgclass
98
95
  BatchRunPivotReportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.BatchRunPivotReportsResponse").msgclass
99
- GetMetadataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.GetMetadataRequest").msgclass
96
+ GetUniversalMetadataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.GetUniversalMetadataRequest").msgclass
97
+ UniversalMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.UniversalMetadata").msgclass
100
98
  end
101
99
  end
102
100
  end
@@ -56,7 +56,10 @@ module Google
56
56
  # Returns metadata for dimensions and metrics available in reporting methods.
57
57
  # Used to explore the dimensions and metrics. Dimensions and metrics will be
58
58
  # mostly added over time, but renames and deletions may occur.
59
- rpc :GetMetadata, ::Google::Analytics::Data::V1alpha::GetMetadataRequest, ::Google::Analytics::Data::V1alpha::Metadata
59
+ #
60
+ # This method returns Universal Metadata. Universal Metadata are dimensions
61
+ # and metrics applicable to any property such as `country` and `totalUsers`.
62
+ rpc :GetUniversalMetadata, ::Google::Analytics::Data::V1alpha::GetUniversalMetadataRequest, ::Google::Analytics::Data::V1alpha::UniversalMetadata
60
63
  end
61
64
 
62
65
  Stub = Service.rpc_stub_class
@@ -21,7 +21,7 @@ module Google
21
21
  module Analytics
22
22
  module Data
23
23
  module V1alpha
24
- VERSION = "0.1.0"
24
+ VERSION = "0.2.0"
25
25
  end
26
26
  end
27
27
  end
@@ -21,21 +21,6 @@ module Google
21
21
  module Analytics
22
22
  module Data
23
23
  module V1alpha
24
- # The dimensions and metrics currently accepted in reporting methods.
25
- # @!attribute [rw] name
26
- # @return [::String]
27
- # Resource name of this metadata.
28
- # @!attribute [rw] dimensions
29
- # @return [::Array<::Google::Analytics::Data::V1alpha::DimensionMetadata>]
30
- # The dimensions descriptions.
31
- # @!attribute [rw] metrics
32
- # @return [::Array<::Google::Analytics::Data::V1alpha::MetricMetadata>]
33
- # The metric descriptions.
34
- class Metadata
35
- include ::Google::Protobuf::MessageExts
36
- extend ::Google::Protobuf::MessageExts::ClassMethods
37
- end
38
-
39
24
  # The request to generate a report.
40
25
  # @!attribute [rw] entity
41
26
  # @return [::Google::Analytics::Data::V1alpha::Entity]
@@ -120,6 +105,12 @@ module Google
120
105
  # @!attribute [rw] minimums
121
106
  # @return [::Array<::Google::Analytics::Data::V1alpha::Row>]
122
107
  # If requested, the minimum values of metrics.
108
+ # @!attribute [rw] row_count
109
+ # @return [::Integer]
110
+ # The total number of rows in the query result, regardless of the number of
111
+ # rows returned in the response. For example if a query returns 175 rows and
112
+ # includes limit = 50 in the API request, the response will contain row_count
113
+ # = 175 but only 50 rows.
123
114
  # @!attribute [rw] metadata
124
115
  # @return [::Google::Analytics::Data::V1alpha::ResponseMetaData]
125
116
  # Metadata for the report.
@@ -304,14 +295,20 @@ module Google
304
295
  extend ::Google::Protobuf::MessageExts::ClassMethods
305
296
  end
306
297
 
307
- # Request for dimension and metric metadata.
308
- # @!attribute [rw] name
309
- # @return [::String]
310
- # Required. The name of the metadata to retrieve. Either has the form
311
- # 'metadata' or 'properties/\\{property}/metadata'. This name field is
312
- # specified in the URL path and not URL parameters. Property is a numeric
313
- # Google Analytics App + Web Property Id.
314
- class GetMetadataRequest
298
+ # Request for the universal dimension and metric metadata.
299
+ class GetUniversalMetadataRequest
300
+ include ::Google::Protobuf::MessageExts
301
+ extend ::Google::Protobuf::MessageExts::ClassMethods
302
+ end
303
+
304
+ # The dimensions and metrics currently accepted in reporting methods.
305
+ # @!attribute [rw] dimensions
306
+ # @return [::Array<::Google::Analytics::Data::V1alpha::DimensionMetadata>]
307
+ # The dimensions descriptions.
308
+ # @!attribute [rw] metrics
309
+ # @return [::Array<::Google::Analytics::Data::V1alpha::MetricMetadata>]
310
+ # The metric descriptions.
311
+ class UniversalMetadata
315
312
  include ::Google::Protobuf::MessageExts
316
313
  extend ::Google::Protobuf::MessageExts::ClassMethods
317
314
  end
@@ -556,7 +556,9 @@ module Google
556
556
  # combinations.
557
557
  # @!attribute [rw] row_count
558
558
  # @return [::Integer]
559
- # The cardinality of the pivot as if offset = 0 and limit = -1.
559
+ # The cardinality of the pivot as if offset = 0 and limit = -1. The total
560
+ # number of rows for this pivot's fields regardless of how the parameters
561
+ # offset and limit are specified in the request.
560
562
  class PivotHeader
561
563
  include ::Google::Protobuf::MessageExts
562
564
  extend ::Google::Protobuf::MessageExts::ClassMethods
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-analytics-data-v1alpha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-18 00:00:00.000000000 Z
11
+ date: 2020-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -169,7 +169,6 @@ files:
169
169
  - lib/google/analytics/data/v1alpha/analytics_data.rb
170
170
  - lib/google/analytics/data/v1alpha/analytics_data/client.rb
171
171
  - lib/google/analytics/data/v1alpha/analytics_data/credentials.rb
172
- - lib/google/analytics/data/v1alpha/analytics_data/paths.rb
173
172
  - lib/google/analytics/data/v1alpha/analytics_data_api_pb.rb
174
173
  - lib/google/analytics/data/v1alpha/analytics_data_api_services_pb.rb
175
174
  - lib/google/analytics/data/v1alpha/data_pb.rb
@@ -178,7 +177,6 @@ files:
178
177
  - proto_docs/google/analytics/data/v1alpha/analytics_data_api.rb
179
178
  - proto_docs/google/analytics/data/v1alpha/data.rb
180
179
  - proto_docs/google/api/field_behavior.rb
181
- - proto_docs/google/api/resource.rb
182
180
  homepage: https://github.com/googleapis/google-cloud-ruby
183
181
  licenses:
184
182
  - Apache-2.0
@@ -1,64 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright 2020 Google LLC
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # https://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
- # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
-
19
-
20
- module Google
21
- module Analytics
22
- module Data
23
- module V1alpha
24
- module AnalyticsData
25
- # Path helper methods for the AnalyticsData API.
26
- module Paths
27
- ##
28
- # Create a fully-qualified Metadata resource string.
29
- #
30
- # @overload metadata_path()
31
- # The resource will be in the following format:
32
- #
33
- # `metadata`
34
- #
35
- # @overload metadata_path(property:)
36
- # The resource will be in the following format:
37
- #
38
- # `properties/{property}/metadata`
39
- #
40
- # @param property [String]
41
- #
42
- # @return [::String]
43
- def metadata_path **args
44
- resources = {
45
- "" => (proc do
46
- "metadata"
47
- end),
48
- "property" => (proc do |property:|
49
- "properties/#{property}/metadata"
50
- end)
51
- }
52
-
53
- resource = resources[args.keys.sort.join(":")]
54
- raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
55
- resource.call(**args)
56
- end
57
-
58
- extend self
59
- end
60
- end
61
- end
62
- end
63
- end
64
- end
@@ -1,283 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright 2020 Google LLC
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # https://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
- # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
-
19
-
20
- module Google
21
- module Api
22
- # A simple descriptor of a resource type.
23
- #
24
- # ResourceDescriptor annotates a resource message (either by means of a
25
- # protobuf annotation or use in the service config), and associates the
26
- # resource's schema, the resource type, and the pattern of the resource name.
27
- #
28
- # Example:
29
- #
30
- # message Topic {
31
- # // Indicates this message defines a resource schema.
32
- # // Declares the resource type in the format of {service}/{kind}.
33
- # // For Kubernetes resources, the format is {api group}/{kind}.
34
- # option (google.api.resource) = {
35
- # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
41
- # };
42
- # }
43
- #
44
- # The ResourceDescriptor Yaml config will look like:
45
- #
46
- # resources:
47
- # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
52
- #
53
- # Sometimes, resources have multiple patterns, typically because they can
54
- # live under multiple parents.
55
- #
56
- # Example:
57
- #
58
- # message LogEntry {
59
- # option (google.api.resource) = {
60
- # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
81
- # };
82
- # }
83
- #
84
- # The ResourceDescriptor Yaml config will look like:
85
- #
86
- # resources:
87
- # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
130
- # @!attribute [rw] type
131
- # @return [::String]
132
- # The resource type. It must be in the format of
133
- # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
134
- # singular and must not include version numbers.
135
- #
136
- # Example: `storage.googleapis.com/Bucket`
137
- #
138
- # The value of the resource_type_kind must follow the regular expression
139
- # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
140
- # should use PascalCase (UpperCamelCase). The maximum number of
141
- # characters allowed for the `resource_type_kind` is 100.
142
- # @!attribute [rw] pattern
143
- # @return [::Array<::String>]
144
- # Optional. The relative resource name pattern associated with this resource
145
- # type. The DNS prefix of the full resource name shouldn't be specified here.
146
- #
147
- # The path pattern must follow the syntax, which aligns with HTTP binding
148
- # syntax:
149
- #
150
- # Template = Segment { "/" Segment } ;
151
- # Segment = LITERAL | Variable ;
152
- # Variable = "{" LITERAL "}" ;
153
- #
154
- # Examples:
155
- #
156
- # - "projects/\\{project}/topics/\\{topic}"
157
- # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
158
- #
159
- # The components in braces correspond to the IDs for each resource in the
160
- # hierarchy. It is expected that, if multiple patterns are provided,
161
- # the same component name (e.g. "project") refers to IDs of the same
162
- # type of resource.
163
- # @!attribute [rw] name_field
164
- # @return [::String]
165
- # Optional. The field on the resource that designates the resource name
166
- # field. If omitted, this is assumed to be "name".
167
- # @!attribute [rw] history
168
- # @return [::Google::Api::ResourceDescriptor::History]
169
- # Optional. The historical or future-looking state of the resource pattern.
170
- #
171
- # Example:
172
- #
173
- # // The InspectTemplate message originally only supported resource
174
- # // names with organization, and project was added later.
175
- # message InspectTemplate {
176
- # option (google.api.resource) = {
177
- # type: "dlp.googleapis.com/InspectTemplate"
178
- # pattern:
179
- # "organizations/{organization}/inspectTemplates/{inspect_template}"
180
- # pattern: "projects/{project}/inspectTemplates/{inspect_template}"
181
- # history: ORIGINALLY_SINGLE_PATTERN
182
- # };
183
- # }
184
- # @!attribute [rw] plural
185
- # @return [::String]
186
- # The plural name used in the resource name and permission names, such as
187
- # 'projects' for the resource name of 'projects/\\{project}' and the permission
188
- # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
189
- # concept of the `plural` field in k8s CRD spec
190
- # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
191
- #
192
- # Note: The plural form is required even for singleton resources. See
193
- # https://aip.dev/156
194
- # @!attribute [rw] singular
195
- # @return [::String]
196
- # The same concept of the `singular` field in k8s CRD spec
197
- # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
198
- # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
199
- # @!attribute [rw] style
200
- # @return [::Array<::Google::Api::ResourceDescriptor::Style>]
201
- # Style flag(s) for this resource.
202
- # These indicate that a resource is expected to conform to a given
203
- # style. See the specific style flags for additional information.
204
- class ResourceDescriptor
205
- include ::Google::Protobuf::MessageExts
206
- extend ::Google::Protobuf::MessageExts::ClassMethods
207
-
208
- # A description of the historical or future-looking state of the
209
- # resource pattern.
210
- module History
211
- # The "unset" value.
212
- HISTORY_UNSPECIFIED = 0
213
-
214
- # The resource originally had one pattern and launched as such, and
215
- # additional patterns were added later.
216
- ORIGINALLY_SINGLE_PATTERN = 1
217
-
218
- # The resource has one pattern, but the API owner expects to add more
219
- # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
220
- # that from being necessary once there are multiple patterns.)
221
- FUTURE_MULTI_PATTERN = 2
222
- end
223
-
224
- # A flag representing a specific style that a resource claims to conform to.
225
- module Style
226
- # The unspecified value. Do not use.
227
- STYLE_UNSPECIFIED = 0
228
-
229
- # This resource is intended to be "declarative-friendly".
230
- #
231
- # Declarative-friendly resources must be more strictly consistent, and
232
- # setting this to true communicates to tools that this resource should
233
- # adhere to declarative-friendly expectations.
234
- #
235
- # Note: This is used by the API linter (linter.aip.dev) to enable
236
- # additional checks.
237
- DECLARATIVE_FRIENDLY = 1
238
- end
239
- end
240
-
241
- # Defines a proto annotation that describes a string field that refers to
242
- # an API resource.
243
- # @!attribute [rw] type
244
- # @return [::String]
245
- # The resource type that the annotated field references.
246
- #
247
- # Example:
248
- #
249
- # message Subscription {
250
- # string topic = 2 [(google.api.resource_reference) = {
251
- # type: "pubsub.googleapis.com/Topic"
252
- # }];
253
- # }
254
- #
255
- # Occasionally, a field may reference an arbitrary resource. In this case,
256
- # APIs use the special value * in their resource reference.
257
- #
258
- # Example:
259
- #
260
- # message GetIamPolicyRequest {
261
- # string resource = 2 [(google.api.resource_reference) = {
262
- # type: "*"
263
- # }];
264
- # }
265
- # @!attribute [rw] child_type
266
- # @return [::String]
267
- # The resource type of a child collection that the annotated field
268
- # references. This is useful for annotating the `parent` field that
269
- # doesn't have a fixed resource type.
270
- #
271
- # Example:
272
- #
273
- # message ListLogEntriesRequest {
274
- # string parent = 1 [(google.api.resource_reference) = {
275
- # child_type: "logging.googleapis.com/LogEntry"
276
- # };
277
- # }
278
- class ResourceReference
279
- include ::Google::Protobuf::MessageExts
280
- extend ::Google::Protobuf::MessageExts::ClassMethods
281
- end
282
- end
283
- end