google-analytics-data-v1alpha 0.2.0 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e13b1aba1492a99bdbca9844b8ac1e2b199afb970711e06fcdc7ca70fe2def1
4
- data.tar.gz: fb9df83e9d524a47d1995bc22b7c0813713ac44f1adecb7169b045a489b8ac92
3
+ metadata.gz: d859482660c437fd3150924ebaf19a12a8da2e04c26d4b654e0674efa0650367
4
+ data.tar.gz: f8d5a4af55e5a76a51bcdcf8f887384205504aab694ed7ab12484a2dad92a656
5
5
  SHA512:
6
- metadata.gz: cff0bfd6011cb6a3e8df55833e882f9d0653eb4ee61657b734ce3e90ede76169428f38c9af8ead57c6c42a87668c4c61deaa9bf87efe1989f98974000583db38
7
- data.tar.gz: 27beadc602765008f63f2bcd4b8d5f3abf49c4846d8c02d4b4f16c3820b087be276aed162dcd73ed5acb108196d8f5dee97cd2cd8d6e76f3f2c68d3bf7d5b194
6
+ metadata.gz: 5a89ec7f601e8c6d05133e81e6c4edb7aea2037acba65a7cfceda11b749739a5edcd1a365d2b00d036b6f591e22eddcdd6cbe9f145ada93eaf5078f0502e57d3
7
+ data.tar.gz: 62a69ffde2ae2a5ce4569367024e1c497788abe5c3a30cbf9e9268758857ffd49112790a8331fc58248ad16f00d20c5f83fa485c4eab7f791fc1ce45992e3839
@@ -23,6 +23,7 @@ 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"
26
27
  require "google/analytics/data/v1alpha/analytics_data/client"
27
28
 
28
29
  module Google
@@ -30,6 +30,8 @@ module Google
30
30
  # Google Analytics reporting data service.
31
31
  #
32
32
  class Client
33
+ include Paths
34
+
33
35
  # @private
34
36
  attr_reader :analytics_data_stub
35
37
 
@@ -557,6 +559,85 @@ module Google
557
559
  raise ::Google::Cloud::Error.from_error(e)
558
560
  end
559
561
 
562
+ ##
563
+ # Returns metadata for dimensions and metrics available in reporting methods.
564
+ # Used to explore the dimensions and metrics. In this method, a Google
565
+ # Analytics App + Web Property Identifier is specified in the request, and
566
+ # the metadata response includes Custom dimensions and metrics as well as
567
+ # Universal metadata.
568
+ #
569
+ # For example if a custom metric with parameter name `levels_unlocked` is
570
+ # registered to a property, the Metadata response will contain
571
+ # `customEvent:levels_unlocked`. Universal metadata are dimensions and
572
+ # metrics applicable to any property such as `country` and `totalUsers`.
573
+ #
574
+ # @overload get_metadata(request, options = nil)
575
+ # Pass arguments to `get_metadata` via a request object, either of type
576
+ # {::Google::Analytics::Data::V1alpha::GetMetadataRequest} or an equivalent Hash.
577
+ #
578
+ # @param request [::Google::Analytics::Data::V1alpha::GetMetadataRequest, ::Hash]
579
+ # A request object representing the call parameters. Required. To specify no
580
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
581
+ # @param options [::Gapic::CallOptions, ::Hash]
582
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
583
+ #
584
+ # @overload get_metadata(name: nil)
585
+ # Pass arguments to `get_metadata` via keyword arguments. Note that at
586
+ # least one keyword argument is required. To specify no parameters, or to keep all
587
+ # the default parameter values, pass an empty Hash as a request object (see above).
588
+ #
589
+ # @param name [::String]
590
+ # Required. The resource name of the metadata to retrieve. This name field is
591
+ # specified in the URL path and not URL parameters. Property is a numeric
592
+ # Google Analytics App + Web Property identifier.
593
+ #
594
+ # Example: properties/1234/metadata
595
+ #
596
+ # @yield [response, operation] Access the result along with the RPC operation
597
+ # @yieldparam response [::Google::Analytics::Data::V1alpha::Metadata]
598
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
599
+ #
600
+ # @return [::Google::Analytics::Data::V1alpha::Metadata]
601
+ #
602
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
603
+ #
604
+ def get_metadata request, options = nil
605
+ raise ::ArgumentError, "request must be provided" if request.nil?
606
+
607
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Data::V1alpha::GetMetadataRequest
608
+
609
+ # Converts hash and nil to an options object
610
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
611
+
612
+ # Customize the options with defaults
613
+ metadata = @config.rpcs.get_metadata.metadata.to_h
614
+
615
+ # Set x-goog-api-client and x-goog-user-project headers
616
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
617
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
618
+ gapic_version: ::Google::Analytics::Data::V1alpha::VERSION
619
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
620
+
621
+ header_params = {
622
+ "name" => request.name
623
+ }
624
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
625
+ metadata[:"x-goog-request-params"] ||= request_params_header
626
+
627
+ options.apply_defaults timeout: @config.rpcs.get_metadata.timeout,
628
+ metadata: metadata,
629
+ retry_policy: @config.rpcs.get_metadata.retry_policy
630
+ options.apply_defaults metadata: @config.metadata,
631
+ retry_policy: @config.retry_policy
632
+
633
+ @analytics_data_stub.call_rpc :get_metadata, request, options: options do |response, operation|
634
+ yield response, operation if block_given?
635
+ return response
636
+ end
637
+ rescue ::GRPC::BadStatus => e
638
+ raise ::Google::Cloud::Error.from_error(e)
639
+ end
640
+
560
641
  ##
