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.
 
 
 

281 lines
9.0 KiB

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