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.
 
 
 

100 lines
2.9 KiB

  1. // Package arrayofarray provides access to the Example API.
  2. //
  3. // Usage example:
  4. //
  5. // import "google.golang.org/api/arrayofarray/v1"
  6. // ...
  7. // arrayofarrayService, err := arrayofarray.New(oauthHttpClient)
  8. package arrayofarray // import "google.golang.org/api/arrayofarray/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 = "arrayofarray:v1"
  39. const apiName = "arrayofarray"
  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. // GeoJsonMultiPolygon: Multi Polygon
  61. type GeoJsonMultiPolygon struct {
  62. // Coordinates: Coordinate arrays.
  63. Coordinates [][][][]float64 `json:"coordinates,omitempty"`
  64. // Type: Identifies this object as a multi-polygon.
  65. //
  66. // Possible values:
  67. // "MultiPolygon"
  68. Type string `json:"type,omitempty"`
  69. // ForceSendFields is a list of field names (e.g. "Coordinates") to
  70. // unconditionally include in API requests. By default, fields with
  71. // empty values are omitted from API requests. However, any non-pointer,
  72. // non-interface field appearing in ForceSendFields will be sent to the
  73. // server regardless of whether the field is empty or not. This may be
  74. // used to include empty fields in Patch requests.
  75. ForceSendFields []string `json:"-"`
  76. // NullFields is a list of field names (e.g. "Coordinates") to include
  77. // in API requests with the JSON null value. By default, fields with
  78. // empty values are omitted from API requests. However, any field with
  79. // an empty value appearing in NullFields will be sent to the server as
  80. // null. It is an error if a field in this list has a non-empty value.
  81. // This may be used to include null fields in Patch requests.
  82. NullFields []string `json:"-"`
  83. }
  84. func (s *GeoJsonMultiPolygon) MarshalJSON() ([]byte, error) {
  85. type NoMethod GeoJsonMultiPolygon
  86. raw := NoMethod(*s)
  87. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  88. }