spectrum-gen.go 87 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182
  1. // Package spectrum provides access to the Google Spectrum Database API.
  2. //
  3. // See http://developers.google.com/spectrum
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/spectrum/v1explorer"
  8. // ...
  9. // spectrumService, err := spectrum.New(oauthHttpClient)
  10. package spectrum // import "google.golang.org/api/spectrum/v1explorer"
  11. import (
  12. "bytes"
  13. "encoding/json"
  14. "errors"
  15. "fmt"
  16. context "golang.org/x/net/context"
  17. ctxhttp "golang.org/x/net/context/ctxhttp"
  18. gensupport "google.golang.org/api/gensupport"
  19. googleapi "google.golang.org/api/googleapi"
  20. "io"
  21. "net/http"
  22. "net/url"
  23. "strconv"
  24. "strings"
  25. )
  26. // Always reference these packages, just in case the auto-generated code
  27. // below doesn't.
  28. var _ = bytes.NewBuffer
  29. var _ = strconv.Itoa
  30. var _ = fmt.Sprintf
  31. var _ = json.NewDecoder
  32. var _ = io.Copy
  33. var _ = url.Parse
  34. var _ = gensupport.MarshalJSON
  35. var _ = googleapi.Version
  36. var _ = errors.New
  37. var _ = strings.Replace
  38. var _ = context.Canceled
  39. var _ = ctxhttp.Do
  40. const apiId = "spectrum:v1explorer"
  41. const apiName = "spectrum"
  42. const apiVersion = "v1explorer"
  43. const basePath = "https://www.googleapis.com/spectrum/v1explorer/paws/"
  44. func New(client *http.Client) (*Service, error) {
  45. if client == nil {
  46. return nil, errors.New("client is nil")
  47. }
  48. s := &Service{client: client, BasePath: basePath}
  49. s.Paws = NewPawsService(s)
  50. return s, nil
  51. }
  52. type Service struct {
  53. client *http.Client
  54. BasePath string // API endpoint base URL
  55. UserAgent string // optional additional User-Agent fragment
  56. Paws *PawsService
  57. }
  58. func (s *Service) userAgent() string {
  59. if s.UserAgent == "" {
  60. return googleapi.UserAgent
  61. }
  62. return googleapi.UserAgent + " " + s.UserAgent
  63. }
  64. func NewPawsService(s *Service) *PawsService {
  65. rs := &PawsService{s: s}
  66. return rs
  67. }
  68. type PawsService struct {
  69. s *Service
  70. }
  71. // AntennaCharacteristics: Antenna characteristics provide additional
  72. // information, such as the antenna height, antenna type, etc. Whether
  73. // antenna characteristics must be provided in a request depends on the
  74. // device type and regulatory domain.
  75. type AntennaCharacteristics struct {
  76. // Height: The antenna height in meters. Whether the antenna height is
  77. // required depends on the device type and the regulatory domain. Note
  78. // that the height may be negative.
  79. Height float64 `json:"height,omitempty"`
  80. // HeightType: If the height is required, then the height type (AGL for
  81. // above ground level or AMSL for above mean sea level) is also
  82. // required. The default is AGL.
  83. HeightType string `json:"heightType,omitempty"`
  84. // HeightUncertainty: The height uncertainty in meters. Whether this is
  85. // required depends on the regulatory domain.
  86. HeightUncertainty float64 `json:"heightUncertainty,omitempty"`
  87. // ForceSendFields is a list of field names (e.g. "Height") to
  88. // unconditionally include in API requests. By default, fields with
  89. // empty values are omitted from API requests. However, any non-pointer,
  90. // non-interface field appearing in ForceSendFields will be sent to the
  91. // server regardless of whether the field is empty or not. This may be
  92. // used to include empty fields in Patch requests.
  93. ForceSendFields []string `json:"-"`
  94. }
  95. func (s *AntennaCharacteristics) MarshalJSON() ([]byte, error) {
  96. type noMethod AntennaCharacteristics
  97. raw := noMethod(*s)
  98. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  99. }
  100. // DatabaseSpec: This message contains the name and URI of a database.
  101. type DatabaseSpec struct {
  102. // Name: The display name for a database.
  103. Name string `json:"name,omitempty"`
  104. // Uri: The corresponding URI of the database.
  105. Uri string `json:"uri,omitempty"`
  106. // ForceSendFields is a list of field names (e.g. "Name") to
  107. // unconditionally include in API requests. By default, fields with
  108. // empty values are omitted from API requests. However, any non-pointer,
  109. // non-interface field appearing in ForceSendFields will be sent to the
  110. // server regardless of whether the field is empty or not. This may be
  111. // used to include empty fields in Patch requests.
  112. ForceSendFields []string `json:"-"`
  113. }
  114. func (s *DatabaseSpec) MarshalJSON() ([]byte, error) {
  115. type noMethod DatabaseSpec
  116. raw := noMethod(*s)
  117. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  118. }
  119. // DbUpdateSpec: This message is provided by the database to notify
  120. // devices of an upcoming change to the database URI.
  121. type DbUpdateSpec struct {
  122. // Databases: A required list of one or more databases. A device should
  123. // update its preconfigured list of databases to replace (only) the
  124. // database that provided the response with the specified entries.
  125. Databases []*DatabaseSpec `json:"databases,omitempty"`
  126. // ForceSendFields is a list of field names (e.g. "Databases") to
  127. // unconditionally include in API requests. By default, fields with
  128. // empty values are omitted from API requests. However, any non-pointer,
  129. // non-interface field appearing in ForceSendFields will be sent to the
  130. // server regardless of whether the field is empty or not. This may be
  131. // used to include empty fields in Patch requests.
  132. ForceSendFields []string `json:"-"`
  133. }
  134. func (s *DbUpdateSpec) MarshalJSON() ([]byte, error) {
  135. type noMethod DbUpdateSpec
  136. raw := noMethod(*s)
  137. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  138. }
  139. // DeviceCapabilities: Device capabilities provide additional
  140. // information that may be used by a device to provide additional
  141. // information to the database that may help it to determine available
  142. // spectrum. If the database does not support device capabilities it
  143. // will ignore the parameter altogether.
  144. type DeviceCapabilities struct {
  145. // FrequencyRanges: An optional list of frequency ranges supported by
  146. // the device. Each element must contain start and stop frequencies in
  147. // which the device can operate. Channel identifiers are optional. When
  148. // specified, the database should not return available spectrum that
  149. // falls outside these ranges or channel IDs.
  150. FrequencyRanges []*FrequencyRange `json:"frequencyRanges,omitempty"`
  151. // ForceSendFields is a list of field names (e.g. "FrequencyRanges") to
  152. // unconditionally include in API requests. By default, fields with
  153. // empty values are omitted from API requests. However, any non-pointer,
  154. // non-interface field appearing in ForceSendFields will be sent to the
  155. // server regardless of whether the field is empty or not. This may be
  156. // used to include empty fields in Patch requests.
  157. ForceSendFields []string `json:"-"`
  158. }
  159. func (s *DeviceCapabilities) MarshalJSON() ([]byte, error) {
  160. type noMethod DeviceCapabilities
  161. raw := noMethod(*s)
  162. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  163. }
  164. // DeviceDescriptor: The device descriptor contains parameters that
  165. // identify the specific device, such as its manufacturer serial number,
  166. // regulatory-specific identifier (e.g., FCC ID), and any other device
  167. // characteristics required by regulatory domains.
  168. type DeviceDescriptor struct {
  169. // EtsiEnDeviceCategory: Specifies the ETSI white space device category.
  170. // Valid values are the strings master and slave. This field is
  171. // case-insensitive. Consult the ETSI documentation for details about
  172. // the device types.
  173. EtsiEnDeviceCategory string `json:"etsiEnDeviceCategory,omitempty"`
  174. // EtsiEnDeviceEmissionsClass: Specifies the ETSI white space device
  175. // emissions class. The values are represented by numeric strings, such
  176. // as 1, 2, etc. Consult the ETSI documentation for details about the
  177. // device types.
  178. EtsiEnDeviceEmissionsClass string `json:"etsiEnDeviceEmissionsClass,omitempty"`
  179. // EtsiEnDeviceType: Specifies the ETSI white space device type. Valid
  180. // values are single-letter strings, such as A, B, etc. Consult the ETSI
  181. // documentation for details about the device types.
  182. EtsiEnDeviceType string `json:"etsiEnDeviceType,omitempty"`
  183. // EtsiEnTechnologyId: Specifies the ETSI white space device technology
  184. // identifier. The string value must not exceed 64 characters in length.
  185. // Consult the ETSI documentation for details about the device types.
  186. EtsiEnTechnologyId string `json:"etsiEnTechnologyId,omitempty"`
  187. // FccId: Specifies the device's FCC certification identifier. The value
  188. // is an identifier string whose length should not exceed 32 characters.
  189. // Note that, in practice, a valid FCC ID may be limited to 19
  190. // characters.
  191. FccId string `json:"fccId,omitempty"`
  192. // FccTvbdDeviceType: Specifies the TV Band White Space device type, as
  193. // defined by the FCC. Valid values are FIXED, MODE_1, MODE_2.
  194. FccTvbdDeviceType string `json:"fccTvbdDeviceType,omitempty"`
  195. // ManufacturerId: The manufacturer's ID may be required by the
  196. // regulatory domain. This should represent the name of the device
  197. // manufacturer, should be consistent across all devices from the same
  198. // manufacturer, and should be distinct from that of other
  199. // manufacturers. The string value must not exceed 64 characters in
  200. // length.
  201. ManufacturerId string `json:"manufacturerId,omitempty"`
  202. // ModelId: The device's model ID may be required by the regulatory
  203. // domain. The string value must not exceed 64 characters in length.
  204. ModelId string `json:"modelId,omitempty"`
  205. // RulesetIds: The list of identifiers for rulesets supported by the
  206. // device. A database may require that the device provide this list
  207. // before servicing the device requests. If the database does not
  208. // support any of the rulesets specified in the list, the database may
  209. // refuse to service the device requests. If present, the list must
  210. // contain at least one entry.
  211. //
  212. // For information about the valid requests, see section 9.2 of the PAWS
  213. // specification. Currently, FccTvBandWhiteSpace-2010 is the only
  214. // supported ruleset.
  215. RulesetIds []string `json:"rulesetIds,omitempty"`
  216. // SerialNumber: The manufacturer's device serial number; required by
  217. // the applicable regulatory domain. The length of the value must not
  218. // exceed 64 characters.
  219. SerialNumber string `json:"serialNumber,omitempty"`
  220. // ForceSendFields is a list of field names (e.g.
  221. // "EtsiEnDeviceCategory") to unconditionally include in API requests.
  222. // By default, fields with empty values are omitted from API requests.
  223. // However, any non-pointer, non-interface field appearing in
  224. // ForceSendFields will be sent to the server regardless of whether the
  225. // field is empty or not. This may be used to include empty fields in
  226. // Patch requests.
  227. ForceSendFields []string `json:"-"`
  228. }
  229. func (s *DeviceDescriptor) MarshalJSON() ([]byte, error) {
  230. type noMethod DeviceDescriptor
  231. raw := noMethod(*s)
  232. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  233. }
  234. // DeviceOwner: This parameter contains device-owner information
  235. // required as part of device registration. The regulatory domains may
  236. // require additional parameters.
  237. //
  238. // All contact information must be expressed using the structure defined
  239. // by the vCard format specification. Only the contact fields of vCard
  240. // are supported:
  241. // - fn: Full name of an individual
  242. // - org: Name of the organization
  243. // - adr: Address fields
  244. // - tel: Telephone numbers
  245. // - email: Email addresses
  246. //
  247. // Note that the vCard specification defines maximum lengths for each
  248. // field.
  249. type DeviceOwner struct {
  250. // Operator: The vCard contact information for the device operator is
  251. // optional, but may be required by specific regulatory domains.
  252. Operator *Vcard `json:"operator,omitempty"`
  253. // Owner: The vCard contact information for the individual or business
  254. // that owns the device is required.
  255. Owner *Vcard `json:"owner,omitempty"`
  256. // ForceSendFields is a list of field names (e.g. "Operator") to
  257. // unconditionally include in API requests. By default, fields with
  258. // empty values are omitted from API requests. However, any non-pointer,
  259. // non-interface field appearing in ForceSendFields will be sent to the
  260. // server regardless of whether the field is empty or not. This may be
  261. // used to include empty fields in Patch requests.
  262. ForceSendFields []string `json:"-"`
  263. }
  264. func (s *DeviceOwner) MarshalJSON() ([]byte, error) {
  265. type noMethod DeviceOwner
  266. raw := noMethod(*s)
  267. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  268. }
  269. // DeviceValidity: The device validity element describes whether a
  270. // particular device is valid to operate in the regulatory domain.
  271. type DeviceValidity struct {
  272. // DeviceDesc: The descriptor of the device for which the validity check
  273. // was requested. It will always be present.
  274. DeviceDesc *DeviceDescriptor `json:"deviceDesc,omitempty"`
  275. // IsValid: The validity status: true if the device is valid for
  276. // operation, false otherwise. It will always be present.
  277. IsValid bool `json:"isValid,omitempty"`
  278. // Reason: If the device identifier is not valid, the database may
  279. // include a reason. The reason may be in any language. The length of
  280. // the value should not exceed 128 characters.
  281. Reason string `json:"reason,omitempty"`
  282. // ForceSendFields is a list of field names (e.g. "DeviceDesc") to
  283. // unconditionally include in API requests. By default, fields with
  284. // empty values are omitted from API requests. However, any non-pointer,
  285. // non-interface field appearing in ForceSendFields will be sent to the
  286. // server regardless of whether the field is empty or not. This may be
  287. // used to include empty fields in Patch requests.
  288. ForceSendFields []string `json:"-"`
  289. }
  290. func (s *DeviceValidity) MarshalJSON() ([]byte, error) {
  291. type noMethod DeviceValidity
  292. raw := noMethod(*s)
  293. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  294. }
  295. // EventTime: The start and stop times of an event. This is used to
  296. // indicate the time period for which a spectrum profile is valid.
  297. //
  298. // Both times are expressed using the format, YYYY-MM-DDThh:mm:ssZ, as
  299. // defined in RFC3339. The times must be expressed using UTC.
  300. type EventTime struct {
  301. // StartTime: The inclusive start of the event. It will be present.
  302. StartTime string `json:"startTime,omitempty"`
  303. // StopTime: The exclusive end of the event. It will be present.
  304. StopTime string `json:"stopTime,omitempty"`
  305. // ForceSendFields is a list of field names (e.g. "StartTime") to
  306. // unconditionally include in API requests. By default, fields with
  307. // empty values are omitted from API requests. However, any non-pointer,
  308. // non-interface field appearing in ForceSendFields will be sent to the
  309. // server regardless of whether the field is empty or not. This may be
  310. // used to include empty fields in Patch requests.
  311. ForceSendFields []string `json:"-"`
  312. }
  313. func (s *EventTime) MarshalJSON() ([]byte, error) {
  314. type noMethod EventTime
  315. raw := noMethod(*s)
  316. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  317. }
  318. // FrequencyRange: A specific range of frequencies together with the
  319. // associated maximum power level and channel identifier.
  320. type FrequencyRange struct {
  321. // ChannelId: The database may include a channel identifier, when
  322. // applicable. When it is included, the device should treat it as
  323. // informative. The length of the identifier should not exceed 16
  324. // characters.
  325. ChannelId string `json:"channelId,omitempty"`
  326. // MaxPowerDBm: The maximum total power level (EIRP)—computed over the
  327. // corresponding operating bandwidth—that is permitted within the
  328. // frequency range. Depending on the context in which the
  329. // frequency-range element appears, this value may be required. For
  330. // example, it is required in the available-spectrum response,
  331. // available-spectrum-batch response, and spectrum-use notification
  332. // message, but it should not be present (it is not applicable) when the
  333. // frequency range appears inside a device-capabilities message.
  334. MaxPowerDBm float64 `json:"maxPowerDBm,omitempty"`
  335. // StartHz: The required inclusive start of the frequency range (in
  336. // Hertz).
  337. StartHz float64 `json:"startHz,omitempty"`
  338. // StopHz: The required exclusive end of the frequency range (in Hertz).
  339. StopHz float64 `json:"stopHz,omitempty"`
  340. // ForceSendFields is a list of field names (e.g. "ChannelId") to
  341. // unconditionally include in API requests. By default, fields with
  342. // empty values are omitted from API requests. However, any non-pointer,
  343. // non-interface field appearing in ForceSendFields will be sent to the
  344. // server regardless of whether the field is empty or not. This may be
  345. // used to include empty fields in Patch requests.
  346. ForceSendFields []string `json:"-"`
  347. }
  348. func (s *FrequencyRange) MarshalJSON() ([]byte, error) {
  349. type noMethod FrequencyRange
  350. raw := noMethod(*s)
  351. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  352. }
  353. // GeoLocation: This parameter is used to specify the geolocation of the
  354. // device.
  355. type GeoLocation struct {
  356. // Confidence: The location confidence level, as an integer percentage,
  357. // may be required, depending on the regulatory domain. When the
  358. // parameter is optional and not provided, its value is assumed to be
  359. // 95. Valid values range from 0 to 99, since, in practice, 100-percent
  360. // confidence is not achievable. The confidence value is meaningful only
  361. // when geolocation refers to a point with uncertainty.
  362. Confidence int64 `json:"confidence,omitempty"`
  363. // Point: If present, indicates that the geolocation represents a point.
  364. // Paradoxically, a point is parameterized using an ellipse, where the
  365. // center represents the location of the point and the distances along
  366. // the major and minor axes represent the uncertainty. The uncertainty
  367. // values may be required, depending on the regulatory domain.
  368. Point *GeoLocationEllipse `json:"point,omitempty"`
  369. // Region: If present, indicates that the geolocation represents a
  370. // region. Database support for regions is optional.
  371. Region *GeoLocationPolygon `json:"region,omitempty"`
  372. // ForceSendFields is a list of field names (e.g. "Confidence") to
  373. // unconditionally include in API requests. By default, fields with
  374. // empty values are omitted from API requests. However, any non-pointer,
  375. // non-interface field appearing in ForceSendFields will be sent to the
  376. // server regardless of whether the field is empty or not. This may be
  377. // used to include empty fields in Patch requests.
  378. ForceSendFields []string `json:"-"`
  379. }
  380. func (s *GeoLocation) MarshalJSON() ([]byte, error) {
  381. type noMethod GeoLocation
  382. raw := noMethod(*s)
  383. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  384. }
  385. // GeoLocationEllipse: A "point" with uncertainty is represented using
  386. // the Ellipse shape.
  387. type GeoLocationEllipse struct {
  388. // Center: A required geo-spatial point representing the center of the
  389. // ellipse.
  390. Center *GeoLocationPoint `json:"center,omitempty"`
  391. // Orientation: A floating-point number that expresses the orientation
  392. // of the ellipse, representing the rotation, in degrees, of the
  393. // semi-major axis from North towards the East. For example, when the
  394. // uncertainty is greatest along the North-South direction, orientation
  395. // is 0 degrees; conversely, if the uncertainty is greatest along the
  396. // East-West direction, orientation is 90 degrees. When orientation is
  397. // not present, the orientation is assumed to be 0.
  398. Orientation float64 `json:"orientation,omitempty"`
  399. // SemiMajorAxis: A floating-point number that expresses the location
  400. // uncertainty along the major axis of the ellipse. May be required by
  401. // the regulatory domain. When the uncertainty is optional, the default
  402. // value is 0.
  403. SemiMajorAxis float64 `json:"semiMajorAxis,omitempty"`
  404. // SemiMinorAxis: A floating-point number that expresses the location
  405. // uncertainty along the minor axis of the ellipse. May be required by
  406. // the regulatory domain. When the uncertainty is optional, the default
  407. // value is 0.
  408. SemiMinorAxis float64 `json:"semiMinorAxis,omitempty"`
  409. // ForceSendFields is a list of field names (e.g. "Center") to
  410. // unconditionally include in API requests. By default, fields with
  411. // empty values are omitted from API requests. However, any non-pointer,
  412. // non-interface field appearing in ForceSendFields will be sent to the
  413. // server regardless of whether the field is empty or not. This may be
  414. // used to include empty fields in Patch requests.
  415. ForceSendFields []string `json:"-"`
  416. }
  417. func (s *GeoLocationEllipse) MarshalJSON() ([]byte, error) {
  418. type noMethod GeoLocationEllipse
  419. raw := noMethod(*s)
  420. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  421. }
  422. // GeoLocationPoint: A single geolocation on the globe.
  423. type GeoLocationPoint struct {
  424. // Latitude: A required floating-point number that expresses the
  425. // latitude in degrees using the WGS84 datum. For details on this
  426. // encoding, see the National Imagery and Mapping Agency's Technical
  427. // Report TR8350.2.
  428. Latitude float64 `json:"latitude,omitempty"`
  429. // Longitude: A required floating-point number that expresses the
  430. // longitude in degrees using the WGS84 datum. For details on this
  431. // encoding, see the National Imagery and Mapping Agency's Technical
  432. // Report TR8350.2.
  433. Longitude float64 `json:"longitude,omitempty"`
  434. // ForceSendFields is a list of field names (e.g. "Latitude") to
  435. // unconditionally include in API requests. By default, fields with
  436. // empty values are omitted from API requests. However, any non-pointer,
  437. // non-interface field appearing in ForceSendFields will be sent to the
  438. // server regardless of whether the field is empty or not. This may be
  439. // used to include empty fields in Patch requests.
  440. ForceSendFields []string `json:"-"`
  441. }
  442. func (s *GeoLocationPoint) MarshalJSON() ([]byte, error) {
  443. type noMethod GeoLocationPoint
  444. raw := noMethod(*s)
  445. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  446. }
  447. // GeoLocationPolygon: A region is represented using the polygonal
  448. // shape.
  449. type GeoLocationPolygon struct {
  450. // Exterior: When the geolocation describes a region, the exterior field
  451. // refers to a list of latitude/longitude points that represent the
  452. // vertices of a polygon. The first and last points must be the same.
  453. // Thus, a minimum of four points is required. The following polygon
  454. // restrictions from RFC5491 apply:
  455. // - A connecting line shall not cross another connecting line of the
  456. // same polygon.
  457. // - The vertices must be defined in a counterclockwise order.
  458. // - The edges of a polygon are defined by the shortest path between two
  459. // points in space (not a geodesic curve). Consequently, the length
  460. // between two adjacent vertices should be restricted to a maximum of
  461. // 130 km.
  462. // - All vertices are assumed to be at the same altitude.
  463. // - Polygon shapes should be restricted to a maximum of 15 vertices (16
  464. // points that include the repeated vertex).
  465. Exterior []*GeoLocationPoint `json:"exterior,omitempty"`
  466. // ForceSendFields is a list of field names (e.g. "Exterior") to
  467. // unconditionally include in API requests. By default, fields with
  468. // empty values are omitted from API requests. However, any non-pointer,
  469. // non-interface field appearing in ForceSendFields will be sent to the
  470. // server regardless of whether the field is empty or not. This may be
  471. // used to include empty fields in Patch requests.
  472. ForceSendFields []string `json:"-"`
  473. }
  474. func (s *GeoLocationPolygon) MarshalJSON() ([]byte, error) {
  475. type noMethod GeoLocationPolygon
  476. raw := noMethod(*s)
  477. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  478. }
  479. // GeoSpectrumSchedule: The schedule of spectrum profiles available at a
  480. // particular geolocation.
  481. type GeoSpectrumSchedule struct {
  482. // Location: The geolocation identifies the location at which the
  483. // spectrum schedule applies. It will always be present.
  484. Location *GeoLocation `json:"location,omitempty"`
  485. // SpectrumSchedules: A list of available spectrum profiles and
  486. // associated times. It will always be present, and at least one
  487. // schedule must be included (though it may be empty if there is no
  488. // available spectrum). More than one schedule may be included to
  489. // represent future changes to the available spectrum.
  490. SpectrumSchedules []*SpectrumSchedule `json:"spectrumSchedules,omitempty"`
  491. // ForceSendFields is a list of field names (e.g. "Location") to
  492. // unconditionally include in API requests. By default, fields with
  493. // empty values are omitted from API requests. However, any non-pointer,
  494. // non-interface field appearing in ForceSendFields will be sent to the
  495. // server regardless of whether the field is empty or not. This may be
  496. // used to include empty fields in Patch requests.
  497. ForceSendFields []string `json:"-"`
  498. }
  499. func (s *GeoSpectrumSchedule) MarshalJSON() ([]byte, error) {
  500. type noMethod GeoSpectrumSchedule
  501. raw := noMethod(*s)
  502. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  503. }
  504. // PawsGetSpectrumBatchRequest: The request message for a batch
  505. // available spectrum query protocol.
  506. type PawsGetSpectrumBatchRequest struct {
  507. // Antenna: Depending on device type and regulatory domain, antenna
  508. // characteristics may be required.
  509. Antenna *AntennaCharacteristics `json:"antenna,omitempty"`
  510. // Capabilities: The master device may include its device capabilities
  511. // to limit the available-spectrum batch response to the spectrum that
  512. // is compatible with its capabilities. The database should not return
  513. // spectrum that is incompatible with the specified capabilities.
  514. Capabilities *DeviceCapabilities `json:"capabilities,omitempty"`
  515. // DeviceDesc: When the available spectrum request is made on behalf of
  516. // a specific device (a master or slave device), device descriptor
  517. // information for the device on whose behalf the request is made is
  518. // required (in such cases, the requestType parameter must be empty).
  519. // When a requestType value is specified, device descriptor information
  520. // may be optional or required according to the rules of the applicable
  521. // regulatory domain.
  522. DeviceDesc *DeviceDescriptor `json:"deviceDesc,omitempty"`
  523. // Locations: A geolocation list is required. This allows a device to
  524. // specify its current location plus additional anticipated locations
  525. // when allowed by the regulatory domain. At least one location must be
  526. // included. Geolocation must be given as the location of the radiation
  527. // center of the device's antenna. If a location specifies a region,
  528. // rather than a point, the database may return an UNIMPLEMENTED error
  529. // if it does not support query by region.
  530. //
  531. // There is no upper limit on the number of locations included in a
  532. // available spectrum batch request, but the database may restrict the
  533. // number of locations it supports by returning a response with fewer
  534. // locations than specified in the batch request. Note that geolocations
  535. // must be those of the master device (a device with geolocation
  536. // capability that makes an available spectrum batch request), whether
  537. // the master device is making the request on its own behalf or on
  538. // behalf of a slave device (one without geolocation capability).
  539. Locations []*GeoLocation `json:"locations,omitempty"`
  540. // MasterDeviceDesc: When an available spectrum batch request is made by
  541. // the master device (a device with geolocation capability) on behalf of
  542. // a slave device (a device without geolocation capability), the rules
  543. // of the applicable regulatory domain may require the master device to
  544. // provide its own device descriptor information (in addition to device
  545. // descriptor information for the slave device in a separate parameter).
  546. MasterDeviceDesc *DeviceDescriptor `json:"masterDeviceDesc,omitempty"`
  547. // Owner: Depending on device type and regulatory domain, device owner
  548. // information may be included in an available spectrum batch request.
  549. // This allows the device to register and get spectrum-availability
  550. // information in a single request.
  551. Owner *DeviceOwner `json:"owner,omitempty"`
  552. // RequestType: The request type parameter is an optional parameter that
  553. // can be used to modify an available spectrum batch request, but its
  554. // use depends on applicable regulatory rules. For example, It may be
  555. // used to request generic slave device parameters without having to
  556. // specify the device descriptor for a specific device. When the
  557. // requestType parameter is missing, the request is for a specific
  558. // device (master or slave), and the device descriptor parameter for the
  559. // device on whose behalf the batch request is made is required.
  560. RequestType string `json:"requestType,omitempty"`
  561. // Type: The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ,
  562. // ...).
  563. //
  564. // Required field.
  565. Type string `json:"type,omitempty"`
  566. // Version: The PAWS version. Must be exactly 1.0.
  567. //
  568. // Required field.
  569. Version string `json:"version,omitempty"`
  570. // ForceSendFields is a list of field names (e.g. "Antenna") to
  571. // unconditionally include in API requests. By default, fields with
  572. // empty values are omitted from API requests. However, any non-pointer,
  573. // non-interface field appearing in ForceSendFields will be sent to the
  574. // server regardless of whether the field is empty or not. This may be
  575. // used to include empty fields in Patch requests.
  576. ForceSendFields []string `json:"-"`
  577. }
  578. func (s *PawsGetSpectrumBatchRequest) MarshalJSON() ([]byte, error) {
  579. type noMethod PawsGetSpectrumBatchRequest
  580. raw := noMethod(*s)
  581. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  582. }
  583. // PawsGetSpectrumBatchResponse: The response message for the batch
  584. // available spectrum query contains a schedule of available spectrum
  585. // for the device at multiple locations.
  586. type PawsGetSpectrumBatchResponse struct {
  587. // DatabaseChange: A database may include the databaseChange parameter
  588. // to notify a device of a change to its database URI, providing one or
  589. // more alternate database URIs. The device should use this information
  590. // to update its list of pre-configured databases by (only) replacing
  591. // its entry for the responding database with the list of alternate
  592. // URIs.
  593. DatabaseChange *DbUpdateSpec `json:"databaseChange,omitempty"`
  594. // DeviceDesc: The database must return in its available spectrum
  595. // response the device descriptor information it received in the master
  596. // device's available spectrum batch request.
  597. DeviceDesc *DeviceDescriptor `json:"deviceDesc,omitempty"`
  598. // GeoSpectrumSchedules: The available spectrum batch response must
  599. // contain a geo-spectrum schedule list, The list may be empty if
  600. // spectrum is not available. The database may return more than one
  601. // geo-spectrum schedule to represent future changes to the available
  602. // spectrum. How far in advance a schedule may be provided depends upon
  603. // the applicable regulatory domain. The database may return available
  604. // spectrum for fewer geolocations than requested. The device must not
  605. // make assumptions about the order of the entries in the list, and must
  606. // use the geolocation value in each geo-spectrum schedule entry to
  607. // match available spectrum to a location.
  608. GeoSpectrumSchedules []*GeoSpectrumSchedule `json:"geoSpectrumSchedules,omitempty"`
  609. // Kind: Identifies what kind of resource this is. Value: the fixed
  610. // string "spectrum#pawsGetSpectrumBatchResponse".
  611. Kind string `json:"kind,omitempty"`
  612. // MaxContiguousBwHz: The database may return a constraint on the
  613. // allowed maximum contiguous bandwidth (in Hertz). A regulatory domain
  614. // may require the database to return this parameter. When this
  615. // parameter is present in the response, the device must apply this
  616. // constraint to its spectrum-selection logic to ensure that no single
  617. // block of spectrum has bandwidth that exceeds this value.
  618. MaxContiguousBwHz float64 `json:"maxContiguousBwHz,omitempty"`
  619. // MaxTotalBwHz: The database may return a constraint on the allowed
  620. // maximum total bandwidth (in Hertz), which does not need to be
  621. // contiguous. A regulatory domain may require the database to return
  622. // this parameter. When this parameter is present in the available
  623. // spectrum batch response, the device must apply this constraint to its
  624. // spectrum-selection logic to ensure that total bandwidth does not
  625. // exceed this value.
  626. MaxTotalBwHz float64 `json:"maxTotalBwHz,omitempty"`
  627. // NeedsSpectrumReport: For regulatory domains that require a
  628. // spectrum-usage report from devices, the database must return true for
  629. // this parameter if the geo-spectrum schedules list is not empty;
  630. // otherwise, the database should either return false or omit this
  631. // parameter. If this parameter is present and its value is true, the
  632. // device must send a spectrum use notify message to the database;
  633. // otherwise, the device should not send the notification.
  634. NeedsSpectrumReport bool `json:"needsSpectrumReport,omitempty"`
  635. // RulesetInfo: The database should return ruleset information, which
  636. // identifies the applicable regulatory authority and ruleset for the
  637. // available spectrum batch response. If included, the device must use
  638. // the corresponding ruleset to interpret the response. Values provided
  639. // in the returned ruleset information, such as maxLocationChange, take
  640. // precedence over any conflicting values provided in the ruleset
  641. // information returned in a prior initialization response sent by the
  642. // database to the device.
  643. RulesetInfo *RulesetInfo `json:"rulesetInfo,omitempty"`
  644. // Timestamp: The database includes a timestamp of the form,
  645. // YYYY-MM-DDThh:mm:ssZ (Internet timestamp format per RFC3339), in its
  646. // available spectrum batch response. The timestamp should be used by
  647. // the device as a reference for the start and stop times specified in
  648. // the response spectrum schedules.
  649. Timestamp string `json:"timestamp,omitempty"`
  650. // Type: The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ,
  651. // ...).
  652. //
  653. // Required field.
  654. Type string `json:"type,omitempty"`
  655. // Version: The PAWS version. Must be exactly 1.0.
  656. //
  657. // Required field.
  658. Version string `json:"version,omitempty"`
  659. // ServerResponse contains the HTTP response code and headers from the
  660. // server.
  661. googleapi.ServerResponse `json:"-"`
  662. // ForceSendFields is a list of field names (e.g. "DatabaseChange") to
  663. // unconditionally include in API requests. By default, fields with
  664. // empty values are omitted from API requests. However, any non-pointer,
  665. // non-interface field appearing in ForceSendFields will be sent to the
  666. // server regardless of whether the field is empty or not. This may be
  667. // used to include empty fields in Patch requests.
  668. ForceSendFields []string `json:"-"`
  669. }
  670. func (s *PawsGetSpectrumBatchResponse) MarshalJSON() ([]byte, error) {
  671. type noMethod PawsGetSpectrumBatchResponse
  672. raw := noMethod(*s)
  673. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  674. }
  675. // PawsGetSpectrumRequest: The request message for the available
  676. // spectrum query protocol which must include the device's geolocation.
  677. type PawsGetSpectrumRequest struct {
  678. // Antenna: Depending on device type and regulatory domain, the
  679. // characteristics of the antenna may be required.
  680. Antenna *AntennaCharacteristics `json:"antenna,omitempty"`
  681. // Capabilities: The master device may include its device capabilities
  682. // to limit the available-spectrum response to the spectrum that is
  683. // compatible with its capabilities. The database should not return
  684. // spectrum that is incompatible with the specified capabilities.
  685. Capabilities *DeviceCapabilities `json:"capabilities,omitempty"`
  686. // DeviceDesc: When the available spectrum request is made on behalf of
  687. // a specific device (a master or slave device), device descriptor
  688. // information for that device is required (in such cases, the
  689. // requestType parameter must be empty). When a requestType value is
  690. // specified, device descriptor information may be optional or required
  691. // according to the rules of the applicable regulatory domain.
  692. DeviceDesc *DeviceDescriptor `json:"deviceDesc,omitempty"`
  693. // Location: The geolocation of the master device (a device with
  694. // geolocation capability that makes an available spectrum request) is
  695. // required whether the master device is making the request on its own
  696. // behalf or on behalf of a slave device (one without geolocation
  697. // capability). The location must be the location of the radiation
  698. // center of the master device's antenna. To support mobile devices, a
  699. // regulatory domain may allow the anticipated position of the master
  700. // device to be given instead. If the location specifies a region,
  701. // rather than a point, the database may return an UNIMPLEMENTED error
  702. // code if it does not support query by region.
  703. Location *GeoLocation `json:"location,omitempty"`
  704. // MasterDeviceDesc: When an available spectrum request is made by the
  705. // master device (a device with geolocation capability) on behalf of a
  706. // slave device (a device without geolocation capability), the rules of
  707. // the applicable regulatory domain may require the master device to
  708. // provide its own device descriptor information (in addition to device
  709. // descriptor information for the slave device, which is provided in a
  710. // separate parameter).
  711. MasterDeviceDesc *DeviceDescriptor `json:"masterDeviceDesc,omitempty"`
  712. // Owner: Depending on device type and regulatory domain, device owner
  713. // information may be included in an available spectrum request. This
  714. // allows the device to register and get spectrum-availability
  715. // information in a single request.
  716. Owner *DeviceOwner `json:"owner,omitempty"`
  717. // RequestType: The request type parameter is an optional parameter that
  718. // can be used to modify an available spectrum request, but its use
  719. // depends on applicable regulatory rules. It may be used, for example,
  720. // to request generic slave device parameters without having to specify
  721. // the device descriptor for a specific device. When the requestType
  722. // parameter is missing, the request is for a specific device (master or
  723. // slave), and the deviceDesc parameter for the device on whose behalf
  724. // the request is made is required.
  725. RequestType string `json:"requestType,omitempty"`
  726. // Type: The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ,
  727. // ...).
  728. //
  729. // Required field.
  730. Type string `json:"type,omitempty"`
  731. // Version: The PAWS version. Must be exactly 1.0.
  732. //
  733. // Required field.
  734. Version string `json:"version,omitempty"`
  735. // ForceSendFields is a list of field names (e.g. "Antenna") to
  736. // unconditionally include in API requests. By default, fields with
  737. // empty values are omitted from API requests. However, any non-pointer,
  738. // non-interface field appearing in ForceSendFields will be sent to the
  739. // server regardless of whether the field is empty or not. This may be
  740. // used to include empty fields in Patch requests.
  741. ForceSendFields []string `json:"-"`
  742. }
  743. func (s *PawsGetSpectrumRequest) MarshalJSON() ([]byte, error) {
  744. type noMethod PawsGetSpectrumRequest
  745. raw := noMethod(*s)
  746. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  747. }
  748. // PawsGetSpectrumResponse: The response message for the available
  749. // spectrum query which contains a schedule of available spectrum for
  750. // the device.
  751. type PawsGetSpectrumResponse struct {
  752. // DatabaseChange: A database may include the databaseChange parameter
  753. // to notify a device of a change to its database URI, providing one or
  754. // more alternate database URIs. The device should use this information
  755. // to update its list of pre-configured databases by (only) replacing
  756. // its entry for the responding database with the list of alternate
  757. // URIs.
  758. DatabaseChange *DbUpdateSpec `json:"databaseChange,omitempty"`
  759. // DeviceDesc: The database must return, in its available spectrum
  760. // response, the device descriptor information it received in the master
  761. // device's available spectrum request.
  762. DeviceDesc *DeviceDescriptor `json:"deviceDesc,omitempty"`
  763. // Kind: Identifies what kind of resource this is. Value: the fixed
  764. // string "spectrum#pawsGetSpectrumResponse".
  765. Kind string `json:"kind,omitempty"`
  766. // MaxContiguousBwHz: The database may return a constraint on the
  767. // allowed maximum contiguous bandwidth (in Hertz). A regulatory domain
  768. // may require the database to return this parameter. When this
  769. // parameter is present in the response, the device must apply this
  770. // constraint to its spectrum-selection logic to ensure that no single
  771. // block of spectrum has bandwidth that exceeds this value.
  772. MaxContiguousBwHz float64 `json:"maxContiguousBwHz,omitempty"`
  773. // MaxTotalBwHz: The database may return a constraint on the allowed
  774. // maximum total bandwidth (in Hertz), which need not be contiguous. A
  775. // regulatory domain may require the database to return this parameter.
  776. // When this parameter is present in the available spectrum response,
  777. // the device must apply this constraint to its spectrum-selection logic
  778. // to ensure that total bandwidth does not exceed this value.
  779. MaxTotalBwHz float64 `json:"maxTotalBwHz,omitempty"`
  780. // NeedsSpectrumReport: For regulatory domains that require a
  781. // spectrum-usage report from devices, the database must return true for
  782. // this parameter if the spectrum schedule list is not empty; otherwise,
  783. // the database will either return false or omit this parameter. If this
  784. // parameter is present and its value is true, the device must send a
  785. // spectrum use notify message to the database; otherwise, the device
  786. // must not send the notification.
  787. NeedsSpectrumReport bool `json:"needsSpectrumReport,omitempty"`
  788. // RulesetInfo: The database should return ruleset information, which
  789. // identifies the applicable regulatory authority and ruleset for the
  790. // available spectrum response. If included, the device must use the
  791. // corresponding ruleset to interpret the response. Values provided in
  792. // the returned ruleset information, such as maxLocationChange, take
  793. // precedence over any conflicting values provided in the ruleset
  794. // information returned in a prior initialization response sent by the
  795. // database to the device.
  796. RulesetInfo *RulesetInfo `json:"rulesetInfo,omitempty"`
  797. // SpectrumSchedules: The available spectrum response must contain a
  798. // spectrum schedule list. The list may be empty if spectrum is not
  799. // available. The database may return more than one spectrum schedule to
  800. // represent future changes to the available spectrum. How far in
  801. // advance a schedule may be provided depends on the applicable
  802. // regulatory domain.
  803. SpectrumSchedules []*SpectrumSchedule `json:"spectrumSchedules,omitempty"`
  804. // Timestamp: The database includes a timestamp of the form
  805. // YYYY-MM-DDThh:mm:ssZ (Internet timestamp format per RFC3339) in its
  806. // available spectrum response. The timestamp should be used by the
  807. // device as a reference for the start and stop times specified in the
  808. // response spectrum schedules.
  809. Timestamp string `json:"timestamp,omitempty"`
  810. // Type: The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ,
  811. // ...).
  812. //
  813. // Required field.
  814. Type string `json:"type,omitempty"`
  815. // Version: The PAWS version. Must be exactly 1.0.
  816. //
  817. // Required field.
  818. Version string `json:"version,omitempty"`
  819. // ServerResponse contains the HTTP response code and headers from the
  820. // server.
  821. googleapi.ServerResponse `json:"-"`
  822. // ForceSendFields is a list of field names (e.g. "DatabaseChange") to
  823. // unconditionally include in API requests. By default, fields with
  824. // empty values are omitted from API requests. However, any non-pointer,
  825. // non-interface field appearing in ForceSendFields will be sent to the
  826. // server regardless of whether the field is empty or not. This may be
  827. // used to include empty fields in Patch requests.
  828. ForceSendFields []string `json:"-"`
  829. }
  830. func (s *PawsGetSpectrumResponse) MarshalJSON() ([]byte, error) {
  831. type noMethod PawsGetSpectrumResponse
  832. raw := noMethod(*s)
  833. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  834. }
  835. // PawsInitRequest: The initialization request message allows the master
  836. // device to initiate exchange of capabilities with the database.
  837. type PawsInitRequest struct {
  838. // DeviceDesc: The DeviceDescriptor parameter is required. If the
  839. // database does not support the device or any of the rulesets specified
  840. // in the device descriptor, it must return an UNSUPPORTED error code in
  841. // the error response.
  842. DeviceDesc *DeviceDescriptor `json:"deviceDesc,omitempty"`
  843. // Location: A device's geolocation is required.
  844. Location *GeoLocation `json:"location,omitempty"`
  845. // Type: The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ,
  846. // ...).
  847. //
  848. // Required field.
  849. Type string `json:"type,omitempty"`
  850. // Version: The PAWS version. Must be exactly 1.0.
  851. //
  852. // Required field.
  853. Version string `json:"version,omitempty"`
  854. // ForceSendFields is a list of field names (e.g. "DeviceDesc") to
  855. // unconditionally include in API requests. By default, fields with
  856. // empty values are omitted from API requests. However, any non-pointer,
  857. // non-interface field appearing in ForceSendFields will be sent to the
  858. // server regardless of whether the field is empty or not. This may be
  859. // used to include empty fields in Patch requests.
  860. ForceSendFields []string `json:"-"`
  861. }
  862. func (s *PawsInitRequest) MarshalJSON() ([]byte, error) {
  863. type noMethod PawsInitRequest
  864. raw := noMethod(*s)
  865. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  866. }
  867. // PawsInitResponse: The initialization response message communicates
  868. // database parameters to the requesting device.
  869. type PawsInitResponse struct {
  870. // DatabaseChange: A database may include the databaseChange parameter
  871. // to notify a device of a change to its database URI, providing one or
  872. // more alternate database URIs. The device should use this information
  873. // to update its list of pre-configured databases by (only) replacing
  874. // its entry for the responding database with the list of alternate
  875. // URIs.
  876. DatabaseChange *DbUpdateSpec `json:"databaseChange,omitempty"`
  877. // Kind: Identifies what kind of resource this is. Value: the fixed
  878. // string "spectrum#pawsInitResponse".
  879. Kind string `json:"kind,omitempty"`
  880. // RulesetInfo: The rulesetInfo parameter must be included in the
  881. // response. This parameter specifies the regulatory domain and
  882. // parameters applicable to that domain. The database must include the
  883. // authority field, which defines the regulatory domain for the location
  884. // specified in the INIT_REQ message.
  885. RulesetInfo *RulesetInfo `json:"rulesetInfo,omitempty"`
  886. // Type: The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ,
  887. // ...).
  888. //
  889. // Required field.
  890. Type string `json:"type,omitempty"`
  891. // Version: The PAWS version. Must be exactly 1.0.
  892. //
  893. // Required field.
  894. Version string `json:"version,omitempty"`
  895. // ServerResponse contains the HTTP response code and headers from the
  896. // server.
  897. googleapi.ServerResponse `json:"-"`
  898. // ForceSendFields is a list of field names (e.g. "DatabaseChange") to
  899. // unconditionally include in API requests. By default, fields with
  900. // empty values are omitted from API requests. However, any non-pointer,
  901. // non-interface field appearing in ForceSendFields will be sent to the
  902. // server regardless of whether the field is empty or not. This may be
  903. // used to include empty fields in Patch requests.
  904. ForceSendFields []string `json:"-"`
  905. }
  906. func (s *PawsInitResponse) MarshalJSON() ([]byte, error) {
  907. type noMethod PawsInitResponse
  908. raw := noMethod(*s)
  909. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  910. }
  911. // PawsNotifySpectrumUseRequest: The spectrum-use notification message
  912. // which must contain the geolocation of the Device and parameters
  913. // required by the regulatory domain.
  914. type PawsNotifySpectrumUseRequest struct {
  915. // DeviceDesc: Device descriptor information is required in the
  916. // spectrum-use notification message.
  917. DeviceDesc *DeviceDescriptor `json:"deviceDesc,omitempty"`
  918. // Location: The geolocation of the master device (the device that is
  919. // sending the spectrum-use notification) to the database is required in
  920. // the spectrum-use notification message.
  921. Location *GeoLocation `json:"location,omitempty"`
  922. // Spectra: A spectrum list is required in the spectrum-use
  923. // notification. The list specifies the spectrum that the device expects
  924. // to use, which includes frequency ranges and maximum power levels. The
  925. // list may be empty if the device decides not to use any of spectrum.
  926. // For consistency, the psdBandwidthHz value should match that from one
  927. // of the spectrum elements in the corresponding available spectrum
  928. // response previously sent to the device by the database. Note that
  929. // maximum power levels in the spectrum element must be expressed as
  930. // power spectral density over the specified psdBandwidthHz value. The
  931. // actual bandwidth to be used (as computed from the start and stop
  932. // frequencies) may be different from the psdBandwidthHz value. As an
  933. // example, when regulatory rules express maximum power spectral density
  934. // in terms of maximum power over any 100 kHz band, then the
  935. // psdBandwidthHz value should be set to 100 kHz, even though the actual
  936. // bandwidth used can be 20 kHz.
  937. Spectra []*SpectrumMessage `json:"spectra,omitempty"`
  938. // Type: The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ,
  939. // ...).
  940. //
  941. // Required field.
  942. Type string `json:"type,omitempty"`
  943. // Version: The PAWS version. Must be exactly 1.0.
  944. //
  945. // Required field.
  946. Version string `json:"version,omitempty"`
  947. // ForceSendFields is a list of field names (e.g. "DeviceDesc") to
  948. // unconditionally include in API requests. By default, fields with
  949. // empty values are omitted from API requests. However, any non-pointer,
  950. // non-interface field appearing in ForceSendFields will be sent to the
  951. // server regardless of whether the field is empty or not. This may be
  952. // used to include empty fields in Patch requests.
  953. ForceSendFields []string `json:"-"`
  954. }
  955. func (s *PawsNotifySpectrumUseRequest) MarshalJSON() ([]byte, error) {
  956. type noMethod PawsNotifySpectrumUseRequest
  957. raw := noMethod(*s)
  958. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  959. }
  960. // PawsNotifySpectrumUseResponse: An empty response to the notification.
  961. type PawsNotifySpectrumUseResponse struct {
  962. // Kind: Identifies what kind of resource this is. Value: the fixed
  963. // string "spectrum#pawsNotifySpectrumUseResponse".
  964. Kind string `json:"kind,omitempty"`
  965. // Type: The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ,
  966. // ...).
  967. //
  968. // Required field.
  969. Type string `json:"type,omitempty"`
  970. // Version: The PAWS version. Must be exactly 1.0.
  971. //
  972. // Required field.
  973. Version string `json:"version,omitempty"`
  974. // ServerResponse contains the HTTP response code and headers from the
  975. // server.
  976. googleapi.ServerResponse `json:"-"`
  977. // ForceSendFields is a list of field names (e.g. "Kind") to
  978. // unconditionally include in API requests. By default, fields with
  979. // empty values are omitted from API requests. However, any non-pointer,
  980. // non-interface field appearing in ForceSendFields will be sent to the
  981. // server regardless of whether the field is empty or not. This may be
  982. // used to include empty fields in Patch requests.
  983. ForceSendFields []string `json:"-"`
  984. }
  985. func (s *PawsNotifySpectrumUseResponse) MarshalJSON() ([]byte, error) {
  986. type noMethod PawsNotifySpectrumUseResponse
  987. raw := noMethod(*s)
  988. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  989. }
  990. // PawsRegisterRequest: The registration request message contains the
  991. // required registration parameters.
  992. type PawsRegisterRequest struct {
  993. // Antenna: Antenna characteristics, including its height and height
  994. // type.
  995. Antenna *AntennaCharacteristics `json:"antenna,omitempty"`
  996. // DeviceDesc: A DeviceDescriptor is required.
  997. DeviceDesc *DeviceDescriptor `json:"deviceDesc,omitempty"`
  998. // DeviceOwner: Device owner information is required.
  999. DeviceOwner *DeviceOwner `json:"deviceOwner,omitempty"`
  1000. // Location: A device's geolocation is required.
  1001. Location *GeoLocation `json:"location,omitempty"`
  1002. // Type: The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ,
  1003. // ...).
  1004. //
  1005. // Required field.
  1006. Type string `json:"type,omitempty"`
  1007. // Version: The PAWS version. Must be exactly 1.0.
  1008. //
  1009. // Required field.
  1010. Version string `json:"version,omitempty"`
  1011. // ForceSendFields is a list of field names (e.g. "Antenna") to
  1012. // unconditionally include in API requests. By default, fields with
  1013. // empty values are omitted from API requests. However, any non-pointer,
  1014. // non-interface field appearing in ForceSendFields will be sent to the
  1015. // server regardless of whether the field is empty or not. This may be
  1016. // used to include empty fields in Patch requests.
  1017. ForceSendFields []string `json:"-"`
  1018. }
  1019. func (s *PawsRegisterRequest) MarshalJSON() ([]byte, error) {
  1020. type noMethod PawsRegisterRequest
  1021. raw := noMethod(*s)
  1022. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1023. }
  1024. // PawsRegisterResponse: The registration response message simply
  1025. // acknowledges receipt of the request and is otherwise empty.
  1026. type PawsRegisterResponse struct {
  1027. // DatabaseChange: A database may include the databaseChange parameter
  1028. // to notify a device of a change to its database URI, providing one or
  1029. // more alternate database URIs. The device should use this information
  1030. // to update its list of pre-configured databases by (only) replacing
  1031. // its entry for the responding database with the list of alternate
  1032. // URIs.
  1033. DatabaseChange *DbUpdateSpec `json:"databaseChange,omitempty"`
  1034. // Kind: Identifies what kind of resource this is. Value: the fixed
  1035. // string "spectrum#pawsRegisterResponse".
  1036. Kind string `json:"kind,omitempty"`
  1037. // Type: The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ,
  1038. // ...).
  1039. //
  1040. // Required field.
  1041. Type string `json:"type,omitempty"`
  1042. // Version: The PAWS version. Must be exactly 1.0.
  1043. //
  1044. // Required field.
  1045. Version string `json:"version,omitempty"`
  1046. // ServerResponse contains the HTTP response code and headers from the
  1047. // server.
  1048. googleapi.ServerResponse `json:"-"`
  1049. // ForceSendFields is a list of field names (e.g. "DatabaseChange") to
  1050. // unconditionally include in API requests. By default, fields with
  1051. // empty values are omitted from API requests. However, any non-pointer,
  1052. // non-interface field appearing in ForceSendFields will be sent to the
  1053. // server regardless of whether the field is empty or not. This may be
  1054. // used to include empty fields in Patch requests.
  1055. ForceSendFields []string `json:"-"`
  1056. }
  1057. func (s *PawsRegisterResponse) MarshalJSON() ([]byte, error) {
  1058. type noMethod PawsRegisterResponse
  1059. raw := noMethod(*s)
  1060. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1061. }
  1062. // PawsVerifyDeviceRequest: The device validation request message.
  1063. type PawsVerifyDeviceRequest struct {
  1064. // DeviceDescs: A list of device descriptors, which specifies the slave
  1065. // devices to be validated, is required.
  1066. DeviceDescs []*DeviceDescriptor `json:"deviceDescs,omitempty"`
  1067. // Type: The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ,
  1068. // ...).
  1069. //
  1070. // Required field.
  1071. Type string `json:"type,omitempty"`
  1072. // Version: The PAWS version. Must be exactly 1.0.
  1073. //
  1074. // Required field.
  1075. Version string `json:"version,omitempty"`
  1076. // ForceSendFields is a list of field names (e.g. "DeviceDescs") to
  1077. // unconditionally include in API requests. By default, fields with
  1078. // empty values are omitted from API requests. However, any non-pointer,
  1079. // non-interface field appearing in ForceSendFields will be sent to the
  1080. // server regardless of whether the field is empty or not. This may be
  1081. // used to include empty fields in Patch requests.
  1082. ForceSendFields []string `json:"-"`
  1083. }
  1084. func (s *PawsVerifyDeviceRequest) MarshalJSON() ([]byte, error) {
  1085. type noMethod PawsVerifyDeviceRequest
  1086. raw := noMethod(*s)
  1087. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1088. }
  1089. // PawsVerifyDeviceResponse: The device validation response message.
  1090. type PawsVerifyDeviceResponse struct {
  1091. // DatabaseChange: A database may include the databaseChange parameter
  1092. // to notify a device of a change to its database URI, providing one or
  1093. // more alternate database URIs. The device should use this information
  1094. // to update its list of pre-configured databases by (only) replacing
  1095. // its entry for the responding database with the list of alternate
  1096. // URIs.
  1097. DatabaseChange *DbUpdateSpec `json:"databaseChange,omitempty"`
  1098. // DeviceValidities: A device validities list is required in the device
  1099. // validation response to report whether each slave device listed in a
  1100. // previous device validation request is valid. The number of entries
  1101. // must match the number of device descriptors listed in the previous
  1102. // device validation request.
  1103. DeviceValidities []*DeviceValidity `json:"deviceValidities,omitempty"`
  1104. // Kind: Identifies what kind of resource this is. Value: the fixed
  1105. // string "spectrum#pawsVerifyDeviceResponse".
  1106. Kind string `json:"kind,omitempty"`
  1107. // Type: The message type (e.g., INIT_REQ, AVAIL_SPECTRUM_REQ,
  1108. // ...).
  1109. //
  1110. // Required field.
  1111. Type string `json:"type,omitempty"`
  1112. // Version: The PAWS version. Must be exactly 1.0.
  1113. //
  1114. // Required field.
  1115. Version string `json:"version,omitempty"`
  1116. // ServerResponse contains the HTTP response code and headers from the
  1117. // server.
  1118. googleapi.ServerResponse `json:"-"`
  1119. // ForceSendFields is a list of field names (e.g. "DatabaseChange") to
  1120. // unconditionally include in API requests. By default, fields with
  1121. // empty values are omitted from API requests. However, any non-pointer,
  1122. // non-interface field appearing in ForceSendFields will be sent to the
  1123. // server regardless of whether the field is empty or not. This may be
  1124. // used to include empty fields in Patch requests.
  1125. ForceSendFields []string `json:"-"`
  1126. }
  1127. func (s *PawsVerifyDeviceResponse) MarshalJSON() ([]byte, error) {
  1128. type noMethod PawsVerifyDeviceResponse
  1129. raw := noMethod(*s)
  1130. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1131. }
  1132. // RulesetInfo: This contains parameters for the ruleset of a regulatory
  1133. // domain that is communicated using the initialization and
  1134. // available-spectrum processes.
  1135. type RulesetInfo struct {
  1136. // Authority: The regulatory domain to which the ruleset belongs is
  1137. // required. It must be a 2-letter country code. The device should use
  1138. // this to determine additional device behavior required by the
  1139. // associated regulatory domain.
  1140. Authority string `json:"authority,omitempty"`
  1141. // MaxLocationChange: The maximum location change in meters is required
  1142. // in the initialization response, but optional otherwise. When the
  1143. // device changes location by more than this specified distance, it must
  1144. // contact the database to get the available spectrum for the new
  1145. // location. If the device is using spectrum that is no longer
  1146. // available, it must immediately cease use of the spectrum under rules
  1147. // for database-managed spectrum. If this value is provided within the
  1148. // context of an available-spectrum response, it takes precedence over
  1149. // the value within the initialization response.
  1150. MaxLocationChange float64 `json:"maxLocationChange,omitempty"`
  1151. // MaxPollingSecs: The maximum duration, in seconds, between requests
  1152. // for available spectrum. It is required in the initialization
  1153. // response, but optional otherwise. The device must contact the
  1154. // database to get available spectrum no less frequently than this
  1155. // duration. If the new spectrum information indicates that the device
  1156. // is using spectrum that is no longer available, it must immediately
  1157. // cease use of those frequencies under rules for database-managed
  1158. // spectrum. If this value is provided within the context of an
  1159. // available-spectrum response, it takes precedence over the value
  1160. // within the initialization response.
  1161. MaxPollingSecs int64 `json:"maxPollingSecs,omitempty"`
  1162. // RulesetIds: The identifiers of the rulesets supported for the
  1163. // device's location. The database should include at least one
  1164. // applicable ruleset in the initialization response. The device may use
  1165. // the ruleset identifiers to determine parameters to include in
  1166. // subsequent requests. Within the context of the available-spectrum
  1167. // responses, the database should include the identifier of the ruleset
  1168. // that it used to determine the available-spectrum response. If
  1169. // included, the device must use the specified ruleset to interpret the
  1170. // response. If the device does not support the indicated ruleset, it
  1171. // must not operate in the spectrum governed by the ruleset.
  1172. RulesetIds []string `json:"rulesetIds,omitempty"`
  1173. // ForceSendFields is a list of field names (e.g. "Authority") to
  1174. // unconditionally include in API requests. By default, fields with
  1175. // empty values are omitted from API requests. However, any non-pointer,
  1176. // non-interface field appearing in ForceSendFields will be sent to the
  1177. // server regardless of whether the field is empty or not. This may be
  1178. // used to include empty fields in Patch requests.
  1179. ForceSendFields []string `json:"-"`
  1180. }
  1181. func (s *RulesetInfo) MarshalJSON() ([]byte, error) {
  1182. type noMethod RulesetInfo
  1183. raw := noMethod(*s)
  1184. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1185. }
  1186. // SpectrumMessage: Available spectrum can be logically characterized by
  1187. // a list of frequency ranges and permissible power levels for each
  1188. // range.
  1189. type SpectrumMessage struct {
  1190. // Bandwidth: The bandwidth (in Hertz) for which permissible power
  1191. // levels are specified. For example, FCC regulation would require only
  1192. // one spectrum specification at 6MHz bandwidth, but Ofcom regulation
  1193. // would require two specifications, at 0.1MHz and 8MHz. This parameter
  1194. // may be empty if there is no available spectrum. It will be present
  1195. // otherwise.
  1196. Bandwidth float64 `json:"bandwidth,omitempty"`
  1197. // FrequencyRanges: The list of frequency ranges and permissible power
  1198. // levels. The list may be empty if there is no available spectrum,
  1199. // otherwise it will be present.
  1200. FrequencyRanges []*FrequencyRange `json:"frequencyRanges,omitempty"`
  1201. // ForceSendFields is a list of field names (e.g. "Bandwidth") to
  1202. // unconditionally include in API requests. By default, fields with
  1203. // empty values are omitted from API requests. However, any non-pointer,
  1204. // non-interface field appearing in ForceSendFields will be sent to the
  1205. // server regardless of whether the field is empty or not. This may be
  1206. // used to include empty fields in Patch requests.
  1207. ForceSendFields []string `json:"-"`
  1208. }
  1209. func (s *SpectrumMessage) MarshalJSON() ([]byte, error) {
  1210. type noMethod SpectrumMessage
  1211. raw := noMethod(*s)
  1212. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1213. }
  1214. // SpectrumSchedule: The spectrum schedule element combines an event
  1215. // time with spectrum profile to define a time period in which the
  1216. // profile is valid.
  1217. type SpectrumSchedule struct {
  1218. // EventTime: The event time expresses when the spectrum profile is
  1219. // valid. It will always be present.
  1220. EventTime *EventTime `json:"eventTime,omitempty"`
  1221. // Spectra: A list of spectrum messages representing the usable profile.
  1222. // It will always be present, but may be empty when there is no
  1223. // available spectrum.
  1224. Spectra []*SpectrumMessage `json:"spectra,omitempty"`
  1225. // ForceSendFields is a list of field names (e.g. "EventTime") to
  1226. // unconditionally include in API requests. By default, fields with
  1227. // empty values are omitted from API requests. However, any non-pointer,
  1228. // non-interface field appearing in ForceSendFields will be sent to the
  1229. // server regardless of whether the field is empty or not. This may be
  1230. // used to include empty fields in Patch requests.
  1231. ForceSendFields []string `json:"-"`
  1232. }
  1233. func (s *SpectrumSchedule) MarshalJSON() ([]byte, error) {
  1234. type noMethod SpectrumSchedule
  1235. raw := noMethod(*s)
  1236. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1237. }
  1238. // Vcard: A vCard-in-JSON message that contains only the fields needed
  1239. // for PAWS:
  1240. // - fn: Full name of an individual
  1241. // - org: Name of the organization
  1242. // - adr: Address fields
  1243. // - tel: Telephone numbers
  1244. // - email: Email addresses
  1245. type Vcard struct {
  1246. // Adr: The street address of the entity.
  1247. Adr *VcardAddress `json:"adr,omitempty"`
  1248. // Email: An email address that can be used to reach the contact.
  1249. Email *VcardTypedText `json:"email,omitempty"`
  1250. // Fn: The full name of the contact person. For example: John A. Smith.
  1251. Fn string `json:"fn,omitempty"`
  1252. // Org: The organization associated with the registering entity.
  1253. Org *VcardTypedText `json:"org,omitempty"`
  1254. // Tel: A telephone number that can be used to call the contact.
  1255. Tel *VcardTelephone `json:"tel,omitempty"`
  1256. // ForceSendFields is a list of field names (e.g. "Adr") to
  1257. // unconditionally include in API requests. By default, fields with
  1258. // empty values are omitted from API requests. However, any non-pointer,
  1259. // non-interface field appearing in ForceSendFields will be sent to the
  1260. // server regardless of whether the field is empty or not. This may be
  1261. // used to include empty fields in Patch requests.
  1262. ForceSendFields []string `json:"-"`
  1263. }
  1264. func (s *Vcard) MarshalJSON() ([]byte, error) {
  1265. type noMethod Vcard
  1266. raw := noMethod(*s)
  1267. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1268. }
  1269. // VcardAddress: The structure used to represent a street address.
  1270. type VcardAddress struct {
  1271. // Code: The postal code associated with the address. For example:
  1272. // 94423.
  1273. Code string `json:"code,omitempty"`
  1274. // Country: The country name. For example: US.
  1275. Country string `json:"country,omitempty"`
  1276. // Locality: The city or local equivalent portion of the address. For
  1277. // example: San Jose.
  1278. Locality string `json:"locality,omitempty"`
  1279. // Pobox: An optional post office box number.
  1280. Pobox string `json:"pobox,omitempty"`
  1281. // Region: The state or local equivalent portion of the address. For
  1282. // example: CA.
  1283. Region string `json:"region,omitempty"`
  1284. // Street: The street number and name. For example: 123 Any St.
  1285. Street string `json:"street,omitempty"`
  1286. // ForceSendFields is a list of field names (e.g. "Code") to
  1287. // unconditionally include in API requests. By default, fields with
  1288. // empty values are omitted from API requests. However, any non-pointer,
  1289. // non-interface field appearing in ForceSendFields will be sent to the
  1290. // server regardless of whether the field is empty or not. This may be
  1291. // used to include empty fields in Patch requests.
  1292. ForceSendFields []string `json:"-"`
  1293. }
  1294. func (s *VcardAddress) MarshalJSON() ([]byte, error) {
  1295. type noMethod VcardAddress
  1296. raw := noMethod(*s)
  1297. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1298. }
  1299. // VcardTelephone: The structure used to represent a telephone number.
  1300. type VcardTelephone struct {
  1301. // Uri: A nested telephone URI of the form: tel:+1-123-456-7890.
  1302. Uri string `json:"uri,omitempty"`
  1303. // ForceSendFields is a list of field names (e.g. "Uri") to
  1304. // unconditionally include in API requests. By default, fields with
  1305. // empty values are omitted from API requests. However, any non-pointer,
  1306. // non-interface field appearing in ForceSendFields will be sent to the
  1307. // server regardless of whether the field is empty or not. This may be
  1308. // used to include empty fields in Patch requests.
  1309. ForceSendFields []string `json:"-"`
  1310. }
  1311. func (s *VcardTelephone) MarshalJSON() ([]byte, error) {
  1312. type noMethod VcardTelephone
  1313. raw := noMethod(*s)
  1314. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1315. }
  1316. // VcardTypedText: The structure used to represent an organization and
  1317. // an email address.
  1318. type VcardTypedText struct {
  1319. // Text: The text string associated with this item. For example, for an
  1320. // org field: ACME, inc. For an email field: smith@example.com.
  1321. Text string `json:"text,omitempty"`
  1322. // ForceSendFields is a list of field names (e.g. "Text") to
  1323. // unconditionally include in API requests. By default, fields with
  1324. // empty values are omitted from API requests. However, any non-pointer,
  1325. // non-interface field appearing in ForceSendFields will be sent to the
  1326. // server regardless of whether the field is empty or not. This may be
  1327. // used to include empty fields in Patch requests.
  1328. ForceSendFields []string `json:"-"`
  1329. }
  1330. func (s *VcardTypedText) MarshalJSON() ([]byte, error) {
  1331. type noMethod VcardTypedText
  1332. raw := noMethod(*s)
  1333. return gensupport.MarshalJSON(raw, s.ForceSendFields)
  1334. }
  1335. // method id "spectrum.paws.getSpectrum":
  1336. type PawsGetSpectrumCall struct {
  1337. s *Service
  1338. pawsgetspectrumrequest *PawsGetSpectrumRequest
  1339. urlParams_ gensupport.URLParams
  1340. ctx_ context.Context
  1341. }
  1342. // GetSpectrum: Requests information about the available spectrum for a
  1343. // device at a location. Requests from a fixed-mode device must include
  1344. // owner information so the device can be registered with the database.
  1345. func (r *PawsService) GetSpectrum(pawsgetspectrumrequest *PawsGetSpectrumRequest) *PawsGetSpectrumCall {
  1346. c := &PawsGetSpectrumCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1347. c.pawsgetspectrumrequest = pawsgetspectrumrequest
  1348. return c
  1349. }
  1350. // Fields allows partial responses to be retrieved. See
  1351. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1352. // for more information.
  1353. func (c *PawsGetSpectrumCall) Fields(s ...googleapi.Field) *PawsGetSpectrumCall {
  1354. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1355. return c
  1356. }
  1357. // Context sets the context to be used in this call's Do method. Any
  1358. // pending HTTP request will be aborted if the provided context is
  1359. // canceled.
  1360. func (c *PawsGetSpectrumCall) Context(ctx context.Context) *PawsGetSpectrumCall {
  1361. c.ctx_ = ctx
  1362. return c
  1363. }
  1364. func (c *PawsGetSpectrumCall) doRequest(alt string) (*http.Response, error) {
  1365. var body io.Reader = nil
  1366. body, err := googleapi.WithoutDataWrapper.JSONReader(c.pawsgetspectrumrequest)
  1367. if err != nil {
  1368. return nil, err
  1369. }
  1370. ctype := "application/json"
  1371. c.urlParams_.Set("alt", alt)
  1372. urls := googleapi.ResolveRelative(c.s.BasePath, "getSpectrum")
  1373. urls += "?" + c.urlParams_.Encode()
  1374. req, _ := http.NewRequest("POST", urls, body)
  1375. googleapi.SetOpaque(req.URL)
  1376. req.Header.Set("Content-Type", ctype)
  1377. req.Header.Set("User-Agent", c.s.userAgent())
  1378. if c.ctx_ != nil {
  1379. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1380. }
  1381. return c.s.client.Do(req)
  1382. }
  1383. // Do executes the "spectrum.paws.getSpectrum" call.
  1384. // Exactly one of *PawsGetSpectrumResponse or error will be non-nil. Any
  1385. // non-2xx status code is an error. Response headers are in either
  1386. // *PawsGetSpectrumResponse.ServerResponse.Header or (if a response was
  1387. // returned at all) in error.(*googleapi.Error).Header. Use
  1388. // googleapi.IsNotModified to check whether the returned error was
  1389. // because http.StatusNotModified was returned.
  1390. func (c *PawsGetSpectrumCall) Do(opts ...googleapi.CallOption) (*PawsGetSpectrumResponse, error) {
  1391. gensupport.SetOptions(c.urlParams_, opts...)
  1392. res, err := c.doRequest("json")
  1393. if res != nil && res.StatusCode == http.StatusNotModified {
  1394. if res.Body != nil {
  1395. res.Body.Close()
  1396. }
  1397. return nil, &googleapi.Error{
  1398. Code: res.StatusCode,
  1399. Header: res.Header,
  1400. }
  1401. }
  1402. if err != nil {
  1403. return nil, err
  1404. }
  1405. defer googleapi.CloseBody(res)
  1406. if err := googleapi.CheckResponse(res); err != nil {
  1407. return nil, err
  1408. }
  1409. ret := &PawsGetSpectrumResponse{
  1410. ServerResponse: googleapi.ServerResponse{
  1411. Header: res.Header,
  1412. HTTPStatusCode: res.StatusCode,
  1413. },
  1414. }
  1415. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1416. return nil, err
  1417. }
  1418. return ret, nil
  1419. // {
  1420. // "description": "Requests information about the available spectrum for a device at a location. Requests from a fixed-mode device must include owner information so the device can be registered with the database.",
  1421. // "httpMethod": "POST",
  1422. // "id": "spectrum.paws.getSpectrum",
  1423. // "path": "getSpectrum",
  1424. // "request": {
  1425. // "$ref": "PawsGetSpectrumRequest"
  1426. // },
  1427. // "response": {
  1428. // "$ref": "PawsGetSpectrumResponse"
  1429. // }
  1430. // }
  1431. }
  1432. // method id "spectrum.paws.getSpectrumBatch":
  1433. type PawsGetSpectrumBatchCall struct {
  1434. s *Service
  1435. pawsgetspectrumbatchrequest *PawsGetSpectrumBatchRequest
  1436. urlParams_ gensupport.URLParams
  1437. ctx_ context.Context
  1438. }
  1439. // GetSpectrumBatch: The Google Spectrum Database does not support batch
  1440. // requests, so this method always yields an UNIMPLEMENTED error.
  1441. func (r *PawsService) GetSpectrumBatch(pawsgetspectrumbatchrequest *PawsGetSpectrumBatchRequest) *PawsGetSpectrumBatchCall {
  1442. c := &PawsGetSpectrumBatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1443. c.pawsgetspectrumbatchrequest = pawsgetspectrumbatchrequest
  1444. return c
  1445. }
  1446. // Fields allows partial responses to be retrieved. See
  1447. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1448. // for more information.
  1449. func (c *PawsGetSpectrumBatchCall) Fields(s ...googleapi.Field) *PawsGetSpectrumBatchCall {
  1450. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1451. return c
  1452. }
  1453. // Context sets the context to be used in this call's Do method. Any
  1454. // pending HTTP request will be aborted if the provided context is
  1455. // canceled.
  1456. func (c *PawsGetSpectrumBatchCall) Context(ctx context.Context) *PawsGetSpectrumBatchCall {
  1457. c.ctx_ = ctx
  1458. return c
  1459. }
  1460. func (c *PawsGetSpectrumBatchCall) doRequest(alt string) (*http.Response, error) {
  1461. var body io.Reader = nil
  1462. body, err := googleapi.WithoutDataWrapper.JSONReader(c.pawsgetspectrumbatchrequest)
  1463. if err != nil {
  1464. return nil, err
  1465. }
  1466. ctype := "application/json"
  1467. c.urlParams_.Set("alt", alt)
  1468. urls := googleapi.ResolveRelative(c.s.BasePath, "getSpectrumBatch")
  1469. urls += "?" + c.urlParams_.Encode()
  1470. req, _ := http.NewRequest("POST", urls, body)
  1471. googleapi.SetOpaque(req.URL)
  1472. req.Header.Set("Content-Type", ctype)
  1473. req.Header.Set("User-Agent", c.s.userAgent())
  1474. if c.ctx_ != nil {
  1475. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1476. }
  1477. return c.s.client.Do(req)
  1478. }
  1479. // Do executes the "spectrum.paws.getSpectrumBatch" call.
  1480. // Exactly one of *PawsGetSpectrumBatchResponse or error will be
  1481. // non-nil. Any non-2xx status code is an error. Response headers are in
  1482. // either *PawsGetSpectrumBatchResponse.ServerResponse.Header or (if a
  1483. // response was returned at all) in error.(*googleapi.Error).Header. Use
  1484. // googleapi.IsNotModified to check whether the returned error was
  1485. // because http.StatusNotModified was returned.
  1486. func (c *PawsGetSpectrumBatchCall) Do(opts ...googleapi.CallOption) (*PawsGetSpectrumBatchResponse, error) {
  1487. gensupport.SetOptions(c.urlParams_, opts...)
  1488. res, err := c.doRequest("json")
  1489. if res != nil && res.StatusCode == http.StatusNotModified {
  1490. if res.Body != nil {
  1491. res.Body.Close()
  1492. }
  1493. return nil, &googleapi.Error{
  1494. Code: res.StatusCode,
  1495. Header: res.Header,
  1496. }
  1497. }
  1498. if err != nil {
  1499. return nil, err
  1500. }
  1501. defer googleapi.CloseBody(res)
  1502. if err := googleapi.CheckResponse(res); err != nil {
  1503. return nil, err
  1504. }
  1505. ret := &PawsGetSpectrumBatchResponse{
  1506. ServerResponse: googleapi.ServerResponse{
  1507. Header: res.Header,
  1508. HTTPStatusCode: res.StatusCode,
  1509. },
  1510. }
  1511. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1512. return nil, err
  1513. }
  1514. return ret, nil
  1515. // {
  1516. // "description": "The Google Spectrum Database does not support batch requests, so this method always yields an UNIMPLEMENTED error.",
  1517. // "httpMethod": "POST",
  1518. // "id": "spectrum.paws.getSpectrumBatch",
  1519. // "path": "getSpectrumBatch",
  1520. // "request": {
  1521. // "$ref": "PawsGetSpectrumBatchRequest"
  1522. // },
  1523. // "response": {
  1524. // "$ref": "PawsGetSpectrumBatchResponse"
  1525. // }
  1526. // }
  1527. }
  1528. // method id "spectrum.paws.init":
  1529. type PawsInitCall struct {
  1530. s *Service
  1531. pawsinitrequest *PawsInitRequest
  1532. urlParams_ gensupport.URLParams
  1533. ctx_ context.Context
  1534. }
  1535. // Init: Initializes the connection between a white space device and the
  1536. // database.
  1537. func (r *PawsService) Init(pawsinitrequest *PawsInitRequest) *PawsInitCall {
  1538. c := &PawsInitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1539. c.pawsinitrequest = pawsinitrequest
  1540. return c
  1541. }
  1542. // Fields allows partial responses to be retrieved. See
  1543. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1544. // for more information.
  1545. func (c *PawsInitCall) Fields(s ...googleapi.Field) *PawsInitCall {
  1546. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1547. return c
  1548. }
  1549. // Context sets the context to be used in this call's Do method. Any
  1550. // pending HTTP request will be aborted if the provided context is
  1551. // canceled.
  1552. func (c *PawsInitCall) Context(ctx context.Context) *PawsInitCall {
  1553. c.ctx_ = ctx
  1554. return c
  1555. }
  1556. func (c *PawsInitCall) doRequest(alt string) (*http.Response, error) {
  1557. var body io.Reader = nil
  1558. body, err := googleapi.WithoutDataWrapper.JSONReader(c.pawsinitrequest)
  1559. if err != nil {
  1560. return nil, err
  1561. }
  1562. ctype := "application/json"
  1563. c.urlParams_.Set("alt", alt)
  1564. urls := googleapi.ResolveRelative(c.s.BasePath, "init")
  1565. urls += "?" + c.urlParams_.Encode()
  1566. req, _ := http.NewRequest("POST", urls, body)
  1567. googleapi.SetOpaque(req.URL)
  1568. req.Header.Set("Content-Type", ctype)
  1569. req.Header.Set("User-Agent", c.s.userAgent())
  1570. if c.ctx_ != nil {
  1571. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1572. }
  1573. return c.s.client.Do(req)
  1574. }
  1575. // Do executes the "spectrum.paws.init" call.
  1576. // Exactly one of *PawsInitResponse or error will be non-nil. Any
  1577. // non-2xx status code is an error. Response headers are in either
  1578. // *PawsInitResponse.ServerResponse.Header or (if a response was
  1579. // returned at all) in error.(*googleapi.Error).Header. Use
  1580. // googleapi.IsNotModified to check whether the returned error was
  1581. // because http.StatusNotModified was returned.
  1582. func (c *PawsInitCall) Do(opts ...googleapi.CallOption) (*PawsInitResponse, error) {
  1583. gensupport.SetOptions(c.urlParams_, opts...)
  1584. res, err := c.doRequest("json")
  1585. if res != nil && res.StatusCode == http.StatusNotModified {
  1586. if res.Body != nil {
  1587. res.Body.Close()
  1588. }
  1589. return nil, &googleapi.Error{
  1590. Code: res.StatusCode,
  1591. Header: res.Header,
  1592. }
  1593. }
  1594. if err != nil {
  1595. return nil, err
  1596. }
  1597. defer googleapi.CloseBody(res)
  1598. if err := googleapi.CheckResponse(res); err != nil {
  1599. return nil, err
  1600. }
  1601. ret := &PawsInitResponse{
  1602. ServerResponse: googleapi.ServerResponse{
  1603. Header: res.Header,
  1604. HTTPStatusCode: res.StatusCode,
  1605. },
  1606. }
  1607. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1608. return nil, err
  1609. }
  1610. return ret, nil
  1611. // {
  1612. // "description": "Initializes the connection between a white space device and the database.",
  1613. // "httpMethod": "POST",
  1614. // "id": "spectrum.paws.init",
  1615. // "path": "init",
  1616. // "request": {
  1617. // "$ref": "PawsInitRequest"
  1618. // },
  1619. // "response": {
  1620. // "$ref": "PawsInitResponse"
  1621. // }
  1622. // }
  1623. }
  1624. // method id "spectrum.paws.notifySpectrumUse":
  1625. type PawsNotifySpectrumUseCall struct {
  1626. s *Service
  1627. pawsnotifyspectrumuserequest *PawsNotifySpectrumUseRequest
  1628. urlParams_ gensupport.URLParams
  1629. ctx_ context.Context
  1630. }
  1631. // NotifySpectrumUse: Notifies the database that the device has selected
  1632. // certain frequency ranges for transmission. Only to be invoked when
  1633. // required by the regulator. The Google Spectrum Database does not
  1634. // operate in domains that require notification, so this always yields
  1635. // an UNIMPLEMENTED error.
  1636. func (r *PawsService) NotifySpectrumUse(pawsnotifyspectrumuserequest *PawsNotifySpectrumUseRequest) *PawsNotifySpectrumUseCall {
  1637. c := &PawsNotifySpectrumUseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1638. c.pawsnotifyspectrumuserequest = pawsnotifyspectrumuserequest
  1639. return c
  1640. }
  1641. // Fields allows partial responses to be retrieved. See
  1642. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1643. // for more information.
  1644. func (c *PawsNotifySpectrumUseCall) Fields(s ...googleapi.Field) *PawsNotifySpectrumUseCall {
  1645. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1646. return c
  1647. }
  1648. // Context sets the context to be used in this call's Do method. Any
  1649. // pending HTTP request will be aborted if the provided context is
  1650. // canceled.
  1651. func (c *PawsNotifySpectrumUseCall) Context(ctx context.Context) *PawsNotifySpectrumUseCall {
  1652. c.ctx_ = ctx
  1653. return c
  1654. }
  1655. func (c *PawsNotifySpectrumUseCall) doRequest(alt string) (*http.Response, error) {
  1656. var body io.Reader = nil
  1657. body, err := googleapi.WithoutDataWrapper.JSONReader(c.pawsnotifyspectrumuserequest)
  1658. if err != nil {
  1659. return nil, err
  1660. }
  1661. ctype := "application/json"
  1662. c.urlParams_.Set("alt", alt)
  1663. urls := googleapi.ResolveRelative(c.s.BasePath, "notifySpectrumUse")
  1664. urls += "?" + c.urlParams_.Encode()
  1665. req, _ := http.NewRequest("POST", urls, body)
  1666. googleapi.SetOpaque(req.URL)
  1667. req.Header.Set("Content-Type", ctype)
  1668. req.Header.Set("User-Agent", c.s.userAgent())
  1669. if c.ctx_ != nil {
  1670. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1671. }
  1672. return c.s.client.Do(req)
  1673. }
  1674. // Do executes the "spectrum.paws.notifySpectrumUse" call.
  1675. // Exactly one of *PawsNotifySpectrumUseResponse or error will be
  1676. // non-nil. Any non-2xx status code is an error. Response headers are in
  1677. // either *PawsNotifySpectrumUseResponse.ServerResponse.Header or (if a
  1678. // response was returned at all) in error.(*googleapi.Error).Header. Use
  1679. // googleapi.IsNotModified to check whether the returned error was
  1680. // because http.StatusNotModified was returned.
  1681. func (c *PawsNotifySpectrumUseCall) Do(opts ...googleapi.CallOption) (*PawsNotifySpectrumUseResponse, error) {
  1682. gensupport.SetOptions(c.urlParams_, opts...)
  1683. res, err := c.doRequest("json")
  1684. if res != nil && res.StatusCode == http.StatusNotModified {
  1685. if res.Body != nil {
  1686. res.Body.Close()
  1687. }
  1688. return nil, &googleapi.Error{
  1689. Code: res.StatusCode,
  1690. Header: res.Header,
  1691. }
  1692. }
  1693. if err != nil {
  1694. return nil, err
  1695. }
  1696. defer googleapi.CloseBody(res)
  1697. if err := googleapi.CheckResponse(res); err != nil {
  1698. return nil, err
  1699. }
  1700. ret := &PawsNotifySpectrumUseResponse{
  1701. ServerResponse: googleapi.ServerResponse{
  1702. Header: res.Header,
  1703. HTTPStatusCode: res.StatusCode,
  1704. },
  1705. }
  1706. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1707. return nil, err
  1708. }
  1709. return ret, nil
  1710. // {
  1711. // "description": "Notifies the database that the device has selected certain frequency ranges for transmission. Only to be invoked when required by the regulator. The Google Spectrum Database does not operate in domains that require notification, so this always yields an UNIMPLEMENTED error.",
  1712. // "httpMethod": "POST",
  1713. // "id": "spectrum.paws.notifySpectrumUse",
  1714. // "path": "notifySpectrumUse",
  1715. // "request": {
  1716. // "$ref": "PawsNotifySpectrumUseRequest"
  1717. // },
  1718. // "response": {
  1719. // "$ref": "PawsNotifySpectrumUseResponse"
  1720. // }
  1721. // }
  1722. }
  1723. // method id "spectrum.paws.register":
  1724. type PawsRegisterCall struct {
  1725. s *Service
  1726. pawsregisterrequest *PawsRegisterRequest
  1727. urlParams_ gensupport.URLParams
  1728. ctx_ context.Context
  1729. }
  1730. // Register: The Google Spectrum Database implements registration in the
  1731. // getSpectrum method. As such this always returns an UNIMPLEMENTED
  1732. // error.
  1733. func (r *PawsService) Register(pawsregisterrequest *PawsRegisterRequest) *PawsRegisterCall {
  1734. c := &PawsRegisterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1735. c.pawsregisterrequest = pawsregisterrequest
  1736. return c
  1737. }
  1738. // Fields allows partial responses to be retrieved. See
  1739. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1740. // for more information.
  1741. func (c *PawsRegisterCall) Fields(s ...googleapi.Field) *PawsRegisterCall {
  1742. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1743. return c
  1744. }
  1745. // Context sets the context to be used in this call's Do method. Any
  1746. // pending HTTP request will be aborted if the provided context is
  1747. // canceled.
  1748. func (c *PawsRegisterCall) Context(ctx context.Context) *PawsRegisterCall {
  1749. c.ctx_ = ctx
  1750. return c
  1751. }
  1752. func (c *PawsRegisterCall) doRequest(alt string) (*http.Response, error) {
  1753. var body io.Reader = nil
  1754. body, err := googleapi.WithoutDataWrapper.JSONReader(c.pawsregisterrequest)
  1755. if err != nil {
  1756. return nil, err
  1757. }
  1758. ctype := "application/json"
  1759. c.urlParams_.Set("alt", alt)
  1760. urls := googleapi.ResolveRelative(c.s.BasePath, "register")
  1761. urls += "?" + c.urlParams_.Encode()
  1762. req, _ := http.NewRequest("POST", urls, body)
  1763. googleapi.SetOpaque(req.URL)
  1764. req.Header.Set("Content-Type", ctype)
  1765. req.Header.Set("User-Agent", c.s.userAgent())
  1766. if c.ctx_ != nil {
  1767. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1768. }
  1769. return c.s.client.Do(req)
  1770. }
  1771. // Do executes the "spectrum.paws.register" call.
  1772. // Exactly one of *PawsRegisterResponse or error will be non-nil. Any
  1773. // non-2xx status code is an error. Response headers are in either
  1774. // *PawsRegisterResponse.ServerResponse.Header or (if a response was
  1775. // returned at all) in error.(*googleapi.Error).Header. Use
  1776. // googleapi.IsNotModified to check whether the returned error was
  1777. // because http.StatusNotModified was returned.
  1778. func (c *PawsRegisterCall) Do(opts ...googleapi.CallOption) (*PawsRegisterResponse, error) {
  1779. gensupport.SetOptions(c.urlParams_, opts...)
  1780. res, err := c.doRequest("json")
  1781. if res != nil && res.StatusCode == http.StatusNotModified {
  1782. if res.Body != nil {
  1783. res.Body.Close()
  1784. }
  1785. return nil, &googleapi.Error{
  1786. Code: res.StatusCode,
  1787. Header: res.Header,
  1788. }
  1789. }
  1790. if err != nil {
  1791. return nil, err
  1792. }
  1793. defer googleapi.CloseBody(res)
  1794. if err := googleapi.CheckResponse(res); err != nil {
  1795. return nil, err
  1796. }
  1797. ret := &PawsRegisterResponse{
  1798. ServerResponse: googleapi.ServerResponse{
  1799. Header: res.Header,
  1800. HTTPStatusCode: res.StatusCode,
  1801. },
  1802. }
  1803. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1804. return nil, err
  1805. }
  1806. return ret, nil
  1807. // {
  1808. // "description": "The Google Spectrum Database implements registration in the getSpectrum method. As such this always returns an UNIMPLEMENTED error.",
  1809. // "httpMethod": "POST",
  1810. // "id": "spectrum.paws.register",
  1811. // "path": "register",
  1812. // "request": {
  1813. // "$ref": "PawsRegisterRequest"
  1814. // },
  1815. // "response": {
  1816. // "$ref": "PawsRegisterResponse"
  1817. // }
  1818. // }
  1819. }
  1820. // method id "spectrum.paws.verifyDevice":
  1821. type PawsVerifyDeviceCall struct {
  1822. s *Service
  1823. pawsverifydevicerequest *PawsVerifyDeviceRequest
  1824. urlParams_ gensupport.URLParams
  1825. ctx_ context.Context
  1826. }
  1827. // VerifyDevice: Validates a device for white space use in accordance
  1828. // with regulatory rules. The Google Spectrum Database does not support
  1829. // master/slave configurations, so this always yields an UNIMPLEMENTED
  1830. // error.
  1831. func (r *PawsService) VerifyDevice(pawsverifydevicerequest *PawsVerifyDeviceRequest) *PawsVerifyDeviceCall {
  1832. c := &PawsVerifyDeviceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1833. c.pawsverifydevicerequest = pawsverifydevicerequest
  1834. return c
  1835. }
  1836. // Fields allows partial responses to be retrieved. See
  1837. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1838. // for more information.
  1839. func (c *PawsVerifyDeviceCall) Fields(s ...googleapi.Field) *PawsVerifyDeviceCall {
  1840. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1841. return c
  1842. }
  1843. // Context sets the context to be used in this call's Do method. Any
  1844. // pending HTTP request will be aborted if the provided context is
  1845. // canceled.
  1846. func (c *PawsVerifyDeviceCall) Context(ctx context.Context) *PawsVerifyDeviceCall {
  1847. c.ctx_ = ctx
  1848. return c
  1849. }
  1850. func (c *PawsVerifyDeviceCall) doRequest(alt string) (*http.Response, error) {
  1851. var body io.Reader = nil
  1852. body, err := googleapi.WithoutDataWrapper.JSONReader(c.pawsverifydevicerequest)
  1853. if err != nil {
  1854. return nil, err
  1855. }
  1856. ctype := "application/json"
  1857. c.urlParams_.Set("alt", alt)
  1858. urls := googleapi.ResolveRelative(c.s.BasePath, "verifyDevice")
  1859. urls += "?" + c.urlParams_.Encode()
  1860. req, _ := http.NewRequest("POST", urls, body)
  1861. googleapi.SetOpaque(req.URL)
  1862. req.Header.Set("Content-Type", ctype)
  1863. req.Header.Set("User-Agent", c.s.userAgent())
  1864. if c.ctx_ != nil {
  1865. return ctxhttp.Do(c.ctx_, c.s.client, req)
  1866. }
  1867. return c.s.client.Do(req)
  1868. }
  1869. // Do executes the "spectrum.paws.verifyDevice" call.
  1870. // Exactly one of *PawsVerifyDeviceResponse or error will be non-nil.
  1871. // Any non-2xx status code is an error. Response headers are in either
  1872. // *PawsVerifyDeviceResponse.ServerResponse.Header or (if a response was
  1873. // returned at all) in error.(*googleapi.Error).Header. Use
  1874. // googleapi.IsNotModified to check whether the returned error was
  1875. // because http.StatusNotModified was returned.
  1876. func (c *PawsVerifyDeviceCall) Do(opts ...googleapi.CallOption) (*PawsVerifyDeviceResponse, error) {
  1877. gensupport.SetOptions(c.urlParams_, opts...)
  1878. res, err := c.doRequest("json")
  1879. if res != nil && res.StatusCode == http.StatusNotModified {
  1880. if res.Body != nil {
  1881. res.Body.Close()
  1882. }
  1883. return nil, &googleapi.Error{
  1884. Code: res.StatusCode,
  1885. Header: res.Header,
  1886. }
  1887. }
  1888. if err != nil {
  1889. return nil, err
  1890. }
  1891. defer googleapi.CloseBody(res)
  1892. if err := googleapi.CheckResponse(res); err != nil {
  1893. return nil, err
  1894. }
  1895. ret := &PawsVerifyDeviceResponse{
  1896. ServerResponse: googleapi.ServerResponse{
  1897. Header: res.Header,
  1898. HTTPStatusCode: res.StatusCode,
  1899. },
  1900. }
  1901. if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
  1902. return nil, err
  1903. }
  1904. return ret, nil
  1905. // {
  1906. // "description": "Validates a device for white space use in accordance with regulatory rules. The Google Spectrum Database does not support master/slave configurations, so this always yields an UNIMPLEMENTED error.",
  1907. // "httpMethod": "POST",
  1908. // "id": "spectrum.paws.verifyDevice",
  1909. // "path": "verifyDevice",
  1910. // "request": {
  1911. // "$ref": "PawsVerifyDeviceRequest"
  1912. // },
  1913. // "response": {
  1914. // "$ref": "PawsVerifyDeviceResponse"
  1915. // }
  1916. // }
  1917. }