Copyright 2013 Google LLC. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

package googleapi

import (
	
	
	
)
Int64s is a slice of int64s that marshal as quoted strings in JSON.
type Int64s []int64

func ( *Int64s) ( []byte) error {
	* = (*)[:0]
	var  []string
	if  := json.Unmarshal(, &);  != nil {
		return 
	}
	for ,  := range  {
		,  := strconv.ParseInt(, 10, 64)
		if  != nil {
			return 
		}
		* = append(*, int64())
	}
	return nil
}
Int32s is a slice of int32s that marshal as quoted strings in JSON.
type Int32s []int32

func ( *Int32s) ( []byte) error {
	* = (*)[:0]
	var  []string
	if  := json.Unmarshal(, &);  != nil {
		return 
	}
	for ,  := range  {
		,  := strconv.ParseInt(, 10, 32)
		if  != nil {
			return 
		}
		* = append(*, int32())
	}
	return nil
}
Uint64s is a slice of uint64s that marshal as quoted strings in JSON.
type Uint64s []uint64

func ( *Uint64s) ( []byte) error {
	* = (*)[:0]
	var  []string
	if  := json.Unmarshal(, &);  != nil {
		return 
	}
	for ,  := range  {
		,  := strconv.ParseUint(, 10, 64)
		if  != nil {
			return 
		}
		* = append(*, uint64())
	}
	return nil
}
Uint32s is a slice of uint32s that marshal as quoted strings in JSON.
type Uint32s []uint32

func ( *Uint32s) ( []byte) error {
	* = (*)[:0]
	var  []string
	if  := json.Unmarshal(, &);  != nil {
		return 
	}
	for ,  := range  {
		,  := strconv.ParseUint(, 10, 32)
		if  != nil {
			return 
		}
		* = append(*, uint32())
	}
	return nil
}
Float64s is a slice of float64s that marshal as quoted strings in JSON.
type Float64s []float64

func ( *Float64s) ( []byte) error {
	* = (*)[:0]
	var  []string
	if  := json.Unmarshal(, &);  != nil {
		return 
	}
	for ,  := range  {
		,  := strconv.ParseFloat(, 64)
		if  != nil {
			return 
		}
		* = append(*, float64())
	}
	return nil
}

func ( int,  func( []byte,  int) []byte) ([]byte, error) {
	 := make([]byte, 0, 2+*10) // somewhat arbitrary
	 = append(, '[')
	for  := 0;  < ; ++ {
		if  > 0 {
			 = append(, ',')
		}
		 = append(, '"')
		 = (, )
		 = append(, '"')
	}
	 = append(, ']')
	return , nil
}

func ( Int64s) () ([]byte, error) {
	return quotedList(len(), func( []byte,  int) []byte {
		return strconv.AppendInt(, [], 10)
	})
}

func ( Int32s) () ([]byte, error) {
	return quotedList(len(), func( []byte,  int) []byte {
		return strconv.AppendInt(, int64([]), 10)
	})
}

func ( Uint64s) () ([]byte, error) {
	return quotedList(len(), func( []byte,  int) []byte {
		return strconv.AppendUint(, [], 10)
	})
}

func ( Uint32s) () ([]byte, error) {
	return quotedList(len(), func( []byte,  int) []byte {
		return strconv.AppendUint(, uint64([]), 10)
	})
}

func ( Float64s) () ([]byte, error) {
	return quotedList(len(), func( []byte,  int) []byte {
		return strconv.AppendFloat(, [], 'g', -1, 64)
	})
}
RawMessage is a raw encoded JSON value. It is identical to json.RawMessage, except it does not suffer from https://golang.org/issue/14493.
MarshalJSON returns m.
func ( RawMessage) () ([]byte, error) {
	return , nil
}
UnmarshalJSON sets *m to a copy of data.
func ( *RawMessage) ( []byte) error {
	if  == nil {
		return errors.New("googleapi.RawMessage: UnmarshalJSON on nil pointer")
	}
	* = append((*)[:0], ...)
	return nil
}
* Helper routines for simplifying the creation of optional fields of basic type.
Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.
func ( bool) *bool { return & }
Int32 is a helper routine that allocates a new int32 value to store v and returns a pointer to it.
func ( int32) *int32 { return & }
Int64 is a helper routine that allocates a new int64 value to store v and returns a pointer to it.
func ( int64) *int64 { return & }
Float64 is a helper routine that allocates a new float64 value to store v and returns a pointer to it.
func ( float64) *float64 { return & }
Uint32 is a helper routine that allocates a new uint32 value to store v and returns a pointer to it.
func ( uint32) *uint32 { return & }
Uint64 is a helper routine that allocates a new uint64 value to store v and returns a pointer to it.
func ( uint64) *uint64 { return & }
String is a helper routine that allocates a new string value to store v and returns a pointer to it.