561
642
  # Configuration class for the AnalyticsData API.
562
643
  #
@@ -718,6 +799,11 @@ module Google
718
799
  # @return [::Gapic::Config::Method]
719
800
  #
720
801
  attr_reader :get_universal_metadata
802
+ ##
803
+ # RPC-specific configuration for `get_metadata`
804
+ # @return [::Gapic::Config::Method]
805
+ #
806
+ attr_reader :get_metadata
721
807
 
722
808
  # @private
723
809
  def initialize parent_rpcs = nil
@@ -731,6 +817,8 @@ module Google
731
817
  @batch_run_pivot_reports = ::Gapic::Config::Method.new batch_run_pivot_reports_config
732
818
  get_universal_metadata_config = parent_rpcs&.get_universal_metadata if parent_rpcs&.respond_to? :get_universal_metadata
733
819
  @get_universal_metadata = ::Gapic::Config::Method.new get_universal_metadata_config
820
+ get_metadata_config = parent_rpcs&.get_metadata if parent_rpcs&.respond_to? :get_metadata
821
+ @get_metadata = ::Gapic::Config::Method.new get_metadata_config
734
822
 
735
823
  yield self if block_given?
736
824
  end
@@ -0,0 +1,47 @@
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
+ # The resource will be in the following format:
31
+ #
32
+ # `properties/{property}/metadata`
33
+ #
34
+ # @param property [String]
35
+ #
36
+ # @return [::String]
37
+ def metadata_path property:
38
+ "properties/#{property}/metadata"
39
+ end
40
+
41
+ extend self
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -7,8 +7,14 @@ 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'
10
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
12
  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
12
18
  add_message "google.analytics.data.v1alpha.RunReportRequest" do
13
19
  optional :entity, :message, 1, "google.analytics.data.v1alpha.Entity"
14
20
  repeated :dimensions, :message, 2, "google.analytics.data.v1alpha.Dimension"
@@ -78,6 +84,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
78
84
  repeated :dimensions, :message, 1, "google.analytics.data.v1alpha.DimensionMetadata"
79
85
  repeated :metrics, :message, 2, "google.analytics.data.v1alpha.MetricMetadata"
80
86
  end
87
+ add_message "google.analytics.data.v1alpha.GetMetadataRequest" do
88
+ optional :name, :string, 1
89
+ end
81
90
  end
82
91
  end
83
92
 
@@ -85,6 +94,7 @@ module Google
85
94
  module Analytics
86
95
  module Data
87
96
  module V1alpha
97
+ Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.Metadata").msgclass
88
98
  RunReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.RunReportRequest").msgclass
89
99
  RunReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.RunReportResponse").msgclass
90
100
  RunPivotReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.RunPivotReportRequest").msgclass
@@ -95,6 +105,7 @@ module Google
95
105
  BatchRunPivotReportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.BatchRunPivotReportsResponse").msgclass
96
106
  GetUniversalMetadataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.GetUniversalMetadataRequest").msgclass
97
107
  UniversalMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.UniversalMetadata").msgclass
108
+ GetMetadataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.data.v1alpha.GetMetadataRequest").msgclass
98
109
  end
99
110
  end
100
111
  end
@@ -60,6 +60,17 @@ module Google
60
60
  # This method returns Universal Metadata. Universal Metadata are dimensions
61
61
  # and metrics applicable to any property such as `country` and `totalUsers`.
62
62
  rpc :GetUniversalMetadata, ::Google::Analytics::Data::V1alpha::GetUniversalMetadataRequest, ::Google::Analytics::Data::V1alpha::UniversalMetadata
