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.
 
 
 

279 lines
8.8 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/ads/googleads/v0/common/value.proto
  3. package common // import "google.golang.org/genproto/googleapis/ads/googleads/v0/common"
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. // Reference imports to suppress errors if they are not otherwise used.
  8. var _ = proto.Marshal
  9. var _ = fmt.Errorf
  10. var _ = math.Inf
  11. // This is a compile-time assertion to ensure that this generated file
  12. // is compatible with the proto package it is being compiled against.
  13. // A compilation error at this line likely means your copy of the
  14. // proto package needs to be updated.
  15. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  16. // A generic data container.
  17. type Value struct {
  18. // A value.
  19. //
  20. // Types that are valid to be assigned to Value:
  21. // *Value_BooleanValue
  22. // *Value_Int64Value
  23. // *Value_FloatValue
  24. // *Value_DoubleValue
  25. // *Value_StringValue
  26. Value isValue_Value `protobuf_oneof:"value"`
  27. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  28. XXX_unrecognized []byte `json:"-"`
  29. XXX_sizecache int32 `json:"-"`
  30. }
  31. func (m *Value) Reset() { *m = Value{} }
  32. func (m *Value) String() string { return proto.CompactTextString(m) }
  33. func (*Value) ProtoMessage() {}
  34. func (*Value) Descriptor() ([]byte, []int) {
  35. return fileDescriptor_value_e30ab3a0326a98f4, []int{0}
  36. }
  37. func (m *Value) XXX_Unmarshal(b []byte) error {
  38. return xxx_messageInfo_Value.Unmarshal(m, b)
  39. }
  40. func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  41. return xxx_messageInfo_Value.Marshal(b, m, deterministic)
  42. }
  43. func (dst *Value) XXX_Merge(src proto.Message) {
  44. xxx_messageInfo_Value.Merge(dst, src)
  45. }
  46. func (m *Value) XXX_Size() int {
  47. return xxx_messageInfo_Value.Size(m)
  48. }
  49. func (m *Value) XXX_DiscardUnknown() {
  50. xxx_messageInfo_Value.DiscardUnknown(m)
  51. }
  52. var xxx_messageInfo_Value proto.InternalMessageInfo
  53. type isValue_Value interface {
  54. isValue_Value()
  55. }
  56. type Value_BooleanValue struct {
  57. BooleanValue bool `protobuf:"varint,1,opt,name=boolean_value,json=booleanValue,proto3,oneof"`
  58. }
  59. type Value_Int64Value struct {
  60. Int64Value int64 `protobuf:"varint,2,opt,name=int64_value,json=int64Value,proto3,oneof"`
  61. }
  62. type Value_FloatValue struct {
  63. FloatValue float32 `protobuf:"fixed32,3,opt,name=float_value,json=floatValue,proto3,oneof"`
  64. }
  65. type Value_DoubleValue struct {
  66. DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3,oneof"`
  67. }
  68. type Value_StringValue struct {
  69. StringValue string `protobuf:"bytes,5,opt,name=string_value,json=stringValue,proto3,oneof"`
  70. }
  71. func (*Value_BooleanValue) isValue_Value() {}
  72. func (*Value_Int64Value) isValue_Value() {}
  73. func (*Value_FloatValue) isValue_Value() {}
  74. func (*Value_DoubleValue) isValue_Value() {}
  75. func (*Value_StringValue) isValue_Value() {}
  76. func (m *Value) GetValue() isValue_Value {
  77. if m != nil {
  78. return m.Value
  79. }
  80. return nil
  81. }
  82. func (m *Value) GetBooleanValue() bool {
  83. if x, ok := m.GetValue().(*Value_BooleanValue); ok {
  84. return x.BooleanValue
  85. }
  86. return false
  87. }
  88. func (m *Value) GetInt64Value() int64 {
  89. if x, ok := m.GetValue().(*Value_Int64Value); ok {
  90. return x.Int64Value
  91. }
  92. return 0
  93. }
  94. func (m *Value) GetFloatValue() float32 {
  95. if x, ok := m.GetValue().(*Value_FloatValue); ok {
  96. return x.FloatValue
  97. }
  98. return 0
  99. }
  100. func (m *Value) GetDoubleValue() float64 {
  101. if x, ok := m.GetValue().(*Value_DoubleValue); ok {
  102. return x.DoubleValue
  103. }
  104. return 0
  105. }
  106. func (m *Value) GetStringValue() string {
  107. if x, ok := m.GetValue().(*Value_StringValue); ok {
  108. return x.StringValue
  109. }
  110. return ""
  111. }
  112. // XXX_OneofFuncs is for the internal use of the proto package.
  113. func (*Value) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  114. return _Value_OneofMarshaler, _Value_OneofUnmarshaler, _Value_OneofSizer, []interface{}{
  115. (*Value_BooleanValue)(nil),
  116. (*Value_Int64Value)(nil),
  117. (*Value_FloatValue)(nil),
  118. (*Value_DoubleValue)(nil),
  119. (*Value_StringValue)(nil),
  120. }
  121. }
  122. func _Value_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  123. m := msg.(*Value)
  124. // value
  125. switch x := m.Value.(type) {
  126. case *Value_BooleanValue:
  127. t := uint64(0)
  128. if x.BooleanValue {
  129. t = 1
  130. }
  131. b.EncodeVarint(1<<3 | proto.WireVarint)
  132. b.EncodeVarint(t)
  133. case *Value_Int64Value:
  134. b.EncodeVarint(2<<3 | proto.WireVarint)
  135. b.EncodeVarint(uint64(x.Int64Value))
  136. case *Value_FloatValue:
  137. b.EncodeVarint(3<<3 | proto.WireFixed32)
  138. b.EncodeFixed32(uint64(math.Float32bits(x.FloatValue)))
  139. case *Value_DoubleValue:
  140. b.EncodeVarint(4<<3 | proto.WireFixed64)
  141. b.EncodeFixed64(math.Float64bits(x.DoubleValue))
  142. case *Value_StringValue:
  143. b.EncodeVarint(5<<3 | proto.WireBytes)
  144. b.EncodeStringBytes(x.StringValue)
  145. case nil:
  146. default:
  147. return fmt.Errorf("Value.Value has unexpected type %T", x)
  148. }
  149. return nil
  150. }
  151. func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  152. m := msg.(*Value)
  153. switch tag {
  154. case 1: // value.boolean_value
  155. if wire != proto.WireVarint {
  156. return true, proto.ErrInternalBadWireType
  157. }
  158. x, err := b.DecodeVarint()
  159. m.Value = &Value_BooleanValue{x != 0}
  160. return true, err
  161. case 2: // value.int64_value
  162. if wire != proto.WireVarint {
  163. return true, proto.ErrInternalBadWireType
  164. }
  165. x, err := b.DecodeVarint()
  166. m.Value = &Value_Int64Value{int64(x)}
  167. return true, err
  168. case 3: // value.float_value
  169. if wire != proto.WireFixed32 {
  170. return true, proto.ErrInternalBadWireType
  171. }
  172. x, err := b.DecodeFixed32()
  173. m.Value = &Value_FloatValue{math.Float32frombits(uint32(x))}
  174. return true, err
  175. case 4: // value.double_value
  176. if wire != proto.WireFixed64 {
  177. return true, proto.ErrInternalBadWireType
  178. }
  179. x, err := b.DecodeFixed64()
  180. m.Value = &Value_DoubleValue{math.Float64frombits(x)}
  181. return true, err
  182. case 5: // value.string_value
  183. if wire != proto.WireBytes {
  184. return true, proto.ErrInternalBadWireType
  185. }
  186. x, err := b.DecodeStringBytes()
  187. m.Value = &Value_StringValue{x}
  188. return true, err
  189. default:
  190. return false, nil
  191. }
  192. }
  193. func _Value_OneofSizer(msg proto.Message) (n int) {
  194. m := msg.(*Value)
  195. // value
  196. switch x := m.Value.(type) {
  197. case *Value_BooleanValue:
  198. n += 1 // tag and wire
  199. n += 1
  200. case *Value_Int64Value:
  201. n += 1 // tag and wire
  202. n += proto.SizeVarint(uint64(x.Int64Value))
  203. case *Value_FloatValue:
  204. n += 1 // tag and wire
  205. n += 4
  206. case *Value_DoubleValue:
  207. n += 1 // tag and wire
  208. n += 8
  209. case *Value_StringValue:
  210. n += 1 // tag and wire
  211. n += proto.SizeVarint(uint64(len(x.StringValue)))
  212. n += len(x.StringValue)
  213. case nil:
  214. default:
  215. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  216. }
  217. return n
  218. }
  219. func init() {
  220. proto.RegisterType((*Value)(nil), "google.ads.googleads.v0.common.Value")
  221. }
  222. func init() {
  223. proto.RegisterFile("google/ads/googleads/v0/common/value.proto", fileDescriptor_value_e30ab3a0326a98f4)
  224. }
  225. var fileDescriptor_value_e30ab3a0326a98f4 = []byte{
  226. // 312 bytes of a gzipped FileDescriptorProto
  227. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0xd0, 0xb1, 0x4e, 0xeb, 0x30,
  228. 0x18, 0x05, 0xe0, 0x3a, 0xbd, 0xbd, 0x80, 0x5b, 0x96, 0x4e, 0x4c, 0x55, 0x28, 0x42, 0x8a, 0x18,
  229. 0x9c, 0x48, 0x20, 0x06, 0x33, 0xa5, 0x20, 0xb5, 0x63, 0xd5, 0x21, 0x03, 0x8a, 0x84, 0xdc, 0x3a,
  230. 0x58, 0x95, 0x5c, 0xff, 0x55, 0x9c, 0xe6, 0x81, 0x18, 0x79, 0x11, 0x24, 0xde, 0x83, 0x85, 0xa7,
  231. 0x40, 0xf6, 0xef, 0x66, 0x83, 0x29, 0x47, 0x27, 0x5f, 0xac, 0xf8, 0xd0, 0x1b, 0x05, 0xa0, 0x74,
  232. 0x95, 0x0a, 0x69, 0x53, 0x8c, 0x2e, 0xb5, 0x59, 0xba, 0x81, 0xdd, 0x0e, 0x4c, 0xda, 0x0a, 0x7d,
  233. 0xa8, 0xd8, 0xbe, 0x86, 0x06, 0xc6, 0x13, 0x04, 0x4c, 0x48, 0xcb, 0x3a, 0xcb, 0xda, 0x8c, 0xa1,
  234. 0x9d, 0x7e, 0x10, 0x3a, 0x28, 0x9c, 0x1f, 0x5f, 0xd3, 0xf3, 0x35, 0x80, 0xae, 0x84, 0x79, 0xf1,
  235. 0x07, 0x5c, 0x90, 0x98, 0x24, 0xa7, 0x8b, 0xde, 0x6a, 0x14, 0x6a, 0x64, 0x97, 0x74, 0xb8, 0x35,
  236. 0xcd, 0xfd, 0x5d, 0x40, 0x51, 0x4c, 0x92, 0xfe, 0xa2, 0xb7, 0xa2, 0xbe, 0xec, 0xc8, 0xab, 0x06,
  237. 0xd1, 0x04, 0xd2, 0x8f, 0x49, 0x12, 0x39, 0xe2, 0x4b, 0x24, 0x57, 0x74, 0x24, 0xe1, 0xb0, 0xd6,
  238. 0x55, 0x30, 0xff, 0x62, 0x92, 0x90, 0x45, 0x6f, 0x35, 0xc4, 0xb6, 0x43, 0xb6, 0xa9, 0xb7, 0x46,
  239. 0x05, 0x34, 0x88, 0x49, 0x72, 0xe6, 0x10, 0xb6, 0x1e, 0xcd, 0x4e, 0xe8, 0xc0, 0xbf, 0x9d, 0x7d,
  240. 0x11, 0x3a, 0xdd, 0xc0, 0x8e, 0xfd, 0x7d, 0xe1, 0x19, 0xf5, 0x9f, 0x2d, 0xdd, 0x38, 0x4b, 0xf2,
  241. 0xfc, 0x14, 0xb4, 0x02, 0x2d, 0x8c, 0x62, 0x50, 0xab, 0x54, 0x55, 0xc6, 0x4f, 0x77, 0x9c, 0x76,
  242. 0xbf, 0xb5, 0xbf, 0x2d, 0xfd, 0x80, 0x8f, 0xb7, 0xa8, 0x3f, 0xcf, 0xf3, 0xf7, 0x68, 0x32, 0xc7,
  243. 0xc3, 0x72, 0x69, 0x19, 0x46, 0x97, 0x8a, 0x8c, 0x3d, 0x7a, 0xf6, 0x79, 0x04, 0x65, 0x2e, 0x6d,
  244. 0xd9, 0x81, 0xb2, 0xc8, 0x4a, 0x04, 0xdf, 0xd1, 0x14, 0x5b, 0xce, 0x73, 0x69, 0x39, 0xef, 0x08,
  245. 0xe7, 0x45, 0xc6, 0x39, 0xa2, 0xf5, 0x7f, 0xff, 0x77, 0xb7, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff,
  246. 0x4b, 0x32, 0x5e, 0xdf, 0x06, 0x02, 0x00, 0x00,
  247. }