google-cloud-debugger-v2 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +203 -0
  5. data/README.md +75 -0
  6. data/lib/google-cloud-debugger-v2.rb +21 -0
  7. data/lib/google/cloud/debugger/v2.rb +36 -0
  8. data/lib/google/cloud/debugger/v2/controller.rb +67 -0
  9. data/lib/google/cloud/debugger/v2/controller/client.rb +591 -0
  10. data/lib/google/cloud/debugger/v2/controller/credentials.rb +52 -0
  11. data/lib/google/cloud/debugger/v2/debugger.rb +59 -0
  12. data/lib/google/cloud/debugger/v2/debugger/client.rb +742 -0
  13. data/lib/google/cloud/debugger/v2/debugger/credentials.rb +52 -0
  14. data/lib/google/cloud/debugger/v2/version.rb +28 -0
  15. data/lib/google/devtools/clouddebugger/v2/controller_pb.rb +51 -0
  16. data/lib/google/devtools/clouddebugger/v2/controller_services_pb.rb +97 -0
  17. data/lib/google/devtools/clouddebugger/v2/data_pb.rb +109 -0
  18. data/lib/google/devtools/clouddebugger/v2/debugger_pb.rb +78 -0
  19. data/lib/google/devtools/clouddebugger/v2/debugger_services_pb.rb +65 -0
  20. data/lib/google/devtools/source/v1/source_context_pb.rb +91 -0
  21. data/proto_docs/README.md +4 -0
  22. data/proto_docs/google/api/field_behavior.rb +59 -0
  23. data/proto_docs/google/api/resource.rb +247 -0
  24. data/proto_docs/google/devtools/clouddebugger/v2/controller.rb +113 -0
  25. data/proto_docs/google/devtools/clouddebugger/v2/data.rb +486 -0
  26. data/proto_docs/google/devtools/clouddebugger/v2/debugger.rb +185 -0
  27. data/proto_docs/google/devtools/source/v1/source_context.rb +205 -0
  28. data/proto_docs/google/protobuf/empty.rb +36 -0
  29. data/proto_docs/google/protobuf/timestamp.rb +120 -0
  30. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  31. metadata +218 -0
