verify.go raw
1 /**
2 * Copyright 2016-2024 IBM Corp.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5 * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 *
7 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
8 * on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 * See the License for the specific language governing permissions and limitations under the License.
10 */
11
12 // AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
13
14 package services
15
16 import (
17 "fmt"
18 "strings"
19
20 "github.com/softlayer/softlayer-go/datatypes"
21 "github.com/softlayer/softlayer-go/session"
22 "github.com/softlayer/softlayer-go/sl"
23 )
24
25 // no documentation yet
26 type Verify_Api_HttpObj struct {
27 Session session.SLSession
28 Options sl.Options
29 }
30
31 // GetVerifyApiHttpObjService returns an instance of the Verify_Api_HttpObj SoftLayer service
32 func GetVerifyApiHttpObjService(sess session.SLSession) Verify_Api_HttpObj {
33 return Verify_Api_HttpObj{Session: sess}
34 }
35
36 func (r Verify_Api_HttpObj) Id(id int) Verify_Api_HttpObj {
37 r.Options.Id = &id
38 return r
39 }
40
41 func (r Verify_Api_HttpObj) Mask(mask string) Verify_Api_HttpObj {
42 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
43 mask = fmt.Sprintf("mask[%s]", mask)
44 }
45
46 r.Options.Mask = mask
47 return r
48 }
49
50 func (r Verify_Api_HttpObj) Filter(filter string) Verify_Api_HttpObj {
51 r.Options.Filter = filter
52 return r
53 }
54
55 func (r Verify_Api_HttpObj) Limit(limit int) Verify_Api_HttpObj {
56 r.Options.Limit = &limit
57 return r
58 }
59
60 func (r Verify_Api_HttpObj) Offset(offset int) Verify_Api_HttpObj {
61 r.Options.Offset = &offset
62 return r
63 }
64
65 // no documentation yet
66 func (r Verify_Api_HttpObj) CreateObject(templateObject *datatypes.Verify_Api_HttpObj) (resp datatypes.Verify_Api_HttpObj, err error) {
67 params := []interface{}{
68 templateObject,
69 }
70 err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpObj", "createObject", params, &r.Options, &resp)
71 return
72 }
73
74 // no documentation yet
75 func (r Verify_Api_HttpObj) DeleteObject() (resp bool, err error) {
76 err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpObj", "deleteObject", nil, &r.Options, &resp)
77 return
78 }
79
80 // no documentation yet
81 func (r Verify_Api_HttpObj) GetAllObjects() (resp []datatypes.Verify_Api_HttpObj, err error) {
82 err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpObj", "getAllObjects", nil, &r.Options, &resp)
83 return
84 }
85
86 // no documentation yet
87 func (r Verify_Api_HttpObj) GetObject() (resp datatypes.Verify_Api_HttpObj, err error) {
88 err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpObj", "getObject", nil, &r.Options, &resp)
89 return
90 }
91
92 // no documentation yet
93 type Verify_Api_HttpsObj struct {
94 Session session.SLSession
95 Options sl.Options
96 }
97
98 // GetVerifyApiHttpsObjService returns an instance of the Verify_Api_HttpsObj SoftLayer service
99 func GetVerifyApiHttpsObjService(sess session.SLSession) Verify_Api_HttpsObj {
100 return Verify_Api_HttpsObj{Session: sess}
101 }
102
103 func (r Verify_Api_HttpsObj) Id(id int) Verify_Api_HttpsObj {
104 r.Options.Id = &id
105 return r
106 }
107
108 func (r Verify_Api_HttpsObj) Mask(mask string) Verify_Api_HttpsObj {
109 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
110 mask = fmt.Sprintf("mask[%s]", mask)
111 }
112
113 r.Options.Mask = mask
114 return r
115 }
116
117 func (r Verify_Api_HttpsObj) Filter(filter string) Verify_Api_HttpsObj {
118 r.Options.Filter = filter
119 return r
120 }
121
122 func (r Verify_Api_HttpsObj) Limit(limit int) Verify_Api_HttpsObj {
123 r.Options.Limit = &limit
124 return r
125 }
126
127 func (r Verify_Api_HttpsObj) Offset(offset int) Verify_Api_HttpsObj {
128 r.Options.Offset = &offset
129 return r
130 }
131
132 // no documentation yet
133 func (r Verify_Api_HttpsObj) CreateObject(templateObject *datatypes.Verify_Api_HttpsObj) (resp datatypes.Verify_Api_HttpsObj, err error) {
134 params := []interface{}{
135 templateObject,
136 }
137 err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpsObj", "createObject", params, &r.Options, &resp)
138 return
139 }
140
141 // no documentation yet
142 func (r Verify_Api_HttpsObj) DeleteObject() (resp bool, err error) {
143 err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpsObj", "deleteObject", nil, &r.Options, &resp)
144 return
145 }
146
147 // no documentation yet
148 func (r Verify_Api_HttpsObj) GetAllObjects() (resp []datatypes.Verify_Api_HttpsObj, err error) {
149 err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpsObj", "getAllObjects", nil, &r.Options, &resp)
150 return
151 }
152
153 // no documentation yet
154 func (r Verify_Api_HttpsObj) GetObject() (resp datatypes.Verify_Api_HttpsObj, err error) {
155 err = r.Session.DoRequest("SoftLayer_Verify_Api_HttpsObj", "getObject", nil, &r.Options, &resp)
156 return
157 }
158