-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dlex.go
99 lines (86 loc) · 3.77 KB
/
Dlex.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package input
import (
"encoding/json"
"github.com/dynamicpdf-api/go-client/v2/resource"
)
// Represents a Dlex input.
type Dlex struct {
Input
}
var _ InputCollector = (*Dlex)(nil)
var _ json.Marshaler = (*Dlex)(nil)
/*
Initializes a new instance of the `DlexInput` class by posting the
DLEX file and the JSON data file or
DLEX file path that is present in the cloud environment and the JSON data file or
DLEX file path and DLEX data file path that is present in the cloud environment
from the client to the API to create the PDF report.
- @param {DlexResource} resource dlex file created as per the desired PDF report layout design.
- @param {LayoutDataResource} layoutData json data file used to create the PDF report.
*/
func NewDlexWithDlexNLayoutResources(dlexResource resource.DlexResource, layoutData resource.LayoutDataResource) *Dlex {
var p Dlex
p.inputType = p.InputType()
p.ResourceName = dlexResource.ResourceName
p.LayoutDataResourceName = layoutData.ResourceName
p.resources = append(p.resources, dlexResource.Resource)
p.resources = append(p.resources, layoutData.Resource)
return &p
}
/*
Initializes a new instance of the `DlexInput` class by posting the
DLEX file and the JSON data file or
DLEX file path that is present in the cloud environment and the JSON data file or
DLEX file path and DLEX data file path that is present in the cloud environment
from the client to the API to create the PDF report.
- @param {DlexResource} resource dlex file created as per the desired PDF report layout design.
- @param {string} The JSON data file path present in the resource manager used to create the PDF report.
*/
func NewDlexWithDlexResourceNLayoutDataPath(dlexResource resource.DlexResource, layoutData string) *Dlex {
var p Dlex
p.inputType = p.InputType()
p.ResourceName = dlexResource.ResourceName
layoutDataResource := resource.NewLayoutDataResource(layoutData, "")
p.LayoutDataResourceName = layoutDataResource.ResourceName
p.resources = append(p.resources, dlexResource.Resource)
p.resources = append(p.resources, layoutDataResource.Resource)
return &p
}
/*
Initializes a new instance of the `DlexInput` class by posting the
DLEX file and the JSON data file or
DLEX file path that is present in the cloud environment and the JSON data file or
DLEX file path and DLEX data file path that is present in the cloud environment
from the client to the API to create the PDF report.
- @param {string}The DLEX file path present in the resource manager.
- @param {LayoutDataResource} layoutData json data file used to create the PDF report.
*/
func NewDlexWithCloudResourceNLayoutData(cloudResourcePath string, layoutData resource.LayoutDataResource) *Dlex {
var p Dlex
p.inputType = p.InputType()
p.ResourceName = cloudResourcePath
p.LayoutDataResourceName = layoutData.ResourceName
p.resources = append(p.resources, layoutData.Resource)
return &p
}
/*
Initializes a new instance of the `DlexInput` class by posting the
DLEX file and the JSON data file or
DLEX file path that is present in the cloud environment and the JSON data file or
DLEX file path and DLEX data file path that is present in the cloud environment
from the client to the API to create the PDF report.
- @param {string} The DLEX file path present in the resource manager.
- @param {string} The JSON data file path present in the resource manager used to create the PDF report.
*/
func NewDlexWithCloudResourceNLayoutDataPath(cloudResourcePath string, layoutData string) *Dlex {
var p Dlex
p.inputType = p.InputType()
p.ResourceName = cloudResourcePath
layoutDataResource := resource.NewLayoutDataResource(layoutData, "")
p.LayoutDataResourceName = layoutDataResource.ResourceName
p.resources = append(p.resources, layoutDataResource.Resource)
return &p
}
func (p *Dlex) InputType() InputType {
return DlexInput
}