@@ -0,0 +1,185 @@
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 Cloud
22
+ module Debugger
23
+ module V2
24
+ # Request to set a breakpoint
25
+ # @!attribute [rw] debuggee_id
26
+ # @return [::String]
27
+ # Required. ID of the debuggee where the breakpoint is to be set.
28
+ # @!attribute [rw] breakpoint
29
+ # @return [::Google::Cloud::Debugger::V2::Breakpoint]
30
+ # Required. Breakpoint specification to set.
31
+ # The field `location` of the breakpoint must be set.
32
+ # @!attribute [rw] client_version
33
+ # @return [::String]
34
+ # Required. The client version making the call.
35
+ # Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
36
+ class SetBreakpointRequest
37
+ include ::Google::Protobuf::MessageExts
38
+ extend ::Google::Protobuf::MessageExts::ClassMethods
39
+ end
40
+
41
+ # Response for setting a breakpoint.
42
+ # @!attribute [rw] breakpoint
43
+ # @return [::Google::Cloud::Debugger::V2::Breakpoint]
44
+ # Breakpoint resource.
45
+ # The field `id` is guaranteed to be set (in addition to the echoed fileds).
46
+ class SetBreakpointResponse
47
+ include ::Google::Protobuf::MessageExts
48
+ extend ::Google::Protobuf::MessageExts::ClassMethods
49
+ end
50
+
51
+ # Request to get breakpoint information.
52
+ # @!attribute [rw] debuggee_id
53
+ # @return [::String]
54
+ # Required. ID of the debuggee whose breakpoint to get.
55
+ # @!attribute [rw] breakpoint_id
56
+ # @return [::String]
57
+ # Required. ID of the breakpoint to get.
58
+ # @!attribute [rw] client_version
59
+ # @return [::String]
60
+ # Required. The client version making the call.
61
+ # Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
62
+ class GetBreakpointRequest
63
+ include ::Google::Protobuf::MessageExts
64
+ extend ::Google::Protobuf::MessageExts::ClassMethods
65
+ end
66
+
67
+ # Response for getting breakpoint information.
68
+ # @!attribute [rw] breakpoint
69
+ # @return [::Google::Cloud::Debugger::V2::Breakpoint]
70
+ # Complete breakpoint state.
71
+ # The fields `id` and `location` are guaranteed to be set.
72
+ class GetBreakpointResponse
73
+ include ::Google::Protobuf::MessageExts
74
+ extend ::Google::Protobuf::MessageExts::ClassMethods
75
+ end
76
+
77
+ # Request to delete a breakpoint.
78
+ # @!attribute [rw] debuggee_id
79
+ # @return [::String]
80
+ # Required. ID of the debuggee whose breakpoint to delete.
81
+ # @!attribute [rw] breakpoint_id
82
+ # @return [::String]
83
+ # Required. ID of the breakpoint to delete.
84
+ # @!attribute [rw] client_version
85
+ # @return [::String]
86
+ # Required. The client version making the call.
87
+ # Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
88
+ class DeleteBreakpointRequest
89
+ include ::Google::Protobuf::MessageExts
90
+ extend ::Google::Protobuf::MessageExts::ClassMethods
91
+ end
92
+
93
+ # Request to list breakpoints.
94
+ # @!attribute [rw] debuggee_id
95
+ # @return [::String]
96
+ # Required. ID of the debuggee whose breakpoints to list.
97
+ # @!attribute [rw] include_all_users
98
+ # @return [::Boolean]
99
+ # When set to `true`, the response includes the list of breakpoints set by
100
+ # any user. Otherwise, it includes only breakpoints set by the caller.
101
+ # @!attribute [rw] include_inactive
102
+ # @return [::Boolean]
103
+ # When set to `true`, the response includes active and inactive
104
+ # breakpoints. Otherwise, it includes only active breakpoints.
105
+ # @!attribute [rw] action
106
+ # @return [::Google::Cloud::Debugger::V2::ListBreakpointsRequest::BreakpointActionValue]
107
+ # When set, the response includes only breakpoints with the specified action.
108
+ # @!attribute [rw] strip_results
109
+ # @return [::Boolean]
110
+ # This field is deprecated. The following fields are always stripped out of
111
+ # the result: `stack_frames`, `evaluated_expressions` and `variable_table`.
112
+ # @!attribute [rw] wait_token
113
+ # @return [::String]
114
+ # A wait token that, if specified, blocks the call until the breakpoints
115
+ # list has changed, or a server selected timeout has expired. The value
116
+ # should be set from the last response. The error code
117
+ # `google.rpc.Code.ABORTED` (RPC) is returned on wait timeout, which
118
+ # should be called again with the same `wait_token`.
119
+ # @!attribute [rw] client_version
120
+ # @return [::String]
121
+ # Required. The client version making the call.
122
+ # Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
123
+ class ListBreakpointsRequest
124
+ include ::Google::Protobuf::MessageExts
125
+ extend ::Google::Protobuf::MessageExts::ClassMethods
126
+
127
+ # Wrapper message for `Breakpoint.Action`. Defines a filter on the action
128
+ # field of breakpoints.
129
+ # @!attribute [rw] value
130
+ # @return [::Google::Cloud::Debugger::V2::Breakpoint::Action]
131
+ # Only breakpoints with the specified action will pass the filter.
132
+ class BreakpointActionValue
133
+ include ::Google::Protobuf::MessageExts
134
+ extend ::Google::Protobuf::MessageExts::ClassMethods
135
+ end
136
+ end
137
+
138
+ # Response for listing breakpoints.
139
+ # @!attribute [rw] breakpoints
140
+ # @return [::Array<::Google::Cloud::Debugger::V2::Breakpoint>]
141
+ # List of breakpoints matching the request.
142
+ # The fields `id` and `location` are guaranteed to be set on each breakpoint.
143
+ # The fields: `stack_frames`, `evaluated_expressions` and `variable_table`
144
+ # are cleared on each breakpoint regardless of its status.
145
+ # @!attribute [rw] next_wait_token
146
+ # @return [::String]
147
+ # A wait token that can be used in the next call to `list` (REST) or
148
+ # `ListBreakpoints` (RPC) to block until the list of breakpoints has changes.
149
+ class ListBreakpointsResponse
150
+ include ::Google::Protobuf::MessageExts
151
+ extend ::Google::Protobuf::MessageExts::ClassMethods
152
+ end
153
+
154
+ # Request to list debuggees.
155
+ # @!attribute [rw] project
156
+ # @return [::String]
157
+ # Required. Project number of a Google Cloud project whose debuggees to list.
158
+ # @!attribute [rw] include_inactive
159
+ # @return [::Boolean]
160
+ # When set to `true`, the result includes all debuggees. Otherwise, the
161
+ # result includes only debuggees that are active.
162
+ # @!attribute [rw] client_version
163
+ # @return [::String]
164
+ # Required. The client version making the call.
165
+ # Schema: `domain/type/version` (e.g., `google.com/intellij/v1`).
166
+ class ListDebuggeesRequest
167
+ include ::Google::Protobuf::MessageExts
168
+ extend ::Google::Protobuf::MessageExts::ClassMethods
169
+ end
170
+
171
+ # Response for listing debuggees.
172
+ # @!attribute [rw] debuggees
173
+ # @return [::Array<::Google::Cloud::Debugger::V2::Debuggee>]
174
+ # List of debuggees accessible to the calling user.
175
+ # The fields `debuggee.id` and `description` are guaranteed to be set.
176
+ # The `description` field is a human readable field provided by agents and
177
+ # can be displayed to users.
178
+ class ListDebuggeesResponse
179
+ include ::Google::Protobuf::MessageExts
180
+ extend ::Google::Protobuf::MessageExts::ClassMethods
181
+ end
182
+ end
183
+ end
184
+ end
185
+ end
@@ -0,0 +1,205 @@
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 Devtools
22
+ module Source
23
+ module V1
24
+ # A SourceContext is a reference to a tree of files. A SourceContext together
25
+ # with a path point to a unique revision of a single file or directory.
26
+ # @!attribute [rw] cloud_repo
27
+ # @return [::Google::Devtools::Source::V1::CloudRepoSourceContext]
28
+ # A SourceContext referring to a revision in a cloud repo.
29
+ # @!attribute [rw] cloud_workspace
30
+ # @return [::Google::Devtools::Source::V1::CloudWorkspaceSourceContext]
31
+ # A SourceContext referring to a snapshot in a cloud workspace.
32
+ # @!attribute [rw] gerrit
33
+ # @return [::Google::Devtools::Source::V1::GerritSourceContext]
34
+ # A SourceContext referring to a Gerrit project.
35
+ # @!attribute [rw] git
36
+ # @return [::Google::Devtools::Source::V1::GitSourceContext]
37
+ # A SourceContext referring to any third party Git repo (e.g. GitHub).
38
+ class SourceContext
39
+ include ::Google::Protobuf::MessageExts
40
+ extend ::Google::Protobuf::MessageExts::ClassMethods
41
+ end
42
+
43
+ # An ExtendedSourceContext is a SourceContext combined with additional
44
+ # details describing the context.
45
+ # @!attribute [rw] context
46
+ # @return [::Google::Devtools::Source::V1::SourceContext]
47
+ # Any source context.
48
+ # @!attribute [rw] labels
49
+ # @return [::Google::Protobuf::Map{::String => ::String}]
50
+ # Labels with user defined metadata.
51
+ class ExtendedSourceContext
52
+ include ::Google::Protobuf::MessageExts
53
+ extend ::Google::Protobuf::MessageExts::ClassMethods
54
+
55
+ # @!attribute [rw] key
56
+ # @return [::String]
57
+ # @!attribute [rw] value
58
+ # @return [::String]
59
+ class LabelsEntry
60
+ include ::Google::Protobuf::MessageExts
61
+ extend ::Google::Protobuf::MessageExts::ClassMethods
62
+ end
63
+ end
64
+
65
+ # An alias to a repo revision.
66
+ # @!attribute [rw] kind
67
+ # @return [::Google::Devtools::Source::V1::AliasContext::Kind]
68
+ # The alias kind.
69
+ # @!attribute [rw] name
70
+ # @return [::String]
71
+ # The alias name.
72
+ class AliasContext
73
+ include ::Google::Protobuf::MessageExts
74
+ extend ::Google::Protobuf::MessageExts::ClassMethods
75
+
76
+ # The type of an Alias.
77
+ module Kind
78
+ # Do not use.
79
+ ANY = 0
80
+
81
+ # Git tag
82
+ FIXED = 1
83
+
84
+ # Git branch
85
+ MOVABLE = 2
86
+
87
+ # OTHER is used to specify non-standard aliases, those not of the kinds
88
+ # above. For example, if a Git repo has a ref named "refs/foo/bar", it
89
+ # is considered to be of kind OTHER.
90
+ OTHER = 4
91
+ end
92
+ end
93
+
94
+ # A CloudRepoSourceContext denotes a particular revision in a cloud
95
+ # repo (a repo hosted by the Google Cloud Platform).
96
+ # @!attribute [rw] repo_id
97
+ # @return [::Google::Devtools::Source::V1::RepoId]
98
+ # The ID of the repo.
99
+ # @!attribute [rw] revision_id
100
+ # @return [::String]
101
+ # A revision ID.
102
+ # @!attribute [rw] alias_name
103
+ # @return [::String]
104
+ # The name of an alias (branch, tag, etc.).
105
+ # @!attribute [rw] alias_context
106
+ # @return [::Google::Devtools::Source::V1::AliasContext]
107
+ # An alias, which may be a branch or tag.
108
+ class CloudRepoSourceContext
109
+ include ::Google::Protobuf::MessageExts
110
+ extend ::Google::Protobuf::MessageExts::ClassMethods
111
+ end
112
+
113
+ # A CloudWorkspaceSourceContext denotes a workspace at a particular snapshot.
114
+ # @!attribute [rw] workspace_id
115
+ # @return [::Google::Devtools::Source::V1::CloudWorkspaceId]
116
+ # The ID of the workspace.
117
+ # @!attribute [rw] snapshot_id
118
+ # @return [::String]
119
+ # The ID of the snapshot.
120
+ # An empty snapshot_id refers to the most recent snapshot.
121
+ class CloudWorkspaceSourceContext
122
+ include ::Google::Protobuf::MessageExts
123
+ extend ::Google::Protobuf::MessageExts::ClassMethods
124
+ end
125
+
126
+ # A SourceContext referring to a Gerrit project.
127
+ # @!attribute [rw] host_uri
128
+ # @return [::String]
129
+ # The URI of a running Gerrit instance.
130
+ # @!attribute [rw] gerrit_project
131
+ # @return [::String]
132
+ # The full project name within the host. Projects may be nested, so
133
+ # "project/subproject" is a valid project name.
134
+ # The "repo name" is hostURI/project.
135
+ # @!attribute [rw] revision_id
136
+ # @return [::String]
137
+ # A revision (commit) ID.
138
+ # @!attribute [rw] alias_name
139
+ # @return [::String]
140
+ # The name of an alias (branch, tag, etc.).
141
+ # @!attribute [rw] alias_context
142
+ # @return [::Google::Devtools::Source::V1::AliasContext]
143
+ # An alias, which may be a branch or tag.
144
+ class GerritSourceContext
145
+ include ::Google::Protobuf::MessageExts
146
+ extend ::Google::Protobuf::MessageExts::ClassMethods
147
+ end
148
+
149
+ # A GitSourceContext denotes a particular revision in a third party Git
150
+ # repository (e.g. GitHub).
151
+ # @!attribute [rw] url
152
+ # @return [::String]
153
+ # Git repository URL.
154
+ # @!attribute [rw] revision_id
155
+ # @return [::String]
156
+ # Git commit hash.
157
+ # required.
158
+ class GitSourceContext
159
+ include ::Google::Protobuf::MessageExts
160
+ extend ::Google::Protobuf::MessageExts::ClassMethods
161
+ end
162
+
163
+ # A unique identifier for a cloud repo.
164
+ # @!attribute [rw] project_repo_id
165
+ # @return [::Google::Devtools::Source::V1::ProjectRepoId]
166
+ # A combination of a project ID and a repo name.
167
+ # @!attribute [rw] uid
168
+ # @return [::String]
169
+ # A server-assigned, globally unique identifier.
170
+ class RepoId
171
+ include ::Google::Protobuf::MessageExts
172
+ extend ::Google::Protobuf::MessageExts::ClassMethods
173
+ end
174
+
175
+ # Selects a repo using a Google Cloud Platform project ID
176
+ # (e.g. winged-cargo-31) and a repo name within that project.
177
+ # @!attribute [rw] project_id
178
+ # @return [::String]
179
+ # The ID of the project.
180
+ # @!attribute [rw] repo_name
181
+ # @return [::String]
182
+ # The name of the repo. Leave empty for the default repo.
183
+ class ProjectRepoId
184
+ include ::Google::Protobuf::MessageExts
185
+ extend ::Google::Protobuf::MessageExts::ClassMethods
186
+ end
187
+
188
+ # A CloudWorkspaceId is a unique identifier for a cloud workspace.
189
+ # A cloud workspace is a place associated with a repo where modified files
190
+ # can be stored before they are committed.
191
+ # @!attribute [rw] repo_id
192
+ # @return [::Google::Devtools::Source::V1::RepoId]
193
+ # The ID of the repo containing the workspace.
194
+ # @!attribute [rw] name
195
+ # @return [::String]
196
+ # The unique name of the workspace within the repo. This is the name
197
+ # chosen by the client in the Source API's CreateWorkspace method.
198
+ class CloudWorkspaceId
199
+ include ::Google::Protobuf::MessageExts
200
+ extend ::Google::Protobuf::MessageExts::ClassMethods
201
+ end
202
+ end
203
+ end
204
+ end
205
+ end
@@ -0,0 +1,36 @@
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 Protobuf
22
+ # A generic empty message that you can re-use to avoid defining duplicated
23
+ # empty messages in your APIs. A typical example is to use it as the request
24
+ # or the response type of an API method. For instance:
25
+ #
26
+ # service Foo {
27
+ # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
28
+ # }
29
+ #
30
+ # The JSON representation for `Empty` is empty JSON object `{}`.
31
+ class Empty
32
+ include ::Google::Protobuf::MessageExts
33
+ extend ::Google::Protobuf::MessageExts::ClassMethods
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,120 @@
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 Protobuf
22
+ # A Timestamp represents a point in time independent of any time zone or local
23
+ # calendar, encoded as a count of seconds and fractions of seconds at
24
+ # nanosecond resolution. The count is relative to an epoch at UTC midnight on
25
+ # January 1, 1970, in the proleptic Gregorian calendar which extends the
26
+ # Gregorian calendar backwards to year one.
27
+ #
28
+ # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
29
+ # second table is needed for interpretation, using a [24-hour linear
30
+ # smear](https://developers.google.com/time/smear).
31
+ #
32
+ # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
33
+ # restricting to that range, we ensure that we can convert to and from [RFC
34
+ # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
35
+ #
36
+ # # Examples
37
+ #
38
+ # Example 1: Compute Timestamp from POSIX `time()`.
39
+ #
40
+ # Timestamp timestamp;
41
+ # timestamp.set_seconds(time(NULL));
42
+ # timestamp.set_nanos(0);
43
+ #
44
+ # Example 2: Compute Timestamp from POSIX `gettimeofday()`.
45
+ #
46
+ # struct timeval tv;
47
+ # gettimeofday(&tv, NULL);
48
+ #
49
+ # Timestamp timestamp;
50
+ # timestamp.set_seconds(tv.tv_sec);
51
+ # timestamp.set_nanos(tv.tv_usec * 1000);
52
+ #
53
+ # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
54
+ #
55
+ # FILETIME ft;
56
+ # GetSystemTimeAsFileTime(&ft);
57
+ # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
58
+ #
59
+ # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
60
+ # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
61
+ # Timestamp timestamp;
62
+ # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
63
+ # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
64
+ #
65
+ # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
66
+ #
67
+ # long millis = System.currentTimeMillis();
68
+ #
69
+ # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
70
+ # .setNanos((int) ((millis % 1000) * 1000000)).build();
71
+ #
72
+ #
73
+ # Example 5: Compute Timestamp from current time in Python.
74
+ #
75
+ # timestamp = Timestamp()
76
+ # timestamp.GetCurrentTime()
77
+ #
78
+ # # JSON Mapping
79
+ #
80
+ # In JSON format, the Timestamp type is encoded as a string in the
81
+ # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
82
+ # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z"
83
+ # where \\{year} is always expressed using four digits while \\{month}, \\{day},
84
+ # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional
85
+ # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
86
+ # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
87
+ # is required. A proto3 JSON serializer should always use UTC (as indicated by
88
+ # "Z") when printing the Timestamp type and a proto3 JSON parser should be
89
+ # able to accept both UTC and other timezones (as indicated by an offset).
90
+ #
91
+ # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
92
+ # 01:30 UTC on January 15, 2017.
93
+ #
94
+ # In JavaScript, one can convert a Date object to this format using the
95
+ # standard
96
+ # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
97
+ # method. In Python, a standard `datetime.datetime` object can be converted
98
+ # to this format using
99
+ # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
100
+ # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
101
+ # the Joda Time's [`ISODateTimeFormat.dateTime()`](
102
+ # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
103
+ # ) to obtain a formatter capable of generating timestamps in this format.
104
+ # @!attribute [rw] seconds
105
+ # @return [::Integer]
106
+ # Represents seconds of UTC time since Unix epoch
107
+ # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
108
+ # 9999-12-31T23:59:59Z inclusive.
109
+ # @!attribute [rw] nanos
110
+ # @return [::Integer]
111
+ # Non-negative fractions of a second at nanosecond resolution. Negative
112
+ # second values with fractions must still have non-negative nanos values
113
+ # that count forward in time. Must be from 0 to 999,999,999
114
+ # inclusive.
115
+ class Timestamp
116
+ include ::Google::Protobuf::MessageExts
117
+ extend ::Google::Protobuf::MessageExts::ClassMethods
118
+ end
119
+ end
120
+ end