File: classes.rb

package info (click to toggle)
ruby-google-api-client 0.53.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 75,020 kB
  • sloc: ruby: 626,567; makefile: 4
file content (242 lines) | stat: -rw-r--r-- 10,179 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'

module Google
  module Apis
    module DomainsrdapV1
      
      # Message that represents an arbitrary HTTP body. It should only be used for
      # payload formats that can't be represented as JSON, such as raw binary or an
      # HTML page. This message can be used both in streaming and non-streaming API
      # methods in the request as well as the response. It can be used as a top-level
      # request field, which is convenient if one wants to extract parameters from
      # either the URL or HTTP template into the request fields and also want access
      # to the raw HTTP body. Example: message GetResourceRequest ` // A unique
      # request id. string request_id = 1; // The raw HTTP body is bound to this field.
      # google.api.HttpBody http_body = 2; ` service ResourceService ` rpc
      # GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc
      # UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); ` Example
      # with streaming methods: service CaldavService ` rpc GetCalendar(stream google.
      # api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream
      # google.api.HttpBody) returns (stream google.api.HttpBody); ` Use of this type
      # only changes how the request and response bodies are handled, all other
      # features will continue to work unchanged.
      class HttpBody
        include Google::Apis::Core::Hashable
      
        # The HTTP Content-Type header value specifying the content type of the body.
        # Corresponds to the JSON property `contentType`
        # @return [String]
        attr_accessor :content_type
      
        # The HTTP request/response body as raw binary.
        # Corresponds to the JSON property `data`
        # NOTE: Values are automatically base64 encoded/decoded in the client library.
        # @return [String]
        attr_accessor :data
      
        # Application specific response metadata. Must be set in the first response for
        # streaming APIs.
        # Corresponds to the JSON property `extensions`
        # @return [Array<Hash<String,Object>>]
        attr_accessor :extensions
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @content_type = args[:content_type] if args.key?(:content_type)
          @data = args[:data] if args.key?(:data)
          @extensions = args[:extensions] if args.key?(:extensions)
        end
      end
      
      # Links object defined in [section 4.2 of RFC 7483](https://tools.ietf.org/html/
      # rfc7483#section-4.2).
      class Link
        include Google::Apis::Core::Hashable
      
        # Target URL of a link. Example: "http://example.com/previous".
        # Corresponds to the JSON property `href`
        # @return [String]
        attr_accessor :href
      
        # Language code of a link. Example: "en".
        # Corresponds to the JSON property `hreflang`
        # @return [String]
        attr_accessor :hreflang
      
        # Media type of the link destination. Example: "screen".
        # Corresponds to the JSON property `media`
        # @return [String]
        attr_accessor :media
      
        # Relation type of a link. Example: "previous".
        # Corresponds to the JSON property `rel`
        # @return [String]
        attr_accessor :rel
      
        # Title of this link. Example: "title".
        # Corresponds to the JSON property `title`
        # @return [String]
        attr_accessor :title
      
        # Content type of the link. Example: "application/json".
        # Corresponds to the JSON property `type`
        # @return [String]
        attr_accessor :type
      
        # URL giving context for the link. Example: "http://example.com/current".
        # Corresponds to the JSON property `value`
        # @return [String]
        attr_accessor :value
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @href = args[:href] if args.key?(:href)
          @hreflang = args[:hreflang] if args.key?(:hreflang)
          @media = args[:media] if args.key?(:media)
          @rel = args[:rel] if args.key?(:rel)
          @title = args[:title] if args.key?(:title)
          @type = args[:type] if args.key?(:type)
          @value = args[:value] if args.key?(:value)
        end
      end
      
      # Notices object defined in [section 4.3 of RFC 7483](https://tools.ietf.org/
      # html/rfc7483#section-4.3).
      class Notice
        include Google::Apis::Core::Hashable
      
        # Description of the notice.
        # Corresponds to the JSON property `description`
        # @return [Array<String>]
        attr_accessor :description
      
        # Link to a document containing more information.
        # Corresponds to the JSON property `links`
        # @return [Array<Google::Apis::DomainsrdapV1::Link>]
        attr_accessor :links
      
        # Title of a notice. Example: "Terms of Service".
        # Corresponds to the JSON property `title`
        # @return [String]
        attr_accessor :title
      
        # Type values defined in [section 10.2.1 of RFC 7483](https://tools.ietf.org/
        # html/rfc7483#section-10.2.1) specific to a whole response: "result set
        # truncated due to authorization", "result set truncated due to excessive load",
        # "result set truncated due to unexplainable reasons".
        # Corresponds to the JSON property `type`
        # @return [String]
        attr_accessor :type
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @description = args[:description] if args.key?(:description)
          @links = args[:links] if args.key?(:links)
          @title = args[:title] if args.key?(:title)
          @type = args[:type] if args.key?(:type)
        end
      end
      
      # Response to a general RDAP query.
      class RdapResponse
        include Google::Apis::Core::Hashable
      
        # Error description.
        # Corresponds to the JSON property `description`
        # @return [Array<String>]
        attr_accessor :description
      
        # Error HTTP code. Example: "501".
        # Corresponds to the JSON property `errorCode`
        # @return [Fixnum]
        attr_accessor :error_code
      
        # Message that represents an arbitrary HTTP body. It should only be used for
        # payload formats that can't be represented as JSON, such as raw binary or an
        # HTML page. This message can be used both in streaming and non-streaming API
        # methods in the request as well as the response. It can be used as a top-level
        # request field, which is convenient if one wants to extract parameters from
        # either the URL or HTTP template into the request fields and also want access
        # to the raw HTTP body. Example: message GetResourceRequest ` // A unique
        # request id. string request_id = 1; // The raw HTTP body is bound to this field.
        # google.api.HttpBody http_body = 2; ` service ResourceService ` rpc
        # GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc
        # UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); ` Example
        # with streaming methods: service CaldavService ` rpc GetCalendar(stream google.
        # api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream
        # google.api.HttpBody) returns (stream google.api.HttpBody); ` Use of this type
        # only changes how the request and response bodies are handled, all other
        # features will continue to work unchanged.
        # Corresponds to the JSON property `jsonResponse`
        # @return [Google::Apis::DomainsrdapV1::HttpBody]
        attr_accessor :json_response
      
        # Error language code. Error response info fields are defined in [section 6 of
        # RFC 7483](https://tools.ietf.org/html/rfc7483#section-6).
        # Corresponds to the JSON property `lang`
        # @return [String]
        attr_accessor :lang
      
        # Notices applying to this response.
        # Corresponds to the JSON property `notices`
        # @return [Array<Google::Apis::DomainsrdapV1::Notice>]
        attr_accessor :notices
      
        # RDAP conformance level.
        # Corresponds to the JSON property `rdapConformance`
        # @return [Array<String>]
        attr_accessor :rdap_conformance
      
        # Error title.
        # Corresponds to the JSON property `title`
        # @return [String]
        attr_accessor :title
      
        def initialize(**args)
           update!(**args)
        end
      
        # Update properties of this object
        def update!(**args)
          @description = args[:description] if args.key?(:description)
          @error_code = args[:error_code] if args.key?(:error_code)
          @json_response = args[:json_response] if args.key?(:json_response)
          @lang = args[:lang] if args.key?(:lang)
          @notices = args[:notices] if args.key?(:notices)
          @rdap_conformance = args[:rdap_conformance] if args.key?(:rdap_conformance)
          @title = args[:title] if args.key?(:title)
        end
      end
    end
  end
end