-
Notifications
You must be signed in to change notification settings - Fork 0
/
money.go
74 lines (69 loc) · 2.86 KB
/
money.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package money
import (
"github.com/graphql-go/graphql"
"google.golang.org/genproto/googleapis/type/money"
)
// Expose Google defined ptypes as this package types
type Money = money.Money
var (
gql__type_Money *graphql.Object
gql__input_Money *graphql.InputObject
)
func Gql__type_Money() *graphql.Object {
if gql__type_Money == nil {
gql__type_Money = graphql.NewObject(graphql.ObjectConfig{
Name: "Google_type_Money",
Fields: graphql.Fields{
"currency_code": &graphql.Field{
Type: graphql.String,
Description: `The three-letter currency code defined in ISO 4217.`,
},
"units": &graphql.Field{
Type: graphql.Int,
Description: `The whole units of the amount.
For example if ` + "`" + `currencyCode` + "`" + ` is ` + "`" + `"USD"` + "`" + `, then 1 unit is one US dollar.`,
},
"nanos": &graphql.Field{
Type: graphql.Int,
Description: `Number of nano (10^-9) units of the amount.
The value must be between -999,999,999 and +999,999,999 inclusive.
If ` + "`" + `units` + "`" + ` is positive, ` + "`" + `nanos` + "`" + ` must be positive or zero.
If ` + "`" + `units` + "`" + ` is zero, ` + "`" + `nanos` + "`" + ` can be positive, zero, or negative.
If ` + "`" + `units` + "`" + ` is negative, ` + "`" + `nanos` + "`" + ` must be negative or zero.
For example $-1.75 is represented as ` + "`" + `units` + "`" + `=-1 and ` + "`" + `nanos` + "`" + `=-750,000,000.`,
},
},
Description: `Represents an amount of money with its currency type.`,
})
}
return gql__type_Money
}
func Gql__input_Money() *graphql.InputObject {
if gql__input_Money == nil {
gql__input_Money = graphql.NewInputObject(graphql.InputObjectConfig{
Name: "Google_input_Money",
Fields: graphql.InputObjectConfigFieldMap{
"currency_code": &graphql.InputObjectFieldConfig{
Type: graphql.String,
Description: `The three-letter currency code defined in ISO 4217.`,
},
"units": &graphql.InputObjectFieldConfig{
Type: graphql.Int,
Description: `The whole units of the amount.
For example if ` + "`" + `currencyCode` + "`" + ` is ` + "`" + `"USD"` + "`" + `, then 1 unit is one US dollar.`,
},
"nanos": &graphql.InputObjectFieldConfig{
Type: graphql.Int,
Description: `Number of nano (10^-9) units of the amount.
The value must be between -999,999,999 and +999,999,999 inclusive.
If ` + "`" + `units` + "`" + ` is positive, ` + "`" + `nanos` + "`" + ` must be positive or zero.
If ` + "`" + `units` + "`" + ` is zero, ` + "`" + `nanos` + "`" + ` can be positive, zero, or negative.
If ` + "`" + `units` + "`" + ` is negative, ` + "`" + `nanos` + "`" + ` must be negative or zero.
For example $-1.75 is represented as ` + "`" + `units` + "`" + `=-1 and ` + "`" + `nanos` + "`" + `=-750,000,000.`,
},
},
Description: `Represents an amount of money with its currency type.`,
})
}
return gql__input_Money
}