google-apis-admin_reports_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6775182db1bcbb383188b4c55715a80d15d1da7e32b92e3cca1c1e74564cbeac
4
+ data.tar.gz: ec45f95896569eb3b7a62372fd3df5c2f0e3fd5bc7868f334d69c2b457940fc6
5
+ SHA512:
6
+ metadata.gz: f476f55d2d10d90bf8be3d008eb995e7f20d1ce02aad8833a2d48d87f35a9146ca765ec3d69665556274b3e3be4a6a5ed08533f18828c71e444599c727cdcc0e
7
+ data.tar.gz: 73b32acd2b43e22b7bb59dd7c49de0f959c9e5eaa796b40d21899ed769bd81e525741fe225505c71b338536e1c18f550036fc0b0ce7b0b872f9950b7c48f1cff
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-admin_reports_v1
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/admin_reports_v1/*.rb
9
+ lib/google/apis/admin_reports_v1.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-admin_reports_v1
2
+
3
+ ### v0.1.0 (2021-01-07)
4
+
5
+ * Regenerated using generator version 0.1.1
6
+ * Regenerated from discovery document revision 20201208
7
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,96 @@
1
+ # Simple REST client for version ReportsV1 of the Admin SDK API
2
+
3
+ This is a simple client library for version ReportsV1 of the Admin SDK API. It provides:
4
+
5
+ * A client object that connects to the HTTP/JSON REST endpoint for the service.
6
+ * Ruby objects for data structures related to the service.
7
+ * Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
8
+ * Control of retry, pagination, and timeouts.
9
+
10
+ Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
11
+
12
+ ## Getting started
13
+
14
+ ### Before you begin
15
+
16
+ There are a few setup steps you need to complete before you can use this library:
17
+
18
+ 1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
19
+ 2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
20
+ 3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/admin.googleapis.com) in the console.
21
+
22
+ ### Installation
23
+
24
+ Add this line to your application's Gemfile:
25
+
26
+ ```ruby
27
+ gem 'google-apis-admin_reports_v1', '~> 0.1'
28
+ ```
29
+
30
+ And then execute:
31
+
32
+ ```
33
+ $ bundle
34
+ ```
35
+
36
+ Or install it yourself as:
37
+
38
+ ```
39
+ $ gem install google-apis-admin_reports_v1
40
+ ```
41
+
42
+ ### Creating a client object
43
+
44
+ Once the gem is installed, you can load the client code and instantiate a client.
45
+
46
+ ```ruby
47
+ # Load the client
48
+ require "google/apis/admin_reports_v1"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::AdminReportsV1::ReportsService.new
52
+
53
+ # Authenticate calls
54
+ client.authentication = # ... use the googleauth gem to create credentials
55
+ ```
56
+
57
+ See the class reference docs for information on the methods you can call from a client.
58
+
59
+ ## Documentation
60
+
61
+ More detailed descriptions of the Google simple REST clients are available in two documents.
62
+
63
+ * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
64
+ * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
65
+
66
+ (Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Admin service in particular.)
67
+
68
+ For reference information on specific calls in the Admin SDK API, see the {Google::Apis::AdminReportsV1::ReportsService class reference docs}.
69
+
70
+ ## Which client should I use?
71
+
72
+ Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
73
+
74
+ This library, `google-apis-admin_reports_v1`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
75
+
76
+ Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
77
+
78
+ Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
79
+
80
+ **For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
81
+
82
+ The [product documentation](http://developers.google.com/admin-sdk/) may provide guidance regarding the preferred client library to use.
83
+
84
+ ## Supported Ruby versions
85
+
86
+ This library is supported on Ruby 2.5+.
87
+
88
+ Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
89
+
90
+ ## License
91
+
92
+ This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
93
+
94
+ ## Support
95
+
96
+ Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
@@ -0,0 +1,15 @@
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 "google/apis/admin_reports_v1"
@@ -0,0 +1,41 @@
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 'google/apis/admin_reports_v1/service.rb'
16
+ require 'google/apis/admin_reports_v1/classes.rb'
17
+ require 'google/apis/admin_reports_v1/representations.rb'
18
+ require 'google/apis/admin_reports_v1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Admin SDK API
23
+ #
24
+ # Admin SDK lets administrators of enterprise domains to view and manage
25
+ # resources like user, groups etc. It also provides audit and usage reports of
26
+ # domain.
27
+ #
28
+ # @see http://developers.google.com/admin-sdk/
29
+ module AdminReportsV1
30
+ # Version of the Admin SDK API this client connects to.
31
+ # This is NOT the gem version.
32
+ VERSION = 'ReportsV1'
33
+
34
+ # View audit reports for your G Suite domain
35
+ AUTH_ADMIN_REPORTS_AUDIT_READONLY = 'https://www.googleapis.com/auth/admin.reports.audit.readonly'
36
+
37
+ # View usage reports for your G Suite domain
38
+ AUTH_ADMIN_REPORTS_USAGE_READONLY = 'https://www.googleapis.com/auth/admin.reports.usage.readonly'
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,741 @@
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 AdminReportsV1
24
+
25
+ # JSON template for a collection of activities.
26
+ class Activities
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # ETag of the resource.
30
+ # Corresponds to the JSON property `etag`
31
+ # @return [String]
32
+ attr_accessor :etag
33
+
34
+ # Each activity record in the response.
35
+ # Corresponds to the JSON property `items`
36
+ # @return [Array<Google::Apis::AdminReportsV1::Activity>]
37
+ attr_accessor :items
38
+
39
+ # The type of API resource. For an activity report, the value is `reports#
40
+ # activities`.
41
+ # Corresponds to the JSON property `kind`
42
+ # @return [String]
43
+ attr_accessor :kind
44
+
45
+ # Token for retrieving the follow-on next page of the report. The `nextPageToken`
46
+ # value is used in the request's `pageToken` query string.
47
+ # Corresponds to the JSON property `nextPageToken`
48
+ # @return [String]
49
+ attr_accessor :next_page_token
50
+
51
+ def initialize(**args)
52
+ update!(**args)
53
+ end
54
+
55
+ # Update properties of this object
56
+ def update!(**args)
57
+ @etag = args[:etag] if args.key?(:etag)
58
+ @items = args[:items] if args.key?(:items)
59
+ @kind = args[:kind] if args.key?(:kind)
60
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
61
+ end
62
+ end
63
+
64
+ # JSON template for the activity resource.
65
+ class Activity
66
+ include Google::Apis::Core::Hashable
67
+
68
+ # User doing the action.
69
+ # Corresponds to the JSON property `actor`
70
+ # @return [Google::Apis::AdminReportsV1::Activity::Actor]
71
+ attr_accessor :actor
72
+
73
+ # ETag of the entry.
74
+ # Corresponds to the JSON property `etag`
75
+ # @return [String]
76
+ attr_accessor :etag
77
+
78
+ # Activity events in the report.
79
+ # Corresponds to the JSON property `events`
80
+ # @return [Array<Google::Apis::AdminReportsV1::Activity::Event>]
81
+ attr_accessor :events
82
+
83
+ # Unique identifier for each activity record.
84
+ # Corresponds to the JSON property `id`
85
+ # @return [Google::Apis::AdminReportsV1::Activity::Id]
86
+ attr_accessor :id
87
+
88
+ # IP address of the user doing the action. This is the Internet Protocol (IP)
89
+ # address of the user when logging into G Suite which may or may not reflect the
90
+ # user's physical location. For example, the IP address can be the user's proxy
91
+ # server's address or a virtual private network (VPN) address. The API supports
92
+ # IPv4 and IPv6.
93
+ # Corresponds to the JSON property `ipAddress`
94
+ # @return [String]
95
+ attr_accessor :ip_address
96
+
97
+ # The type of API resource. For an activity report, the value is `audit#activity`
98
+ # .
99
+ # Corresponds to the JSON property `kind`
100
+ # @return [String]
101
+ attr_accessor :kind
102
+
103
+ # This is the domain that is affected by the report's event. For example domain
104
+ # of Admin console or the Drive application's document owner.
105
+ # Corresponds to the JSON property `ownerDomain`
106
+ # @return [String]
107
+ attr_accessor :owner_domain
108
+
109
+ def initialize(**args)
110
+ update!(**args)
111
+ end
112
+
113
+ # Update properties of this object
114
+ def update!(**args)
115
+ @actor = args[:actor] if args.key?(:actor)
116
+ @etag = args[:etag] if args.key?(:etag)
117
+ @events = args[:events] if args.key?(:events)
118
+ @id = args[:id] if args.key?(:id)
119
+ @ip_address = args[:ip_address] if args.key?(:ip_address)
120
+ @kind = args[:kind] if args.key?(:kind)
121
+ @owner_domain = args[:owner_domain] if args.key?(:owner_domain)
122
+ end
123
+
124
+ # User doing the action.
125
+ class Actor
126
+ include Google::Apis::Core::Hashable
127
+
128
+ # The type of actor.
129
+ # Corresponds to the JSON property `callerType`
130
+ # @return [String]
131
+ attr_accessor :caller_type
132
+
133
+ # The primary email address of the actor. May be absent if there is no email
134
+ # address associated with the actor.
135
+ # Corresponds to the JSON property `email`
136
+ # @return [String]
137
+ attr_accessor :email
138
+
139
+ # Only present when `callerType` is `KEY`. Can be the `consumer_key` of the
140
+ # requestor for OAuth 2LO API requests or an identifier for robot accounts.
141
+ # Corresponds to the JSON property `key`
142
+ # @return [String]
143
+ attr_accessor :key
144
+
145
+ # The unique G Suite profile ID of the actor. May be absent if the actor is not
146
+ # a G Suite user.
147
+ # Corresponds to the JSON property `profileId`
148
+ # @return [String]
149
+ attr_accessor :profile_id
150
+
151
+ def initialize(**args)
152
+ update!(**args)
153
+ end
154
+
155
+ # Update properties of this object
156
+ def update!(**args)
157
+ @caller_type = args[:caller_type] if args.key?(:caller_type)
158
+ @email = args[:email] if args.key?(:email)
159
+ @key = args[:key] if args.key?(:key)
160
+ @profile_id = args[:profile_id] if args.key?(:profile_id)
161
+ end
162
+ end
163
+
164
+ #
165
+ class Event
166
+ include Google::Apis::Core::Hashable
167
+
168
+ # Name of the event. This is the specific name of the activity reported by the
169
+ # API. And each `eventName` is related to a specific G Suite service or feature
170
+ # which the API organizes into types of events. For `eventName` request
171
+ # parameters in general: - If no `eventName` is given, the report returns all
172
+ # possible instances of an `eventName`. - When you request an `eventName`, the
173
+ # API's response returns all activities which contain that `eventName`. It is
174
+ # possible that the returned activities will have other `eventName` properties
175
+ # in addition to the one requested. For more information about `eventName`
176
+ # properties, see the list of event names for various applications above in `
177
+ # applicationName`.
178
+ # Corresponds to the JSON property `name`
179
+ # @return [String]
180
+ attr_accessor :name
181
+
182
+ # Parameter value pairs for various applications. For more information about `
183
+ # eventName` parameters, see the list of event names for various applications
184
+ # above in `applicationName`.
185
+ # Corresponds to the JSON property `parameters`
186
+ # @return [Array<Google::Apis::AdminReportsV1::Activity::Event::Parameter>]
187
+ attr_accessor :parameters
188
+
189
+ # Type of event. The G Suite service or feature that an administrator changes is
190
+ # identified in the `type` property which identifies an event using the `
191
+ # eventName` property. For a full list of the API's `type` categories, see the
192
+ # list of event names for various applications above in `applicationName`.
193
+ # Corresponds to the JSON property `type`
194
+ # @return [String]
195
+ attr_accessor :type
196
+
197
+ def initialize(**args)
198
+ update!(**args)
199
+ end
200
+
201
+ # Update properties of this object
202
+ def update!(**args)
203
+ @name = args[:name] if args.key?(:name)
204
+ @parameters = args[:parameters] if args.key?(:parameters)
205
+ @type = args[:type] if args.key?(:type)
206
+ end
207
+
208
+ #
209
+ class Parameter
210
+ include Google::Apis::Core::Hashable
211
+
212
+ # Boolean value of the parameter.
213
+ # Corresponds to the JSON property `boolValue`
214
+ # @return [Boolean]
215
+ attr_accessor :bool_value
216
+ alias_method :bool_value?, :bool_value
217
+
218
+ # Integer value of the parameter.
219
+ # Corresponds to the JSON property `intValue`
220
+ # @return [Fixnum]
221
+ attr_accessor :int_value
222
+
223
+ # Nested parameter value pairs associated with this parameter. Complex value
224
+ # type for a parameter are returned as a list of parameter values. For example,
225
+ # the address parameter may have a value as `[`parameter: [`name: city, value:
226
+ # abc`]`]`
227
+ # Corresponds to the JSON property `messageValue`
228
+ # @return [Google::Apis::AdminReportsV1::Activity::Event::Parameter::MessageValue]
229
+ attr_accessor :message_value
230
+
231
+ # Integer values of the parameter.
232
+ # Corresponds to the JSON property `multiIntValue`
233
+ # @return [Array<Fixnum>]
234
+ attr_accessor :multi_int_value
235
+
236
+ # List of `messageValue` objects.
237
+ # Corresponds to the JSON property `multiMessageValue`
238
+ # @return [Array<Google::Apis::AdminReportsV1::Activity::Event::Parameter::MultiMessageValue>]
239
+ attr_accessor :multi_message_value
240
+
241
+ # String values of the parameter.
242
+ # Corresponds to the JSON property `multiValue`
243
+ # @return [Array<String>]
244
+ attr_accessor :multi_value
245
+
246
+ # The name of the parameter.
247
+ # Corresponds to the JSON property `name`
248
+ # @return [String]
249
+ attr_accessor :name
250
+
251
+ # String value of the parameter.
252
+ # Corresponds to the JSON property `value`
253
+ # @return [String]
254
+ attr_accessor :value
255
+
256
+ def initialize(**args)
257
+ update!(**args)
258
+ end
259
+
260
+ # Update properties of this object
261
+ def update!(**args)
262
+ @bool_value = args[:bool_value] if args.key?(:bool_value)
263
+ @int_value = args[:int_value] if args.key?(:int_value)
264
+ @message_value = args[:message_value] if args.key?(:message_value)
265
+ @multi_int_value = args[:multi_int_value] if args.key?(:multi_int_value)
266
+ @multi_message_value = args[:multi_message_value] if args.key?(:multi_message_value)
267
+ @multi_value = args[:multi_value] if args.key?(:multi_value)
268
+ @name = args[:name] if args.key?(:name)
269
+ @value = args[:value] if args.key?(:value)
270
+ end
271
+
272
+ # Nested parameter value pairs associated with this parameter. Complex value
273
+ # type for a parameter are returned as a list of parameter values. For example,
274
+ # the address parameter may have a value as `[`parameter: [`name: city, value:
275
+ # abc`]`]`
276
+ class MessageValue
277
+ include Google::Apis::Core::Hashable
278
+
279
+ # Parameter values
280
+ # Corresponds to the JSON property `parameter`
281
+ # @return [Array<Google::Apis::AdminReportsV1::NestedParameter>]
282
+ attr_accessor :parameter
283
+
284
+ def initialize(**args)
285
+ update!(**args)
286
+ end
287
+
288
+ # Update properties of this object
289
+ def update!(**args)
290
+ @parameter = args[:parameter] if args.key?(:parameter)
291
+ end
292
+ end
293
+
294
+ #
295
+ class MultiMessageValue
296
+ include Google::Apis::Core::Hashable
297
+
298
+ # Parameter values
299
+ # Corresponds to the JSON property `parameter`
300
+ # @return [Array<Google::Apis::AdminReportsV1::NestedParameter>]
301
+ attr_accessor :parameter
302
+
303
+ def initialize(**args)
304
+ update!(**args)
305
+ end
306
+
307
+ # Update properties of this object
308
+ def update!(**args)
309
+ @parameter = args[:parameter] if args.key?(:parameter)
310
+ end
311
+ end
312
+ end
313
+ end
314
+
315
+ # Unique identifier for each activity record.
316
+ class Id
317
+ include Google::Apis::Core::Hashable
318
+
319
+ # Application name to which the event belongs. For possible values see the list
320
+ # of applications above in `applicationName`.
321
+ # Corresponds to the JSON property `applicationName`
322
+ # @return [String]
323
+ attr_accessor :application_name
324
+
325
+ # The unique identifier for a G suite account.
326
+ # Corresponds to the JSON property `customerId`
327
+ # @return [String]
328
+ attr_accessor :customer_id
329
+
330
+ # Time of occurrence of the activity. This is in UNIX epoch time in seconds.
331
+ # Corresponds to the JSON property `time`
332
+ # @return [DateTime]
333
+ attr_accessor :time
334
+
335
+ # Unique qualifier if multiple events have the same time.
336
+ # Corresponds to the JSON property `uniqueQualifier`
337
+ # @return [Fixnum]
338
+ attr_accessor :unique_qualifier
339
+
340
+ def initialize(**args)
341
+ update!(**args)
342
+ end
343
+
344
+ # Update properties of this object
345
+ def update!(**args)
346
+ @application_name = args[:application_name] if args.key?(:application_name)
347
+ @customer_id = args[:customer_id] if args.key?(:customer_id)
348
+ @time = args[:time] if args.key?(:time)
349
+ @unique_qualifier = args[:unique_qualifier] if args.key?(:unique_qualifier)
350
+ end
351
+ end
352
+ end
353
+
354
+ # A notification channel used to watch for resource changes.
355
+ class Channel
356
+ include Google::Apis::Core::Hashable
357
+
358
+ # The address where notifications are delivered for this channel.
359
+ # Corresponds to the JSON property `address`
360
+ # @return [String]
361
+ attr_accessor :address
362
+
363
+ # Date and time of notification channel expiration, expressed as a Unix
364
+ # timestamp, in milliseconds. Optional.
365
+ # Corresponds to the JSON property `expiration`
366
+ # @return [Fixnum]
367
+ attr_accessor :expiration
368
+
369
+ # A UUID or similar unique string that identifies this channel.
370
+ # Corresponds to the JSON property `id`
371
+ # @return [String]
372
+ attr_accessor :id
373
+
374
+ # Identifies this as a notification channel used to watch for changes to a
375
+ # resource, which is "`api#channel`".
376
+ # Corresponds to the JSON property `kind`
377
+ # @return [String]
378
+ attr_accessor :kind
379
+
380
+ # Additional parameters controlling delivery channel behavior. Optional.
381
+ # Corresponds to the JSON property `params`
382
+ # @return [Hash<String,String>]
383
+ attr_accessor :params
384
+
385
+ # A Boolean value to indicate whether payload is wanted. Optional.
386
+ # Corresponds to the JSON property `payload`
387
+ # @return [Boolean]
388
+ attr_accessor :payload
389
+ alias_method :payload?, :payload
390
+
391
+ # An opaque ID that identifies the resource being watched on this channel.
392
+ # Stable across different API versions.
393
+ # Corresponds to the JSON property `resourceId`
394
+ # @return [String]
395
+ attr_accessor :resource_id
396
+
397
+ # A version-specific identifier for the watched resource.
398
+ # Corresponds to the JSON property `resourceUri`
399
+ # @return [String]
400
+ attr_accessor :resource_uri
401
+
402
+ # An arbitrary string delivered to the target address with each notification
403
+ # delivered over this channel. Optional.
404
+ # Corresponds to the JSON property `token`
405
+ # @return [String]
406
+ attr_accessor :token
407
+
408
+ # The type of delivery mechanism used for this channel. The value should be set
409
+ # to `"web_hook"`.
410
+ # Corresponds to the JSON property `type`
411
+ # @return [String]
412
+ attr_accessor :type
413
+
414
+ def initialize(**args)
415
+ update!(**args)
416
+ end
417
+
418
+ # Update properties of this object
419
+ def update!(**args)
420
+ @address = args[:address] if args.key?(:address)
421
+ @expiration = args[:expiration] if args.key?(:expiration)
422
+ @id = args[:id] if args.key?(:id)
423
+ @kind = args[:kind] if args.key?(:kind)
424
+ @params = args[:params] if args.key?(:params)
425
+ @payload = args[:payload] if args.key?(:payload)
426
+ @resource_id = args[:resource_id] if args.key?(:resource_id)
427
+ @resource_uri = args[:resource_uri] if args.key?(:resource_uri)
428
+ @token = args[:token] if args.key?(:token)
429
+ @type = args[:type] if args.key?(:type)
430
+ end
431
+ end
432
+
433
+ # JSON template for a parameter used in various reports.
434
+ class NestedParameter
435
+ include Google::Apis::Core::Hashable
436
+
437
+ # Boolean value of the parameter.
438
+ # Corresponds to the JSON property `boolValue`
439
+ # @return [Boolean]
440
+ attr_accessor :bool_value
441
+ alias_method :bool_value?, :bool_value
442
+
443
+ # Integer value of the parameter.
444
+ # Corresponds to the JSON property `intValue`
445
+ # @return [Fixnum]
446
+ attr_accessor :int_value
447
+
448
+ # Multiple boolean values of the parameter.
449
+ # Corresponds to the JSON property `multiBoolValue`
450
+ # @return [Array<Boolean>]
451
+ attr_accessor :multi_bool_value
452
+
453
+ # Multiple integer values of the parameter.
454
+ # Corresponds to the JSON property `multiIntValue`
455
+ # @return [Array<Fixnum>]
456
+ attr_accessor :multi_int_value
457
+
458
+ # Multiple string values of the parameter.
459
+ # Corresponds to the JSON property `multiValue`
460
+ # @return [Array<String>]
461
+ attr_accessor :multi_value
462
+
463
+ # The name of the parameter.
464
+ # Corresponds to the JSON property `name`
465
+ # @return [String]
466
+ attr_accessor :name
467
+
468
+ # String value of the parameter.
469
+ # Corresponds to the JSON property `value`
470
+ # @return [String]
471
+ attr_accessor :value
472
+
473
+ def initialize(**args)
474
+ update!(**args)
475
+ end
476
+
477
+ # Update properties of this object
478
+ def update!(**args)
479
+ @bool_value = args[:bool_value] if args.key?(:bool_value)
480
+ @int_value = args[:int_value] if args.key?(:int_value)
481
+ @multi_bool_value = args[:multi_bool_value] if args.key?(:multi_bool_value)
482
+ @multi_int_value = args[:multi_int_value] if args.key?(:multi_int_value)
483
+ @multi_value = args[:multi_value] if args.key?(:multi_value)
484
+ @name = args[:name] if args.key?(:name)
485
+ @value = args[:value] if args.key?(:value)
486
+ end
487
+ end
488
+
489
+ # JSON template for a usage report.
490
+ class UsageReport
491
+ include Google::Apis::Core::Hashable
492
+
493
+ # Output only. The date of the report request.
494
+ # Corresponds to the JSON property `date`
495
+ # @return [String]
496
+ attr_accessor :date
497
+
498
+ # Output only. Information about the type of the item.
499
+ # Corresponds to the JSON property `entity`
500
+ # @return [Google::Apis::AdminReportsV1::UsageReport::Entity]
501
+ attr_accessor :entity
502
+
503
+ # ETag of the resource.
504
+ # Corresponds to the JSON property `etag`
505
+ # @return [String]
506
+ attr_accessor :etag
507
+
508
+ # The type of API resource. For a usage report, the value is `admin#reports#
509
+ # usageReport`.
510
+ # Corresponds to the JSON property `kind`
511
+ # @return [String]
512
+ attr_accessor :kind
513
+
514
+ # Output only. Parameter value pairs for various applications. For the Entity
515
+ # Usage Report parameters and values, see [the Entity Usage parameters reference]
516
+ # (/admin-sdk/reports/v1/reference/usage-ref-appendix-a/entities).
517
+ # Corresponds to the JSON property `parameters`
518
+ # @return [Array<Google::Apis::AdminReportsV1::UsageReport::Parameter>]
519
+ attr_accessor :parameters
520
+
521
+ def initialize(**args)
522
+ update!(**args)
523
+ end
524
+
525
+ # Update properties of this object
526
+ def update!(**args)
527
+ @date = args[:date] if args.key?(:date)
528
+ @entity = args[:entity] if args.key?(:entity)
529
+ @etag = args[:etag] if args.key?(:etag)
530
+ @kind = args[:kind] if args.key?(:kind)
531
+ @parameters = args[:parameters] if args.key?(:parameters)
532
+ end
533
+
534
+ # Output only. Information about the type of the item.
535
+ class Entity
536
+ include Google::Apis::Core::Hashable
537
+
538
+ # Output only. The unique identifier of the customer's account.
539
+ # Corresponds to the JSON property `customerId`
540
+ # @return [String]
541
+ attr_accessor :customer_id
542
+
543
+ # Output only. Object key. Only relevant if entity.type = "OBJECT" Note:
544
+ # external-facing name of report is "Entities" rather than "Objects".
545
+ # Corresponds to the JSON property `entityId`
546
+ # @return [String]
547
+ attr_accessor :entity_id
548
+
549
+ # Output only. The user's immutable G Suite profile identifier.
550
+ # Corresponds to the JSON property `profileId`
551
+ # @return [String]
552
+ attr_accessor :profile_id
553
+
554
+ # Output only. The type of item. The value is `user`.
555
+ # Corresponds to the JSON property `type`
556
+ # @return [String]
557
+ attr_accessor :type
558
+
559
+ # Output only. The user's email address. Only relevant if entity.type = "USER"
560
+ # Corresponds to the JSON property `userEmail`
561
+ # @return [String]
562
+ attr_accessor :user_email
563
+
564
+ def initialize(**args)
565
+ update!(**args)
566
+ end
567
+
568
+ # Update properties of this object
569
+ def update!(**args)
570
+ @customer_id = args[:customer_id] if args.key?(:customer_id)
571
+ @entity_id = args[:entity_id] if args.key?(:entity_id)
572
+ @profile_id = args[:profile_id] if args.key?(:profile_id)
573
+ @type = args[:type] if args.key?(:type)
574
+ @user_email = args[:user_email] if args.key?(:user_email)
575
+ end
576
+ end
577
+
578
+ #
579
+ class Parameter
580
+ include Google::Apis::Core::Hashable
581
+
582
+ # Output only. Boolean value of the parameter.
583
+ # Corresponds to the JSON property `boolValue`
584
+ # @return [Boolean]
585
+ attr_accessor :bool_value
586
+ alias_method :bool_value?, :bool_value
587
+
588
+ # The RFC 3339 formatted value of the parameter, for example 2010-10-28T10:26:35.
589
+ # 000Z.
590
+ # Corresponds to the JSON property `datetimeValue`
591
+ # @return [DateTime]
592
+ attr_accessor :datetime_value
593
+
594
+ # Output only. Integer value of the parameter.
595
+ # Corresponds to the JSON property `intValue`
596
+ # @return [Fixnum]
597
+ attr_accessor :int_value
598
+
599
+ # Output only. Nested message value of the parameter.
600
+ # Corresponds to the JSON property `msgValue`
601
+ # @return [Array<Hash<String,Object>>]
602
+ attr_accessor :msg_value
603
+
604
+ # The name of the parameter. For the User Usage Report parameter names, see the
605
+ # User Usage parameters reference.
606
+ # Corresponds to the JSON property `name`
607
+ # @return [String]
608
+ attr_accessor :name
609
+
610
+ # Output only. String value of the parameter.
611
+ # Corresponds to the JSON property `stringValue`
612
+ # @return [String]
613
+ attr_accessor :string_value
614
+
615
+ def initialize(**args)
616
+ update!(**args)
617
+ end
618
+
619
+ # Update properties of this object
620
+ def update!(**args)
621
+ @bool_value = args[:bool_value] if args.key?(:bool_value)
622
+ @datetime_value = args[:datetime_value] if args.key?(:datetime_value)
623
+ @int_value = args[:int_value] if args.key?(:int_value)
624
+ @msg_value = args[:msg_value] if args.key?(:msg_value)
625
+ @name = args[:name] if args.key?(:name)
626
+ @string_value = args[:string_value] if args.key?(:string_value)
627
+ end
628
+ end
629
+ end
630
+
631
+ #
632
+ class UsageReports
633
+ include Google::Apis::Core::Hashable
634
+
635
+ # ETag of the resource.
636
+ # Corresponds to the JSON property `etag`
637
+ # @return [String]
638
+ attr_accessor :etag
639
+
640
+ # The type of API resource. For a usage report, the value is `admin#reports#
641
+ # usageReports`.
642
+ # Corresponds to the JSON property `kind`
643
+ # @return [String]
644
+ attr_accessor :kind
645
+
646
+ # Token to specify next page. A report with multiple pages has a `nextPageToken`
647
+ # property in the response. For your follow-on requests getting all of the
648
+ # report's pages, enter the `nextPageToken` value in the `pageToken` query
649
+ # string.
650
+ # Corresponds to the JSON property `nextPageToken`
651
+ # @return [String]
652
+ attr_accessor :next_page_token
653
+
654
+ # Various application parameter records.
655
+ # Corresponds to the JSON property `usageReports`
656
+ # @return [Array<Google::Apis::AdminReportsV1::UsageReport>]
657
+ attr_accessor :usage_reports
658
+
659
+ # Warnings, if any.
660
+ # Corresponds to the JSON property `warnings`
661
+ # @return [Array<Google::Apis::AdminReportsV1::UsageReports::Warning>]
662
+ attr_accessor :warnings
663
+
664
+ def initialize(**args)
665
+ update!(**args)
666
+ end
667
+
668
+ # Update properties of this object
669
+ def update!(**args)
670
+ @etag = args[:etag] if args.key?(:etag)
671
+ @kind = args[:kind] if args.key?(:kind)
672
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
673
+ @usage_reports = args[:usage_reports] if args.key?(:usage_reports)
674
+ @warnings = args[:warnings] if args.key?(:warnings)
675
+ end
676
+
677
+ #
678
+ class Warning
679
+ include Google::Apis::Core::Hashable
680
+
681
+ # Machine readable code or warning type. The warning code value is `200`.
682
+ # Corresponds to the JSON property `code`
683
+ # @return [String]
684
+ attr_accessor :code
685
+
686
+ # Key-value pairs to give detailed information on the warning.
687
+ # Corresponds to the JSON property `data`
688
+ # @return [Array<Google::Apis::AdminReportsV1::UsageReports::Warning::Datum>]
689
+ attr_accessor :data
690
+
691
+ # The human readable messages for a warning are: - Data is not available warning
692
+ # - Sorry, data for date yyyy-mm-dd for application "`application name`" is not
693
+ # available. - Partial data is available warning - Data for date yyyy-mm-dd for
694
+ # application "`application name`" is not available right now, please try again
695
+ # after a few hours.
696
+ # Corresponds to the JSON property `message`
697
+ # @return [String]
698
+ attr_accessor :message
699
+
700
+ def initialize(**args)
701
+ update!(**args)
702
+ end
703
+
704
+ # Update properties of this object
705
+ def update!(**args)
706
+ @code = args[:code] if args.key?(:code)
707
+ @data = args[:data] if args.key?(:data)
708
+ @message = args[:message] if args.key?(:message)
709
+ end
710
+
711
+ #
712
+ class Datum
713
+ include Google::Apis::Core::Hashable
714
+
715
+ # Key associated with a key-value pair to give detailed information on the
716
+ # warning.
717
+ # Corresponds to the JSON property `key`
718
+ # @return [String]
719
+ attr_accessor :key
720
+
721
+ # Value associated with a key-value pair to give detailed information on the
722
+ # warning.
723
+ # Corresponds to the JSON property `value`
724
+ # @return [String]
725
+ attr_accessor :value
726
+
727
+ def initialize(**args)
728
+ update!(**args)
729
+ end
730
+
731
+ # Update properties of this object
732
+ def update!(**args)
733
+ @key = args[:key] if args.key?(:key)
734
+ @value = args[:value] if args.key?(:value)
735
+ end
736
+ end
737
+ end
738
+ end
739
+ end
740
+ end
741
+ end