You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

96 regels
2.8 KiB

  1. // Package arrayofmapofstrings provides access to the Example API.
  2. //
  3. // Usage example:
  4. //
  5. // import "google.golang.org/api/arrayofmapofstrings/v1"
  6. // ...
  7. // arrayofmapofstringsService, err := arrayofmapofstrings.New(oauthHttpClient)
  8. package arrayofmapofstrings // import "google.golang.org/api/arrayofmapofstrings/v1"
  9. import (
  10. "bytes"
  11. "encoding/json"
  12. "errors"
  13. "fmt"
  14. context "golang.org/x/net/context"
  15. ctxhttp "golang.org/x/net/context/ctxhttp"
  16. gensupport "google.golang.org/api/gensupport"
  17. googleapi "google.golang.org/api/googleapi"
  18. "io"
  19. "net/http"
  20. "net/url"
  21. "strconv"
  22. "strings"
  23. )
  24. // Always reference these packages, just in case the auto-generated code
  25. // below doesn't.
  26. var _ = bytes.NewBuffer
  27. var _ = strconv.Itoa
  28. var _ = fmt.Sprintf
  29. var _ = json.NewDecoder
  30. var _ = io.Copy
  31. var _ = url.Parse
  32. var _ = gensupport.MarshalJSON
  33. var _ = googleapi.Version
  34. var _ = errors.New
  35. var _ = strings.Replace
  36. var _ = context.Canceled
  37. var _ = ctxhttp.Do
  38. const apiId = "arrayofmapofstrings:v1"
  39. const apiName = "arrayofmapofstrings"
  40. const apiVersion = "v1"
  41. const basePath = "https://www.googleapis.com/discovery/v1/apis"
  42. func New(client *http.Client) (*Service, error) {
  43. if client == nil {
  44. return nil, errors.New("client is nil")
  45. }
  46. s := &Service{client: client, BasePath: basePath}
  47. return s, nil
  48. }
  49. type Service struct {
  50. client *http.Client
  51. BasePath string // API endpoint base URL
  52. UserAgent string // optional additional User-Agent fragment
  53. }
  54. func (s *Service) userAgent() string {
  55. if s.UserAgent == "" {
  56. return googleapi.UserAgent
  57. }
  58. return googleapi.UserAgent + " " + s.UserAgent
  59. }
  60. type Analyze struct {
  61. // Errors: List of errors with the data.
  62. Errors []map[string]Property `json:"errors,omitempty"`
  63. // ForceSendFields is a list of field names (e.g. "Errors") to
  64. // unconditionally include in API requests. By default, fields with
  65. // empty values are omitted from API requests. However, any non-pointer,
  66. // non-interface field appearing in ForceSendFields will be sent to the
  67. // server regardless of whether the field is empty or not. This may be
  68. // used to include empty fields in Patch requests.
  69. ForceSendFields []string `json:"-"`
  70. // NullFields is a list of field names (e.g. "Errors") to include in API
  71. // requests with the JSON null value. By default, fields with empty
  72. // values are omitted from API requests. However, any field with an
  73. // empty value appearing in NullFields will be sent to the server as
  74. // null. It is an error if a field in this list has a non-empty value.
  75. // This may be used to include null fields in Patch requests.
  76. NullFields []string `json:"-"`
  77. }
  78. func (s *Analyze) MarshalJSON() ([]byte, error) {
  79. type NoMethod Analyze
  80. raw := NoMethod(*s)
  81. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  82. }
  83. type Property struct {
  84. }