63
+ # Returns metadata for dimensions and metrics available in reporting methods.
64
+ # Used to explore the dimensions and metrics. In this method, a Google
65
+ # Analytics App + Web Property Identifier is specified in the request, and
66
+ # the metadata response includes Custom dimensions and metrics as well as
67
+ # Universal metadata.
68
+ #
69
+ # For example if a custom metric with parameter name `levels_unlocked` is
70
+ # registered to a property, the Metadata response will contain
71
+ # `customEvent:levels_unlocked`. Universal metadata are dimensions and
72
+ # metrics applicable to any property such as `country` and `totalUsers`.
73
+ rpc :GetMetadata, ::Google::Analytics::Data::V1alpha::GetMetadataRequest, ::Google::Analytics::Data::V1alpha::Metadata
63
74
  end
64
75
 
65
76
  Stub = Service.rpc_stub_class
@@ -224,7 +224,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
224
224
  value :TYPE_INTEGER, 1
225
225
  value :TYPE_FLOAT, 2
226
226
  value :TYPE_SECONDS, 4
227
+ value :TYPE_MILLISECONDS, 5
228
+ value :TYPE_MINUTES, 6
229
+ value :TYPE_HOURS, 7
230
+ value :TYPE_STANDARD, 8
227
231
  value :TYPE_CURRENCY, 9
232
+ value :TYPE_FEET, 10
233
+ value :TYPE_MILES, 11
234
+ value :TYPE_METERS, 12
235
+ value :TYPE_KILOMETERS, 13
228
236
  end
229
237
  end
230
238
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Analytics
22
22
  module Data
23
23
  module V1alpha
24
- VERSION = "0.2.0"
24
+ VERSION = "0.3.0"
25
25
  end
26
26
  end
27
27
  end
@@ -21,6 +21,21 @@ 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
+
24
39
  # The request to generate a report.
25
40
  # @!attribute [rw] entity
26
41
  # @return [::Google::Analytics::Data::V1alpha::Entity]
@@ -312,6 +327,19 @@ module Google
312
327
  include ::Google::Protobuf::MessageExts
313
328
  extend ::Google::Protobuf::MessageExts::ClassMethods
314
329
  end
330
+
331
+ # Request for a property's dimension and metric metadata.
332
+ # @!attribute [rw] name
333
+ # @return [::String]
334
+ # Required. The resource name of the metadata to retrieve. This name field is
335
+ # specified in the URL path and not URL parameters. Property is a numeric
336
+ # Google Analytics App + Web Property identifier.
337
+ #
338
+ # Example: properties/1234/metadata
339
+ class GetMetadataRequest
340
+ include ::Google::Protobuf::MessageExts
341
+ extend ::Google::Protobuf::MessageExts::ClassMethods
342
+ end
315
343
  end
316
344
  end
317
345
  end
@@ -764,8 +764,32 @@ module Google
764
764
  # A duration of seconds; a special floating point type.
765
765
  TYPE_SECONDS = 4
766
766
 
767
+ # A duration in milliseconds; a special floating point type.
768
+ TYPE_MILLISECONDS = 5
769
+
770
+ # A duration in minutes; a special floating point type.
771
+ TYPE_MINUTES = 6
772
+
773
+ # A duration in hours; a special floating point type.
774
+ TYPE_HOURS = 7
775
+
776
+ # A custom metric of standard type; a special floating point type.
777
+ TYPE_STANDARD = 8
778
+
767
779
  # An amount of money; a special floating point type.
768
780
  TYPE_CURRENCY = 9
781
+
782
+ # A length in feet; a special floating point type.
783
+ TYPE_FEET = 10
784
+
785
+ # A length in miles; a special floating point type.
786
+ TYPE_MILES = 11
787
+
788
+ # A length in meters; a special floating point type.
789
+ TYPE_METERS = 12
790
+
791
+ # A length in kilometers; a special floating point type.
792
+ TYPE_KILOMETERS = 13
769
793
  end
770
794
  end
771
795
  end
@@ -0,0 +1,283 @@
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
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.2.0
4
+ version: 0.3.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-10-14 00:00:00.000000000 Z
11
+ date: 2020-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -169,6 +169,7 @@ 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
172
173
  - lib/google/analytics/data/v1alpha/analytics_data_api_pb.rb
173
174
  - lib/google/analytics/data/v1alpha/analytics_data_api_services_pb.rb
174
175
  - lib/google/analytics/data/v1alpha/data_pb.rb
@@ -177,6 +178,7 @@ files:
177
178
  - proto_docs/google/analytics/data/v1alpha/analytics_data_api.rb
178
179
  - proto_docs/google/analytics/data/v1alpha/data.rb
179
180
  - proto_docs/google/api/field_behavior.rb
181
+ - proto_docs/google/api/resource.rb
180
182
  homepage: https://github.com/googleapis/google-cloud-ruby
181
183
  licenses:
182
184
  - Apache-2.0