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.
 
 
 

127 lines
4.1 KiB

  1. // Package mapofany provides access to the Example API.
  2. //
  3. // Usage example:
  4. //
  5. // import "google.golang.org/api/mapofany/v1"
  6. // ...
  7. // mapofanyService, err := mapofany.New(oauthHttpClient)
  8. package mapofany // import "google.golang.org/api/mapofany/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 = "mapofany:v1"
  39. const apiName = "mapofany"
  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 JsonValue interface{}
  61. type TableDataInsertAllRequest struct {
  62. // Kind: The resource type of the response.
  63. Kind string `json:"kind,omitempty"`
  64. // Rows: The rows to insert.
  65. Rows []*TableDataInsertAllRequestRows `json:"rows,omitempty"`
  66. // ForceSendFields is a list of field names (e.g. "Kind") to
  67. // unconditionally include in API requests. By default, fields with
  68. // empty values are omitted from API requests. However, any non-pointer,
  69. // non-interface field appearing in ForceSendFields will be sent to the
  70. // server regardless of whether the field is empty or not. This may be
  71. // used to include empty fields in Patch requests.
  72. ForceSendFields []string `json:"-"`
  73. // NullFields is a list of field names (e.g. "Kind") to include in API
  74. // requests with the JSON null value. By default, fields with empty
  75. // values are omitted from API requests. However, any field with an
  76. // empty value appearing in NullFields will be sent to the server as
  77. // null. It is an error if a field in this list has a non-empty value.
  78. // This may be used to include null fields in Patch requests.
  79. NullFields []string `json:"-"`
  80. }
  81. func (s *TableDataInsertAllRequest) MarshalJSON() ([]byte, error) {
  82. type NoMethod TableDataInsertAllRequest
  83. raw := NoMethod(*s)
  84. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  85. }
  86. type TableDataInsertAllRequestRows struct {
  87. // Json: [Required] A JSON object that contains a row of data. The
  88. // object's properties and values must match the destination table's
  89. // schema.
  90. Json map[string]JsonValue `json:"json,omitempty"`
  91. // ForceSendFields is a list of field names (e.g. "Json") to
  92. // unconditionally include in API requests. By default, fields with
  93. // empty values are omitted from API requests. However, any non-pointer,
  94. // non-interface field appearing in ForceSendFields will be sent to the
  95. // server regardless of whether the field is empty or not. This may be
  96. // used to include empty fields in Patch requests.
  97. ForceSendFields []string `json:"-"`
  98. // NullFields is a list of field names (e.g. "Json") to include in API
  99. // requests with the JSON null value. By default, fields with empty
  100. // values are omitted from API requests. However, any field with an
  101. // empty value appearing in NullFields will be sent to the server as
  102. // null. It is an error if a field in this list has a non-empty value.
  103. // This may be used to include null fields in Patch requests.
  104. NullFields []string `json:"-"`
  105. }
  106. func (s *TableDataInsertAllRequestRows) MarshalJSON() ([]byte, error) {
  107. type NoMethod TableDataInsertAllRequestRows
  108. raw := NoMethod(*s)
  109. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  110. }